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 _GIrNode GIrNode;
31 typedef struct _GIrNodeFunction GIrNodeFunction;
32 typedef struct _GIrNodeParam GIrNodeParam;
33 typedef struct _GIrNodeType GIrNodeType;
34 typedef struct _GIrNodeInterface GIrNodeInterface;
35 typedef struct _GIrNodeSignal GIrNodeSignal;
36 typedef struct _GIrNodeProperty GIrNodeProperty;
37 typedef struct _GIrNodeVFunc GIrNodeVFunc;
38 typedef struct _GIrNodeField GIrNodeField;
39 typedef struct _GIrNodeValue GIrNodeValue;
40 typedef struct _GIrNodeEnum GIrNodeEnum;
41 typedef struct _GIrNodeBoxed GIrNodeBoxed;
42 typedef struct _GIrNodeStruct GIrNodeStruct;
43 typedef struct _GIrNodeConstant GIrNodeConstant;
44 typedef struct _GIrNodeErrorDomain GIrNodeErrorDomain;
45 typedef struct _GIrNodeXRef GIrNodeXRef;
46 typedef struct _GIrNodeUnion GIrNodeUnion;
50 G_IR_NODE_INVALID = 0,
51 G_IR_NODE_FUNCTION = 1,
52 G_IR_NODE_CALLBACK = 2,
58 G_IR_NODE_INTERFACE = 8,
59 G_IR_NODE_CONSTANT = 9,
60 G_IR_NODE_ERROR_DOMAIN = 10,
64 G_IR_NODE_PROPERTY = 14,
65 G_IR_NODE_SIGNAL = 15,
85 struct _GIrNodeFunction
90 gboolean is_varargs; /* Not in typelib yet */
95 gboolean is_constructor;
101 GIrNodeParam *result;
114 gboolean is_ghashtable;
115 gboolean is_interface;
121 gboolean zero_terminated;
127 GIrNodeType *parameter_type1;
128 GIrNodeType *parameter_type2;
145 gboolean shallow_transfer;
150 struct _GIrNodeProperty
160 gboolean construct_only;
165 struct _GIrNodeSignal
173 gboolean run_cleanup;
179 gboolean has_class_closure;
180 gboolean true_stops_emit;
185 GIrNodeParam *result;
192 gboolean is_varargs; /* Not in typelib yet */
193 gboolean must_chain_up;
194 gboolean must_be_implemented;
195 gboolean must_not_be_implemented;
196 gboolean is_class_closure;
199 GIrNodeParam *result;
216 struct _GIrNodeInterface
229 GList *prerequisites;
243 struct _GIrNodeConstant
281 struct _GIrNodeStruct
304 GList *discriminators;
312 gint discriminator_offset;
313 GIrNodeType *discriminator_type;
317 struct _GIrNodeErrorDomain
329 GIrNode * g_ir_node_new (GIrNodeTypeId type);
330 void g_ir_node_free (GIrNode *node);
331 guint32 g_ir_node_get_size (GIrNode *node);
332 guint32 g_ir_node_get_full_size (GIrNode *node);
333 void g_ir_node_build_typelib (GIrNode *node,
341 int g_ir_node_cmp (GIrNode *node,
343 gboolean g_ir_node_can_have_member (GIrNode *node);
344 void g_ir_node_add_member (GIrNode *node,
345 GIrNodeFunction *member);
346 guint32 write_string (const gchar *str,
351 const gchar * g_ir_node_param_direction_string (GIrNodeParam * node);
352 const gchar * g_ir_node_type_to_string (GIrNodeTypeId type);
354 gboolean g_ir_find_node (GIrModule *module,
358 GIrModule **module_out);
360 /* In giroffsets.c */
362 void g_ir_node_compute_offsets (GIrNode *node,
369 #endif /* __G_IR_NODE_H__ */