gobject-introspection r703 - in trunk: . giscanner tests/scanner



Author: juergbi
Date: Mon Oct 13 20:58:14 2008
New Revision: 703
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=703&view=rev

Log:
2008-10-13  JÃrg Billeter  <j bitron ch>

	* giscanner/glibtransformer.py:
	* tests/scanner/annotation-1.0-expected.gir:
	* tests/scanner/drawable-1.0-expected.gir:
	* tests/scanner/foo-1.0-expected.gir:
	* tests/scanner/utility-1.0-expected.gir:

	Support fields in GObject structs


Modified:
   trunk/ChangeLog
   trunk/giscanner/glibtransformer.py
   trunk/tests/scanner/annotation-1.0-expected.gir
   trunk/tests/scanner/drawable-1.0-expected.gir
   trunk/tests/scanner/foo-1.0-expected.gir
   trunk/tests/scanner/utility-1.0-expected.gir

Modified: trunk/giscanner/glibtransformer.py
==============================================================================
--- trunk/giscanner/glibtransformer.py	(original)
+++ trunk/giscanner/glibtransformer.py	Mon Oct 13 20:58:14 2008
@@ -535,6 +535,12 @@
         self._introspect_properties(node, type_id)
         self._introspect_signals(node, type_id)
         self._introspect_implemented_interfaces(node, type_id)
+
+        # add struct fields
+        struct = self._get_attribute(node.name)
+        if struct is not None:
+            node.fields = struct.fields
+
         self._add_attribute(node, replace=True)
         self._register_internal_type(type_name, node)
 

Modified: trunk/tests/scanner/annotation-1.0-expected.gir
==============================================================================
--- trunk/tests/scanner/annotation-1.0-expected.gir	(original)
+++ trunk/tests/scanner/annotation-1.0-expected.gir	Mon Oct 13 20:58:14 2008
@@ -168,6 +168,9 @@
           <type name="GObject.Object" c:type="GObject*"/>
         </return-value>
       </method>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
     </class>
     <record name="ObjectClass" c:type="AnnotationObjectClass">
       <field name="parent_class">

Modified: trunk/tests/scanner/drawable-1.0-expected.gir
==============================================================================
--- trunk/tests/scanner/drawable-1.0-expected.gir	(original)
+++ trunk/tests/scanner/drawable-1.0-expected.gir	Mon Oct 13 20:58:14 2008
@@ -22,6 +22,9 @@
           </parameter>
         </parameters>
       </method>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
     </class>
     <record name="TestDrawableClass" c:type="TestDrawableClass">
       <field name="parent_class">

Modified: trunk/tests/scanner/foo-1.0-expected.gir
==============================================================================
--- trunk/tests/scanner/foo-1.0-expected.gir	(original)
+++ trunk/tests/scanner/foo-1.0-expected.gir	Mon Oct 13 20:58:14 2008
@@ -126,6 +126,9 @@
       <property name="string" writable="1">
         <type name="utf8" c:type="gchararray"/>
       </property>
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
       <callback name="virtual_method" c:type="virtual_method">
         <return-value>
           <type name="boolean" c:type="gboolean"/>
@@ -182,6 +185,9 @@
           <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">
       <field name="parent_class">

Modified: trunk/tests/scanner/utility-1.0-expected.gir
==============================================================================
--- trunk/tests/scanner/utility-1.0-expected.gir	(original)
+++ trunk/tests/scanner/utility-1.0-expected.gir	Mon Oct 13 20:58:14 2008
@@ -11,6 +11,9 @@
            parent="GObject.Object"
            glib:type-name="UtilityObject"
            glib:get-type="utility_object_get_type">
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
     </class>
     <record name="ObjectClass" c:type="UtilityObjectClass">
       <field name="parent_class">



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]