Bug 571483 - Sort toplevel .gir entries
authorColin Walters <walters@verbum.org>
Thu, 12 Feb 2009 15:12:01 +0000 (10:12 -0500)
committerColin Walters <walters@verbum.org>
Tue, 17 Feb 2009 22:00:07 +0000 (17:00 -0500)
This ensures we're stable on a macro level.

giscanner/ast.py
giscanner/girwriter.py
tests/scanner/annotation-1.0-expected.gir
tests/scanner/annotation-1.0-expected.tgir
tests/scanner/foo-1.0-expected.gir
tests/scanner/foo-1.0-expected.tgir
tests/scanner/utility-1.0-expected.gir
tests/scanner/utility-1.0-expected.tgir

index 14cd1a6..ff65312 100644 (file)
@@ -150,6 +150,9 @@ class Node(object):
         self.deprecated_version = None
         self.version = None
 
+    def __cmp__(self, other):
+        return cmp(self.name, other.name)
+
     def __repr__(self):
         return '%s(%r)' % (self.__class__.__name__, self.name)
 
index 35c9b35..116681a 100644 (file)
@@ -80,7 +80,20 @@ and/or use gtk-doc annotations. ''')
                  ('version', namespace.version),
                  ('shared-library', ','.join(libraries))]
         with self.tagcontext('namespace', attrs):
-            for node in namespace.nodes:
+            # We define a custom sorting function here because
+            # we want aliases to be first.  They're a bit
+            # special because the typelib compiler expands them.
+            def nscmp(a, b):
+                if isinstance(a, Alias):
+                    if isinstance(b, Alias):
+                        return cmp(a.name, b.name)
+                    else:
+                        return -1
+                elif isinstance(b, Alias):
+                    return 1
+                else:
+                    return cmp(a, b)
+            for node in sorted(namespace.nodes, cmp=nscmp):
                 self._write_node(node)
 
     def _write_node(self, node):
index 16d8ea4..1833f73 100644 (file)
@@ -23,6 +23,22 @@ and/or use gtk-doc annotations.  -->
         </parameter>
       </parameters>
     </callback>
+    <callback name="ForeachFunc" c:type="AnnotationForeachFunc">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="object" transfer-ownership="none">
+          <type name="Object" c:type="AnnotationObject*"/>
+        </parameter>
+        <parameter name="item" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+        <parameter name="user_data" transfer-ownership="none">
+          <type name="any" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </callback>
     <callback name="ListCallback"
               c:type="AnnotationListCallback"
               doc="This is a callback taking a list.">
@@ -461,22 +477,15 @@ known by GObject as it&apos;s only marked as G_TYPE_POINTER">
         <type name="GObject.ObjectClass" c:type="GObjectClass"/>
       </field>
     </record>
-    <callback name="ForeachFunc" c:type="AnnotationForeachFunc">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="object" transfer-ownership="none">
-          <type name="Object" c:type="AnnotationObject*"/>
-        </parameter>
-        <parameter name="item" transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
-        </parameter>
-        <parameter name="user_data" transfer-ownership="none">
-          <type name="any" c:type="gpointer"/>
-        </parameter>
-      </parameters>
-    </callback>
+    <record name="Struct"
+            c:type="AnnotationStruct"
+            doc="This is a test of an array of object in an field of a struct.">
+      <field name="objects" writable="1">
+        <array zero-terminated="0" c:type="AnnotationObject*" fixed-size="10">
+          <type name="Object"/>
+        </array>
+      </field>
+    </record>
     <function name="init" c:identifier="annotation_init">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
@@ -513,13 +522,6 @@ known by GObject as it&apos;s only marked as G_TYPE_POINTER">
         </parameter>
       </parameters>
     </function>
-    <function name="versioned"
-              c:identifier="annotation_versioned"
-              version="0.6">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-    </function>
     <function name="string_zero_terminated"
               c:identifier="annotation_string_zero_terminated">
       <return-value transfer-ownership="none" doc="The return value">
@@ -541,14 +543,12 @@ known by GObject as it&apos;s only marked as G_TYPE_POINTER">
         </parameter>
       </parameters>
     </function>
-    <record name="Struct"
-            c:type="AnnotationStruct"
-            doc="This is a test of an array of object in an field of a struct.">
-      <field name="objects" writable="1">
-        <array zero-terminated="0" c:type="AnnotationObject*" fixed-size="10">
-          <type name="Object"/>
-        </array>
-      </field>
-    </record>
+    <function name="versioned"
+              c:identifier="annotation_versioned"
+              version="0.6">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+    </function>
   </namespace>
 </repository>
index bb85894..a201ec6 100644 (file)
         </parameter>
       </parameters>
     </callback>
+    <callback name="ForeachFunc">
+      <return-value transfer-ownership="none">
+        <type name="none"/>
+      </return-value>
+      <parameters>
+        <parameter name="object" transfer-ownership="none">
+          <type name="Object"/>
+        </parameter>
+        <parameter name="item" transfer-ownership="none">
+          <type name="utf8"/>
+        </parameter>
+        <parameter name="user_data" transfer-ownership="none">
+          <type name="any"/>
+        </parameter>
+      </parameters>
+    </callback>
     <callback name="ListCallback">
       <return-value transfer-ownership="container">
         <type name="GLib.List">
         <type name="GObject.ObjectClass"/>
       </field>
     </record>
-    <callback name="ForeachFunc">
-      <return-value transfer-ownership="none">
-        <type name="none"/>
-      </return-value>
-      <parameters>
-        <parameter name="object" transfer-ownership="none">
+    <record name="Struct">
+      <field name="objects" writable="1">
+        <array fixed-size="10">
           <type name="Object"/>
-        </parameter>
-        <parameter name="item" transfer-ownership="none">
-          <type name="utf8"/>
-        </parameter>
-        <parameter name="user_data" transfer-ownership="none">
-          <type name="any"/>
-        </parameter>
-      </parameters>
-    </callback>
+        </array>
+      </field>
+    </record>
     <function name="init" c:identifier="annotation_init">
       <return-value transfer-ownership="none">
         <type name="none"/>
         </parameter>
       </parameters>
     </function>
-    <function name="versioned" c:identifier="annotation_versioned">
-      <return-value transfer-ownership="none">
-        <type name="none"/>
-      </return-value>
-    </function>
     <function name="string_zero_terminated" c:identifier="annotation_string_zero_terminated">
       <return-value transfer-ownership="none">
         <array zero-terminated="1">
         </parameter>
       </parameters>
     </function>
-    <record name="Struct">
-      <field name="objects" writable="1">
-        <array fixed-size="10">
-          <type name="Object"/>
-        </array>
-      </field>
-    </record>
+    <function name="versioned" c:identifier="annotation_versioned">
+      <return-value transfer-ownership="none">
+        <type name="none"/>
+      </return-value>
+    </function>
   </namespace>
 </repository>
index 8a36791..c0fa2aa 100644 (file)
@@ -12,70 +12,243 @@ and/or use gtk-doc annotations.  -->
   <package name="gobject-2.0"/>
   <namespace name="foo" version="1.0" shared-library="foo">
     <alias name="List" target="GLib.SList" c:type="FooList"/>
-    <alias name="XEvent" target="none" c:type="FooXEvent"/>
     <alias name="ObjectCookie" target="any" c:type="FooObjectCookie"/>
-    <interface name="Interface"
-               c:type="FooInterface"
-               glib:type-name="FooInterface"
-               glib:get-type="foo_interface_get_type">
-      <callback name="do_foo" c:type="do_foo">
-        <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
+    <alias name="XEvent" target="none" c:type="FooXEvent"/>
+    <record name="BRect"
+            c:type="FooBRect"
+            glib:type-name="FooBRect"
+            glib:get-type="foo_brect_get_type">
+      <field name="x" writable="1">
+        <type name="double" c:type="double"/>
+      </field>
+      <field name="y" writable="1">
+        <type name="double" c:type="double"/>
+      </field>
+      <constructor name="new" c:identifier="foo_brect_new">
+        <return-value transfer-ownership="full">
+          <type name="BRect" c:type="FooBRect*"/>
         </return-value>
         <parameters>
-          <parameter name="self" transfer-ownership="none">
-            <type name="Interface" c:type="FooInterface*"/>
+          <parameter name="x" transfer-ownership="none">
+            <type name="double" c:type="double"/>
+          </parameter>
+          <parameter name="y" transfer-ownership="none">
+            <type name="double" c:type="double"/>
           </parameter>
         </parameters>
-      </callback>
-    </interface>
-    <record name="InterfaceIface" c:type="FooInterfaceIface">
-      <field name="parent_iface">
-        <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
-      </field>
-      <callback name="do_foo" c:type="do_foo">
+      </constructor>
+      <method name="add" c:identifier="foo_brect_add">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
-          <parameter name="self" transfer-ownership="none">
-            <type name="Interface" c:type="FooInterface*"/>
+          <parameter name="b2" transfer-ownership="none">
+            <type name="BRect" c:type="FooBRect*"/>
           </parameter>
         </parameters>
-      </callback>
+      </method>
     </record>
-    <interface name="SubInterface"
-               c:type="FooSubInterface"
-               glib:type-name="FooSubInterface"
-               glib:get-type="foo_sub_interface_get_type">
-      <prerequisite name="Interface"/>
-      <method name="do_bar" c:identifier="foo_sub_interface_do_bar">
+    <union name="BUnion"
+           c:type="FooBUnion"
+           glib:type-name="FooBUnion"
+           glib:get-type="foo_bunion_get_type">
+      <field name="type" writable="1">
+        <type name="int" c:type="int"/>
+      </field>
+      <field name="v" writable="1">
+        <type name="double" c:type="double"/>
+      </field>
+      <field name="rect" writable="1">
+        <type name="BRect" c:type="FooBRect*"/>
+      </field>
+      <constructor name="new" c:identifier="foo_bunion_new">
+        <return-value transfer-ownership="full">
+          <type name="BUnion" c:type="FooBUnion*"/>
+        </return-value>
+      </constructor>
+      <method name="get_contained_type"
+              c:identifier="foo_bunion_get_contained_type">
+        <return-value transfer-ownership="none">
+          <type name="int" c:type="int"/>
+        </return-value>
+      </method>
+    </union>
+    <record name="Boxed"
+            c:type="FooBoxed"
+            glib:type-name="FooBoxed"
+            glib:get-type="foo_boxed_get_type">
+      <constructor name="new" c:identifier="foo_boxed_new">
+        <return-value transfer-ownership="full">
+          <type name="Boxed" c:type="FooBoxed*"/>
+        </return-value>
+      </constructor>
+      <method name="method" c:identifier="foo_boxed_method">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
       </method>
-      <callback name="do_bar" c:type="do_bar">
+    </record>
+    <class name="Buffer"
+           c:type="FooBuffer"
+           parent="GObject.Object"
+           glib:type-name="FooBuffer"
+           glib:get-type="foo_buffer_get_type"
+           glib:class-struct="BufferClass">
+      <implements name="Interface"/>
+      <method name="some_method" c:identifier="foo_buffer_some_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+    </class>
+    <record name="BufferClass"
+            c:type="FooBufferClass"
+            glib:is-class-struct-for="Buffer">
+    </record>
+    <callback name="Callback" c:type="FooCallback">
+      <return-value transfer-ownership="none">
+        <type name="boolean" c:type="gboolean"/>
+      </return-value>
+      <parameters>
+        <parameter name="foo" transfer-ownership="none">
+          <type name="Object" c:type="FooObject*"/>
+        </parameter>
+        <parameter name="b" transfer-ownership="none">
+          <type name="boolean" c:type="gboolean"/>
+        </parameter>
+        <parameter name="data" transfer-ownership="none">
+          <type name="any" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <record name="DBusData"
+            c:type="FooDBusData"
+            glib:type-name="FooDBusData"
+            glib:get-type="foo_dbus_data_get_type">
+      <method name="method" c:identifier="foo_dbus_data_method">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+    </record>
+    <enumeration name="EnumFullname" c:type="FooEnumFullname">
+      <member name="one" value="1" c:identifier="FOO_ENUM_FULLNAME_ONE"/>
+      <member name="two" value="2" c:identifier="FOO_ENUM_FULLNAME_TWO"/>
+      <member name="three" value="3" c:identifier="FOO_ENUM_FULLNAME_THREE"/>
+    </enumeration>
+    <enumeration name="EnumNoType" c:type="FooEnumNoType">
+      <member name="un" value="1" c:identifier="FOO_ENUM_UN"/>
+      <member name="deux" value="2" c:identifier="FOO_ENUM_DEUX"/>
+      <member name="trois" value="3" c:identifier="FOO_ENUM_TROIS"/>
+      <member name="neuf" value="9" c:identifier="FOO_ENUM_NEUF"/>
+    </enumeration>
+    <enumeration name="EnumType"
+                 glib:type-name="FooEnumType"
+                 glib:get-type="foo_enum_type_get_type"
+                 c:type="FooEnumType">
+      <member name="alpha"
+              value="0"
+              c:identifier="FOO_ENUM_ALPHA"
+              glib:nick="alpha"/>
+      <member name="beta"
+              value="1"
+              c:identifier="FOO_ENUM_BETA"
+              glib:nick="beta"/>
+      <member name="delta"
+              value="2"
+              c:identifier="FOO_ENUM_DELTA"
+              glib:nick="delta"/>
+    </enumeration>
+    <enumeration name="Error"
+                 glib:type-name="FooError"
+                 glib:get-type="foo_error_get_type"
+                 c:type="FooError"
+                 glib:error-quark="foo_error_quark">
+      <member name="good"
+              value="0"
+              c:identifier="FOO_ERROR_GOOD"
+              glib:nick="good"/>
+      <member name="bad"
+              value="1"
+              c:identifier="FOO_ERROR_BAD"
+              glib:nick="bad"/>
+      <member name="ugly"
+              value="2"
+              c:identifier="FOO_ERROR_UGLY"
+              glib:nick="ugly"/>
+    </enumeration>
+    <union name="Event" c:type="FooEvent">
+      <field name="type" writable="1">
+        <type name="int" c:type="int"/>
+      </field>
+      <field name="any" writable="1">
+        <type name="EventAny" c:type="FooEventAny"/>
+      </field>
+      <field name="expose" writable="1">
+        <type name="EventExpose" c:type="FooEventExpose"/>
+      </field>
+    </union>
+    <record name="EventAny" c:type="FooEventAny">
+      <field name="send_event" writable="1">
+        <type name="int8" c:type="gint8"/>
+      </field>
+    </record>
+    <record name="EventExpose" c:type="FooEventExpose">
+      <field name="send_event" writable="1">
+        <type name="int8" c:type="gint8"/>
+      </field>
+      <field name="count" writable="1">
+        <type name="int" c:type="gint"/>
+      </field>
+    </record>
+    <bitfield name="FlagsNoType" c:type="FooFlagsNoType">
+      <member name="ett" value="1" c:identifier="FOO_FLAGS_ETT"/>
+      <member name="tva" value="2" c:identifier="FOO_FLAGS_TVA"/>
+      <member name="fyra" value="4" c:identifier="FOO_FLAGS_FYRA"/>
+    </bitfield>
+    <bitfield name="FlagsType"
+              glib:type-name="FooFlagsType"
+              glib:get-type="foo_flags_type_get_type"
+              c:type="FooFlagsType">
+      <member name="first"
+              value="1"
+              c:identifier="FOO_FLAGS_FIRST"
+              glib:nick="first"/>
+      <member name="second"
+              value="2"
+              c:identifier="FOO_FLAGS_SECOND"
+              glib:nick="second"/>
+      <member name="third"
+              value="4"
+              c:identifier="FOO_FLAGS_THIRD"
+              glib:nick="third"/>
+    </bitfield>
+    <interface name="Interface"
+               c:type="FooInterface"
+               glib:type-name="FooInterface"
+               glib:get-type="foo_interface_get_type">
+      <callback name="do_foo" c:type="do_foo">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
           <parameter name="self" transfer-ownership="none">
-            <type name="SubInterface" c:type="FooSubInterface*"/>
+            <type name="Interface" c:type="FooInterface*"/>
           </parameter>
         </parameters>
       </callback>
     </interface>
-    <record name="SubInterfaceIface" c:type="FooSubInterfaceIface">
+    <record name="InterfaceIface" c:type="FooInterfaceIface">
       <field name="parent_iface">
         <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
       </field>
-      <callback name="do_bar" c:type="do_bar">
+      <callback name="do_foo" c:type="do_foo">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
           <parameter name="self" transfer-ownership="none">
-            <type name="SubInterface" c:type="FooSubInterface*"/>
+            <type name="Interface" c:type="FooInterface*"/>
           </parameter>
         </parameters>
       </callback>
@@ -222,176 +395,9 @@ and/or use gtk-doc annotations.  -->
         </parameters>
       </callback>
     </record>
-    <class name="Subobject"
-           c:type="FooSubobject"
-           parent="Object"
-           abstract="1"
-           glib:type-name="FooSubobject"
-           glib:get-type="foo_subobject_get_type"
-           glib:class-struct="SubobjectClass">
-      <implements name="Interface"/>
-      <constructor name="new" c:identifier="foo_subobject_new">
-        <return-value transfer-ownership="full">
-          <type name="Subobject" c:type="FooSubobject*"/>
-        </return-value>
-      </constructor>
-      <field name="parent_instance">
-        <type name="Object" c:type="FooObject"/>
-      </field>
-    </class>
-    <record name="SubobjectClass"
-            c:type="FooSubobjectClass"
-            glib:is-class-struct-for="Subobject">
-      <field name="parent_class">
-        <type name="ObjectClass" c:type="FooObjectClass"/>
-      </field>
-    </record>
-    <class name="Buffer"
-           c:type="FooBuffer"
-           parent="GObject.Object"
-           glib:type-name="FooBuffer"
-           glib:get-type="foo_buffer_get_type"
-           glib:class-struct="BufferClass">
-      <implements name="Interface"/>
-      <method name="some_method" c:identifier="foo_buffer_some_method">
-        <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
-        </return-value>
-      </method>
-    </class>
-    <record name="BufferClass"
-            c:type="FooBufferClass"
-            glib:is-class-struct-for="Buffer">
-    </record>
-    <function name="init" c:identifier="foo_init">
-      <return-value transfer-ownership="none">
-        <type name="int" c:type="gint"/>
-      </return-value>
-    </function>
-    <enumeration name="EnumType"
-                 glib:type-name="FooEnumType"
-                 glib:get-type="foo_enum_type_get_type"
-                 c:type="FooEnumType">
-      <member name="alpha"
-              value="0"
-              c:identifier="FOO_ENUM_ALPHA"
-              glib:nick="alpha"/>
-      <member name="beta"
-              value="1"
-              c:identifier="FOO_ENUM_BETA"
-              glib:nick="beta"/>
-      <member name="delta"
-              value="2"
-              c:identifier="FOO_ENUM_DELTA"
-              glib:nick="delta"/>
-    </enumeration>
-    <function name="enum_type_method" c:identifier="foo_enum_type_method">
-      <return-value transfer-ownership="none">
-        <type name="int" c:type="int"/>
-      </return-value>
-      <parameters>
-        <parameter name="foo_enum" transfer-ownership="none">
-          <type name="EnumType" c:type="FooEnumType"/>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="enum_type_returnv" c:identifier="foo_enum_type_returnv">
-      <return-value transfer-ownership="full">
-        <type name="EnumType" c:type="FooEnumType"/>
-      </return-value>
-      <parameters>
-        <parameter name="x" transfer-ownership="none">
-          <type name="int" c:type="int"/>
-        </parameter>
-      </parameters>
-    </function>
-    <bitfield name="FlagsType"
-              glib:type-name="FooFlagsType"
-              glib:get-type="foo_flags_type_get_type"
-              c:type="FooFlagsType">
-      <member name="first"
-              value="1"
-              c:identifier="FOO_FLAGS_FIRST"
-              glib:nick="first"/>
-      <member name="second"
-              value="2"
-              c:identifier="FOO_FLAGS_SECOND"
-              glib:nick="second"/>
-      <member name="third"
-              value="4"
-              c:identifier="FOO_FLAGS_THIRD"
-              glib:nick="third"/>
-    </bitfield>
-    <enumeration name="EnumNoType" c:type="FooEnumNoType">
-      <member name="un" value="1" c:identifier="FOO_ENUM_UN"/>
-      <member name="deux" value="2" c:identifier="FOO_ENUM_DEUX"/>
-      <member name="trois" value="3" c:identifier="FOO_ENUM_TROIS"/>
-      <member name="neuf" value="9" c:identifier="FOO_ENUM_NEUF"/>
-    </enumeration>
-    <bitfield name="FlagsNoType" c:type="FooFlagsNoType">
-      <member name="ett" value="1" c:identifier="FOO_FLAGS_ETT"/>
-      <member name="tva" value="2" c:identifier="FOO_FLAGS_TVA"/>
-      <member name="fyra" value="4" c:identifier="FOO_FLAGS_FYRA"/>
-    </bitfield>
-    <enumeration name="EnumFullname" c:type="FooEnumFullname">
-      <member name="one" value="1" c:identifier="FOO_ENUM_FULLNAME_ONE"/>
-      <member name="two" value="2" c:identifier="FOO_ENUM_FULLNAME_TWO"/>
-      <member name="three" value="3" c:identifier="FOO_ENUM_FULLNAME_THREE"/>
-    </enumeration>
-    <record name="Boxed"
-            c:type="FooBoxed"
-            glib:type-name="FooBoxed"
-            glib:get-type="foo_boxed_get_type">
-      <constructor name="new" c:identifier="foo_boxed_new">
-        <return-value transfer-ownership="full">
-          <type name="Boxed" c:type="FooBoxed*"/>
-        </return-value>
-      </constructor>
-      <method name="method" c:identifier="foo_boxed_method">
-        <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
-        </return-value>
-      </method>
-    </record>
-    <record name="DBusData"
-            c:type="FooDBusData"
-            glib:type-name="FooDBusData"
-            glib:get-type="foo_dbus_data_get_type">
-      <method name="method" c:identifier="foo_dbus_data_method">
-        <return-value transfer-ownership="none">
-          <type name="none" c:type="void"/>
-        </return-value>
-      </method>
-    </record>
-    <callback name="Callback" c:type="FooCallback">
-      <return-value transfer-ownership="none">
-        <type name="boolean" c:type="gboolean"/>
-      </return-value>
-      <parameters>
-        <parameter name="foo" transfer-ownership="none">
-          <type name="Object" c:type="FooObject*"/>
-        </parameter>
-        <parameter name="b" transfer-ownership="none">
-          <type name="boolean" c:type="gboolean"/>
-        </parameter>
-        <parameter name="data" transfer-ownership="none">
-          <type name="any" c:type="gpointer"/>
-        </parameter>
-      </parameters>
-    </callback>
-    <record name="Struct" c:type="FooStruct">
-      <field name="priv" writable="1">
-        <type name="StructPrivate" c:type="FooStructPrivate*"/>
-      </field>
-      <field name="member" writable="1">
-        <type name="int" c:type="int"/>
-      </field>
-    </record>
-    <record name="StructPrivate" c:type="FooStructPrivate">
-    </record>
-    <record name="Rectangle" c:type="FooRectangle">
-      <field name="x" writable="1">
-        <type name="int" c:type="gint"/>
+    <record name="Rectangle" c:type="FooRectangle">
+      <field name="x" writable="1">
+        <type name="int" c:type="gint"/>
       </field>
       <field name="y" writable="1">
         <type name="int" c:type="gint"/>
@@ -432,117 +438,77 @@ and/or use gtk-doc annotations.  -->
         </parameters>
       </method>
     </record>
-    <function name="method_external_references"
-              c:identifier="foo_method_external_references">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="object" transfer-ownership="none">
-          <type name="utility.Object" c:type="UtilityObject*"/>
-        </parameter>
-        <parameter name="e" transfer-ownership="none">
-          <type name="utility.EnumType" c:type="UtilityEnumType"/>
-        </parameter>
-        <parameter name="f" transfer-ownership="none">
-          <type name="utility.FlagType" c:type="UtilityFlagType"/>
-        </parameter>
-        <parameter name="s" transfer-ownership="none">
-          <type name="utility.Struct" c:type="UtilityStruct"/>
-        </parameter>
-      </parameters>
-    </function>
-    <record name="EventAny" c:type="FooEventAny">
-      <field name="send_event" writable="1">
-        <type name="int8" c:type="gint8"/>
-      </field>
-    </record>
-    <record name="EventExpose" c:type="FooEventExpose">
-      <field name="send_event" writable="1">
-        <type name="int8" c:type="gint8"/>
-      </field>
-      <field name="count" writable="1">
-        <type name="int" c:type="gint"/>
+    <constant name="SUCCESS_INT" value="4408">
+      <type name="int"/>
+    </constant>
+    <record name="Struct" c:type="FooStruct">
+      <field name="priv" writable="1">
+        <type name="StructPrivate" c:type="FooStructPrivate*"/>
       </field>
-    </record>
-    <union name="Event" c:type="FooEvent">
-      <field name="type" writable="1">
+      <field name="member" writable="1">
         <type name="int" c:type="int"/>
       </field>
-      <field name="any" writable="1">
-        <type name="EventAny" c:type="FooEventAny"/>
-      </field>
-      <field name="expose" writable="1">
-        <type name="EventExpose" c:type="FooEventExpose"/>
-      </field>
-    </union>
-    <record name="BRect"
-            c:type="FooBRect"
-            glib:type-name="FooBRect"
-            glib:get-type="foo_brect_get_type">
-      <field name="x" writable="1">
-        <type name="double" c:type="double"/>
-      </field>
-      <field name="y" writable="1">
-        <type name="double" c:type="double"/>
-      </field>
-      <constructor name="new" c:identifier="foo_brect_new">
-        <return-value transfer-ownership="full">
-          <type name="BRect" c:type="FooBRect*"/>
+    </record>
+    <record name="StructPrivate" c:type="FooStructPrivate">
+    </record>
+    <interface name="SubInterface"
+               c:type="FooSubInterface"
+               glib:type-name="FooSubInterface"
+               glib:get-type="foo_sub_interface_get_type">
+      <prerequisite name="Interface"/>
+      <method name="do_bar" c:identifier="foo_sub_interface_do_bar">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+      </method>
+      <callback name="do_bar" c:type="do_bar">
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
         </return-value>
         <parameters>
-          <parameter name="x" transfer-ownership="none">
-            <type name="double" c:type="double"/>
-          </parameter>
-          <parameter name="y" transfer-ownership="none">
-            <type name="double" c:type="double"/>
+          <parameter name="self" transfer-ownership="none">
+            <type name="SubInterface" c:type="FooSubInterface*"/>
           </parameter>
         </parameters>
-      </constructor>
-      <method name="add" c:identifier="foo_brect_add">
+      </callback>
+    </interface>
+    <record name="SubInterfaceIface" c:type="FooSubInterfaceIface">
+      <field name="parent_iface">
+        <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
+      </field>
+      <callback name="do_bar" c:type="do_bar">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
-          <parameter name="b2" transfer-ownership="none">
-            <type name="BRect" c:type="FooBRect*"/>
+          <parameter name="self" transfer-ownership="none">
+            <type name="SubInterface" c:type="FooSubInterface*"/>
           </parameter>
         </parameters>
-      </method>
+      </callback>
     </record>
-    <union name="BUnion"
-           c:type="FooBUnion"
-           glib:type-name="FooBUnion"
-           glib:get-type="foo_bunion_get_type">
-      <field name="type" writable="1">
-        <type name="int" c:type="int"/>
-      </field>
-      <field name="v" writable="1">
-        <type name="double" c:type="double"/>
-      </field>
-      <field name="rect" writable="1">
-        <type name="BRect" c:type="FooBRect*"/>
-      </field>
-      <constructor name="new" c:identifier="foo_bunion_new">
+    <class name="Subobject"
+           c:type="FooSubobject"
+           parent="Object"
+           abstract="1"
+           glib:type-name="FooSubobject"
+           glib:get-type="foo_subobject_get_type"
+           glib:class-struct="SubobjectClass">
+      <implements name="Interface"/>
+      <constructor name="new" c:identifier="foo_subobject_new">
         <return-value transfer-ownership="full">
-          <type name="BUnion" c:type="FooBUnion*"/>
+          <type name="Subobject" c:type="FooSubobject*"/>
         </return-value>
       </constructor>
-      <method name="get_contained_type"
-              c:identifier="foo_bunion_get_contained_type">
-        <return-value transfer-ownership="none">
-          <type name="int" c:type="int"/>
-        </return-value>
-      </method>
-    </union>
-    <union name="Union" c:type="_FooUnion">
-      <field name="foo" writable="1">
-        <type name="int" c:type="int"/>
+      <field name="parent_instance">
+        <type name="Object" c:type="FooObject"/>
       </field>
-    </union>
-    <record name="UtilityStruct" c:type="FooUtilityStruct">
-      <field name="bar" writable="1">
-        <type name="utility.Struct" c:type="UtilityStruct"/>
+    </class>
+    <record name="SubobjectClass"
+            c:type="FooSubobjectClass"
+            glib:is-class-struct-for="Subobject">
+      <field name="parent_class">
+        <type name="ObjectClass" c:type="FooObjectClass"/>
       </field>
     </record>
     <record name="ThingWithArray" c:type="_FooThingWithArray">
@@ -561,49 +527,83 @@ and/or use gtk-doc annotations.  -->
         <type name="any" c:type="guchar*"/>
       </field>
     </record>
-    <function name="test_unsigned_qualifier"
-              c:identifier="foo_test_unsigned_qualifier">
+    <union name="Union" c:type="_FooUnion">
+      <field name="foo" writable="1">
+        <type name="int" c:type="int"/>
+      </field>
+    </union>
+    <record name="UtilityStruct" c:type="FooUtilityStruct">
+      <field name="bar" writable="1">
+        <type name="utility.Struct" c:type="UtilityStruct"/>
+      </field>
+    </record>
+    <callback name="VarargsCallback" c:type="FooVarargsCallback">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
       <parameters>
-        <parameter name="unsigned_param" transfer-ownership="none">
-          <type name="uint" c:type="unsigned int"/>
+        <parameter name="param" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+        <parameter transfer-ownership="none">
+          <varargs>
+          </varargs>
         </parameter>
       </parameters>
-    </function>
-    <function name="test_unsigned_type" c:identifier="foo_test_unsigned_type">
+    </callback>
+    <function name="enum_type_method" c:identifier="foo_enum_type_method">
       <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
+        <type name="int" c:type="int"/>
       </return-value>
       <parameters>
-        <parameter name="unsigned_param" transfer-ownership="none">
-          <type name="uint" c:type="unsigned"/>
+        <parameter name="foo_enum" transfer-ownership="none">
+          <type name="EnumType" c:type="FooEnumType"/>
         </parameter>
       </parameters>
     </function>
-    <function name="test_string_array" c:identifier="foo_test_string_array">
+    <function name="enum_type_returnv" c:identifier="foo_enum_type_returnv">
+      <return-value transfer-ownership="full">
+        <type name="EnumType" c:type="FooEnumType"/>
+      </return-value>
+      <parameters>
+        <parameter name="x" transfer-ownership="none">
+          <type name="int" c:type="int"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="init" c:identifier="foo_init">
+      <return-value transfer-ownership="none">
+        <type name="int" c:type="gint"/>
+      </return-value>
+    </function>
+    <function name="method_external_references"
+              c:identifier="foo_method_external_references">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
       <parameters>
-        <parameter name="array" transfer-ownership="none">
-          <array c:type="char**">
-            <type name="utf8"/>
-          </array>
+        <parameter name="object" transfer-ownership="none">
+          <type name="utility.Object" c:type="UtilityObject*"/>
+        </parameter>
+        <parameter name="e" transfer-ownership="none">
+          <type name="utility.EnumType" c:type="UtilityEnumType"/>
+        </parameter>
+        <parameter name="f" transfer-ownership="none">
+          <type name="utility.FlagType" c:type="UtilityFlagType"/>
+        </parameter>
+        <parameter name="s" transfer-ownership="none">
+          <type name="utility.Struct" c:type="UtilityStruct"/>
         </parameter>
       </parameters>
     </function>
-    <function name="test_string_array_with_g"
-              c:identifier="foo_test_string_array_with_g">
+    <function name="test_const_char_param"
+              c:identifier="foo_test_const_char_param">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
       <parameters>
-        <parameter name="array" transfer-ownership="none">
-          <array c:type="gchar**">
-            <type name="utf8"/>
-          </array>
+        <parameter name="param" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
         </parameter>
       </parameters>
     </function>
@@ -613,48 +613,69 @@ and/or use gtk-doc annotations.  -->
         <type name="utf8" c:type="char*"/>
       </return-value>
     </function>
+    <function name="test_const_struct_param"
+              c:identifier="foo_test_const_struct_param">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="param" transfer-ownership="none">
+          <type name="Struct" c:type="FooStruct*"/>
+        </parameter>
+      </parameters>
+    </function>
     <function name="test_const_struct_retval"
               c:identifier="foo_test_const_struct_retval">
       <return-value transfer-ownership="none">
         <type name="Struct" c:type="FooStruct*"/>
       </return-value>
     </function>
-    <function name="test_const_char_param"
-              c:identifier="foo_test_const_char_param">
+    <function name="test_string_array" c:identifier="foo_test_string_array">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
       <parameters>
-        <parameter name="param" transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
+        <parameter name="array" transfer-ownership="none">
+          <array c:type="char**">
+            <type name="utf8"/>
+          </array>
         </parameter>
       </parameters>
     </function>
-    <function name="test_const_struct_param"
-              c:identifier="foo_test_const_struct_param">
+    <function name="test_string_array_with_g"
+              c:identifier="foo_test_string_array_with_g">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
       <parameters>
-        <parameter name="param" transfer-ownership="none">
-          <type name="Struct" c:type="FooStruct*"/>
+        <parameter name="array" transfer-ownership="none">
+          <array c:type="gchar**">
+            <type name="utf8"/>
+          </array>
         </parameter>
       </parameters>
     </function>
-    <callback name="VarargsCallback" c:type="FooVarargsCallback">
+    <function name="test_unsigned_qualifier"
+              c:identifier="foo_test_unsigned_qualifier">
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
       <parameters>
-        <parameter name="param" transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
+        <parameter name="unsigned_param" transfer-ownership="none">
+          <type name="uint" c:type="unsigned int"/>
         </parameter>
-        <parameter transfer-ownership="none">
-          <varargs>
-          </varargs>
+      </parameters>
+    </function>
+    <function name="test_unsigned_type" c:identifier="foo_test_unsigned_type">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="unsigned_param" transfer-ownership="none">
+          <type name="uint" c:type="unsigned"/>
         </parameter>
       </parameters>
-    </callback>
+    </function>
     <function name="test_varargs_callback"
               c:identifier="foo_test_varargs_callback">
       <return-value transfer-ownership="none">
@@ -694,26 +715,5 @@ and/or use gtk-doc annotations.  -->
         </parameter>
       </parameters>
     </function>
-    <enumeration name="Error"
-                 glib:type-name="FooError"
-                 glib:get-type="foo_error_get_type"
-                 c:type="FooError"
-                 glib:error-quark="foo_error_quark">
-      <member name="good"
-              value="0"
-              c:identifier="FOO_ERROR_GOOD"
-              glib:nick="good"/>
-      <member name="bad"
-              value="1"
-              c:identifier="FOO_ERROR_BAD"
-              glib:nick="bad"/>
-      <member name="ugly"
-              value="2"
-              c:identifier="FOO_ERROR_UGLY"
-              glib:nick="ugly"/>
-    </enumeration>
-    <constant name="SUCCESS_INT" value="4408">
-      <type name="int"/>
-    </constant>
   </namespace>
 </repository>
index ce3a045..3401fe2 100644 (file)
   <include name="GObject" version="2.0"/>
   <include name="GLib" version="2.0"/>
   <namespace name="foo" version="1.0" shared-library="foo">
-    <interface name="Interface" glib:type-name="FooInterface" glib:get-type="foo_interface_get_type"/>
-    <record name="InterfaceIface">
-      <field name="parent_iface">
-        <type name="GObject.TypeInterface"/>
+    <record name="BRect" glib:type-name="FooBRect" glib:get-type="foo_brect_get_type">
+      <field name="x" writable="1">
+        <type name="double"/>
+      </field>
+      <field name="y" writable="1">
+        <type name="double"/>
       </field>
+      <constructor name="new" c:identifier="foo_brect_new">
+        <return-value transfer-ownership="full">
+          <type name="BRect"/>
+        </return-value>
+        <parameters>
+          <parameter name="x" transfer-ownership="none">
+            <type name="double"/>
+          </parameter>
+          <parameter name="y" transfer-ownership="none">
+            <type name="double"/>
+          </parameter>
+        </parameters>
+      </constructor>
+      <method name="add" c:identifier="foo_brect_add">
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+        <parameters>
+          <parameter name="b2" transfer-ownership="none">
+            <type name="BRect"/>
+          </parameter>
+        </parameters>
+      </method>
     </record>
-    <interface name="SubInterface" glib:type-name="FooSubInterface" glib:get-type="foo_sub_interface_get_type">
-      <prerequisite name="Interface"/>
-      <method name="do_bar" c:identifier="foo_sub_interface_do_bar">
+    <union name="BUnion" type-name="FooBUnion" get-type="foo_bunion_get_type">
+      <field name="type" writable="1">
+        <type name="int"/>
+      </field>
+      <field name="v" writable="1">
+        <type name="double"/>
+      </field>
+      <field name="rect" writable="1">
+        <type name="BRect"/>
+      </field>
+      <constructor name="new" c:identifier="foo_bunion_new">
+        <return-value transfer-ownership="full">
+          <type name="BUnion"/>
+        </return-value>
+      </constructor>
+      <method name="get_contained_type" c:identifier="foo_bunion_get_contained_type">
+        <return-value transfer-ownership="none">
+          <type name="int"/>
+        </return-value>
+      </method>
+    </union>
+    <record name="Boxed" glib:type-name="FooBoxed" glib:get-type="foo_boxed_get_type">
+      <constructor name="new" c:identifier="foo_boxed_new">
+        <return-value transfer-ownership="full">
+          <type name="Boxed"/>
+        </return-value>
+      </constructor>
+      <method name="method" c:identifier="foo_boxed_method">
         <return-value transfer-ownership="none">
           <type name="none"/>
         </return-value>
       </method>
-    </interface>
-    <record name="SubInterfaceIface">
+    </record>
+    <class name="Buffer" parent="GObject.Object" glib:class-struct="BufferClass" glib:type-name="FooBuffer" glib:get-type="foo_buffer_get_type">
+      <implements name="Interface"/>
+      <method name="some_method" c:identifier="foo_buffer_some_method">
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+      </method>
+    </class>
+    <record name="BufferClass" glib:is-class-struct="1"/>
+    <callback name="Callback">
+      <return-value transfer-ownership="none">
+        <type name="boolean"/>
+      </return-value>
+      <parameters>
+        <parameter name="foo" transfer-ownership="none">
+          <type name="Object"/>
+        </parameter>
+        <parameter name="b" transfer-ownership="none">
+          <type name="boolean"/>
+        </parameter>
+        <parameter name="data" transfer-ownership="none">
+          <type name="any"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <record name="DBusData" glib:type-name="FooDBusData" glib:get-type="foo_dbus_data_get_type">
+      <method name="method" c:identifier="foo_dbus_data_method">
+        <return-value transfer-ownership="none">
+          <type name="none"/>
+        </return-value>
+      </method>
+    </record>
+    <enumeration name="EnumFullname">
+      <member name="one" value="1"/>
+      <member name="two" value="2"/>
+      <member name="three" value="3"/>
+    </enumeration>
+    <enumeration name="EnumNoType">
+      <member name="un" value="1"/>
+      <member name="deux" value="2"/>
+      <member name="trois" value="3"/>
+      <member name="neuf" value="9"/>
+    </enumeration>
+    <enumeration name="EnumType" glib:type-name="FooEnumType" glib:get-type="foo_enum_type_get_type">
+      <member name="alpha" value="0"/>
+      <member name="beta" value="1"/>
+      <member name="delta" value="2"/>
+    </enumeration>
+    <enumeration name="Error" glib:type-name="FooError" glib:get-type="foo_error_get_type">
+      <member name="good" value="0"/>
+      <member name="bad" value="1"/>
+      <member name="ugly" value="2"/>
+    </enumeration>
+    <union name="Event">
+      <field name="type" writable="1">
+        <type name="int"/>
+      </field>
+      <field name="any" writable="1">
+        <type name="EventAny"/>
+      </field>
+      <field name="expose" writable="1">
+        <type name="EventExpose"/>
+      </field>
+    </union>
+    <record name="EventAny">
+      <field name="send_event" writable="1">
+        <type name="int8"/>
+      </field>
+    </record>
+    <record name="EventExpose">
+      <field name="send_event" writable="1">
+        <type name="int8"/>
+      </field>
+      <field name="count" writable="1">
+        <type name="int"/>
+      </field>
+    </record>
+    <bitfield name="FlagsNoType">
+      <member name="ett" value="1"/>
+      <member name="tva" value="2"/>
+      <member name="fyra" value="4"/>
+    </bitfield>
+    <bitfield name="FlagsType" glib:type-name="FooFlagsType" glib:get-type="foo_flags_type_get_type">
+      <member name="first" value="1"/>
+      <member name="second" value="2"/>
+      <member name="third" value="4"/>
+    </bitfield>
+    <interface name="Interface" glib:type-name="FooInterface" glib:get-type="foo_interface_get_type"/>
+    <record name="InterfaceIface">
       <field name="parent_iface">
         <type name="GObject.TypeInterface"/>
       </field>
         <type name="GObject.ObjectClass"/>
       </field>
     </record>
-    <class name="Subobject" parent="Object" glib:class-struct="SubobjectClass" abstract="1" glib:type-name="FooSubobject" glib:get-type="foo_subobject_get_type">
-      <implements name="Interface"/>
-      <field name="parent_instance">
-        <type name="Object"/>
-      </field>
-      <constructor name="new" c:identifier="foo_subobject_new">
-        <return-value transfer-ownership="full">
-          <type name="Subobject"/>
-        </return-value>
-      </constructor>
-    </class>
-    <record name="SubobjectClass" glib:is-class-struct="1">
-      <field name="parent_class">
-        <type name="ObjectClass"/>
-      </field>
-    </record>
-    <class name="Buffer" parent="GObject.Object" glib:class-struct="BufferClass" glib:type-name="FooBuffer" glib:get-type="foo_buffer_get_type">
-      <implements name="Interface"/>
-      <method name="some_method" c:identifier="foo_buffer_some_method">
-        <return-value transfer-ownership="none">
-          <type name="none"/>
-        </return-value>
-      </method>
-    </class>
-    <record name="BufferClass" glib:is-class-struct="1"/>
-    <function name="init" c:identifier="foo_init">
-      <return-value transfer-ownership="none">
-        <type name="int"/>
-      </return-value>
-    </function>
-    <enumeration name="EnumType" glib:type-name="FooEnumType" glib:get-type="foo_enum_type_get_type">
-      <member name="alpha" value="0"/>
-      <member name="beta" value="1"/>
-      <member name="delta" value="2"/>
-    </enumeration>
-    <function name="enum_type_method" c:identifier="foo_enum_type_method">
-      <return-value transfer-ownership="none">
-        <type name="int"/>
-      </return-value>
-      <parameters>
-        <parameter name="foo_enum" transfer-ownership="none">
-          <type name="EnumType"/>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="enum_type_returnv" c:identifier="foo_enum_type_returnv">
-      <return-value transfer-ownership="full">
-        <type name="EnumType"/>
-      </return-value>
-      <parameters>
-        <parameter name="x" transfer-ownership="none">
-          <type name="int"/>
-        </parameter>
-      </parameters>
-    </function>
-    <bitfield name="FlagsType" glib:type-name="FooFlagsType" glib:get-type="foo_flags_type_get_type">
-      <member name="first" value="1"/>
-      <member name="second" value="2"/>
-      <member name="third" value="4"/>
-    </bitfield>
-    <enumeration name="EnumNoType">
-      <member name="un" value="1"/>
-      <member name="deux" value="2"/>
-      <member name="trois" value="3"/>
-      <member name="neuf" value="9"/>
-    </enumeration>
-    <bitfield name="FlagsNoType">
-      <member name="ett" value="1"/>
-      <member name="tva" value="2"/>
-      <member name="fyra" value="4"/>
-    </bitfield>
-    <enumeration name="EnumFullname">
-      <member name="one" value="1"/>
-      <member name="two" value="2"/>
-      <member name="three" value="3"/>
-    </enumeration>
-    <record name="Boxed" glib:type-name="FooBoxed" glib:get-type="foo_boxed_get_type">
-      <constructor name="new" c:identifier="foo_boxed_new">
-        <return-value transfer-ownership="full">
-          <type name="Boxed"/>
-        </return-value>
-      </constructor>
-      <method name="method" c:identifier="foo_boxed_method">
-        <return-value transfer-ownership="none">
-          <type name="none"/>
-        </return-value>
-      </method>
-    </record>
-    <record name="DBusData" glib:type-name="FooDBusData" glib:get-type="foo_dbus_data_get_type">
-      <method name="method" c:identifier="foo_dbus_data_method">
-        <return-value transfer-ownership="none">
-          <type name="none"/>
-        </return-value>
-      </method>
-    </record>
-    <callback name="Callback">
-      <return-value transfer-ownership="none">
-        <type name="boolean"/>
-      </return-value>
-      <parameters>
-        <parameter name="foo" transfer-ownership="none">
-          <type name="Object"/>
-        </parameter>
-        <parameter name="b" transfer-ownership="none">
-          <type name="boolean"/>
-        </parameter>
-        <parameter name="data" transfer-ownership="none">
-          <type name="any"/>
-        </parameter>
-      </parameters>
-    </callback>
-    <record name="Struct">
-      <field name="priv" writable="1">
-        <type name="StructPrivate"/>
-      </field>
-      <field name="member" writable="1">
-        <type name="int"/>
-      </field>
-    </record>
-    <record name="StructPrivate"/>
     <record name="Rectangle">
       <field name="x" writable="1">
         <type name="int"/>
         </parameters>
       </method>
     </record>
-    <function name="method_external_references" c:identifier="foo_method_external_references">
-      <return-value transfer-ownership="none">
-        <type name="none"/>
-      </return-value>
-      <parameters>
-        <parameter name="object" transfer-ownership="none">
-          <type name="utility.Object"/>
-        </parameter>
-        <parameter name="e" transfer-ownership="none">
-          <type name="utility.EnumType"/>
-        </parameter>
-        <parameter name="f" transfer-ownership="none">
-          <type name="utility.FlagType"/>
-        </parameter>
-        <parameter name="s" transfer-ownership="none">
-          <type name="utility.Struct"/>
-        </parameter>
-      </parameters>
-    </function>
-    <record name="EventAny">
-      <field name="send_event" writable="1">
-        <type name="int8"/>
-      </field>
-    </record>
-    <record name="EventExpose">
-      <field name="send_event" writable="1">
-        <type name="int8"/>
+    <constant name="SUCCESS_INT" value="4408">
+      <type name="int"/>
+    </constant>
+    <record name="Struct">
+      <field name="priv" writable="1">
+        <type name="StructPrivate"/>
       </field>
-      <field name="count" writable="1">
+      <field name="member" writable="1">
         <type name="int"/>
       </field>
     </record>
-    <union name="Event">
-      <field name="type" writable="1">
-        <type name="int"/>
-      </field>
-      <field name="any" writable="1">
-        <type name="EventAny"/>
-      </field>
-      <field name="expose" writable="1">
-        <type name="EventExpose"/>
-      </field>
-    </union>
-    <record name="BRect" glib:type-name="FooBRect" glib:get-type="foo_brect_get_type">
-      <field name="x" writable="1">
-        <type name="double"/>
-      </field>
-      <field name="y" writable="1">
-        <type name="double"/>
-      </field>
-      <constructor name="new" c:identifier="foo_brect_new">
-        <return-value transfer-ownership="full">
-          <type name="BRect"/>
-        </return-value>
-        <parameters>
-          <parameter name="x" transfer-ownership="none">
-            <type name="double"/>
-          </parameter>
-          <parameter name="y" transfer-ownership="none">
-            <type name="double"/>
-          </parameter>
-        </parameters>
-      </constructor>
-      <method name="add" c:identifier="foo_brect_add">
+    <record name="StructPrivate"/>
+    <interface name="SubInterface" glib:type-name="FooSubInterface" glib:get-type="foo_sub_interface_get_type">
+      <prerequisite name="Interface"/>
+      <method name="do_bar" c:identifier="foo_sub_interface_do_bar">
         <return-value transfer-ownership="none">
           <type name="none"/>
         </return-value>
-        <parameters>
-          <parameter name="b2" transfer-ownership="none">
-            <type name="BRect"/>
-          </parameter>
-        </parameters>
       </method>
-    </record>
-    <union name="BUnion" type-name="FooBUnion" get-type="foo_bunion_get_type">
-      <field name="type" writable="1">
-        <type name="int"/>
-      </field>
-      <field name="v" writable="1">
-        <type name="double"/>
+    </interface>
+    <record name="SubInterfaceIface">
+      <field name="parent_iface">
+        <type name="GObject.TypeInterface"/>
       </field>
-      <field name="rect" writable="1">
-        <type name="BRect"/>
+    </record>
+    <class name="Subobject" parent="Object" glib:class-struct="SubobjectClass" abstract="1" glib:type-name="FooSubobject" glib:get-type="foo_subobject_get_type">
+      <implements name="Interface"/>
+      <field name="parent_instance">
+        <type name="Object"/>
       </field>
-      <constructor name="new" c:identifier="foo_bunion_new">
+      <constructor name="new" c:identifier="foo_subobject_new">
         <return-value transfer-ownership="full">
-          <type name="BUnion"/>
+          <type name="Subobject"/>
         </return-value>
       </constructor>
-      <method name="get_contained_type" c:identifier="foo_bunion_get_contained_type">
-        <return-value transfer-ownership="none">
-          <type name="int"/>
-        </return-value>
-      </method>
-    </union>
-    <union name="Union">
-      <field name="foo" writable="1">
-        <type name="int"/>
-      </field>
-    </union>
-    <record name="UtilityStruct">
-      <field name="bar" writable="1">
-        <type name="utility.Struct"/>
+    </class>
+    <record name="SubobjectClass" glib:is-class-struct="1">
+      <field name="parent_class">
+        <type name="ObjectClass"/>
       </field>
     </record>
     <record name="ThingWithArray">
         <type name="any"/>
       </field>
     </record>
-    <function name="test_unsigned_qualifier" c:identifier="foo_test_unsigned_qualifier">
+    <union name="Union">
+      <field name="foo" writable="1">
+        <type name="int"/>
+      </field>
+    </union>
+    <record name="UtilityStruct">
+      <field name="bar" writable="1">
+        <type name="utility.Struct"/>
+      </field>
+    </record>
+    <function name="enum_type_method" c:identifier="foo_enum_type_method">
+      <return-value transfer-ownership="none">
+        <type name="int"/>
+      </return-value>
+      <parameters>
+        <parameter name="foo_enum" transfer-ownership="none">
+          <type name="EnumType"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="enum_type_returnv" c:identifier="foo_enum_type_returnv">
+      <return-value transfer-ownership="full">
+        <type name="EnumType"/>
+      </return-value>
+      <parameters>
+        <parameter name="x" transfer-ownership="none">
+          <type name="int"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="init" c:identifier="foo_init">
+      <return-value transfer-ownership="none">
+        <type name="int"/>
+      </return-value>
+    </function>
+    <function name="method_external_references" c:identifier="foo_method_external_references">
       <return-value transfer-ownership="none">
         <type name="none"/>
       </return-value>
       <parameters>
-        <parameter name="unsigned_param" transfer-ownership="none">
-          <type name="uint"/>
+        <parameter name="object" transfer-ownership="none">
+          <type name="utility.Object"/>
+        </parameter>
+        <parameter name="e" transfer-ownership="none">
+          <type name="utility.EnumType"/>
+        </parameter>
+        <parameter name="f" transfer-ownership="none">
+          <type name="utility.FlagType"/>
+        </parameter>
+        <parameter name="s" transfer-ownership="none">
+          <type name="utility.Struct"/>
         </parameter>
       </parameters>
     </function>
-    <function name="test_unsigned_type" c:identifier="foo_test_unsigned_type">
+    <function name="test_const_char_param" c:identifier="foo_test_const_char_param">
       <return-value transfer-ownership="none">
         <type name="none"/>
       </return-value>
       <parameters>
-        <parameter name="unsigned_param" transfer-ownership="none">
-          <type name="uint"/>
+        <parameter name="param" transfer-ownership="none">
+          <type name="utf8"/>
         </parameter>
       </parameters>
     </function>
+    <function name="test_const_char_retval" c:identifier="foo_test_const_char_retval">
+      <return-value transfer-ownership="none">
+        <type name="utf8"/>
+      </return-value>
+    </function>
+    <function name="test_const_struct_param" c:identifier="foo_test_const_struct_param">
+      <return-value transfer-ownership="none">
+        <type name="none"/>
+      </return-value>
+      <parameters>
+        <parameter name="param" transfer-ownership="none">
+          <type name="Struct"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="test_const_struct_retval" c:identifier="foo_test_const_struct_retval">
+      <return-value transfer-ownership="none">
+        <type name="Struct"/>
+      </return-value>
+    </function>
     <function name="test_string_array" c:identifier="foo_test_string_array">
       <return-value transfer-ownership="none">
         <type name="none"/>
         </parameter>
       </parameters>
     </function>
-    <function name="test_const_char_retval" c:identifier="foo_test_const_char_retval">
-      <return-value transfer-ownership="none">
-        <type name="utf8"/>
-      </return-value>
-    </function>
-    <function name="test_const_struct_retval" c:identifier="foo_test_const_struct_retval">
-      <return-value transfer-ownership="none">
-        <type name="Struct"/>
-      </return-value>
-    </function>
-    <function name="test_const_char_param" c:identifier="foo_test_const_char_param">
+    <function name="test_unsigned_qualifier" c:identifier="foo_test_unsigned_qualifier">
       <return-value transfer-ownership="none">
         <type name="none"/>
       </return-value>
       <parameters>
-        <parameter name="param" transfer-ownership="none">
-          <type name="utf8"/>
+        <parameter name="unsigned_param" transfer-ownership="none">
+          <type name="uint"/>
         </parameter>
       </parameters>
     </function>
-    <function name="test_const_struct_param" c:identifier="foo_test_const_struct_param">
+    <function name="test_unsigned_type" c:identifier="foo_test_unsigned_type">
       <return-value transfer-ownership="none">
         <type name="none"/>
       </return-value>
       <parameters>
-        <parameter name="param" transfer-ownership="none">
-          <type name="Struct"/>
+        <parameter name="unsigned_param" transfer-ownership="none">
+          <type name="uint"/>
         </parameter>
       </parameters>
     </function>
-    <enumeration name="Error" glib:type-name="FooError" glib:get-type="foo_error_get_type">
-      <member name="good" value="0"/>
-      <member name="bad" value="1"/>
-      <member name="ugly" value="2"/>
-    </enumeration>
-    <constant name="SUCCESS_INT" value="4408">
-      <type name="int"/>
-    </constant>
   </namespace>
 </repository>
index 2848d14..3d8aed0 100644 (file)
@@ -11,6 +11,42 @@ and/or use gtk-doc annotations.  -->
   <package name="gobject-2.0"/>
   <namespace name="utility" version="1.0" shared-library="utility">
     <alias name="Glyph" target="uint32" c:type="UtilityGlyph"/>
+    <union name="Byte" c:type="UtilityByte">
+      <field name="value" writable="1">
+        <type name="uint8" c:type="guint8"/>
+      </field>
+      <record>
+        <field name="first_nibble" writable="1" bits="4">
+          <type name="uint8" c:type="guint8"/>
+        </field>
+        <field name="second_nibble" writable="1" bits="4">
+          <type name="uint8" c:type="guint8"/>
+        </field>
+      </record>
+    </union>
+    <enumeration name="EnumType" c:type="UtilityEnumType">
+      <member name="a" value="0" c:identifier="UTILITY_ENUM_A"/>
+      <member name="b" value="1" c:identifier="UTILITY_ENUM_B"/>
+      <member name="c" value="2" c:identifier="UTILITY_ENUM_C"/>
+    </enumeration>
+    <callback name="FileFunc" c:type="UtilityFileFunc">
+      <return-value transfer-ownership="none">
+        <type name="none" c:type="void"/>
+      </return-value>
+      <parameters>
+        <parameter name="path" transfer-ownership="none">
+          <type name="utf8" c:type="char*"/>
+        </parameter>
+        <parameter name="user_data" transfer-ownership="none">
+          <type name="any" c:type="gpointer"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <enumeration name="FlagType" c:type="UtilityFlagType">
+      <member name="a" value="0" c:identifier="UTILITY_FLAG_A"/>
+      <member name="b" value="1" c:identifier="UTILITY_FLAG_B"/>
+      <member name="c" value="2" c:identifier="UTILITY_FLAG_C"/>
+    </enumeration>
     <class name="Object"
            c:type="UtilityObject"
            parent="GObject.Object"
@@ -50,58 +86,6 @@ and/or use gtk-doc annotations.  -->
         <type name="GObject.ObjectClass" c:type="GObjectClass"/>
       </field>
     </record>
-    <record name="TaggedValue" c:type="UtilityTaggedValue">
-      <field name="tag" writable="1">
-        <type name="int" c:type="int"/>
-      </field>
-      <union>
-        <field name="v_pointer" writable="1">
-          <type name="any" c:type="gpointer"/>
-        </field>
-        <field name="v_real" writable="1">
-          <type name="double" c:type="double"/>
-        </field>
-        <field name="v_integer" writable="1">
-          <type name="long" c:type="long"/>
-        </field>
-      </union>
-    </record>
-    <union name="Byte" c:type="UtilityByte">
-      <field name="value" writable="1">
-        <type name="uint8" c:type="guint8"/>
-      </field>
-      <record>
-        <field name="first_nibble" writable="1" bits="4">
-          <type name="uint8" c:type="guint8"/>
-        </field>
-        <field name="second_nibble" writable="1" bits="4">
-          <type name="uint8" c:type="guint8"/>
-        </field>
-      </record>
-    </union>
-    <callback name="FileFunc" c:type="UtilityFileFunc">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="path" transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
-        </parameter>
-        <parameter name="user_data" transfer-ownership="none">
-          <type name="any" c:type="gpointer"/>
-        </parameter>
-      </parameters>
-    </callback>
-    <enumeration name="EnumType" c:type="UtilityEnumType">
-      <member name="a" value="0" c:identifier="UTILITY_ENUM_A"/>
-      <member name="b" value="1" c:identifier="UTILITY_ENUM_B"/>
-      <member name="c" value="2" c:identifier="UTILITY_ENUM_C"/>
-    </enumeration>
-    <enumeration name="FlagType" c:type="UtilityFlagType">
-      <member name="a" value="0" c:identifier="UTILITY_FLAG_A"/>
-      <member name="b" value="1" c:identifier="UTILITY_FLAG_B"/>
-      <member name="c" value="2" c:identifier="UTILITY_FLAG_C"/>
-    </enumeration>
     <record name="Struct" c:type="UtilityStruct">
       <field name="field" writable="1">
         <type name="int" c:type="int"/>
@@ -118,6 +102,22 @@ and/or use gtk-doc annotations.  -->
         </array>
       </field>
     </record>
+    <record name="TaggedValue" c:type="UtilityTaggedValue">
+      <field name="tag" writable="1">
+        <type name="int" c:type="int"/>
+      </field>
+      <union>
+        <field name="v_pointer" writable="1">
+          <type name="any" c:type="gpointer"/>
+        </field>
+        <field name="v_real" writable="1">
+          <type name="double" c:type="double"/>
+        </field>
+        <field name="v_integer" writable="1">
+          <type name="long" c:type="long"/>
+        </field>
+      </union>
+    </record>
     <union name="Union" c:type="UtilityUnion">
       <field name="pointer" writable="1">
         <type name="utf8" c:type="char*"/>
index e55fc80..34bdce5 100644 (file)
@@ -6,6 +6,34 @@
   <include name="GObject" version="2.0"/>
   <include name="GLib" version="2.0"/>
   <namespace name="utility" version="1.0" shared-library="utility">
+    <union name="Byte">
+      <field name="value" writable="1">
+        <type name="uint8"/>
+      </field>
+    </union>
+    <enumeration name="EnumType">
+      <member name="a" value="0"/>
+      <member name="b" value="1"/>
+      <member name="c" value="2"/>
+    </enumeration>
+    <callback name="FileFunc">
+      <return-value transfer-ownership="none">
+        <type name="none"/>
+      </return-value>
+      <parameters>
+        <parameter name="path" transfer-ownership="none">
+          <type name="utf8"/>
+        </parameter>
+        <parameter name="user_data" transfer-ownership="none">
+          <type name="any"/>
+        </parameter>
+      </parameters>
+    </callback>
+    <enumeration name="FlagType">
+      <member name="a" value="0"/>
+      <member name="b" value="1"/>
+      <member name="c" value="2"/>
+    </enumeration>
     <class name="Object" parent="GObject.Object" glib:class-struct="ObjectClass" glib:type-name="UtilityObject" glib:get-type="utility_object_get_type">
       <field name="parent_instance">
         <type name="GObject.Object"/>
         <type name="GObject.ObjectClass"/>
       </field>
     </record>
-    <record name="TaggedValue">
-      <field name="tag" writable="1">
-        <type name="int"/>
-      </field>
-    </record>
-    <union name="Byte">
-      <field name="value" writable="1">
-        <type name="uint8"/>
-      </field>
-    </union>
-    <callback name="FileFunc">
-      <return-value transfer-ownership="none">
-        <type name="none"/>
-      </return-value>
-      <parameters>
-        <parameter name="path" transfer-ownership="none">
-          <type name="utf8"/>
-        </parameter>
-        <parameter name="user_data" transfer-ownership="none">
-          <type name="any"/>
-        </parameter>
-      </parameters>
-    </callback>
-    <enumeration name="EnumType">
-      <member name="a" value="0"/>
-      <member name="b" value="1"/>
-      <member name="c" value="2"/>
-    </enumeration>
-    <enumeration name="FlagType">
-      <member name="a" value="0"/>
-      <member name="b" value="1"/>
-      <member name="c" value="2"/>
-    </enumeration>
     <record name="Struct">
       <field name="field" writable="1">
         <type name="int"/>
         </array>
       </field>
     </record>
+    <record name="TaggedValue">
+      <field name="tag" writable="1">
+        <type name="int"/>
+      </field>
+    </record>
     <union name="Union">
       <field name="pointer" writable="1">
         <type name="utf8"/>