a0c668055a56c03f3375012cc0d0e1a392429e53
[platform/upstream/python-gobject.git] / gi / pygi-info.h
1 /* -*- Mode: C; c-basic-offset: 4 -*-
2  * vim: tabstop=4 shiftwidth=4 expandtab
3  *
4  * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
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_INFO_H__
21 #define __PYGI_INFO_H__
22
23 #include <Python.h>
24
25 #include <girepository.h>
26
27 G_BEGIN_DECLS
28
29 gboolean pygi_g_struct_info_is_simple (GIStructInfo *struct_info);
30
31
32 /* Private */
33
34 extern PyTypeObject PyGIBaseInfo_Type;
35 extern PyTypeObject PyGICallableInfo_Type;
36 extern PyTypeObject PyGICallbackInfo_Type;
37 extern PyTypeObject PyGIFunctionInfo_Type;
38 extern PyTypeObject PyGIRegisteredTypeInfo_Type;
39 extern PyTypeObject PyGIStructInfo_Type;
40 extern PyTypeObject PyGIEnumInfo_Type;
41 extern PyTypeObject PyGIObjectInfo_Type;
42 extern PyTypeObject PyGIInterfaceInfo_Type;
43 extern PyTypeObject PyGIConstantInfo_Type;
44 extern PyTypeObject PyGIValueInfo_Type;
45 extern PyTypeObject PyGIFieldInfo_Type;
46 extern PyTypeObject PyGIUnresolvedInfo_Type;
47 extern PyTypeObject PyGIVFuncInfo_Type;
48 extern PyTypeObject PyGIUnionInfo_Type;
49 extern PyTypeObject PyGIBoxedInfo_Type;
50 extern PyTypeObject PyGIErrorDomainInfo_Type;
51 extern PyTypeObject PyGISignalInfo_Type;
52 extern PyTypeObject PyGIPropertyInfo_Type;
53 extern PyTypeObject PyGIArgInfo_Type;
54 extern PyTypeObject PyGITypeInfo_Type;
55
56 #define PyGIBaseInfo_GET_GI_INFO(object) g_base_info_ref(((PyGIBaseInfo *)object)->info)
57
58 PyObject* _pygi_info_new (GIBaseInfo *info);
59 GIBaseInfo* _pygi_object_get_gi_info (PyObject     *object,
60                                       PyTypeObject *type);
61
62 gchar* _pygi_g_base_info_get_fullname (GIBaseInfo *info);
63
64 gsize _pygi_g_type_tag_size (GITypeTag type_tag);
65 gsize _pygi_g_type_info_size (GITypeInfo *type_info);
66
67 void _pygi_info_register_types (PyObject *m);
68
69 gboolean _pygi_is_python_keyword (const gchar *name);
70
71 G_END_DECLS
72
73 #endif /* __PYGI_INFO_H__ */