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