Imported Upstream version 3.7.3
[platform/upstream/python-gobject.git] / gi / pygi-invoke-state-struct.h
1 #ifndef __PYGI_INVOKE_STATE_STRUCT_H__
2 #define __PYGI_INVOKE_STATE_STRUCT_H__
3
4 #include <Python.h>
5
6 #include <girepository.h>
7
8 G_BEGIN_DECLS
9
10 typedef struct _PyGIInvokeState
11 {
12     PyObject *py_in_args;
13     gssize n_py_in_args;
14     gssize current_arg;
15
16     GType implementor_gtype;
17
18     GIArgument **args;
19     GIArgument *in_args;
20
21     /* Generic array allocated to the same length as args
22      * for use as extra per-arg state data. */
23     gpointer *args_data;
24
25     /* Out args and out values
26      * In order to pass a parameter and get something back out in C
27      * we need to pass a pointer to the value, e.g.
28      *    int *out_integer;
29      *
30      * so while out_args == out_integer, out_value == *out_integer
31      * or in other words out_args = &out_values
32      *
33      * We do all of our processing on out_values but we pass out_args to 
34      * the actual function.
35      */
36     GIArgument *out_args;
37     GIArgument *out_values;
38
39     GIArgument return_arg;
40
41     GError *error;
42
43     gboolean failed;
44
45     gpointer user_data;
46 } PyGIInvokeState;
47
48 G_END_DECLS
49
50 #endif