| 1 |
/* -*- Mode: C; c-basic-offset: 4 -*- |
| 2 |
* vim: tabstop=4 shiftwidth=4 expandtab |
| 3 |
* |
| 4 |
* Copyright (C) 2005-2009 Johan Dahlin <[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_INFO_H__ |
| 21 |
#define __PYGI_INFO_H__ |
| 22 |
|
| 23 |
#include "pygi-cache.h" |
| 24 |
|
| 25 |
G_BEGIN_DECLS |
| 26 |
|
| 27 |
typedef struct { |
| 28 |
PyObject_HEAD |
| 29 |
GIBaseInfo *info; |
| 30 |
PyObject *inst_weakreflist; |
| 31 |
} PyGIBaseInfo; |
| 32 |
|
| 33 |
typedef struct { |
| 34 |
PyGIBaseInfo base; |
| 35 |
PyGIFunctionCache *cache; |
| 36 |
vectorcallfunc vectorcall; |
| 37 |
} PyGICallableInfo; |
| 38 |
|
| 39 |
|
| 40 |
PyGIFunctionCache *pygi_callable_info_get_cache (PyGICallableInfo *self); |
| 41 |
|
| 42 |
gboolean pygi_gi_struct_info_is_simple (GIStructInfo *struct_info); |
| 43 |
|
| 44 |
|
| 45 |
/* Private */ |
| 46 |
|
| 47 |
extern PyTypeObject PyGIBaseInfo_Type; |
| 48 |
extern PyTypeObject PyGICallableInfo_Type; |
| 49 |
extern PyTypeObject PyGICallbackInfo_Type; |
| 50 |
extern PyTypeObject PyGIFunctionInfo_Type; |
| 51 |
extern PyTypeObject PyGIRegisteredTypeInfo_Type; |
| 52 |
extern PyTypeObject PyGIStructInfo_Type; |
| 53 |
extern PyTypeObject PyGIEnumInfo_Type; |
| 54 |
extern PyTypeObject PyGIObjectInfo_Type; |
| 55 |
extern PyTypeObject PyGIInterfaceInfo_Type; |
| 56 |
extern PyTypeObject PyGIConstantInfo_Type; |
| 57 |
extern PyTypeObject PyGIValueInfo_Type; |
| 58 |
extern PyTypeObject PyGIFieldInfo_Type; |
| 59 |
extern PyTypeObject PyGIUnresolvedInfo_Type; |
| 60 |
extern PyTypeObject PyGIVFuncInfo_Type; |
| 61 |
extern PyTypeObject PyGIUnionInfo_Type; |
| 62 |
extern PyTypeObject PyGIBoxedInfo_Type; |
| 63 |
extern PyTypeObject PyGIFundamental_Type; |
| 64 |
extern PyTypeObject PyGIErrorDomainInfo_Type; |
| 65 |
extern PyTypeObject PyGISignalInfo_Type; |
| 66 |
extern PyTypeObject PyGIPropertyInfo_Type; |
| 67 |
extern PyTypeObject PyGIArgInfo_Type; |
| 68 |
extern PyTypeObject PyGITypeInfo_Type; |
| 69 |
|
| 70 |
PyObject *_pygi_info_new (GIBaseInfo *info); |
| 71 |
GIBaseInfo *_pygi_object_get_gi_info (PyObject *object, PyTypeObject *type); |
| 72 |
|
| 73 |
gchar *_pygi_gi_base_info_get_fullname (GIBaseInfo *info); |
| 74 |
|
| 75 |
gsize _pygi_g_type_tag_size (GITypeTag type_tag); |
| 76 |
gsize _pygi_gi_type_info_size (GITypeInfo *type_info); |
| 77 |
|
| 78 |
int pygi_info_register_types (PyObject *m); |
| 79 |
|
| 80 |
G_END_DECLS |
| 81 |
|
| 82 |
#endif /* __PYGI_INFO_H__ */ |