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