1 /* GObject introspection: Parsed GIR
3 * Copyright (C) 2005 Matthias Clasen
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __G_IR_NODE_H__
22 #define __G_IR_NODE_H__
26 #include "girmodule.h"
30 typedef struct _GIrTypelibBuild GIrTypelibBuild;
31 typedef struct _GIrNode GIrNode;
32 typedef struct _GIrNodeFunction GIrNodeFunction;
33 typedef struct _GIrNodeParam GIrNodeParam;
34 typedef struct _GIrNodeType GIrNodeType;
35 typedef struct _GIrNodeInterface GIrNodeInterface;
36 typedef struct _GIrNodeSignal GIrNodeSignal;
37 typedef struct _GIrNodeProperty GIrNodeProperty;
38 typedef struct _GIrNodeVFunc GIrNodeVFunc;
39 typedef struct _GIrNodeField GIrNodeField;
40 typedef struct _GIrNodeValue GIrNodeValue;
41 typedef struct _GIrNodeEnum GIrNodeEnum;
42 typedef struct _GIrNodeBoxed GIrNodeBoxed;
43 typedef struct _GIrNodeStruct GIrNodeStruct;
44 typedef struct _GIrNodeConstant GIrNodeConstant;
45 typedef struct _GIrNodeErrorDomain GIrNodeErrorDomain;
46 typedef struct _GIrNodeXRef GIrNodeXRef;
47 typedef struct _GIrNodeUnion GIrNodeUnion;
49 struct _GIrTypelibBuild {
59 G_IR_NODE_INVALID = 0,
60 G_IR_NODE_FUNCTION = 1,
61 G_IR_NODE_CALLBACK = 2,
67 G_IR_NODE_INTERFACE = 8,
68 G_IR_NODE_CONSTANT = 9,
69 G_IR_NODE_ERROR_DOMAIN = 10,
73 G_IR_NODE_PROPERTY = 14,
74 G_IR_NODE_SIGNAL = 15,
94 struct _GIrNodeFunction
99 gboolean is_varargs; /* Not in typelib yet */
104 gboolean is_constructor;
105 gboolean wraps_vfunc;
110 GIrNodeParam *result;
123 gboolean is_ghashtable;
124 gboolean is_interface;
130 gboolean zero_terminated;
136 GIrNodeType *parameter_type1;
137 GIrNodeType *parameter_type2;
154 gboolean shallow_transfer;
163 struct _GIrNodeProperty
173 gboolean construct_only;
178 struct _GIrNodeSignal
186 gboolean run_cleanup;
192 gboolean has_class_closure;
193 gboolean true_stops_emit;
198 GIrNodeParam *result;
205 gboolean is_varargs; /* Not in typelib yet */
206 gboolean must_chain_up;
207 gboolean must_be_implemented;
208 gboolean must_not_be_implemented;
209 gboolean is_class_closure;
212 GIrNodeParam *result;
229 struct _GIrNodeInterface
240 gchar *glib_type_struct;
243 GList *prerequisites;
260 struct _GIrNodeConstant
299 struct _GIrNodeStruct
305 gboolean is_gtype_struct;
323 GList *discriminators;
331 gint discriminator_offset;
332 GIrNodeType *discriminator_type;
336 struct _GIrNodeErrorDomain
348 GIrNode * g_ir_node_new (GIrNodeTypeId type);
349 void g_ir_node_free (GIrNode *node);
350 guint32 g_ir_node_get_size (GIrNode *node);
351 guint32 g_ir_node_get_full_size (GIrNode *node);
352 void g_ir_node_build_typelib (GIrNode *node,
353 GIrTypelibBuild *build,
356 int g_ir_node_cmp (GIrNode *node,
358 gboolean g_ir_node_can_have_member (GIrNode *node);
359 void g_ir_node_add_member (GIrNode *node,
360 GIrNodeFunction *member);
361 guint32 write_string (const gchar *str,
366 const gchar * g_ir_node_param_direction_string (GIrNodeParam * node);
367 const gchar * g_ir_node_type_to_string (GIrNodeTypeId type);
369 gboolean g_ir_find_node (GIrModule *module,
373 GIrModule **module_out);
375 /* In giroffsets.c */
377 void g_ir_node_compute_offsets (GIrNode *node,
384 #endif /* __G_IR_NODE_H__ */