93cf126ac0dd8e698d07ee62ae51653fd18c6be0
[gnome.gobject-introspection] / girepository / girepository.h
1 /* GObject introspection: Repository
2  *
3  * Copyright (C) 2005 Matthias Clasen
4  * Copyright (C) 2008,2009 Red Hat, Inc.
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 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, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __G_IREPOSITORY_H__
23 #define __G_IREPOSITORY_H__
24
25 #include <glib-object.h>
26 #include <gmodule.h>
27
28 G_BEGIN_DECLS
29
30 #define G_TYPE_IREPOSITORY              (g_irepository_get_type ())
31 #define G_IREPOSITORY(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_IREPOSITORY, GIRepository))
32 #define G_IREPOSITORY_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_IREPOSITORY, GIRepositoryClass))
33 #define G_IS_IREPOSITORY(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_IREPOSITORY))
34 #define G_IS_IREPOSITORY_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), G_TYPE_IREPOSITORY))
35 #define G_IREPOSITORY_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_IREPOSITORY, GIRepositoryClass))
36
37 typedef struct _GIRepository         GIRepository; 
38 typedef struct _GIRepositoryClass    GIRepositoryClass; 
39 typedef struct _GIRepositoryPrivate  GIRepositoryPrivate; 
40
41 typedef struct _GIBaseInfoStub       GIBaseInfo;
42
43 struct _GIBaseInfoStub {
44   gint32 dummy1;
45   gint32 dummy2;
46   gpointer dummy3;
47   gpointer dummy4;
48   gpointer dummy5;
49   guint32  dummy6;
50   guint32  dummy7;
51   gpointer padding[4];
52 };
53
54 typedef GIBaseInfo GICallableInfo;
55 typedef GIBaseInfo GIFunctionInfo;
56 typedef GIBaseInfo GICallbackInfo;
57 typedef GIBaseInfo GIRegisteredTypeInfo;
58 typedef GIBaseInfo GIStructInfo;
59 typedef GIBaseInfo GIUnionInfo;
60 typedef GIBaseInfo GIEnumInfo;
61 typedef GIBaseInfo GIObjectInfo;
62 typedef GIBaseInfo GIInterfaceInfo;
63 typedef GIBaseInfo GIConstantInfo;
64 typedef GIBaseInfo GIValueInfo;
65 typedef GIBaseInfo GISignalInfo;
66 typedef GIBaseInfo GIVFuncInfo;
67 typedef GIBaseInfo GIPropertyInfo;
68 typedef GIBaseInfo GIFieldInfo;
69 typedef GIBaseInfo GIArgInfo;
70 typedef GIBaseInfo GITypeInfo;
71 typedef GIBaseInfo GIErrorDomainInfo;
72
73 typedef struct _GIUnresolvedInfo     GIUnresolvedInfo;
74 typedef struct _GTypelib            GTypelib;
75
76 struct _GIRepository 
77
78   GObject parent;
79
80   /*< private >*/
81   GIRepositoryPrivate *priv;
82 };
83
84 struct _GIRepositoryClass
85
86   GObjectClass parent; 
87 };
88
89 typedef enum
90 {
91   G_IREPOSITORY_LOAD_FLAG_LAZY = 1 << 0
92 } GIRepositoryLoadFlags;
93
94 /* Repository */
95
96 GType         g_irepository_get_type      (void) G_GNUC_CONST;
97 GIRepository *g_irepository_get_default   (void);
98 void          g_irepository_prepend_search_path (const char *directory);
99 GSList *      g_irepository_get_search_path     (void);
100 const char *  g_irepository_load_typelib  (GIRepository *repository,
101                                            GTypelib     *typelib,
102                                            GIRepositoryLoadFlags flags,
103                                            GError      **error);
104 gboolean      g_irepository_is_registered (GIRepository *repository,
105                                            const gchar  *namespace_,
106                                            const gchar  *version);
107 GIBaseInfo *  g_irepository_find_by_name  (GIRepository *repository,
108                                            const gchar  *namespace_,
109                                            const gchar  *name);
110 GTypelib *    g_irepository_require       (GIRepository *repository,
111                                            const gchar  *namespace_,
112                                            const gchar  *version,
113                                            GIRepositoryLoadFlags flags,
114                                            GError      **error);
115 gchar      ** g_irepository_get_dependencies (GIRepository *repository,
116                                               const gchar  *namespace_);
117 gchar      ** g_irepository_get_loaded_namespaces (GIRepository *repository);
118 GIBaseInfo *  g_irepository_find_by_gtype (GIRepository *repository,
119                                            GType         gtype);
120 gint          g_irepository_get_n_infos   (GIRepository *repository,
121                                            const gchar  *namespace_);
122 GIBaseInfo *  g_irepository_get_info      (GIRepository *repository,
123                                            const gchar  *namespace_,
124                                            gint          index);
125 const gchar * g_irepository_get_typelib_path   (GIRepository *repository,
126                                                 const gchar  *namespace_);
127 const gchar * g_irepository_get_shared_library (GIRepository *repository,
128                                                 const gchar  *namespace_);
129 const gchar * g_irepository_get_c_prefix (GIRepository *repository,
130                                           const gchar  *namespace_);
131 const gchar * g_irepository_get_version (GIRepository *repository,
132                                          const gchar  *namespace_);
133
134 GOptionGroup * g_irepository_get_option_group (void);
135
136 gboolean       g_irepository_dump  (const char *arg, GError **error);
137
138 /* Typelib */
139
140 GTypelib *   g_typelib_new_from_memory       (guchar       *memory,
141                                                 gsize         len);
142 GTypelib *   g_typelib_new_from_const_memory (const guchar *memory,
143                                                 gsize         len);
144 GTypelib *   g_typelib_new_from_mapped_file  (GMappedFile  *mfile);
145 void          g_typelib_free                  (GTypelib    *typelib);
146
147 gboolean      g_typelib_symbol                (GTypelib    *typelib,
148                                                const gchar *symbol_name,
149                                                gpointer    *symbol);
150 const gchar * g_typelib_get_namespace         (GTypelib    *typelib);
151
152 typedef enum
153 {
154   G_IREPOSITORY_ERROR_TYPELIB_NOT_FOUND,
155   G_IREPOSITORY_ERROR_NAMESPACE_MISMATCH,
156   G_IREPOSITORY_ERROR_NAMESPACE_VERSION_CONFLICT,
157   G_IREPOSITORY_ERROR_LIBRARY_NOT_FOUND
158 } GIRepositoryError;
159
160 #define G_IREPOSITORY_ERROR (g_irepository_error_quark ())
161
162 GQuark g_irepository_error_quark (void);
163
164
165 /* Global utility functions */
166
167 void gi_cclosure_marshal_generic (GClosure       *closure,
168                                   GValue         *return_gvalue,
169                                   guint           n_param_values,
170                                   const GValue   *param_values,
171                                   gpointer        invocation_hint,
172                                   gpointer        marshal_data);
173
174 /* Types of objects registered in the repository */
175
176 typedef enum 
177 {
178   GI_INFO_TYPE_INVALID,
179   GI_INFO_TYPE_FUNCTION,
180   GI_INFO_TYPE_CALLBACK,
181   GI_INFO_TYPE_STRUCT,
182   GI_INFO_TYPE_BOXED,
183   GI_INFO_TYPE_ENUM,         /*  5 */
184   GI_INFO_TYPE_FLAGS,
185   GI_INFO_TYPE_OBJECT,
186   GI_INFO_TYPE_INTERFACE,
187   GI_INFO_TYPE_CONSTANT,
188   GI_INFO_TYPE_ERROR_DOMAIN, /* 10 */
189   GI_INFO_TYPE_UNION,
190   GI_INFO_TYPE_VALUE,
191   GI_INFO_TYPE_SIGNAL,
192   GI_INFO_TYPE_VFUNC,
193   GI_INFO_TYPE_PROPERTY,     /* 15 */
194   GI_INFO_TYPE_FIELD,
195   GI_INFO_TYPE_ARG,
196   GI_INFO_TYPE_TYPE,
197   GI_INFO_TYPE_UNRESOLVED
198 } GIInfoType;
199
200
201 /* GIBaseInfo */
202
203 typedef struct {
204   gpointer data;
205   gpointer data2;
206   gpointer data3;
207   gpointer data4;
208 } GIAttributeIter;
209
210 GIBaseInfo *           g_base_info_ref              (GIBaseInfo   *info);
211 void                   g_base_info_unref            (GIBaseInfo   *info);
212 GIInfoType             g_base_info_get_type         (GIBaseInfo   *info);
213 const gchar *          g_base_info_get_name         (GIBaseInfo   *info);
214 const gchar *          g_base_info_get_namespace    (GIBaseInfo   *info);
215 gboolean               g_base_info_is_deprecated    (GIBaseInfo   *info);
216 const gchar *          g_base_info_get_attribute    (GIBaseInfo   *info,
217                                                      const gchar  *name);
218 gboolean               g_base_info_iterate_attributes (GIBaseInfo      *info,
219                                                        GIAttributeIter *iterator,
220                                                        char           **name,
221                                                        char          **value);
222 GIBaseInfo *           g_base_info_get_container    (GIBaseInfo   *info);
223 GTypelib *             g_base_info_get_typelib      (GIBaseInfo   *info);
224 gboolean               g_base_info_equal            (GIBaseInfo   *info1,
225                                                      GIBaseInfo   *info2);
226
227 GIBaseInfo *           g_info_new                   (GIInfoType    type,
228                                                      GIBaseInfo   *container,
229                                                      GTypelib     *typelib, 
230                                                      guint32       offset);
231
232
233 /* GIFunctionInfo */
234
235 typedef enum
236 {
237   GI_FUNCTION_IS_METHOD      = 1 << 0,
238   GI_FUNCTION_IS_CONSTRUCTOR = 1 << 1,
239   GI_FUNCTION_IS_GETTER      = 1 << 2,
240   GI_FUNCTION_IS_SETTER      = 1 << 3,
241   GI_FUNCTION_WRAPS_VFUNC    = 1 << 4,
242   GI_FUNCTION_THROWS         = 1 << 5
243 } GIFunctionInfoFlags;
244
245 const gchar *           g_function_info_get_symbol     (GIFunctionInfo *info);
246 GIFunctionInfoFlags     g_function_info_get_flags      (GIFunctionInfo *info);
247 GIPropertyInfo *        g_function_info_get_property   (GIFunctionInfo *info);
248 GIVFuncInfo *           g_function_info_get_vfunc      (GIFunctionInfo *info);
249
250 typedef union 
251 {
252   gboolean v_boolean;
253   gint8    v_int8;
254   guint8   v_uint8;
255   gint16   v_int16;
256   guint16  v_uint16;
257   gint32   v_int32;
258   guint32  v_uint32;
259   gint64   v_int64;
260   guint64  v_uint64;
261   gfloat   v_float;
262   gdouble  v_double;
263   gshort   v_short;
264   gushort  v_ushort;
265   gint     v_int;
266   guint    v_uint;
267   glong    v_long;
268   gulong   v_ulong;
269   gssize   v_ssize;
270   gsize    v_size;
271   gchar *  v_string;
272   gpointer v_pointer;
273 } GArgument;
274
275 #define G_INVOKE_ERROR (g_invoke_error_quark ())
276 GQuark g_invoke_error_quark (void);
277
278 typedef enum
279 {
280   G_INVOKE_ERROR_FAILED,
281   G_INVOKE_ERROR_SYMBOL_NOT_FOUND,
282   G_INVOKE_ERROR_ARGUMENT_MISMATCH
283 } GInvokeError;
284
285 gboolean              g_function_info_invoke         (GIFunctionInfo *info, 
286                                                       const GArgument  *in_args,
287                                                       int               n_in_args,
288                                                       const GArgument  *out_args,
289                                                       int               n_out_args,
290                                                       GArgument        *return_value,
291                                                       GError          **error);
292
293
294 /* GICallableInfo */
295
296 typedef enum {
297   GI_TRANSFER_NOTHING,
298   GI_TRANSFER_CONTAINER,
299   GI_TRANSFER_EVERYTHING
300 } GITransfer;
301
302 GITypeInfo *           g_callable_info_get_return_type (GICallableInfo *info);
303 void                   g_callable_info_load_return_type (GICallableInfo *info,
304                                                          GITypeInfo     *type);
305 GITransfer             g_callable_info_get_caller_owns (GICallableInfo *info);
306 gboolean               g_callable_info_may_return_null (GICallableInfo *info);
307 gint                   g_callable_info_get_n_args      (GICallableInfo *info);
308 GIArgInfo *            g_callable_info_get_arg         (GICallableInfo *info,
309                                                         gint            n);
310 void                   g_callable_info_load_arg        (GICallableInfo *info,
311                                                         gint            n,
312                                                         GIArgInfo      *arg);
313
314 /* GIArgInfo */
315
316 typedef enum  {
317   GI_DIRECTION_IN,
318   GI_DIRECTION_OUT,
319   GI_DIRECTION_INOUT
320 } GIDirection;
321
322 typedef enum {
323   GI_SCOPE_TYPE_INVALID, /* The argument is not of callback type */
324   GI_SCOPE_TYPE_CALL, /* The callback and associated user_data is only used during the
325                          call to this function */
326   GI_SCOPE_TYPE_ASYNC, /* The callback and associated user_data is 
327                           only used until the callback is invoked, and the callback 
328                           is invoked always exactly once. */
329   GI_SCOPE_TYPE_NOTIFIED /* The callback and and associated user_data is
330                             used until the caller is notfied via the destroy_notify */
331 } GIScopeType;
332
333 GIDirection            g_arg_info_get_direction          (GIArgInfo *info);
334 gboolean               g_arg_info_is_dipper              (GIArgInfo *info);
335 gboolean               g_arg_info_is_return_value        (GIArgInfo *info);
336 gboolean               g_arg_info_is_optional            (GIArgInfo *info);
337 gboolean               g_arg_info_may_be_null            (GIArgInfo *info);
338 GITransfer             g_arg_info_get_ownership_transfer (GIArgInfo *info);
339 GIScopeType            g_arg_info_get_scope              (GIArgInfo *info);
340 gint                   g_arg_info_get_closure            (GIArgInfo *info);
341 gint                   g_arg_info_get_destroy            (GIArgInfo *info);
342 GITypeInfo *           g_arg_info_get_type               (GIArgInfo *info);
343 void                   g_arg_info_load_type              (GIArgInfo *info,
344                                                           GITypeInfo *type);
345
346
347 /* GITypeInfo */
348
349 typedef enum {
350   /* Basic types */
351   GI_TYPE_TAG_VOID      =  0,
352   GI_TYPE_TAG_BOOLEAN   =  1,
353   GI_TYPE_TAG_INT8      =  2,
354   GI_TYPE_TAG_UINT8     =  3,
355   GI_TYPE_TAG_INT16     =  4,
356   GI_TYPE_TAG_UINT16    =  5,  
357   GI_TYPE_TAG_INT32     =  6,
358   GI_TYPE_TAG_UINT32    =  7,
359   GI_TYPE_TAG_INT64     =  8,
360   GI_TYPE_TAG_UINT64    =  9,
361   GI_TYPE_TAG_SHORT     = 10,
362   GI_TYPE_TAG_USHORT    = 11,
363   GI_TYPE_TAG_INT       = 12,
364   GI_TYPE_TAG_UINT      = 13,
365   GI_TYPE_TAG_LONG      = 14,
366   GI_TYPE_TAG_ULONG     = 15,
367   GI_TYPE_TAG_SSIZE     = 16,
368   GI_TYPE_TAG_SIZE      = 17,
369   GI_TYPE_TAG_FLOAT     = 18,
370   GI_TYPE_TAG_DOUBLE    = 19,
371   GI_TYPE_TAG_TIME_T    = 20,
372   GI_TYPE_TAG_GTYPE     = 21,
373   GI_TYPE_TAG_UTF8      = 22,
374   GI_TYPE_TAG_FILENAME  = 23,
375   /* Non-basic types */
376   GI_TYPE_TAG_ARRAY     = 24,
377   GI_TYPE_TAG_INTERFACE = 25,
378   GI_TYPE_TAG_GLIST     = 26,
379   GI_TYPE_TAG_GSLIST    = 27,
380   GI_TYPE_TAG_GHASH     = 28,
381   GI_TYPE_TAG_ERROR     = 29
382   /* Note - there is only room currently for 32 tags.
383    * See docs/typelib-format.txt SimpleTypeBlob definition */
384 } GITypeTag;
385
386 #define G_TYPE_TAG_IS_BASIC(tag) (tag < GI_TYPE_TAG_ARRAY)
387
388 const gchar*           g_type_tag_to_string            (GITypeTag   type);
389
390 gboolean               g_type_info_is_pointer          (GITypeInfo *info);
391 GITypeTag              g_type_info_get_tag             (GITypeInfo *info);
392 GITypeInfo *           g_type_info_get_param_type      (GITypeInfo *info,
393                                                         gint       n);
394 GIBaseInfo *           g_type_info_get_interface       (GITypeInfo *info);
395 gint                   g_type_info_get_array_length    (GITypeInfo *info);
396 gint                   g_type_info_get_array_fixed_size(GITypeInfo *info);
397 gboolean               g_type_info_is_zero_terminated  (GITypeInfo *info);
398
399 gint                   g_type_info_get_n_error_domains (GITypeInfo *info);
400 GIErrorDomainInfo     *g_type_info_get_error_domain    (GITypeInfo *info,
401                                                         gint       n);
402
403 /* GIErrorDomainInfo */
404
405 const gchar *          g_error_domain_info_get_quark   (GIErrorDomainInfo *info);
406 GIInterfaceInfo *           g_error_domain_info_get_codes (GIErrorDomainInfo *info);
407
408
409 /* GIValueInfo */
410  
411 glong                  g_value_info_get_value      (GIValueInfo *info);
412
413
414 /* GIFieldInfo */
415
416 typedef enum
417 {
418   GI_FIELD_IS_READABLE = 1 << 0,
419   GI_FIELD_IS_WRITABLE = 1 << 1
420 } GIFieldInfoFlags;
421
422 GIFieldInfoFlags       g_field_info_get_flags      (GIFieldInfo *info);
423 gint                   g_field_info_get_size       (GIFieldInfo *info);
424 gint                   g_field_info_get_offset     (GIFieldInfo *info);
425 GITypeInfo *           g_field_info_get_type       (GIFieldInfo *info);
426
427 gboolean g_field_info_get_field (GIFieldInfo     *field_info,
428                                  gpointer         mem,
429                                  GArgument       *value);
430 gboolean g_field_info_set_field (GIFieldInfo     *field_info,
431                                  gpointer         mem,
432                                  const GArgument *value);
433
434 /* GIUnionInfo */
435 gint                   g_union_info_get_n_fields  (GIUnionInfo *info);
436 GIFieldInfo *          g_union_info_get_field     (GIUnionInfo *info,
437                                                    gint         n);
438 gint                   g_union_info_get_n_methods (GIUnionInfo *info);
439 GIFunctionInfo *       g_union_info_get_method    (GIUnionInfo *info,
440                                                    gint         n);
441 gboolean               g_union_info_is_discriminated (GIUnionInfo *info);
442 gint                   g_union_info_get_discriminator_offset (GIUnionInfo *info);
443 GITypeInfo *           g_union_info_get_discriminator_type (GIUnionInfo *info);
444 GIConstantInfo *       g_union_info_get_discriminator      (GIUnionInfo *info,
445                                                             gint         n);
446 GIFunctionInfo *       g_union_info_find_method    (GIUnionInfo *info,
447                                                     const gchar *name);
448 gsize                  g_union_info_get_size       (GIUnionInfo *info);
449 gsize                  g_union_info_get_alignment  (GIUnionInfo *info);
450
451
452 /* GIStructInfo */
453 gint                   g_struct_info_get_n_fields  (GIStructInfo *info);
454 GIFieldInfo *          g_struct_info_get_field     (GIStructInfo *info,
455                                                     gint         n);
456 gint                   g_struct_info_get_n_methods (GIStructInfo *info);
457 GIFunctionInfo *       g_struct_info_get_method    (GIStructInfo *info,
458                                                     gint         n);
459 GIFunctionInfo *       g_struct_info_find_method   (GIStructInfo *info,
460                                                     const gchar *name);
461 gsize                  g_struct_info_get_size      (GIStructInfo *info);
462 gsize                  g_struct_info_get_alignment (GIStructInfo *info);
463 gboolean               g_struct_info_is_gtype_struct (GIStructInfo *info);
464
465 /* GIRegisteredTypeInfo */
466
467 const gchar *          g_registered_type_info_get_type_name (GIRegisteredTypeInfo *info);
468 const gchar *          g_registered_type_info_get_type_init (GIRegisteredTypeInfo *info);
469 GType                  g_registered_type_info_get_g_type    (GIRegisteredTypeInfo *info);
470
471 /* GIEnumInfo */
472
473 gint                   g_enum_info_get_n_values             (GIEnumInfo      *info);
474 GIValueInfo  *         g_enum_info_get_value                (GIEnumInfo      *info,
475                                                              gint            n);
476 GITypeTag              g_enum_info_get_storage_type         (GIEnumInfo      *info);
477
478 /* GIObjectInfo */
479
480 const gchar *          g_object_info_get_type_name          (GIObjectInfo    *info);
481 const gchar *          g_object_info_get_type_init          (GIObjectInfo    *info);
482 gboolean               g_object_info_get_abstract           (GIObjectInfo    *info);
483 GIObjectInfo *         g_object_info_get_parent             (GIObjectInfo    *info);
484 gint                   g_object_info_get_n_interfaces       (GIObjectInfo    *info);
485 GIInterfaceInfo *      g_object_info_get_interface          (GIObjectInfo    *info,
486                                                              gint            n);
487 gint                   g_object_info_get_n_fields           (GIObjectInfo    *info);
488 GIFieldInfo *          g_object_info_get_field              (GIObjectInfo    *info,
489                                                              gint            n);
490 gint                   g_object_info_get_n_properties       (GIObjectInfo    *info);
491 GIPropertyInfo *       g_object_info_get_property           (GIObjectInfo    *info,
492                                                              gint            n);
493 gint                   g_object_info_get_n_methods          (GIObjectInfo    *info);
494 GIFunctionInfo *       g_object_info_get_method             (GIObjectInfo    *info,
495                                                              gint            n);
496 GIFunctionInfo *       g_object_info_find_method            (GIObjectInfo *info,
497                                                              const gchar *name);
498 gint                   g_object_info_get_n_signals          (GIObjectInfo    *info);
499 GISignalInfo *         g_object_info_get_signal             (GIObjectInfo    *info,
500                                                              gint            n);
501 gint                   g_object_info_get_n_vfuncs           (GIObjectInfo    *info);
502 GIVFuncInfo *          g_object_info_get_vfunc              (GIObjectInfo    *info,
503                                                              gint            n);
504 GIVFuncInfo *          g_object_info_find_vfunc             (GIObjectInfo *info,
505                                                              const gchar *name);
506 gint                   g_object_info_get_n_constants        (GIObjectInfo    *info);
507 GIConstantInfo *       g_object_info_get_constant           (GIObjectInfo    *info,
508                                                              gint            n);
509 GIStructInfo *         g_object_info_get_class_struct       (GIObjectInfo    *info);
510
511                                                              
512 /* GIInterfaceInfo */
513
514 gint                   g_interface_info_get_n_prerequisites (GIInterfaceInfo *info);
515 GIBaseInfo *           g_interface_info_get_prerequisite    (GIInterfaceInfo *info,
516                                                              gint        n);
517 gint                   g_interface_info_get_n_properties    (GIInterfaceInfo *info);
518 GIPropertyInfo *       g_interface_info_get_property        (GIInterfaceInfo *info,
519                                                              gint        n);
520 gint                   g_interface_info_get_n_methods       (GIInterfaceInfo *info);
521 GIFunctionInfo *       g_interface_info_get_method          (GIInterfaceInfo *info,
522                                                              gint        n);
523 GIFunctionInfo *       g_interface_info_find_method         (GIInterfaceInfo *info,
524                                                              const gchar *name);
525 gint                   g_interface_info_get_n_signals       (GIInterfaceInfo *info);
526 GISignalInfo *         g_interface_info_get_signal          (GIInterfaceInfo *info,
527                                                              gint        n);
528 gint                   g_interface_info_get_n_vfuncs        (GIInterfaceInfo *info);
529 GIVFuncInfo *          g_interface_info_get_vfunc           (GIInterfaceInfo *info,
530                                                              gint        n);
531 GIVFuncInfo *          g_interface_info_find_vfunc          (GIInterfaceInfo *info,
532                                                              const gchar *name);
533 gint                   g_interface_info_get_n_constants     (GIInterfaceInfo *info);
534 GIConstantInfo *       g_interface_info_get_constant        (GIInterfaceInfo *info,
535                                                              gint        n);
536
537 GIStructInfo *         g_interface_info_get_iface_struct    (GIInterfaceInfo *info);
538
539
540 /* GIPropertyInfo  */
541
542 GParamFlags             g_property_info_get_flags                (GIPropertyInfo         *info);
543 GITypeInfo *            g_property_info_get_type                 (GIPropertyInfo         *info);
544
545
546 /* GISignalInfo */
547
548 GSignalFlags            g_signal_info_get_flags                  (GISignalInfo           *info);
549 GIVFuncInfo *           g_signal_info_get_class_closure          (GISignalInfo           *info);
550 gboolean                g_signal_info_true_stops_emit            (GISignalInfo           *info);
551
552
553 /* GIVFuncInfo */
554
555 typedef enum
556 {
557   GI_VFUNC_MUST_CHAIN_UP     = 1 << 0,
558   GI_VFUNC_MUST_OVERRIDE     = 1 << 1,
559   GI_VFUNC_MUST_NOT_OVERRIDE = 1 << 2
560 } GIVFuncInfoFlags;
561
562 GIVFuncInfoFlags        g_vfunc_info_get_flags                   (GIVFuncInfo            *info);
563 gint                    g_vfunc_info_get_offset                  (GIVFuncInfo            *info);
564 GISignalInfo *          g_vfunc_info_get_signal                  (GIVFuncInfo            *info);
565 GIFunctionInfo *        g_vfunc_info_get_invoker                 (GIVFuncInfo            *info);
566
567
568 /* GIConstantInfo */
569
570 GITypeInfo *            g_constant_info_get_type                 (GIConstantInfo         *info);
571 gint                    g_constant_info_get_value                (GIConstantInfo         *info,
572                                                                   GArgument             *value);
573
574
575 G_END_DECLS
576
577 #endif  /* __G_IREPOSITORY_H__ */
578