remove obsolete ref modifier and callback keyword
[vala-lang.git] / gobject-introspection / gidl.vala
blob1973d66ffeb30528e488c38739f4de023edd2fa0
1 /* gidl.vala
3 * Copyright (C) 2006-2007 Jürg Billeter
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 * Author:
20 * Jürg Billeter <j@bitron.ch>
23 [CCode (cprefix = "G", lower_case_cprefix = "g_", cheader_filename = "glib.h")]
24 namespace GLib {
25 [CCode (cheader_filename = "gidlparser.h")]
26 public struct Idl {
27 public static List<IdlModule> parse_file (string! filename, out Error error);
30 [CCode (cheader_filename = "gidlmodule.h")]
31 [ReferenceType (free_function = "g_idl_module_free")]
32 public struct IdlModule {
33 public string name;
34 public List<IdlNode> entries;
37 [CCode (cprefix = "G_IDL_NODE_", cheader_filename = "gidlnode.h")]
38 public enum IdlNodeTypeId {
39 INVALID,
40 FUNCTION,
41 CALLBACK,
42 STRUCT,
43 BOXED,
44 ENUM,
45 FLAGS,
46 OBJECT,
47 INTERFACE,
48 CONSTANT,
49 ERROR_DOMAIN,
50 UNION,
51 PARAM,
52 TYPE,
53 PROPERTY,
54 SIGNAL,
55 VALUE,
56 VFUNC,
57 FIELD,
58 XREF
61 [CCode (cheader_filename = "gidlnode.h")]
62 [ReferenceType (free_function = "g_idl_node_free")]
63 public struct IdlNode {
64 public IdlNodeTypeId type;
65 public string name;
68 [CCode (cheader_filename = "gidlnode.h")]
69 [ReferenceType (free_function = "g_idl_node_free")]
70 public struct IdlNodeFunction {
71 public bool deprecated;
73 public bool is_method;
74 public bool is_setter;
75 public bool is_getter;
76 public bool is_constructor;
77 public bool wraps_vfunc;
79 public string symbol;
81 public IdlNodeParam result;
82 public List<IdlNodeParam> parameters;
85 [CCode (cheader_filename = "gidlnode.h")]
86 [ReferenceType (free_function = "g_idl_node_free")]
87 public struct IdlNodeSignal {
88 public bool deprecated;
90 public bool run_first;
91 public bool run_last;
92 public bool run_cleanup;
93 public bool no_recurse;
94 public bool detailed;
95 public bool action;
96 public bool no_hooks;
98 public bool has_class_closure;
99 public bool true_stops_emit;
101 public int class_closure;
103 public List<IdlNodeParam> parameters;
104 public IdlNodeParam result;
107 [CCode (cheader_filename = "gidlnode.h")]
108 [ReferenceType (free_function = "g_idl_node_free")]
109 public struct IdlNodeBoxed {
110 public bool deprecated;
112 public string gtype_name;
113 public string gtype_init;
115 public List<IdlNode> members;
118 [CCode (cheader_filename = "gidlnode.h")]
119 [ReferenceType (free_function = "g_idl_node_free")]
120 public struct IdlNodeEnum {
121 public bool deprecated;
123 public string gtype_name;
124 public string gtype_init;
126 public List<IdlNode> values;
129 [CCode (cheader_filename = "gidlnode.h")]
130 [ReferenceType (free_function = "g_idl_node_free")]
131 public struct IdlNodeField {
132 public bool readable;
133 public bool writable;
134 public int bits;
135 public int offset;
137 public IdlNodeType type;
140 [CCode (cheader_filename = "gidlnode.h")]
141 [ReferenceType (free_function = "g_idl_node_free")]
142 public struct IdlNodeConstant {
143 public bool deprecated;
145 public IdlNodeType type;
147 public string value;
150 [CCode (cheader_filename = "gidlnode.h")]
151 [ReferenceType (free_function = "g_idl_node_free")]
152 public struct IdlNodeInterface {
153 public bool deprecated;
155 public string gtype_name;
156 public string gtype_init;
158 public string parent;
160 public List<string> interfaces;
161 public List<string> prerequisites;
163 public List<IdlNode> members;
166 [CCode (cheader_filename = "gidlnode.h")]
167 [ReferenceType (free_function = "g_idl_node_free")]
168 public struct IdlNodeParam {
169 public bool @in;
170 public bool @out;
171 public bool dipper;
172 public bool optional;
173 public bool retval;
174 public bool null_ok;
175 public bool transfer;
176 public bool shallow_transfer;
178 public IdlNodeType type;
181 [CCode (cheader_filename = "gidlnode.h")]
182 [ReferenceType (free_function = "g_idl_node_free")]
183 public struct IdlNodeProperty {
184 public bool deprecated;
186 public string name;
188 public bool readable;
189 public bool writable;
190 public bool @construct;
191 public bool construct_only;
193 public IdlNodeType type;
196 [CCode (cheader_filename = "gidlnode.h")]
197 [ReferenceType (free_function = "g_idl_node_free")]
198 public struct IdlNodeStruct {
199 public bool deprecated;
201 public List<IdlNode> members;
204 [CCode (cheader_filename = "gidlnode.h")]
205 [ReferenceType (free_function = "g_idl_node_free")]
206 public struct IdlNodeType {
207 public bool is_pointer;
208 public bool is_basic;
209 public bool is_array;
210 public bool is_glist;
211 public bool is_gslist;
212 public bool is_ghashtable;
213 public bool is_interface;
214 public bool is_error;
215 public TypeTag tag;
217 public string unparsed;
219 public bool zero_terminated;
220 public bool has_length;
221 public int length;
223 public IdlNodeType parameter_type1;
224 public IdlNodeType parameter_type2;
226 public string @interface;
227 public string[] errors;
230 [CCode (cprefix = "TYPE_TAG_", cheader_filename = "gmetadata.h")]
231 public enum TypeTag
233 VOID,
234 BOOLEAN,
235 INT8,
236 UINT8,
237 INT16,
238 UINT16,
239 INT32,
240 UINT32,
241 INT64,
242 UINT64,
243 INT,
244 UINT,
245 LONG,
246 ULONG,
247 SSIZE,
248 SIZE,
249 FLOAT,
250 DOUBLE,
251 UTF8,
252 FILENAME,
253 ARRAY,
254 INTERFACE,
255 LIST,
256 SLIST,
257 HASH,
258 ERROR