f5a3d3e52230ade1a10008e0eb54b5ff3567ee48
[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     /* Out args and out values
22      * In order to pass a parameter and get something back out in C
23      * we need to pass a pointer to the value, e.g.
24      *    int *out_integer;
25      *
26      * so while out_args == out_integer, out_value == *out_integer
27      * or in other words out_args = &out_values
28      *
29      * We do all of our processing on out_values but we pass out_args to 
30      * the actual function.
31      */
32     GIArgument *out_args;
33     GIArgument *out_values;
34
35     GIArgument return_arg;
36
37     GError *error;
38
39     gboolean failed;
40
41     gpointer user_data;
42 } PyGIInvokeState;
43
44 G_END_DECLS
45
46 #endif