1 /* Generated by generate_treefuncs.pl from treefuncs.def!
2  * Do not edit by hand! */
3 
4 
5 #ifndef TREEFUNCS_H
6 #define TREEFUNCS_H
7 
8 /* for ccode type */
9 enum {
10 	A_CCODE,
11 	AT_CCODE,
12 	C_CCODE,
13 	AD_CCODE,
14 	H_CCODE,
15 	HT_CCODE,
16 	PH_CCODE,
17 	CT_CCODE
18 };
19 
20 /* check type */
21 enum {
22 	NULL_CHECK,
23 	TYPE_CHECK,
24 	LT_CHECK,
25 	GT_CHECK,
26 	LE_CHECK,
27 	GE_CHECK,
28 	EQ_CHECK,
29 	NE_CHECK
30 };
31 
32 /* scope type */
33 enum {
34 	NO_SCOPE,
35 	PUBLIC_SCOPE,
36 	PRIVATE_SCOPE,
37 	PROTECTED_SCOPE,
38 	CLASS_SCOPE
39 };
40 
41 /* method type */
42 enum {
43 	REGULAR_METHOD,
44 	INIT_METHOD,
45 	CLASS_INIT_METHOD,
46 	CONSTRUCTOR_METHOD,
47 	DISPOSE_METHOD,
48 	FINALIZE_METHOD,
49 	VIRTUAL_METHOD,
50 	SIGNAL_LAST_METHOD,
51 	SIGNAL_FIRST_METHOD,
52 	OVERRIDE_METHOD
53 };
54 
55 
56 
57 typedef long NodeType;
58 enum {
59 	CLASS_NODE,
60 	TYPE_NODE,
61 	CCODE_NODE,
62 	CHECK_NODE,
63 	FUNCARG_NODE,
64 	ARGUMENT_NODE,
65 	PROPERTY_NODE,
66 	METHOD_NODE,
67 	VARIABLE_NODE,
68 	ENUMDEF_NODE,
69 	ENUMVALUE_NODE,
70 	FLAGS_NODE,
71 	ERROR_NODE,
72 	LAST_NODE_TYPE
73 };
74 
75 typedef union _Node Node;
76 typedef struct _Class Class;
77 typedef struct _Type Type;
78 typedef struct _CCode CCode;
79 typedef struct _Check Check;
80 typedef struct _FuncArg FuncArg;
81 typedef struct _Argument Argument;
82 typedef struct _Property Property;
83 typedef struct _Method Method;
84 typedef struct _Variable Variable;
85 typedef struct _EnumDef EnumDef;
86 typedef struct _EnumValue EnumValue;
87 typedef struct _Flags Flags;
88 typedef struct _Error Error;
89 
90 
91 struct _Argument {
92 	NodeType type;
93 	char * gtktype;
94 	Type * atype;
95 	GList * flags;
96 	char * name;
97 	char * get;
98 	int get_line;
99 	char * set;
100 	int set_line;
101 	int line_no;
102 };
103 
104 struct _CCode {
105 	NodeType type;
106 	int cctype;
107 	char * cbuf;
108 	int line_no;
109 };
110 
111 struct _Check {
112 	NodeType type;
113 	int chtype;
114 	char * number;
115 };
116 
117 struct _Class {
118 	NodeType type;
119 	char * otype;
120 	char * ptype;
121 	char * bonobo_object_class;
122 	gboolean glade_xml;
123 	char * chunk_size;
124 	GList * interfaces;
125 	GList * nodes;
126 	gboolean abstract;
127 };
128 
129 struct _EnumDef {
130 	NodeType type;
131 	char * etype;
132 	char * prefix;
133 	GList * values;
134 };
135 
136 struct _EnumValue {
137 	NodeType type;
138 	char * name;
139 	char * value;
140 };
141 
142 struct _Error {
143 	NodeType type;
144 	char * etype;
145 	char * prefix;
146 	GList * values;
147 };
148 
149 struct _Flags {
150 	NodeType type;
151 	char * ftype;
152 	char * prefix;
153 	GList * values;
154 };
155 
156 struct _FuncArg {
157 	NodeType type;
158 	Type * atype;
159 	char * name;
160 	GList * checks;
161 };
162 
163 struct _Method {
164 	NodeType type;
165 	int scope;
166 	int method;
167 	Type * mtype;
168 	char * otype;
169 	GList * gtktypes;
170 	GList * flags;
171 	char * id;
172 	GList * args;
173 	char * funcattrs;
174 	char * onerror;
175 	char * defreturn;
176 	char * cbuf;
177 	int line_no;
178 	int ccode_line;
179 	gboolean vararg;
180 	int unique_id;
181 	gboolean bonobo_object_func;
182 	char * interface;
183 };
184 
185 struct _Property {
186 	NodeType type;
187 	char * gtktype;
188 	Type * ptype;
189 	GList * flags;
190 	char * name;
191 	char * nick;
192 	char * blurb;
193 	char * minimum;
194 	char * maximum;
195 	char * default_value;
196 	char * extra_gtktype;
197 	gboolean override;
198 	gboolean link;
199 	gboolean export;
200 	char * get;
201 	int get_line;
202 	char * set;
203 	int set_line;
204 	int line_no;
205 };
206 
207 struct _Type {
208 	NodeType type;
209 	char * name;
210 	char * pointer;
211 	char * postfix;
212 };
213 
214 struct _Variable {
215 	NodeType type;
216 	int scope;
217 	Type * vtype;
218 	gboolean glade_widget;
219 	char * id;
220 	int line_no;
221 	gboolean destructor_unref;
222 	char * destructor;
223 	int destructor_line;
224 	gboolean destructor_simple;
225 	char * initializer;
226 	int initializer_line;
227 	gboolean initializer_simple;
228 };
229 
230 union _Node {
231 	NodeType type;
232 	Argument argument;
233 	CCode ccode;
234 	Check check;
235 	Class class;
236 	EnumDef enumdef;
237 	EnumValue enumvalue;
238 	Error error;
239 	Flags flags;
240 	FuncArg funcarg;
241 	Method method;
242 	Property property;
243 	Type _type;
244 	Variable variable;
245 };
246 
247 
248 /* General copy/free functions */
249 Node * node_copy (Node *node);
250 void node_free (Node *node);
251 
252 GList * node_list_copy (GList *nodes);
253 void node_list_free (GList *nodes);
254 
255 /* Node new/set functions */
256 Node * node_new (NodeType type, ...);
257 void node_set (Node *node, ...);
258 
259 
260 #endif /* TREEFUNCS_H */
261