]> git.draconx.ca Git - gob-dx.git/blob - src/treefuncs.h
Release 2.0.10
[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 override;
190         gboolean link;
191         gboolean export;
192         char * get;
193         int get_line;
194         char * set;
195         int set_line;
196         int line_no;
197 };
198
199 struct _Type {
200         NodeType type;
201         char * name;
202         char * pointer;
203         char * postfix;
204 };
205
206 struct _Variable {
207         NodeType type;
208         int scope;
209         Type * vtype;
210         char * id;
211         int line_no;
212         gboolean destructor_unref;
213         char * destructor;
214         int destructor_line;
215         gboolean destructor_simple;
216         char * initializer;
217         int initializer_line;
218 };
219
220 union _Node {
221         NodeType type;
222         Argument argument;
223         CCode ccode;
224         Check check;
225         Class class;
226         EnumDef enumdef;
227         EnumValue enumvalue;
228         Error error;
229         Flags flags;
230         FuncArg funcarg;
231         Method method;
232         Property property;
233         Type _type;
234         Variable variable;
235 };
236
237
238 /* General copy/free functions */
239 Node * node_copy (Node *node);
240 void node_free (Node *node);
241
242 GList * node_list_copy (GList *nodes);
243 void node_list_free (GList *nodes);
244
245 /* Node new/set functions */
246 Node * node_new (NodeType type, ...);
247 void node_set (Node *node, ...);
248
249
250 #endif /* TREEFUNCS_H */