gobject-introspection r410 - in trunk: . tests/scanner



Author: johan
Date: Wed Aug 20 12:33:40 2008
New Revision: 410
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=410&view=rev

Log:
2008-08-20  Johan Dahlin  <johan gnome org>

    * tests/scanner/Makefile.am:
    * tests/scanner/annotation-expected.gir:
    * tests/scanner/annotation.c (annotation_object_class_init),
    (annotation_object_init), (annotation_object_method),
    (annotation_object_in), (annotation_object_out),
    (annotation_object_inout), (annotation_object_inout2),
    (annotation_object_inout3), (annotation_object_calleeowns),
    (annotation_object_calleesowns), (annotation_object_get_strings),
    (annotation_object_with_voidp), (annotation_object_get_objects),
    (annotation_object_create_object), (annotation_object_allow_none):
    * tests/scanner/annotation.h:
    * tests/scanner/foo-expected.gir:
    * tests/scanner/foo.c:
    * tests/scanner/foo.h:
    Split out annotation tests out of foo



Added:
   trunk/tests/scanner/annotation-expected.gir
   trunk/tests/scanner/annotation.c
   trunk/tests/scanner/annotation.h
Modified:
   trunk/ChangeLog
   trunk/tests/scanner/   (props changed)
   trunk/tests/scanner/Makefile.am
   trunk/tests/scanner/foo-expected.gir
   trunk/tests/scanner/foo.c
   trunk/tests/scanner/foo.h

Modified: trunk/tests/scanner/Makefile.am
==============================================================================
--- trunk/tests/scanner/Makefile.am	(original)
+++ trunk/tests/scanner/Makefile.am	Wed Aug 20 12:33:40 2008
@@ -1,9 +1,18 @@
 # We need to build a shared library, which can be dlopened
 # it does not work with noinst_LTLIBRARIES
-testlib_LTLIBRARIES = libdrawable.la libfoo.la libutility.la
+testlib_LTLIBRARIES = 		\
+	libannotation.la 	\
+	libdrawable.la 		\
+	libfoo.la 		\
+	libutility.la
 testlibdir = $(prefix)/unused
 install-testlibLTLIBRARIES: # prevent it from being installed
 
+libannotation_la_SOURCES = $(srcdir)/annotation.c $(srcdir)/annotation.h
+libannotation_la_CFLAGS = $(GOBJECT_CFLAGS)
+libannotation_la_LDFLAGS = -module -avoid-version
+libannotation_la_LIBADD = $(GOBJECT_LIBS)
+
 libdrawable_la_SOURCES = $(srcdir)/drawable.c $(srcdir)/drawable.h
 libdrawable_la_CFLAGS = $(GOBJECT_CFLAGS)
 libdrawable_la_LDFLAGS = -module -avoid-version
@@ -27,15 +36,25 @@
 	$(top_srcdir)/giscanner/*.py \
 	$(top_builddir)/giscanner/libgiscanner.la
 
-utility.gir: libutility.la utility.h $(SCANNER) $(SCANNER_LIBS)
+annotation.gir: libannotation.la annotation.h $(SCANNER) $(SCANNER_LIBS)
 	$(CHECK_DEBUG) $(SCANNER) -v \
 	--include=$(top_srcdir)/gir/glib-2.0.gir \
 	--include=$(top_srcdir)/gir/gobject-2.0.gir \
-	--library=libutility.la \
-	--namespace=utility \
+	--library=libannotation.la \
+	--namespace=test \
 	--pkg gobject-2.0 \
-	$(libutility_la_SOURCES) \
-	--output $@
+	$(libannotation_la_SOURCES) \
+	 --output $@
+
+drawable.gir: libdrawable.la drawable.h $(SCANNER) $(SCANNER_LIBS)
+	$(CHECK_DEBUG) $(SCANNER) -v \
+	--include=$(top_srcdir)/gir/glib-2.0.gir \
+	--include=$(top_srcdir)/gir/gobject-2.0.gir \
+	--library=libdrawable.la \
+	--namespace=test \
+	--pkg gobject-2.0 \
+	$(libdrawable_la_SOURCES) \
+	 --output $@
 
 foo.gir: libfoo.la foo.h $(SCANNER) $(SCANNER_LIBS)
 	$(CHECK_DEBUG) $(SCANNER) -v \
@@ -48,15 +67,15 @@
 	$(libfoo_la_SOURCES) \
 	 --output $@
 
-drawable.gir: libdrawable.la drawable.h $(SCANNER) $(SCANNER_LIBS)
+utility.gir: libutility.la utility.h $(SCANNER) $(SCANNER_LIBS)
 	$(CHECK_DEBUG) $(SCANNER) -v \
 	--include=$(top_srcdir)/gir/glib-2.0.gir \
 	--include=$(top_srcdir)/gir/gobject-2.0.gir \
-	--library=libdrawable.la \
-	--namespace=test \
+	--library=libutility.la \
+	--namespace=utility \
 	--pkg gobject-2.0 \
-	$(libdrawable_la_SOURCES) \
-	 --output $@
+	$(libutility_la_SOURCES) \
+	--output $@
 
 check-%.gir: %.gir
 	@diff -u -U 10 $(srcdir)/$*-expected.gir $*.gir && echo "* $*.gir"
@@ -67,7 +86,7 @@
 	fi
 	@echo "Running scanner checks..."
 
-check-local: pre-check check-utility.gir check-drawable.gir check-foo.gir
+check-local: pre-check check-utility.gir check-annotation.gir check-drawable.gir check-foo.gir
 	@echo "======================="
 	@echo "All parser tests passed"
 	@echo "======================="
@@ -75,4 +94,4 @@
 	   rm -f $(top_builddir)/giscanner/*.py*; \
 	fi
 
-.PHONY: utility.gir drawable.gir foo.gir
+.PHONY: annotation.gir drawable.gir foo.gir utility.gir 

Added: trunk/tests/scanner/annotation-expected.gir
==============================================================================
--- (empty file)
+++ trunk/tests/scanner/annotation-expected.gir	Wed Aug 20 12:33:40 2008
@@ -0,0 +1,179 @@
+<repository version="1.0"
+            xmlns="http://www.gtk.org/introspection/core/1.0";
+            xmlns:c="http://www.gtk.org/introspection/c/1.0";
+            xmlns:glib="http://www.gtk.org/introspection/glib/1.0";>
+  <namespace name="test">
+    <record name="AnnotationObject" c:type="AnnotationObject">
+      <field name="parent_instance">
+        <type name="GObject.Object" c:type="GObject"/>
+      </field>
+    </record>
+    <record name="AnnotationObjectClass" c:type="AnnotationObjectClass">
+      <field name="parent_class">
+        <type name="GObjectClass" c:type="GObjectClass"/>
+      </field>
+    </record>
+    <function name="annotation_object_method"
+              c:identifier="annotation_object_method">
+      <return-value>
+        <type name="int" c:type="gint"/>
+      </return-value>
+      <parameters>
+        <parameter name="object">
+          <type name="AnnotationObject" c:type="AnnotationObject*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="annotation_object_out"
+              c:identifier="annotation_object_out">
+      <return-value>
+        <type name="int" c:type="gint"/>
+      </return-value>
+      <parameters>
+        <parameter name="object">
+          <type name="AnnotationObject" c:type="AnnotationObject*"/>
+        </parameter>
+        <parameter name="outarg" direction="out">
+          <type name="int" c:type="int*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="annotation_object_create_object"
+              c:identifier="annotation_object_create_object">
+      <return-value transfer-ownership="1">
+        <type name="GObject.Object" c:type="GObject*"/>
+      </return-value>
+      <parameters>
+        <parameter name="object">
+          <type name="AnnotationObject" c:type="AnnotationObject*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="annotation_object_allow_none"
+              c:identifier="annotation_object_allow_none">
+      <return-value>
+        <type name="GObject.Object" c:type="GObject*"/>
+      </return-value>
+      <parameters>
+        <parameter name="object">
+          <type name="AnnotationObject" c:type="AnnotationObject*"/>
+        </parameter>
+        <parameter name="allow_none" allow-none="1">
+          <type name="string" c:type="gchar*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="annotation_object_inout"
+              c:identifier="annotation_object_inout">
+      <return-value>
+        <type name="int" c:type="gint"/>
+      </return-value>
+      <parameters>
+        <parameter name="object">
+          <type name="AnnotationObject" c:type="AnnotationObject*"/>
+        </parameter>
+        <parameter name="inoutarg" direction="inout">
+          <type name="int" c:type="int*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="annotation_object_inout2"
+              c:identifier="annotation_object_inout2">
+      <return-value>
+        <type name="int" c:type="gint"/>
+      </return-value>
+      <parameters>
+        <parameter name="object">
+          <type name="AnnotationObject" c:type="AnnotationObject*"/>
+        </parameter>
+        <parameter name="inoutarg">
+          <type name="int" c:type="int*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="annotation_object_inout3"
+              c:identifier="annotation_object_inout3">
+      <return-value>
+        <type name="int" c:type="gint"/>
+      </return-value>
+      <parameters>
+        <parameter name="object">
+          <type name="AnnotationObject" c:type="AnnotationObject*"/>
+        </parameter>
+        <parameter name="inoutarg" direction="inout">
+          <type name="int" c:type="int*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="annotation_object_in" c:identifier="annotation_object_in">
+      <return-value>
+        <type name="int" c:type="gint"/>
+      </return-value>
+      <parameters>
+        <parameter name="object">
+          <type name="AnnotationObject" c:type="AnnotationObject*"/>
+        </parameter>
+        <parameter name="inarg">
+          <type name="int" c:type="int*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="annotation_object_calleeowns"
+              c:identifier="annotation_object_calleeowns">
+      <return-value>
+        <type name="int" c:type="gint"/>
+      </return-value>
+      <parameters>
+        <parameter name="object">
+          <type name="AnnotationObject" c:type="AnnotationObject*"/>
+        </parameter>
+        <parameter name="toown" transfer-ownership="1">
+          <type name="GObject.Object" c:type="GObject*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="annotation_object_calleesowns"
+              c:identifier="annotation_object_calleesowns">
+      <return-value>
+        <type name="int" c:type="gint"/>
+      </return-value>
+      <parameters>
+        <parameter name="object">
+          <type name="AnnotationObject" c:type="AnnotationObject*"/>
+        </parameter>
+        <parameter name="toown1" transfer-ownership="1">
+          <type name="GObject.Object" c:type="GObject*"/>
+        </parameter>
+        <parameter name="toown2" transfer-ownership="1">
+          <type name="GObject.Object" c:type="GObject*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="annotation_object_get_strings"
+              c:identifier="annotation_object_get_strings">
+      <return-value>
+        <type name="GLib.List" transfer-ownership="1">
+          <type name="string" relation="element"/>
+        </type>
+      </return-value>
+      <parameters>
+        <parameter name="object">
+          <type name="AnnotationObject" c:type="AnnotationObject*"/>
+        </parameter>
+      </parameters>
+    </function>
+    <function name="annotation_object_get_objects"
+              c:identifier="annotation_object_get_objects">
+      <return-value>
+        <type name="GLib.SList" transfer-ownership="1">
+          <type name="AnnotationObject" relation="element"/>
+        </type>
+      </return-value>
+      <parameters>
+        <parameter name="object">
+          <type name="AnnotationObject" c:type="AnnotationObject*"/>
+        </parameter>
+      </parameters>
+    </function>
+  </namespace>
+</repository>

Added: trunk/tests/scanner/annotation.c
==============================================================================
--- (empty file)
+++ trunk/tests/scanner/annotation.c	Wed Aug 20 12:33:40 2008
@@ -0,0 +1,210 @@
+#include "annotation.h"
+
+G_DEFINE_TYPE (AnnotationObject, annotation_object, G_TYPE_OBJECT);
+
+static void
+annotation_object_class_init (AnnotationObjectClass *klass)
+{
+
+}
+
+static void
+annotation_object_init (AnnotationObject *object)
+{
+
+}
+
+/**
+ * annotation_object_method:
+ * @object: a #GObject
+ *
+ * Return value: an int
+ **/
+gint
+annotation_object_method (AnnotationObject *object)
+{
+	return 1;
+}
+
+/**
+ * annotation_object_out:
+ * @object: a #GObject
+ *
+ * This is a test for out arguments
+ *
+ * @outarg: (out): This is an argument test
+ * Return value: an int
+ */
+gint
+annotation_object_in (AnnotationObject *object, int *outarg)
+{
+	return 1;
+}
+
+/**
+ * annotation_object_in:
+ * @object: a #GObject
+ *
+ * This is a test for out arguments
+ *
+ * @outarg: (in): This is an argument test
+ * Return value: an int
+ */
+gint
+annotation_object_out (AnnotationObject *object, int *outarg)
+{
+	return 1;
+}
+
+
+/**
+ * annotation_object_inout:
+ * @object: a #GObject
+ *
+ * This is a test for out arguments
+ *
+ * @inoutarg: (inout): This is an argument test
+ * Return value: an int
+ */
+gint
+annotation_object_inout (AnnotationObject *object, int *inoutarg)
+{
+	return 1;
+}
+
+/**
+ * annotation_object_inout2:
+ * @object: a #GObject
+ *
+ * This is a second test for out arguments
+ *
+ * @inoutarg: (in) (out): This is an argument test
+ * Return value: an int
+ */
+gint
+annotation_object_inout2 (AnnotationObject *object, int *inoutarg)
+{
+	return 1;
+}
+
+
+/**
+ * annotation_object_inout3:
+ * @object: a #GObject
+ *
+ * This is a 3th test for out arguments
+ *
+ * @inoutarg: (in-out) (allow-none): This is an argument test
+ * Return value: an int
+ */
+gint
+annotation_object_inout3 (AnnotationObject *object, int *inoutarg)
+{
+	return 1;
+}
+
+/**
+ * annotation_object_calleeowns:
+ * @object: a #GObject
+ *
+ * This is a test for out arguments
+ *
+ * @toown: (callee-owns): a #GObject
+ * Return value: an int
+ */
+gint
+annotation_object_calleeowns (AnnotationObject *object, GObject *toown)
+{
+	return 1;
+}
+
+
+/**
+ * annotation_object_calleesowns:
+ * @object: a #GObject
+ *
+ * This is a test for out arguments
+ *
+ * @toown1: (callee-owns): a #GObject
+ * @toown2: (callee-owns): a #GObject
+ * Return value: an int
+ */
+gint
+annotation_object_calleesowns (AnnotationObject *object,
+			       GObject *toown1,
+			       GObject *toown2)
+{
+	return 1;
+}
+
+
+/**
+ * annotation_object_get_strings:
+ * @object: a #GObject
+ *
+ * This is a test for returning a list of strings
+ *
+ * Return value: (seq char* (callee-owns)) (caller-owns): list of strings
+ */
+GList*
+annotation_object_get_strings (AnnotationObject *object)
+{
+  GList *list = NULL;
+  list = g_list_prepend (list, "annotation");
+  list = g_list_prepend (list, "bar");
+  return list;
+}
+
+
+/**
+ * annotation_object_with_voidp
+ * @data: Opaque pointer handle
+ */
+void
+annotation_object_with_voidp (AnnotationObject *object, void *data)
+{
+  
+}
+
+/**
+ * annotation_object_get_objects:
+ * @object: a #GObject
+ *
+ * This is a test for returning a list of objects.
+ * The list itself should be freed, but not the internal objects,
+ * intentionally similar example to gtk_container_get_children
+ *
+ * Return value: (seq AnnotationObject* (callee-owns)) (caller-owns): a list
+ *               of strings
+ */
+GSList*
+annotation_object_get_objects (AnnotationObject *object)
+{
+  GSList *list = NULL;
+  list = g_slist_prepend (list, object);
+  return list;
+}
+
+/**
+ * annotation_object_create_object:
+ * @object: a #GObject
+ *
+ * Test returning a caller-owned object
+ *
+ * Return value: (caller-owns): The object
+ **/
+GObject*
+annotation_object_create_object (AnnotationObject *object)
+{
+	return g_object_ref (object);
+}
+
+/**
+ * annotation_object_allow_none: 
+ * @object: a #GObject
+ * @allow_none: (allow-none): 
+ **/
+GObject*
+annotation_object_allow_none (AnnotationObject *object, gchar *allow_none)
+{
+}

Added: trunk/tests/scanner/annotation.h
==============================================================================
--- (empty file)
+++ trunk/tests/scanner/annotation.h	Wed Aug 20 12:33:40 2008
@@ -0,0 +1,41 @@
+#ifndef __ANNOTATION_OBJECT_H__
+#define __ANNOTATION_OBJECT_H__
+
+#include <glib-object.h>
+
+typedef struct _AnnotationObject          AnnotationObject;
+typedef struct _AnnotationObjectClass     AnnotationObjectClass;
+
+struct _AnnotationObject
+{
+  GObject parent_instance;
+};
+
+struct _AnnotationObjectClass
+{
+  GObjectClass parent_class;
+};
+
+gint     annotation_object_method       (AnnotationObject *object);
+gint     annotation_object_out          (AnnotationObject *object,
+					 int              *outarg);
+GObject* annotation_object_create_object(AnnotationObject *object);
+GObject* annotation_object_allow_none   (AnnotationObject *object,
+					 gchar            *allow_none);
+gint     annotation_object_inout        (AnnotationObject *object,
+					 int              *inoutarg);
+gint     annotation_object_inout2       (AnnotationObject *object,
+					 int              *inoutarg);
+gint     annotation_object_inout3       (AnnotationObject *object,
+					 int              *inoutarg);
+gint     annotation_object_in           (AnnotationObject *object,
+					 int              *inarg);
+gint     annotation_object_calleeowns   (AnnotationObject *object,
+					 GObject          *toown);
+gint     annotation_object_calleesowns  (AnnotationObject *object,
+					 GObject          *toown1,
+					 GObject          *toown2);
+GList*   annotation_object_get_strings  (AnnotationObject *object);
+GSList*  annotation_object_get_objects  (AnnotationObject *object);
+
+#endif /* __ANNOTATION_OBJECT_H__ */

Modified: trunk/tests/scanner/foo-expected.gir
==============================================================================
--- trunk/tests/scanner/foo-expected.gir	(original)
+++ trunk/tests/scanner/foo-expected.gir	Wed Aug 20 12:33:40 2008
@@ -20,16 +20,6 @@
           <type name="Object" c:type="FooObject*"/>
         </return-value>
       </constructor>
-      <method name="method" c:identifier="foo_object_method">
-        <return-value>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="object">
-            <type name="Object" c:type="FooObject*"/>
-          </parameter>
-        </parameters>
-      </method>
       <method name="external_type" c:identifier="foo_object_external_type">
         <return-value>
           <type name="utility.Object" c:type="UtilityObject*"/>
@@ -40,147 +30,6 @@
           </parameter>
         </parameters>
       </method>
-      <method name="out" c:identifier="foo_object_out">
-        <return-value>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="object">
-            <type name="Object" c:type="FooObject*"/>
-          </parameter>
-          <parameter name="outarg" direction="out">
-            <type name="int" c:type="int*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="create_object" c:identifier="foo_object_create_object">
-        <return-value transfer-ownership="1">
-          <type name="GObject.Object" c:type="GObject*"/>
-        </return-value>
-        <parameters>
-          <parameter name="object">
-            <type name="Object" c:type="FooObject*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="allow_none" c:identifier="foo_object_allow_none">
-        <return-value>
-          <type name="GObject.Object" c:type="GObject*"/>
-        </return-value>
-        <parameters>
-          <parameter name="object">
-            <type name="Object" c:type="FooObject*"/>
-          </parameter>
-          <parameter name="allow_none" allow-none="1">
-            <type name="string" c:type="gchar*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="inout" c:identifier="foo_object_inout">
-        <return-value>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="object">
-            <type name="Object" c:type="FooObject*"/>
-          </parameter>
-          <parameter name="inoutarg" direction="inout">
-            <type name="int" c:type="int*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="inout2" c:identifier="foo_object_inout2">
-        <return-value>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="object">
-            <type name="Object" c:type="FooObject*"/>
-          </parameter>
-          <parameter name="inoutarg">
-            <type name="int" c:type="int*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="inout3" c:identifier="foo_object_inout3">
-        <return-value>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="object">
-            <type name="Object" c:type="FooObject*"/>
-          </parameter>
-          <parameter name="inoutarg" direction="inout">
-            <type name="int" c:type="int*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="in" c:identifier="foo_object_in">
-        <return-value>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="object">
-            <type name="Object" c:type="FooObject*"/>
-          </parameter>
-          <parameter name="inarg">
-            <type name="int" c:type="int*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="calleeowns" c:identifier="foo_object_calleeowns">
-        <return-value>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="object">
-            <type name="Object" c:type="FooObject*"/>
-          </parameter>
-          <parameter name="toown" transfer-ownership="1">
-            <type name="GObject.Object" c:type="GObject*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="calleesowns" c:identifier="foo_object_calleesowns">
-        <return-value>
-          <type name="int" c:type="gint"/>
-        </return-value>
-        <parameters>
-          <parameter name="object">
-            <type name="Object" c:type="FooObject*"/>
-          </parameter>
-          <parameter name="toown1" transfer-ownership="1">
-            <type name="GObject.Object" c:type="GObject*"/>
-          </parameter>
-          <parameter name="toown2" transfer-ownership="1">
-            <type name="GObject.Object" c:type="GObject*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="get_strings" c:identifier="foo_object_get_strings">
-        <return-value>
-          <type name="GLib.List" transfer-ownership="1">
-            <type name="string" relation="element"/>
-          </type>
-        </return-value>
-        <parameters>
-          <parameter name="object">
-            <type name="Object" c:type="FooObject*"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="get_objects" c:identifier="foo_object_get_objects">
-        <return-value>
-          <type name="GLib.SList" transfer-ownership="1">
-            <type name="Object" relation="element"/>
-          </type>
-        </return-value>
-        <parameters>
-          <parameter name="object">
-            <type name="Object" c:type="FooObject*"/>
-          </parameter>
-        </parameters>
-      </method>
       <method name="various" c:identifier="foo_object_various">
         <return-value>
           <type name="none" c:type="void"/>

Modified: trunk/tests/scanner/foo.c
==============================================================================
--- trunk/tests/scanner/foo.c	(original)
+++ trunk/tests/scanner/foo.c	Wed Aug 20 12:33:40 2008
@@ -115,205 +115,12 @@
 
 }
 
-/**
- * foo_object_method:
- * @object: a #GObject
- *
- * Return value: an int
- **/
-gint
-foo_object_method (FooObject *object)
-{
-	return 1;
-}
-
 UtilityObject*
 foo_object_external_type (FooObject *object)
 {
 
 }
 
-/**
- * foo_object_out:
- * @object: a #GObject
- *
- * This is a test for out arguments
- *
- * @outarg: (out): This is an argument test
- * Return value: an int
- */
-gint
-foo_object_in (FooObject *object, int *outarg)
-{
-	return 1;
-}
-
-/**
- * foo_object_in:
- * @object: a #GObject
- *
- * This is a test for out arguments
- *
- * @outarg: (in): This is an argument test
- * Return value: an int
- */
-gint
-foo_object_out (FooObject *object, int *outarg)
-{
-	return 1;
-}
-
-
-/**
- * foo_object_inout:
- * @object: a #GObject
- *
- * This is a test for out arguments
- *
- * @inoutarg: (inout): This is an argument test
- * Return value: an int
- */
-gint
-foo_object_inout (FooObject *object, int *inoutarg)
-{
-	return 1;
-}
-
-/**
- * foo_object_inout2:
- * @object: a #GObject
- *
- * This is a second test for out arguments
- *
- * @inoutarg: (in) (out): This is an argument test
- * Return value: an int
- */
-gint
-foo_object_inout2 (FooObject *object, int *inoutarg)
-{
-	return 1;
-}
-
-
-/**
- * foo_object_inout3:
- * @object: a #GObject
- *
- * This is a 3th test for out arguments
- *
- * @inoutarg: (in-out) (allow-none): This is an argument test
- * Return value: an int
- */
-gint
-foo_object_inout3 (FooObject *object, int *inoutarg)
-{
-	return 1;
-}
-
-/**
- * foo_object_calleeowns:
- * @object: a #GObject
- *
- * This is a test for out arguments
- *
- * @toown: (callee-owns): a #GObject
- * Return value: an int
- */
-gint
-foo_object_calleeowns (FooObject *object, GObject *toown)
-{
-	return 1;
-}
-
-
-/**
- * foo_object_calleesowns:
- * @object: a #GObject
- *
- * This is a test for out arguments
- *
- * @toown1: (callee-owns): a #GObject
- * @toown2: (callee-owns): a #GObject
- * Return value: an int
- */
-gint
-foo_object_calleesowns (FooObject *object, GObject *toown1, GObject *toown2)
-{
-	return 1;
-}
-
-
-/**
- * foo_object_get_strings:
- * @object: a #GObject
- *
- * This is a test for returning a list of strings
- *
- * Return value: (seq char* (callee-owns)) (caller-owns): list of strings
- */
-GList*
-foo_object_get_strings (FooObject *object)
-{
-  GList *list = NULL;
-  list = g_list_prepend (list, "foo");
-  list = g_list_prepend (list, "bar");
-  return list;
-}
-
-
-/**
- * foo_object_with_voidp
- * @data: Opaque pointer handle
- */
-void
-foo_object_with_voidp (FooObject *object, void *data)
-{
-  
-}
-
-/**
- * foo_object_get_objects:
- * @object: a #GObject
- *
- * This is a test for returning a list of objects.
- * The list itself should be freed, but not the internal objects,
- * intentionally similar example to gtk_container_get_children
- *
- * Return value: (seq FooObject* (callee-owns)) (caller-owns): a list
- *               of strings
- */
-GSList*
-foo_object_get_objects (FooObject *object)
-{
-  GSList *list = NULL;
-  list = g_slist_prepend (list, object);
-  return list;
-}
-
-/**
- * foo_object_create_object:
- * @object: a #GObject
- *
- * Test returning a caller-owned object
- *
- * Return value: (caller-owns): The object
- **/
-GObject*
-foo_object_create_object (FooObject *object)
-{
-	return g_object_ref (object);
-}
-
-/**
- * foo_object_allow_none: 
- * @object: a #GObject
- * @allow_none: (allow-none): 
- **/
-GObject*
-foo_object_allow_none (FooObject *object, gchar *allow_none)
-{
-}
-
 G_DEFINE_TYPE (FooSubobject, foo_subobject, FOO_TYPE_OBJECT);
 
 static void

Modified: trunk/tests/scanner/foo.h
==============================================================================
--- trunk/tests/scanner/foo.h	(original)
+++ trunk/tests/scanner/foo.h	Wed Aug 20 12:33:40 2008
@@ -46,20 +46,7 @@
 
 GType                 foo_object_get_type          (void) G_GNUC_CONST;
 FooObject*            foo_object_new               ();
-gint                  foo_object_method            (FooObject *object);
 UtilityObject*        foo_object_external_type     (FooObject *object);
-gint                  foo_object_out               (FooObject *object,
-						    int       *outarg);
-GObject*              foo_object_create_object     (FooObject *object);
-GObject*              foo_object_allow_none        (FooObject *object, gchar *allow_none);
-gint                  foo_object_inout             (FooObject *object, int *inoutarg);
-gint                  foo_object_inout2            (FooObject *object, int *inoutarg);
-gint                  foo_object_inout3            (FooObject *object, int *inoutarg);
-gint                  foo_object_in                (FooObject *object, int *inarg);
-gint                  foo_object_calleeowns        (FooObject *object, GObject *toown);
-gint                  foo_object_calleesowns       (FooObject *object, GObject *toown1, GObject *toown2);
-GList*                foo_object_get_strings       (FooObject *object);
-GSList*               foo_object_get_objects       (FooObject *object);
 
 void                  foo_object_various           (FooObject *object, void *data, GType some_type);
 



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