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