1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 * GObject introspection: Parsed GIR
4 * Copyright (C) 2005 Matthias Clasen
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.
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.
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.
22 #ifndef __G_IR_NODE_H__
23 #define __G_IR_NODE_H__
27 #include "girmodule.h"
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 _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_INVALID_0 = 10, /* DELETED - used to be ERROR_DOMAIN */
64 G_IR_NODE_PROPERTY = 14,
65 G_IR_NODE_SIGNAL = 15,
78 guint32 offset; /* Assigned as we build the typelib */
80 GHashTable *attributes;
90 struct _GIrNodeFunction
95 gboolean is_varargs; /* Not in typelib yet */
100 gboolean is_constructor;
101 gboolean wraps_vfunc;
106 GIrNodeParam *result;
119 gboolean is_ghashtable;
120 gboolean is_interface;
126 gboolean zero_terminated;
133 GIrNodeType *parameter_type1;
134 GIrNodeType *parameter_type2;
146 gboolean caller_allocates;
152 gboolean shallow_transfer;
161 struct _GIrNodeProperty
171 gboolean construct_only;
173 gboolean shallow_transfer;
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;
215 GIrNodeParam *result;
228 GIrNodeFunction *callback;
233 struct _GIrNodeInterface
239 gboolean fundamental;
246 gchar *set_value_func;
247 gchar *get_value_func;
250 gchar *glib_type_struct;
253 GList *prerequisites;
270 struct _GIrNodeConstant
311 struct _GIrNodeStruct
317 gboolean is_gtype_struct;
336 GList *discriminators;
344 gint discriminator_offset;
345 GIrNodeType *discriminator_type;
349 GIrNode * _g_ir_node_new (GIrNodeTypeId type,
351 void _g_ir_node_free (GIrNode *node);
352 guint32 _g_ir_node_get_size (GIrNode *node);
353 guint32 _g_ir_node_get_full_size (GIrNode *node);
354 void _g_ir_node_build_typelib (GIrNode *node,
356 GIrTypelibBuild *build,
359 int _g_ir_node_cmp (GIrNode *node,
361 gboolean _g_ir_node_can_have_member (GIrNode *node);
362 void _g_ir_node_add_member (GIrNode *node,
363 GIrNodeFunction *member);
364 guint32 _g_ir_write_string (const gchar *str,
369 const gchar * _g_ir_node_param_direction_string (GIrNodeParam * node);
370 const gchar * _g_ir_node_type_to_string (GIrNodeTypeId type);
372 GIrNode *_g_ir_find_node (GIrTypelibBuild *build,
376 /* In giroffsets.c */
378 void _g_ir_node_compute_offsets (GIrTypelibBuild *build,
384 #endif /* __G_IR_NODE_H__ */