scanner: Always explicitely set the scope of callbacks
[gnome.gobject-introspection] / tests / scanner / annotation-1.0-expected.gir
index 91fe561..ab81ae1 100644 (file)
@@ -12,7 +12,7 @@ and/or use gtk-doc annotations.  -->
   <package name="gobject-2.0"/>
   <namespace name="annotation"
              version="1.0"
-             shared-library="annotation"
+             shared-library="libannotation.so"
              c:prefix="annotation">
     <callback name="Callback"
               c:type="AnnotationCallback"
@@ -58,6 +58,22 @@ and/or use gtk-doc annotations.  -->
         </parameter>
       </parameters>
     </callback>
+    <callback name="NotifyFunc"
+              c:type="AnnotationNotifyFunc"
+              doc="This is a callback with a &apos;closure&apos; argument that is not named
+&apos;user_data&apos; and hence has to be annotated.">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="data"
+                   transfer-ownership="none"
+                   closure="0"
+                   doc="The user data">
+          <type name="any" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </callback>
     <class name="Object"
            c:type="AnnotationObject"
            doc="This is an object used to test annotations."
@@ -328,7 +344,7 @@ intentionally similar example to gtk_container_get_children">
           </parameter>
           <parameter name="argv"
                      direction="inout"
-                     transfer-ownership="none"
+                     transfer-ownership="full"
                      doc="Argument vector">
             <array length="1" c:type="char***">
               <type name="utf8"/>
@@ -430,6 +446,28 @@ type.">
           <type name="GObject.Object" c:type="GObject*"/>
         </return-value>
       </method>
+      <method name="watch"
+              c:identifier="annotation_object_watch_full"
+              doc="Test overriding via the &quot;Rename To&quot; annotation.">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="func"
+                     transfer-ownership="none"
+                     scope="notified"
+                     closure="2"
+                     destroy="3">
+            <type name="ForeachFunc" c:type="AnnotationForeachFunc"/>
+          </parameter>
+          <parameter name="user_data" transfer-ownership="none">
+            <type name="any" c:type="gpointer"/>
+          </parameter>
+          <parameter name="destroy" transfer-ownership="none" scope="call">
+            <type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
+          </parameter>
+        </parameters>
+      </method>
       <method name="extra_annos" c:identifier="annotation_object_extra_annos">
         <attribute name="org.foobar" value="testvalue"/>
         <return-value transfer-ownership="none">
@@ -448,18 +486,14 @@ type.">
       <field name="parent_instance">
         <type name="GObject.Object" c:type="GObject"/>
       </field>
-      <glib:signal name="string-signal"
-                   doc="This is a signal which has a broken signal handler,
-it says it&apos;s pointer but it&apos;s actually a string."
-                   version="1.0"
-                   deprecated="Use other-signal instead"
-                   deprecated-version="1.2">
+      <glib:signal name="doc-empty-arg-parsing"
+                   doc="This signal tests an empty document argument (@arg1)">
         <return-value transfer-ownership="full">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
-          <parameter name="string" transfer-ownership="none" doc="a string">
-            <type name="utf8" c:type="gpointer"/>
+          <parameter name="arg1" transfer-ownership="none">
+            <type name="any" c:type="gpointer"/>
           </parameter>
         </parameters>
       </glib:signal>
@@ -479,6 +513,21 @@ known by GObject as it&apos;s only marked as G_TYPE_POINTER">
           </parameter>
         </parameters>
       </glib:signal>
+      <glib:signal name="string-signal"
+                   doc="This is a signal which has a broken signal handler,
+it says it&apos;s pointer but it&apos;s actually a string."
+                   version="1.0"
+                   deprecated="Use other-signal instead"
+                   deprecated-version="1.2">
+        <return-value transfer-ownership="full">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <parameter name="string" transfer-ownership="none" doc="a string">
+            <type name="utf8" c:type="gpointer"/>
+          </parameter>
+        </parameters>
+      </glib:signal>
     </class>
     <record name="ObjectClass"
             c:type="AnnotationObjectClass"
@@ -496,6 +545,30 @@ known by GObject as it&apos;s only marked as G_TYPE_POINTER">
         </array>
       </field>
     </record>
+    <function name="custom_destroy"
+              c:identifier="annotation_custom_destroy"
+              doc="Test messing up the heuristic of closure/destroy-notification
+detection, and fixing it via annotations.">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="callback"
+                   transfer-ownership="none"
+                   scope="call"
+                   closure="2"
+                   destroy="1"
+                   doc="Destroy notification">
+          <type name="Callback" c:type="AnnotationCallback"/>
+        </parameter>
+        <parameter name="destroy" transfer-ownership="none" scope="call">
+          <type name="NotifyFunc" c:type="AnnotationNotifyFunc"/>
+        </parameter>
+        <parameter name="data" transfer-ownership="none">
+          <type name="any" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </function>
     <function name="get_source_file" c:identifier="annotation_get_source_file">
       <return-value transfer-ownership="full" doc="Source file">
         <type name="filename" c:type="char*"/>
@@ -514,7 +587,7 @@ known by GObject as it&apos;s only marked as G_TYPE_POINTER">
         </parameter>
         <parameter name="argv"
                    direction="inout"
-                   transfer-ownership="none"
+                   transfer-ownership="full"
                    doc="The arguments.">
           <array length="0" c:type="char***">
             <type name="utf8"/>
@@ -523,7 +596,7 @@ known by GObject as it&apos;s only marked as G_TYPE_POINTER">
       </parameters>
     </function>
     <function name="return_array" c:identifier="annotation_return_array">
-      <return-value transfer-ownership="none" doc="The return value">
+      <return-value transfer-ownership="full" doc="The return value">
         <array length="0" c:type="char**">
           <type name="utf8"/>
         </array>
@@ -547,9 +620,25 @@ known by GObject as it&apos;s only marked as G_TYPE_POINTER">
         </parameter>
       </parameters>
     </function>
+    <function name="string_array_length"
+              c:identifier="annotation_string_array_length">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="n_properties" transfer-ownership="none">
+          <type name="uint" c:type="guint"/>
+        </parameter>
+        <parameter name="properties" transfer-ownership="none">
+          <array length="0" c:type="gchar*">
+            <type name="utf8"/>
+          </array>
+        </parameter>
+      </parameters>
+    </function>
     <function name="string_zero_terminated"
               c:identifier="annotation_string_zero_terminated">
-      <return-value transfer-ownership="none" doc="The return value">
+      <return-value transfer-ownership="full" doc="The return value">
         <array c:type="char**">
           <type name="utf8"/>
         </array>
@@ -561,7 +650,7 @@ known by GObject as it&apos;s only marked as G_TYPE_POINTER">
         <type name="none" c:type="void"/>
       </return-value>
       <parameters>
-        <parameter name="out" direction="inout" transfer-ownership="none">
+        <parameter name="out" direction="inout" transfer-ownership="full">
           <array c:type="char***">
             <type name="utf8"/>
           </array>