Bug 551738 - Associate classes with their structs
[gnome.gobject-introspection] / tests / scanner / annotation-1.0-expected.gir
1 <?xml version="1.0"?>
2 <!-- This file was automatically generated from C sources - DO NOT EDIT!
3 To affect the contents of this file, edit the original C definitions,
4 and/or use gtk-doc annotations.  -->
5 <repository version="1.0"
6             xmlns="http://www.gtk.org/introspection/core/1.0"
7             xmlns:c="http://www.gtk.org/introspection/c/1.0"
8             xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
9   <include name="GLib" version="2.0"/>
10   <include name="GObject" version="2.0"/>
11   <include name="utility" version="1.0"/>
12   <namespace name="annotation" version="1.0" shared-library="annotation">
13     <callback name="Callback"
14               c:type="AnnotationCallback"
15               doc="This is a callback.">
16       <return-value transfer-ownership="none" doc="array of ints">
17         <type name="int" c:type="gint*"/>
18       </return-value>
19       <parameters>
20         <parameter name="in" transfer-ownership="none" doc="array of ints">
21           <type name="int" c:type="gint*"/>
22         </parameter>
23       </parameters>
24     </callback>
25     <callback name="ListCallback"
26               c:type="AnnotationListCallback"
27               doc="This is a callback taking a list.">
28       <return-value transfer-ownership="container" doc="list of strings">
29         <type name="GLib.List" c:type="GList*">
30           <type name="utf8"/>
31         </type>
32       </return-value>
33       <parameters>
34         <parameter name="in" transfer-ownership="none" doc="list of strings">
35           <type name="GLib.List" c:type="GList*">
36             <type name="utf8"/>
37           </type>
38         </parameter>
39       </parameters>
40     </callback>
41     <class name="Object"
42            c:type="AnnotationObject"
43            doc="This is an object used to test annotations."
44            parent="GObject.Object"
45            glib:type-name="AnnotationObject"
46            glib:get-type="annotation_object_get_type"
47            glib:class-struct="ObjectClass">
48       <method name="method" c:identifier="annotation_object_method">
49         <return-value transfer-ownership="none">
50           <type name="int" c:type="gint"/>
51         </return-value>
52       </method>
53       <method name="out"
54               c:identifier="annotation_object_out"
55               doc="This is a test for out arguments">
56         <return-value transfer-ownership="none">
57           <type name="int" c:type="gint"/>
58         </return-value>
59         <parameters>
60           <parameter name="outarg"
61                      direction="out"
62                      transfer-ownership="full"
63                      doc="This is an argument test">
64             <type name="int" c:type="int*"/>
65           </parameter>
66         </parameters>
67       </method>
68       <method name="create_object"
69               c:identifier="annotation_object_create_object"
70               doc="Test returning a caller-owned object">
71         <return-value transfer-ownership="full" doc="The object">
72           <type name="GObject.Object" c:type="GObject*"/>
73         </return-value>
74       </method>
75       <method name="allow_none" c:identifier="annotation_object_allow_none">
76         <return-value transfer-ownership="full">
77           <type name="GObject.Object" c:type="GObject*"/>
78         </return-value>
79         <parameters>
80           <parameter name="somearg" transfer-ownership="none" allow-none="1">
81             <type name="utf8" c:type="gchar*"/>
82           </parameter>
83         </parameters>
84       </method>
85       <method name="notrans" c:identifier="annotation_object_notrans">
86         <return-value transfer-ownership="none"
87                       doc="An object, not referenced">
88           <type name="GObject.Object" c:type="GObject*"/>
89         </return-value>
90       </method>
91       <method name="inout"
92               c:identifier="annotation_object_inout"
93               doc="This is a test for out arguments">
94         <return-value transfer-ownership="none">
95           <type name="int" c:type="gint"/>
96         </return-value>
97         <parameters>
98           <parameter name="inoutarg"
99                      direction="inout"
100                      transfer-ownership="full"
101                      doc="This is an argument test">
102             <type name="int" c:type="int*"/>
103           </parameter>
104         </parameters>
105       </method>
106       <method name="inout2"
107               c:identifier="annotation_object_inout2"
108               doc="This is a second test for out arguments">
109         <return-value transfer-ownership="none">
110           <type name="int" c:type="gint"/>
111         </return-value>
112         <parameters>
113           <parameter name="inoutarg"
114                      direction="inout"
115                      transfer-ownership="full"
116                      doc="This is an argument test">
117             <type name="int" c:type="int*"/>
118           </parameter>
119         </parameters>
120       </method>
121       <method name="inout3"
122               c:identifier="annotation_object_inout3"
123               doc="This is a 3th test for out arguments">
124         <return-value transfer-ownership="none">
125           <type name="int" c:type="gint"/>
126         </return-value>
127         <parameters>
128           <parameter name="inoutarg"
129                      direction="inout"
130                      transfer-ownership="full"
131                      allow-none="1"
132                      doc="This is an argument test">
133             <type name="int" c:type="int*"/>
134           </parameter>
135         </parameters>
136       </method>
137       <method name="in"
138               c:identifier="annotation_object_in"
139               doc="This is a test for in arguments">
140         <return-value transfer-ownership="none">
141           <type name="int" c:type="gint"/>
142         </return-value>
143         <parameters>
144           <parameter name="inarg"
145                      transfer-ownership="none"
146                      doc="This is an argument test">
147             <type name="int" c:type="int*"/>
148           </parameter>
149         </parameters>
150       </method>
151       <method name="calleeowns"
152               c:identifier="annotation_object_calleeowns"
153               doc="This is a test for out arguments; GObject defaults to transfer">
154         <return-value transfer-ownership="none">
155           <type name="int" c:type="gint"/>
156         </return-value>
157         <parameters>
158           <parameter name="toown"
159                      direction="out"
160                      transfer-ownership="full"
161                      doc="a #GObject">
162             <type name="GObject.Object" c:type="GObject**"/>
163           </parameter>
164         </parameters>
165       </method>
166       <method name="calleesowns"
167               c:identifier="annotation_object_calleesowns"
168               doc="This is a test for out arguments, one transferred, other not">
169         <return-value transfer-ownership="none">
170           <type name="int" c:type="gint"/>
171         </return-value>
172         <parameters>
173           <parameter name="toown1"
174                      direction="out"
175                      transfer-ownership="full"
176                      doc="a #GObject">
177             <type name="GObject.Object" c:type="GObject**"/>
178           </parameter>
179           <parameter name="toown2"
180                      direction="out"
181                      transfer-ownership="none"
182                      doc="a #GObject">
183             <type name="GObject.Object" c:type="GObject**"/>
184           </parameter>
185         </parameters>
186       </method>
187       <method name="get_strings"
188               c:identifier="annotation_object_get_strings"
189               doc="This is a test for returning a list of strings, where
190 each string needs to be freed.">
191         <return-value transfer-ownership="full" doc="list of strings">
192           <type name="GLib.List" c:type="GList*">
193             <type name="utf8"/>
194           </type>
195         </return-value>
196       </method>
197       <method name="get_hash"
198               c:identifier="annotation_object_get_hash"
199               doc="This is a test for returning a hash table mapping strings to
200 objects.">
201         <return-value transfer-ownership="full" doc="hash table">
202           <type name="GLib.HashTable" c:type="GHashTable*">
203             <type name="utf8"/>
204             <type name="GObject.Object"/>
205           </type>
206         </return-value>
207       </method>
208       <method name="with_voidp" c:identifier="annotation_object_with_voidp">
209         <return-value transfer-ownership="none">
210           <type name="none" c:type="void"/>
211         </return-value>
212         <parameters>
213           <parameter name="data" transfer-ownership="none">
214             <type name="any" c:type="void*"/>
215           </parameter>
216         </parameters>
217       </method>
218       <method name="get_objects"
219               c:identifier="annotation_object_get_objects"
220               doc="This is a test for returning a list of objects.
221 The list itself should be freed, but not the internal objects,
222 intentionally similar example to gtk_container_get_children">
223         <return-value transfer-ownership="container" doc="list of objects">
224           <type name="GLib.SList" c:type="GSList*">
225             <type name="Object"/>
226           </type>
227         </return-value>
228       </method>
229       <method name="use_buffer" c:identifier="annotation_object_use_buffer">
230         <return-value transfer-ownership="none">
231           <type name="none" c:type="void"/>
232         </return-value>
233         <parameters>
234           <parameter name="bytes" transfer-ownership="none">
235             <array c:type="guchar*">
236               <type name="uint8"/>
237             </array>
238           </parameter>
239         </parameters>
240       </method>
241       <method name="compute_sum"
242               c:identifier="annotation_object_compute_sum"
243               doc="Test taking a zero-terminated array">
244         <return-value transfer-ownership="none">
245           <type name="none" c:type="void"/>
246         </return-value>
247         <parameters>
248           <parameter name="nums"
249                      transfer-ownership="none"
250                      doc="Sequence of numbers">
251             <array c:type="int*">
252               <type name="int"/>
253             </array>
254           </parameter>
255         </parameters>
256       </method>
257       <method name="compute_sum_n"
258               c:identifier="annotation_object_compute_sum_n"
259               doc="Test taking an array with length parameter">
260         <return-value transfer-ownership="none">
261           <type name="none" c:type="void"/>
262         </return-value>
263         <parameters>
264           <parameter name="nums"
265                      transfer-ownership="none"
266                      doc="Sequence of numbers">
267             <array zero-terminated="0" length="2" c:type="int*">
268               <type name="int"/>
269             </array>
270           </parameter>
271           <parameter name="n_nums" transfer-ownership="none">
272             <type name="int" c:type="int"/>
273           </parameter>
274         </parameters>
275       </method>
276       <method name="compute_sum_nz"
277               c:identifier="annotation_object_compute_sum_nz"
278               doc="Test taking a zero-terminated array with length parameter">
279         <return-value transfer-ownership="none">
280           <type name="none" c:type="void"/>
281         </return-value>
282         <parameters>
283           <parameter name="nums"
284                      transfer-ownership="none"
285                      doc="Sequence of numbers">
286             <array length="2" c:type="int*">
287               <type name="int"/>
288             </array>
289           </parameter>
290           <parameter name="n_nums" transfer-ownership="none">
291             <type name="int" c:type="int"/>
292           </parameter>
293         </parameters>
294       </method>
295       <method name="parse_args"
296               c:identifier="annotation_object_parse_args"
297               doc="Test taking a zero-terminated array with length parameter">
298         <return-value transfer-ownership="none">
299           <type name="none" c:type="void"/>
300         </return-value>
301         <parameters>
302           <parameter name="argc"
303                      direction="inout"
304                      transfer-ownership="full"
305                      doc="Length of the argument vector">
306             <type name="int" c:type="int*"/>
307           </parameter>
308           <parameter name="argv"
309                      direction="inout"
310                      transfer-ownership="none"
311                      doc="Argument vector">
312             <array length="1" c:type="char***">
313               <type name="utf8"/>
314             </array>
315           </parameter>
316         </parameters>
317       </method>
318       <method name="string_out"
319               c:identifier="annotation_object_string_out"
320               doc="Test returning a string as an out parameter">
321         <return-value transfer-ownership="none">
322           <type name="boolean" c:type="gboolean"/>
323         </return-value>
324         <parameters>
325           <parameter name="str_out"
326                      direction="out"
327                      transfer-ownership="full"
328                      doc="string return value">
329             <type name="utf8" c:type="char**"/>
330           </parameter>
331         </parameters>
332       </method>
333       <method name="foreach"
334               c:identifier="annotation_object_foreach"
335               doc="Test taking a call-scoped callback">
336         <return-value transfer-ownership="none">
337           <type name="none" c:type="void"/>
338         </return-value>
339         <parameters>
340           <parameter name="func"
341                      transfer-ownership="none"
342                      scope="call"
343                      closure="2"
344                      doc="Callback to invoke">
345             <type name="ForeachFunc" c:type="AnnotationForeachFunc"/>
346           </parameter>
347           <parameter name="user_data" transfer-ownership="none">
348             <type name="any" c:type="gpointer"/>
349           </parameter>
350         </parameters>
351       </method>
352       <method name="set_data"
353               c:identifier="annotation_object_set_data"
354               doc="Test taking a guchar * with a length.">
355         <return-value transfer-ownership="none">
356           <type name="none" c:type="void"/>
357         </return-value>
358         <parameters>
359           <parameter name="data" transfer-ownership="none" doc="The data">
360             <array length="2" c:type="guchar*">
361               <type name="uint8"/>
362             </array>
363           </parameter>
364           <parameter name="length" transfer-ownership="none">
365             <type name="size_t" c:type="gsize"/>
366           </parameter>
367         </parameters>
368       </method>
369       <method name="set_data2"
370               c:identifier="annotation_object_set_data2"
371               doc="Test taking a gchar * with a length.">
372         <return-value transfer-ownership="none">
373           <type name="none" c:type="void"/>
374         </return-value>
375         <parameters>
376           <parameter name="data" transfer-ownership="none" doc="The data">
377             <array length="2" c:type="gchar*">
378               <type name="int8"/>
379             </array>
380           </parameter>
381           <parameter name="length" transfer-ownership="none">
382             <type name="size_t" c:type="gsize"/>
383           </parameter>
384         </parameters>
385       </method>
386       <method name="set_data3"
387               c:identifier="annotation_object_set_data3"
388               doc="Test taking a gchar * with a length, overriding the array element
389 type.">
390         <return-value transfer-ownership="none">
391           <type name="none" c:type="void"/>
392         </return-value>
393         <parameters>
394           <parameter name="data" transfer-ownership="none" doc="The data">
395             <array length="2" c:type="gpointer">
396               <type name="uint8"/>
397             </array>
398           </parameter>
399           <parameter name="length" transfer-ownership="none">
400             <type name="size_t" c:type="gsize"/>
401           </parameter>
402         </parameters>
403       </method>
404       <method name="do_not_use"
405               c:identifier="annotation_object_do_not_use"
406               deprecated="Use annotation_object_create_object() instead."
407               deprecated-version="0.12">
408         <return-value transfer-ownership="full">
409           <type name="GObject.Object" c:type="GObject*"/>
410         </return-value>
411       </method>
412       <property name="string-property"
413                 version="1.0"
414                 deprecated="Use better-string-property instead"
415                 deprecated-version="1.2"
416                 writable="1"
417                 construct="1"
418                 doc="This is a property which is a string">
419         <type name="utf8" c:type="gchararray"/>
420       </property>
421       <field name="parent_instance">
422         <type name="GObject.Object" c:type="GObject"/>
423       </field>
424       <glib:signal name="string-signal"
425                    doc="This is a signal which has a broken signal handler,
426 it says it&apos;s pointer but it&apos;s actually a string."
427                    version="1.0"
428                    deprecated="Use other-signal instead"
429                    deprecated-version="1.2">
430         <return-value transfer-ownership="full">
431           <type name="none" c:type="void"/>
432         </return-value>
433         <parameters>
434           <parameter name="string" transfer-ownership="none" doc="a string">
435             <type name="utf8" c:type="gpointer"/>
436           </parameter>
437         </parameters>
438       </glib:signal>
439       <glib:signal name="list-signal"
440                    doc="This is a signal which takes a list of strings, but it&apos;s not
441 known by GObject as it&apos;s only marked as G_TYPE_POINTER">
442         <return-value transfer-ownership="full">
443           <type name="none" c:type="void"/>
444         </return-value>
445         <parameters>
446           <parameter name="list"
447                      transfer-ownership="container"
448                      doc="a list of strings">
449             <type name="GLib.List" c:type="gpointer">
450               <type name="utf8"/>
451             </type>
452           </parameter>
453         </parameters>
454       </glib:signal>
455     </class>
456     <record name="ObjectClass"
457             c:type="AnnotationObjectClass"
458             glib:is-class-struct-for="Object">
459       <field name="parent_class">
460         <type name="GObject.ObjectClass" c:type="GObjectClass"/>
461       </field>
462     </record>
463     <callback name="ForeachFunc" c:type="AnnotationForeachFunc">
464       <return-value transfer-ownership="none">
465         <type name="none" c:type="void"/>
466       </return-value>
467       <parameters>
468         <parameter name="object" transfer-ownership="none">
469           <type name="Object" c:type="AnnotationObject*"/>
470         </parameter>
471         <parameter name="item" transfer-ownership="none">
472           <type name="utf8" c:type="char*"/>
473         </parameter>
474         <parameter name="user_data" transfer-ownership="none">
475           <type name="any" c:type="gpointer"/>
476         </parameter>
477       </parameters>
478     </callback>
479     <function name="init" c:identifier="annotation_init">
480       <return-value transfer-ownership="none">
481         <type name="none" c:type="void"/>
482       </return-value>
483       <parameters>
484         <parameter name="argc"
485                    direction="inout"
486                    transfer-ownership="full"
487                    doc="The number of args.">
488           <type name="int" c:type="int*"/>
489         </parameter>
490         <parameter name="argv"
491                    direction="inout"
492                    transfer-ownership="none"
493                    doc="The arguments.">
494           <array length="0" c:type="char***">
495             <type name="utf8"/>
496           </array>
497         </parameter>
498       </parameters>
499     </function>
500     <function name="return_array" c:identifier="annotation_return_array">
501       <return-value transfer-ownership="none" doc="The return value">
502         <array length="0" c:type="char**">
503           <type name="utf8"/>
504         </array>
505       </return-value>
506       <parameters>
507         <parameter name="length"
508                    direction="out"
509                    transfer-ownership="full"
510                    doc="Number of return values">
511           <type name="int" c:type="int*"/>
512         </parameter>
513       </parameters>
514     </function>
515     <function name="versioned"
516               c:identifier="annotation_versioned"
517               version="0.6">
518       <return-value transfer-ownership="none">
519         <type name="none" c:type="void"/>
520       </return-value>
521     </function>
522     <function name="string_zero_terminated"
523               c:identifier="annotation_string_zero_terminated">
524       <return-value transfer-ownership="none" doc="The return value">
525         <array c:type="char**">
526           <type name="utf8"/>
527         </array>
528       </return-value>
529     </function>
530     <function name="string_zero_terminated_out"
531               c:identifier="annotation_string_zero_terminated_out">
532       <return-value transfer-ownership="none">
533         <type name="none" c:type="void"/>
534       </return-value>
535       <parameters>
536         <parameter name="out" direction="inout" transfer-ownership="none">
537           <array c:type="char***">
538             <type name="utf8"/>
539           </array>
540         </parameter>
541       </parameters>
542     </function>
543     <record name="Struct"
544             c:type="AnnotationStruct"
545             doc="This is a test of an array of object in an field of a struct.">
546       <field name="objects" writable="1">
547         <array zero-terminated="0" c:type="AnnotationObject*" fixed-size="10">
548           <type name="Object"/>
549         </array>
550       </field>
551     </record>
552   </namespace>
553 </repository>