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