1 /* GObject introspection: Parsed IDL
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_IDL_NODE_H__
22 #define __G_IDL_NODE_H__
28 typedef struct _GIdlNode GIdlNode
;
29 typedef struct _GIdlNodeFunction GIdlNodeFunction
;
30 typedef struct _GIdlNodeParam GIdlNodeParam
;
31 typedef struct _GIdlNodeType GIdlNodeType
;
32 typedef struct _GIdlNodeInterface GIdlNodeInterface
;
33 typedef struct _GIdlNodeSignal GIdlNodeSignal
;
34 typedef struct _GIdlNodeProperty GIdlNodeProperty
;
35 typedef struct _GIdlNodeVFunc GIdlNodeVFunc
;
36 typedef struct _GIdlNodeField GIdlNodeField
;
37 typedef struct _GIdlNodeValue GIdlNodeValue
;
38 typedef struct _GIdlNodeEnum GIdlNodeEnum
;
39 typedef struct _GIdlNodeBoxed GIdlNodeBoxed
;
40 typedef struct _GIdlNodeStruct GIdlNodeStruct
;
41 typedef struct _GIdlNodeConstant GIdlNodeConstant
;
42 typedef struct _GIdlNodeErrorDomain GIdlNodeErrorDomain
;
43 typedef struct _GIdlNodeXRef GIdlNodeXRef
;
44 typedef struct _GIdlNodeUnion GIdlNodeUnion
;
58 G_IDL_NODE_ERROR_DOMAIN
,
83 struct _GIdlNodeFunction
92 gboolean is_constructor
;
97 GIdlNodeParam
*result
;
110 gboolean is_ghashtable
;
111 gboolean is_interface
;
117 gboolean zero_terminated
;
121 GIdlNodeType
*parameter_type1
;
122 GIdlNodeType
*parameter_type2
;
128 struct _GIdlNodeParam
139 gboolean shallow_transfer
;
144 struct _GIdlNodeProperty
154 gboolean construct_only
;
159 struct _GIdlNodeSignal
167 gboolean run_cleanup
;
173 gboolean has_class_closure
;
174 gboolean true_stops_emit
;
179 GIdlNodeParam
*result
;
182 struct _GIdlNodeVFunc
186 gboolean must_chain_up
;
187 gboolean must_be_implemented
;
188 gboolean must_not_be_implemented
;
189 gboolean is_class_closure
;
192 GIdlNodeParam
*result
;
197 struct _GIdlNodeField
209 struct _GIdlNodeInterface
221 GList
*prerequisites
;
226 struct _GIdlNodeValue
235 struct _GIdlNodeConstant
258 struct _GIdlNodeBoxed
270 struct _GIdlNodeStruct
279 struct _GIdlNodeUnion
286 GList
*discriminators
;
291 gint discriminator_offset
;
292 GIdlNodeType
*discriminator_type
;
296 struct _GIdlNodeErrorDomain
308 GIdlNode
*g_idl_node_new (GIdlNodeTypeId type
);
309 void g_idl_node_free (GIdlNode
*node
);
310 guint32
g_idl_node_get_size (GIdlNode
*node
);
311 guint32
g_idl_node_get_full_size (GIdlNode
*node
);
312 void g_idl_node_build_metadata (GIdlNode
*node
,
320 int g_idl_node_cmp (GIdlNode
*node
,
322 gboolean
g_idl_node_can_have_member (GIdlNode
*node
);
323 void g_idl_node_add_member (GIdlNode
*node
,
324 GIdlNodeFunction
*member
);
325 guint32
write_string (const gchar
*str
,
330 void init_stats (void);
331 void dump_stats (void);
335 #endif /* __G_IDL_NODE_H__ */