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__
28 typedef struct _GIrNode GIrNode;
29 typedef struct _GIrNodeFunction GIrNodeFunction;
30 typedef struct _GIrNodeParam GIrNodeParam;
31 typedef struct _GIrNodeType GIrNodeType;
32 typedef struct _GIrNodeInterface GIrNodeInterface;
33 typedef struct _GIrNodeSignal GIrNodeSignal;
34 typedef struct _GIrNodeProperty GIrNodeProperty;
35 typedef struct _GIrNodeVFunc GIrNodeVFunc;
36 typedef struct _GIrNodeField GIrNodeField;
37 typedef struct _GIrNodeValue GIrNodeValue;
38 typedef struct _GIrNodeEnum GIrNodeEnum;
39 typedef struct _GIrNodeBoxed GIrNodeBoxed;
40 typedef struct _GIrNodeStruct GIrNodeStruct;
41 typedef struct _GIrNodeConstant GIrNodeConstant;
42 typedef struct _GIrNodeErrorDomain GIrNodeErrorDomain;
43 typedef struct _GIrNodeXRef GIrNodeXRef;
44 typedef struct _GIrNodeUnion GIrNodeUnion;
48 G_IR_NODE_INVALID = 0,
49 G_IR_NODE_FUNCTION = 1,
50 G_IR_NODE_CALLBACK = 2,
56 G_IR_NODE_INTERFACE = 8,
57 G_IR_NODE_CONSTANT = 9,
58 G_IR_NODE_ERROR_DOMAIN = 10,
62 G_IR_NODE_PROPERTY = 14,
63 G_IR_NODE_SIGNAL = 15,
83 struct _GIrNodeFunction
88 gboolean is_varargs; /* Not in typelib yet */
93 gboolean is_constructor;
112 gboolean is_ghashtable;
113 gboolean is_interface;
119 gboolean zero_terminated;
123 GIrNodeType *parameter_type1;
124 GIrNodeType *parameter_type2;
141 gboolean shallow_transfer;
146 struct _GIrNodeProperty
156 gboolean construct_only;
161 struct _GIrNodeSignal
169 gboolean run_cleanup;
175 gboolean has_class_closure;
176 gboolean true_stops_emit;
181 GIrNodeParam *result;
188 gboolean is_varargs; /* Not in typelib yet */
189 gboolean must_chain_up;
190 gboolean must_be_implemented;
191 gboolean must_not_be_implemented;
192 gboolean is_class_closure;
195 GIrNodeParam *result;
212 struct _GIrNodeInterface
225 GList *prerequisites;
239 struct _GIrNodeConstant
274 struct _GIrNodeStruct
293 GList *discriminators;
298 gint discriminator_offset;
299 GIrNodeType *discriminator_type;
303 struct _GIrNodeErrorDomain
315 GIrNode * g_ir_node_new (GIrNodeTypeId type);
316 void g_ir_node_free (GIrNode *node);
317 guint32 g_ir_node_get_size (GIrNode *node);
318 guint32 g_ir_node_get_full_size (GIrNode *node);
319 void g_ir_node_build_typelib (GIrNode *node,
327 int g_ir_node_cmp (GIrNode *node,
329 gboolean g_ir_node_can_have_member (GIrNode *node);
330 void g_ir_node_add_member (GIrNode *node,
331 GIrNodeFunction *member);
332 guint32 write_string (const gchar *str,
337 const gchar * g_ir_node_param_direction_string (GIrNodeParam * node);
338 const gchar * g_ir_node_type_to_string (GIrNodeTypeId type);
342 #endif /* __G_IR_NODE_H__ */