Debian Codegraph @

gi/pygi-cache-private.h

raw
1 /* -*- Mode: C; c-basic-offset: 4 -*-
2 * vim: tabstop=4 shiftwidth=4 expandtab
3 *
4 * Copyright (C) 2014 Simon Feltman <[email protected]>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef __PYGI_CACHE_PRIVATE_H__
21 #define __PYGI_CACHE_PRIVATE_H__
22
23 #include "pygi-cache.h"
24
25 G_BEGIN_DECLS
26
27
28 PyGIArgCache *pygi_arg_cache_alloc (void);
29
30 PyGIArgCache *pygi_arg_cache_new (GITypeInfo *type_info, GIArgInfo *arg_info,
31 GITransfer transfer, PyGIDirection direction,
32 PyGICallableCache *callable_cache,
33 gssize c_arg_index, gssize py_arg_index);
34
35 void pygi_arg_cache_free (PyGIArgCache *cache);
36
37 void pygi_arg_base_setup (
38 PyGIArgCache *arg_cache, GITypeInfo *type_info,
39 GIArgInfo *arg_info, /* may be NULL for return arguments */
40 GITransfer transfer, PyGIDirection direction);
41
42 gboolean pygi_arg_sequence_setup (
43 PyGISequenceCache *seq_cache, GITypeInfo *type_info,
44 GIArgInfo *arg_info, /* may be NULL for return arguments */
45 GITransfer transfer, PyGIDirection direction,
46 PyGICallableCache *callable_cache);
47
48 PyGIArgCache *pygi_arg_void_type_new_from_info (
49 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
50 GITransfer transfer, PyGIDirection direction);
51
52 PyGIArgCache *pygi_arg_numeric_type_new_from_info (
53 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
54 GITransfer transfer, PyGIDirection direction);
55
56 PyGIArgCache *pygi_arg_string_type_new_from_info (
57 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
58 GITransfer transfer, PyGIDirection direction);
59
60 PyGIArgCache *pygi_arg_enum_new_from_info (
61 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
62 GITransfer transfer, PyGIDirection direction, GIEnumInfo *iface_info);
63
64 PyGIArgCache *pygi_arg_flags_new_from_info (
65 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
66 GITransfer transfer, PyGIDirection direction, GIFlagsInfo *iface_info);
67
68 PyGIArgCache *pygi_arg_struct_new_from_info (
69 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
70 GITransfer transfer, PyGIDirection direction,
71 GIRegisteredTypeInfo *iface_info);
72
73 PyGIArgCache *pygi_arg_interface_new_from_info (
74 GITypeInfo *type_info,
75 GIArgInfo *arg_info, /* may be NULL for return arguments */
76 GITransfer transfer, PyGIDirection direction,
77 GIRegisteredTypeInfo *iface_info);
78
79 PyGIArgCache *pygi_arg_callback_new_from_info (
80 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
81 GITransfer transfer, PyGIDirection direction, GICallbackInfo *iface_info,
82 PyGICallableCache *callable_cache);
83
84 PyGIArgCache *pygi_arg_gobject_new_from_info (
85 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
86 GITransfer transfer, PyGIDirection direction,
87 GIRegisteredTypeInfo *iface_info, PyGICallableCache *callable_cache);
88
89 PyGIArgCache *pygi_arg_glist_new_from_info (
90 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
91 GITransfer transfer, PyGIDirection direction,
92 PyGICallableCache *callable_cache);
93
94 PyGIArgCache *pygi_arg_gslist_new_from_info (
95 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
96 GITransfer transfer, PyGIDirection direction,
97 PyGICallableCache *callable_cache);
98
99 PyGIArgCache *pygi_arg_hash_table_new_from_info (
100 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
101 GITransfer transfer, PyGIDirection direction,
102 PyGICallableCache *callable_cache);
103
104 PyGIArgCache *pygi_arg_garray_new_from_info (
105 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
106 GITransfer transfer, PyGIDirection direction,
107 PyGICallableCache *callable_cache, gssize arg_index, gssize *py_arg_index);
108
109 PyGIArgCache *pygi_arg_gerror_new_from_info (
110 GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
111 GITransfer transfer, PyGIDirection direction);
112
113
114 gboolean pygi_marshal_from_py_basic_type_cache_adapter (
115 PyGIInvokeState *state, PyGICallableCache *callable_cache,
116 PyGIArgCache *arg_cache, PyObject *py_arg, GIArgument *arg,
117 gpointer *cleanup_data);
118
119 PyObject *pygi_marshal_to_py_basic_type_cache_adapter (
120 PyGIInvokeState *state, PyGICallableCache *callable_cache,
121 PyGIArgCache *arg_cache, GIArgument *arg, gpointer *cleanup_data);
122
123
124 /* Needed for hack in pygi-cache-array.c */
125 void pygi_arg_gvalue_from_py_cleanup (PyGIInvokeState *state,
126 PyGIArgCache *arg_cache,
127 PyObject *py_arg, gpointer data,
128 gboolean was_processed);
129
130 G_END_DECLS
131
132 #endif /*__PYGI_CACHE_PRIVATE_H__*/