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