]> git.draconx.ca Git - gob-dx.git/blob - src/treefuncs.h
Release 1.99.2
[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         char * chunk_size;
118         GList * interfaces;
119         GList * nodes;
120 };
121
122 struct _EnumDef {
123         NodeType type;
124         char * etype;
125         char * prefix;
126         GList * values;
127 };
128
129 struct _EnumValue {
130         NodeType type;
131         char * name;
132         char * value;
133 };
134
135 struct _Error {
136         NodeType type;
137         char * etype;
138         char * prefix;
139         GList * values;
140 };
141
142 struct _Flags {
143         NodeType type;
144         char * ftype;
145         char * prefix;
146         GList * values;
147 };
148
149 struct _FuncArg {
150         NodeType type;
151         Type * atype;
152         char * name;
153         GList * checks;
154 };
155
156 struct _Method {
157         NodeType type;
158         int scope;
159         int method;
160         Type * mtype;
161         char * otype;
162         GList * gtktypes;
163         GList * flags;
164         char * id;
165         GList * args;
166         char * onerror;
167         char * defreturn;
168         char * cbuf;
169         int line_no;
170         int ccode_line;
171         gboolean vararg;
172         int unique_id;
173         gboolean bonobo_object_func;
174         char * interface;
175 };
176
177 struct _Property {
178         NodeType type;
179         char * gtktype;
180         Type * ptype;
181         GList * flags;
182         char * name;
183         char * nick;
184         char * blurb;
185         char * minimum;
186         char * maximum;
187         char * default_value;
188         char * extra_gtktype;
189         gboolean link;
190         gboolean export;
191         char * get;
192         int get_line;
193         char * set;
194         int set_line;
195         int line_no;
196 };
197
198 struct _Type {
199         NodeType type;
200         char * name;
201         char * pointer;
202         char * postfix;
203 };
204
205 struct _Variable {
206         NodeType type;
207         int scope;
208         Type * vtype;
209         char * id;
210         int line_no;
211         gboolean destructor_unref;
212         char * destructor;
213         int destructor_line;
214         gboolean destructor_simple;
215         char * initializer;
216         int initializer_line;
217 };
218
219 union _Node {
220         NodeType type;
221         Argument argument;
222         CCode ccode;
223         Check check;
224         Class class;
225         EnumDef enumdef;
226         EnumValue enumvalue;
227         Error error;
228         Flags flags;
229         FuncArg funcarg;
230         Method method;
231         Property property;
232         Type _type;
233         Variable variable;
234 };
235
236
237 /* General copy/free functions */
238 Node * node_copy (Node *node);
239 void node_free (Node *node);
240
241 GList * node_list_copy (GList *nodes);
242 void node_list_free (GList *nodes);
243
244 /* Node new/set functions */
245 Node * node_new (NodeType type, ...);
246 void node_set (Node *node, ...);
247
248
249 #endif /* TREEFUNCS_H */