vapi: Update GIR-based bindings
[vala-gnome.git] / gobject-introspection / gidl.vapi
blob98b155cae4759888776da809a26ebfd3010c3729
1 /* gidl.vala
2  *
3  * Copyright (C) 2006-2007  Jürg Billeter
4  *
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.1 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
18  *
19  * Author:
20  *      Jürg Billeter <j@bitron.ch>
21  */
23 [CCode (cprefix = "G", lower_case_cprefix = "g_", cheader_filename = "glib.h")]
24 namespace GLib {
25         [CCode (cheader_filename = "gidlparser.h")]
26         namespace Idl {
27                 public List<IdlModule> parse_file (string filename) throws MarkupError;
28         }
30         [Compact]
31         [CCode (free_function = "g_idl_module_free", cheader_filename = "gidlmodule.h")]
32         public class IdlModule {
33                 public string name;
34                 public List<IdlNode> entries;
35         }
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
59         }
61         [Compact]
62         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
63         public class IdlNode {
64                 public IdlNodeTypeId type;
65                 public string name;
66         }
68         [Compact]
69         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
70         public class IdlNodeFunction {
71                 public bool deprecated;
72                 
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;
78                 
79                 public string symbol;
80                 
81                 public IdlNodeParam result;
82                 public List<IdlNodeParam> parameters;
83         }
85         [Compact]
86         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
87         public class IdlNodeVFunc 
88         {
89                 public bool must_chain_up;
90                 public bool must_be_implemented;
91                 public bool must_not_be_implemented;
92                 public bool is_class_closure;
93                     
94                 public List<IdlNodeParam> parameters;
95                 public IdlNodeParam result;
96                 public int offset;
97         }
99         [Compact]
100         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
101         public class IdlNodeSignal {
102                 public bool deprecated;
103                 
104                 public bool run_first;
105                 public bool run_last;
106                 public bool run_cleanup;
107                 public bool no_recurse;
108                 public bool detailed;
109                 public bool action;
110                 public bool no_hooks;
111                 
112                 public bool has_class_closure;
113                 public bool true_stops_emit;
114                 
115                 public int class_closure;
116                 
117                 public List<IdlNodeParam> parameters;
118                 public IdlNodeParam result;
119         }
121         [Compact]
122         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
123         public class IdlNodeBoxed {
124                 public bool deprecated;
125                 
126                 public string gtype_name;
127                 public string gtype_init;
128                 
129                 public List<IdlNode> members;
130         }
132         [Compact]
133         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
134         public class IdlNodeEnum {
135                 public bool deprecated;
136                 
137                 public string gtype_name;
138                 public string gtype_init;
139                 
140                 public List<IdlNode> values;
141         }
143         [Compact]
144         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
145         public class IdlNodeField {
146                 public bool readable;
147                 public bool writable;
148                 public int bits;
149                 public int offset;
150                 
151                 public IdlNodeType type;
152         }
154         [Compact]
155         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
156         public class IdlNodeConstant {
157                 public bool deprecated;
158                 
159                 public IdlNodeType type;
160                 
161                 public string value;
162         }
164         [Compact]
165         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
166         public class IdlNodeInterface {
167                 public bool deprecated;
168                 
169                 public string gtype_name;
170                 public string gtype_init;
171                 
172                 public string parent;
173                 
174                 public List<string> interfaces;
175                 public List<string> prerequisites;
176                 
177                 public List<IdlNode> members;
178         }
180         [Compact]
181         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
182         public class IdlNodeParam {
183                 public bool @in;
184                 public bool @out;
185                 public bool dipper;
186                 public bool optional;
187                 public bool retval;
188                 public bool null_ok;
189                 public bool transfer;
190                 public bool shallow_transfer;
191                 
192                 public IdlNodeType type;
193         }
195         [Compact]
196         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
197         public class IdlNodeProperty {
198                 public bool deprecated;
199                 
200                 public string name;
201                 
202                 public bool readable;
203                 public bool writable;
204                 public bool @construct;
205                 public bool construct_only;
206                 
207                 public IdlNodeType type;
208         }
210         [Compact]
211         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
212         public class IdlNodeStruct {
213                 public bool deprecated;
214                 
215                 public List<IdlNode> members;
216         }
218         [Compact]
219         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
220         public class IdlNodeUnion {
221                 public bool deprecated;
222                 
223                 public List<IdlNode> members;
224         }
226         [Compact]
227         [CCode (free_function = "g_idl_node_free", cheader_filename = "gidlnode.h")]
228         public class IdlNodeType {
229                 public bool is_pointer;
230                 public bool is_basic;
231                 public bool is_array;
232                 public bool is_glist;
233                 public bool is_gslist;
234                 public bool is_ghashtable;
235                 public bool is_interface;
236                 public bool is_error;
237                 public TypeTag tag;
238                 
239                 public string unparsed;
240                 
241                 public bool zero_terminated;
242                 public bool has_length;
243                 public int length;
244                 
245                 public IdlNodeType parameter_type1;
246                 public IdlNodeType parameter_type2;
247                 
248                 public string @interface;
249                 public string[] errors;
250         }
252         [CCode (cname = "TypeTag", cprefix = "TYPE_TAG_", cheader_filename = "gmetadata.h")]
253         public enum TypeTag
254         {
255                 VOID,
256                 BOOLEAN,
257                 INT8,
258                 UINT8,
259                 INT16,
260                 UINT16,  
261                 INT32,
262                 UINT32,
263                 INT64,
264                 UINT64,
265                 INT,
266                 UINT,
267                 LONG,
268                 ULONG,
269                 SSIZE,
270                 SIZE,
271                 FLOAT,
272                 DOUBLE,
273                 UTF8,
274                 FILENAME,
275                 ARRAY,
276                 INTERFACE,
277                 LIST,
278                 SLIST,
279                 HASH,
280                 ERROR
281         }