]> git.draconx.ca Git - gob-dx.git/blob - src/treefuncs.h
Release 1.99.1
[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         LAST_NODE_TYPE
64 };
65
66 typedef union _Node Node;
67 typedef struct _Class Class;
68 typedef struct _Type Type;
69 typedef struct _CCode CCode;
70 typedef struct _Check Check;
71 typedef struct _FuncArg FuncArg;
72 typedef struct _Argument Argument;
73 typedef struct _Property Property;
74 typedef struct _Method Method;
75 typedef struct _Variable Variable;
76
77
78 struct _Argument {
79         NodeType type;
80         char * gtktype;
81         Type * atype;
82         GList * flags;
83         char * name;
84         char * get;
85         int get_line;
86         char * set;
87         int set_line;
88         int line_no;
89 };
90
91 struct _CCode {
92         NodeType type;
93         int cctype;
94         char * cbuf;
95         int line_no;
96 };
97
98 struct _Check {
99         NodeType type;
100         int chtype;
101         char * number;
102 };
103
104 struct _Class {
105         NodeType type;
106         char * otype;
107         char * ptype;
108         char * bonobo_x_class;
109         char * chunk_size;
110         GList * nodes;
111 };
112
113 struct _FuncArg {
114         NodeType type;
115         Type * atype;
116         char * name;
117         GList * checks;
118 };
119
120 struct _Method {
121         NodeType type;
122         int scope;
123         int method;
124         Type * mtype;
125         char * otype;
126         GList * gtktypes;
127         GList * flags;
128         char * id;
129         GList * args;
130         char * onerror;
131         char * defreturn;
132         char * cbuf;
133         int line_no;
134         int ccode_line;
135         gboolean vararg;
136         int unique_id;
137         gboolean bonobo_x_func;
138 };
139
140 struct _Property {
141         NodeType type;
142         char * gtktype;
143         Type * ptype;
144         GList * flags;
145         char * name;
146         char * nick;
147         char * blurb;
148         char * minimum;
149         char * maximum;
150         char * default_value;
151         char * extra_gtktype;
152         gboolean link;
153         gboolean export;
154         char * get;
155         int get_line;
156         char * set;
157         int set_line;
158         int line_no;
159 };
160
161 struct _Type {
162         NodeType type;
163         char * name;
164         char * pointer;
165         char * postfix;
166 };
167
168 struct _Variable {
169         NodeType type;
170         int scope;
171         Type * vtype;
172         char * id;
173         int line_no;
174         gboolean destructor_unref;
175         char * destructor;
176         int destructor_line;
177         gboolean destructor_simple;
178         char * initializer;
179         int initializer_line;
180 };
181
182 union _Node {
183         NodeType type;
184         Argument argument;
185         CCode ccode;
186         Check check;
187         Class class;
188         FuncArg funcarg;
189         Method method;
190         Property property;
191         Type _type;
192         Variable variable;
193 };
194
195
196 /* General copy/free functions */
197 Node * node_copy (Node *node);
198 void node_free (Node *node);
199
200 GList * node_list_copy (GList *nodes);
201 void node_list_free (GList *nodes);
202
203 /* Node new/set functions */
204 Node * node_new (NodeType type, ...);
205 void node_set (Node *node, ...);
206
207
208 #endif /* TREEFUNCS_H */