tests: Remove TestMainLoop.test_concurrency
[pygobject.git] / gi / pygi-closure.h
blobc0e842195b85230a6936674183653442f290d555
1 /* -*- Mode: C; c-basic-offset: 4 -*-
2 * vim: tabstop=4 shiftwidth=4 expandtab
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 #ifndef __PYGI_CLOSURE_H__
19 #define __PYGI_CLOSURE_H__
21 #include <Python.h>
22 #include <girffi.h>
23 #include <ffi.h>
25 #include "pygi-cache.h"
27 G_BEGIN_DECLS
30 /* Private */
32 typedef struct _PyGICClosure
34 GICallableInfo *info;
35 PyObject *function;
37 ffi_closure *closure;
38 ffi_cif cif;
40 GIScopeType scope;
42 PyObject* user_data;
44 PyGIClosureCache *cache;
45 } PyGICClosure;
47 void _pygi_closure_handle (ffi_cif *cif, void *result, void
48 **args, void *userdata);
50 void _pygi_invoke_closure_free (gpointer user_data);
52 PyGICClosure* _pygi_make_native_closure (GICallableInfo* info,
53 GIScopeType scope,
54 PyObject *function,
55 gpointer user_data);
57 PyGIArgCache *pygi_arg_callback_new_from_info (GITypeInfo *type_info,
58 GIArgInfo *arg_info, /* may be null */
59 GITransfer transfer,
60 PyGIDirection direction,
61 GIInterfaceInfo *iface_info,
62 PyGICallableCache *callable_cache);
64 G_END_DECLS
66 #endif /* __PYGI_CLOSURE_H__ */