1 /* -*- Mode: C; c-basic-offset: 4 -*-
2 * vim: tabstop=4 shiftwidth=4 expandtab
4 * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
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.
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.
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/>.
20 #ifndef __PYGI_INFO_H__
21 #define __PYGI_INFO_H__
25 #include <girepository.h>
26 #include "pygi-cache.h"
33 PyObject
*inst_weakreflist
;
34 PyGICallableCache
*cache
;
40 /* Reference the unbound version of this struct.
41 * We use this for the actual call to invoke because it manages the cache.
43 struct PyGICallableInfo
*py_unbound_info
;
45 /* Holds bound argument for instance, class, and vfunc methods. */
46 PyObject
*py_bound_arg
;
51 gboolean
pygi_g_struct_info_is_simple (GIStructInfo
*struct_info
);
56 extern PyTypeObject PyGIBaseInfo_Type
;
57 extern PyTypeObject PyGICallableInfo_Type
;
58 extern PyTypeObject PyGICallbackInfo_Type
;
59 extern PyTypeObject PyGIFunctionInfo_Type
;
60 extern PyTypeObject PyGIRegisteredTypeInfo_Type
;
61 extern PyTypeObject PyGIStructInfo_Type
;
62 extern PyTypeObject PyGIEnumInfo_Type
;
63 extern PyTypeObject PyGIObjectInfo_Type
;
64 extern PyTypeObject PyGIInterfaceInfo_Type
;
65 extern PyTypeObject PyGIConstantInfo_Type
;
66 extern PyTypeObject PyGIValueInfo_Type
;
67 extern PyTypeObject PyGIFieldInfo_Type
;
68 extern PyTypeObject PyGIUnresolvedInfo_Type
;
69 extern PyTypeObject PyGIVFuncInfo_Type
;
70 extern PyTypeObject PyGIUnionInfo_Type
;
71 extern PyTypeObject PyGIBoxedInfo_Type
;
72 extern PyTypeObject PyGIErrorDomainInfo_Type
;
73 extern PyTypeObject PyGISignalInfo_Type
;
74 extern PyTypeObject PyGIPropertyInfo_Type
;
75 extern PyTypeObject PyGIArgInfo_Type
;
76 extern PyTypeObject PyGITypeInfo_Type
;
78 #define PyGIBaseInfo_GET_GI_INFO(object) g_base_info_ref(((PyGIBaseInfo *)object)->info)
80 PyObject
* _pygi_info_new (GIBaseInfo
*info
);
81 GIBaseInfo
* _pygi_object_get_gi_info (PyObject
*object
,
84 gchar
* _pygi_g_base_info_get_fullname (GIBaseInfo
*info
);
86 gsize
_pygi_g_type_tag_size (GITypeTag type_tag
);
87 gsize
_pygi_g_type_info_size (GITypeInfo
*type_info
);
89 void _pygi_info_register_types (PyObject
*m
);
91 gboolean
_pygi_is_python_keyword (const gchar
*name
);
95 #endif /* __PYGI_INFO_H__ */