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