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
278 struct _GIrNodeStruct
298 GList *discriminators;
303 gint discriminator_offset;
304 GIrNodeType *discriminator_type;
308 struct _GIrNodeErrorDomain
320 GIrNode * g_ir_node_new (GIrNodeTypeId type);
321 void g_ir_node_free (GIrNode *node);
322 guint32 g_ir_node_get_size (GIrNode *node);
323 guint32 g_ir_node_get_full_size (GIrNode *node);
324 void g_ir_node_build_typelib (GIrNode *node,
332 int g_ir_node_cmp (GIrNode *node,
334 gboolean g_ir_node_can_have_member (GIrNode *node);
335 void g_ir_node_add_member (GIrNode *node,
336 GIrNodeFunction *member);
337 guint32 write_string (const gchar *str,
342 const gchar * g_ir_node_param_direction_string (GIrNodeParam * node);
343 const gchar * g_ir_node_type_to_string (GIrNodeTypeId type);
345 gboolean g_ir_find_node (GIrModule *module,
349 GIrModule **module_out);
353 #endif /* __G_IR_NODE_H__ */