<attribute name="org.example.Test" value="cows"/>
<doc xml:whitespace="preserve">This is an object used to test annotations.</doc>
<method name="allow_none" c:identifier="annotation_object_allow_none">
- <return-value transfer-ownership="full">
+ <return-value transfer-ownership="none">
+ <doc xml:whitespace="preserve">%NULL always</doc>
<type name="GObject.Object" c:type="GObject*"/>
</return-value>
<parameters>
c:identifier="annotation_object_do_not_use"
deprecated="Use annotation_object_create_object() instead."
deprecated-version="0.12">
- <return-value transfer-ownership="full">
+ <return-value transfer-ownership="none">
+ <doc xml:whitespace="preserve">%NULL always</doc>
<type name="GObject.Object" c:type="GObject*"/>
</return-value>
</method>
<function name="get_default" c:identifier="foo_object_get_default">
<doc xml:whitespace="preserve">This function is intended to match clutter_stage_get_default which
uses a C sugar return type.</doc>
- <return-value transfer-ownership="full">
+ <return-value transfer-ownership="none">
<doc xml:whitespace="preserve">The global #FooSubobject</doc>
<type name="Subobject" c:type="FooObject*"/>
</return-value>
</return-value>
</method>
<method name="external_type" c:identifier="foo_object_external_type">
- <return-value transfer-ownership="full">
+ <return-value transfer-ownership="none">
+ <doc xml:whitespace="preserve">%NULL always</doc>
<type name="Utility.Object" c:type="UtilityObject*"/>
</return-value>
</method>
</parameter>
</parameters>
</method>
- <method name="new_cookie" c:identifier="foo_object_new_cookie">
+ <method name="new_cookie"
+ c:identifier="foo_object_new_cookie"
+ introspectable="0">
+ <doc xml:whitespace="preserve">Not sure why this test is here...</doc>
<return-value transfer-ownership="full">
<type name="ObjectCookie" c:type="FooObjectCookie"/>
</return-value>
<type name="ObjectClass" c:type="FooObjectClass"/>
</field>
</record>
- <record name="ThingWithArray" c:type="_FooThingWithArray">
+ <record name="ThingWithArray" c:type="FooThingWithArray">
<field name="x" writable="1">
<type name="gint" c:type="int"/>
</field>
<type name="gpointer" c:type="guchar*"/>
</field>
</record>
- <union name="Union" c:type="_FooUnion">
+ <union name="Union" c:type="FooUnion">
<field name="foo" writable="1">
<type name="gint" c:type="int"/>
</field>
</return-value>
</function>
<function name="test_strv_out" c:identifier="regress_test_strv_out">
- <doc xml:whitespace="preserve">No annotations here. We want the default to Do The Right Thing.</doc>
<return-value transfer-ownership="full">
<array c:type="char**">
<type name="utf8"/>
</return-value>
</function>
<function name="test_strv_out_c" c:identifier="regress_test_strv_out_c">
- <doc xml:whitespace="preserve">No annotations here. We want the default to Do The Right Thing.</doc>
- <return-value transfer-ownership="full">
+ <return-value transfer-ownership="none">
<array c:type="char**">
<type name="utf8"/>
</array>
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
- <record name="PixmapObjectClass" c:type="_TestInheritPixmapObjectClass">
+ <record name="PixmapObjectClass" c:type="TestInheritPixmapObjectClass">
<field name="parent_class" writable="1">
<type name="DrawableClass" c:type="TestInheritDrawableClass"/>
</field>
</alias>
<record name="Buffer" c:type="UtilityBuffer">
<field name="data" writable="1">
- <type name="GLib.pointer" c:type="char*"/>
+ <type name="gpointer" c:type="char*"/>
</field>
<field name="length" writable="1">
<type name="gulong" c:type="gsize"/>
<field name="value" writable="1">
<type name="guint8" c:type="guint8"/>
</field>
- <record>
+ <record name="parts" c:type="parts">
<field name="first_nibble" writable="1" bits="4">
<type name="guint8" c:type="guint8"/>
</field>
<field name="tag" writable="1">
<type name="gint" c:type="int"/>
</field>
- <union>
+ <union name="value" c:type="value">
<field name="v_pointer" writable="1">
<type name="gpointer" c:type="gpointer"/>
</field>
/**
* AnnotationObject::list-signal:
* @annotation: the annotation object
- * @list: (type GLib.List): (element-type utf8): (transfer container): a list of strings
+ * @list: (type GLib.List) (element-type utf8): (transfer container): a list of strings
*
* This is a signal which takes a list of strings, but it's not
* known by GObject as it's only marked as G_TYPE_POINTER
* This is a test for returning a list of strings, where
* each string needs to be freed.
*
- * Return value: (element-type utf8) (transfer): list of strings
+ * Return value: (element-type utf8) (transfer full): list of strings
*/
GList*
annotation_object_get_strings (AnnotationObject *object)
* This is a test for returning a hash table mapping strings to
* objects.
*
- * Return value: (element-type utf8 GObject): hash table
+ * Return value: (element-type utf8 GObject) (transfer full): hash table
*/
GHashTable*
annotation_object_get_hash (AnnotationObject *object)
*
* Test returning a caller-owned object
*
- * Return value: (transfer): The object
+ * Return value: (transfer full): The object
**/
GObject*
annotation_object_create_object (AnnotationObject *object)
return g_object_ref (object);
}
+/**
+ * annotation_object_use_buffer:
+ * @object: a #GObject
+ *
+ **/
void
annotation_object_use_buffer (AnnotationObject *object,
guchar *bytes)
/**
* annotation_object_set_data2:
* @object: a #AnnotationObject
- * @data: (array length=length): The data
+ * @data: (array length=length) (element-type gint8): The data
* @length: Length of the data
*
* Test taking a gchar * with a length.
* annotation_object_allow_none:
* @object: a #GObject
* @somearg: (allow-none):
+ *
+ * Returns: (transfer none): %NULL always
**/
GObject*
annotation_object_allow_none (AnnotationObject *object, const gchar *somearg)
* annotation_object_do_not_use:
* @object: a #GObject
*
+ * Returns: (transfer none): %NULL always
* Deprecated: 0.12: Use annotation_object_create_object() instead.
**/
GObject*
}
/**
- * annotation_object_watch:
+ * annotation_object_watch: (skip)
* @object: A #AnnotationObject
* @func: The callback
* @user_data: The callback data
* annotation_return_array:
* @length: (out): Number of return values
*
- * Return value: (array length=length): The return value
+ * Return value: (transfer full) (array length=length): The return value
**/
char **
annotation_return_array (int *length)
/**
* annotation_string_zero_terminated:
*
- * Return value: (array zero-terminated=1): The return value
+ * Return value: (transfer full) (array zero-terminated=1): The return value
**/
char **
annotation_string_zero_terminated (void)
/**
* annotation_get_source_file:
*
- * Return value: (type filename): Source file
+ * Return value: (type filename) (transfer full): Source file
*/
char *
annotation_get_source_file (void)
}
+/**
+ * test_inherit_drawable_get_origin:
+ * @drawable:
+ * @x: (out):
+ * @y: (out):
+ */
void
test_inherit_drawable_get_origin (TestInheritDrawable *drawable, int *x, int *y)
{
*y = 0;
}
+/**
+ * test_inherit_drawable_get_size:
+ * @drawable:
+ * @width: (out):
+ * @height: (out):
+ */
void
test_inherit_drawable_get_size (TestInheritDrawable *drawable, guint *width, guint *height)
{
void test_inherit_drawable_get_size (TestInheritDrawable *drawable, guint *width, guint *height);
void test_inherit_drawable_do_foo_maybe_throw (TestInheritDrawable *drawable, int x, GError **error);
+typedef struct _TestInheritPixmapObjectClass TestInheritPixmapObjectClass;
+
struct _TestInheritPixmapObjectClass
{
TestInheritDrawableClass parent_class;
}
+/**
+ * foo_object_external_type:
+ * @object: a #FooObject
+ *
+ * Returns: (transfer none): %NULL always
+ */
UtilityObject*
foo_object_external_type (FooObject *object)
{
{
}
+/**
+ * foo_object_new_cookie: (skip)
+ * @object:
+ * @target:
+ *
+ * Not sure why this test is here...
+ */
+FooObjectCookie
+foo_object_new_cookie (FooObject *object, const char *target)
+{
+ return NULL;
+}
+
const char *
foo_object_get_name (FooObject *object)
{
* This function is intended to match clutter_stage_get_default which
* uses a C sugar return type.
*
- * Return value: (type FooSubobject): The global #FooSubobject
+ * Return value: (type FooSubobject) (transfer none): The global #FooSubobject
*/
FooObject *
foo_object_get_default ()
{
}
+/**
+ * foo_test_string_array:
+ * @array: (array zero-terminated=1):
+ */
void
foo_test_string_array (char **array)
{
}
/**
+ * foo_test_string_array_with_g:
+ * @array: (array zero-terminated=1):
+ */
+void
+foo_test_string_array_with_g (gchar **array)
+{
+}
+
+/**
* foo_test_array:
* Returns: (element-type utf8) (transfer container):
*/
* FooForeignStruct: (foreign)
*
*/
+
+/**
+ * foo_test_varargs_callback: (skip)
+ *
+ */
+void
+foo_test_varargs_callback (gint i, FooVarargsCallback callback)
+{
+}
+
+/**
+ * foo_test_varargs_callback2: (skip)
+ *
+ */
+void
+foo_test_varargs_callback2 (FooVarargsCallback callback)
+{
+}
+
+/**
+ * foo_test_varargs_callback3: (skip)
+ *
+ */
+void
+foo_test_varargs_callback3 (FooVarargsCallback callback,
+ FooVarargsCallback callback2)
+{
+}
+
FooBRect *rect;
};
-typedef union _FooUnion
+typedef union _FooUnion FooUnion;
+
+union _FooUnion
{
int foo;
-} FooUnion;
+};
typedef struct _FooUtilityStruct FooUtilityStruct;
struct _FooUtilityStruct
{
UtilityStruct bar;
};
-typedef struct _FooThingWithArray
+
+typedef struct _FooThingWithArray FooThingWithArray;
+struct _FooThingWithArray
{
int x;
int y;
char lines[80];
guchar *data;
-} FooThingWithArray;
+} ;
FooBUnion *foo_bunion_new (void);
* regress_test_array_gtype_in:
* @n_types:
* @types: (array length=n_types): List of types
- * Return value: string representation of provided types
+ *
+ * Return value: (transfer full): string representation of provided types
* */
char *
regress_test_array_gtype_in (int n_types, GType *types)
/**
* regress_test_strv_out:
*
- * No annotations here. We want the default to Do The Right Thing.
- *
* Returns: (transfer full):
*/
char **
/**
* regress_test_strv_out_c:
*
- * No annotations here. We want the default to Do The Right Thing.
+ * Returns: (transfer none):
*/
const char * const*
regress_test_strv_out_c (void)
typedef struct _RegressTestFundamentalObject RegressTestFundamentalObject;
typedef struct _RegressTestFundamentalObjectClass RegressTestFundamentalObjectClass;
+/**
+ * RegressTestFundamentalObjectCopyFunction:
+ *
+ * Returns: (transfer full):
+ */
typedef RegressTestFundamentalObject * (*RegressTestFundamentalObjectCopyFunction) (const RegressTestFundamentalObject *obj);
typedef void (*RegressTestFundamentalObjectFinalizeFunction) (RegressTestFundamentalObject *obj);
G_DEFINE_TYPE (UtilityObject, utility_object, G_TYPE_OBJECT);
/**
- * UtilityFlagType: (type bitfield)
- **/
-
-/**
* UtilityBuffer:
*
- * @data: (type pointer): the data
+ * @data: (type gpointer): the data
**/
static void
}
+/**
+ * utility_dir_foreach:
+ * @path::
+ * @func: (scope call):
+ * @user_data::
+ *
+ */
void
utility_dir_foreach (const char *path, UtilityFileFunc func, gpointer user_data)
{
gpointer v_pointer;
double v_real;
long v_integer;
- };
+ } value;
} UtilityTaggedValue;
typedef union
{
guint8 first_nibble : 4;
guint8 second_nibble : 4;
- };
+ } parts;
} UtilityByte;
/* This one is similiar to Soup.Buffer */
UTILITY_ENUM_C
} UtilityEnumType;
+/* The shift operators here should imply bitfield */
typedef enum
{
- UTILITY_FLAG_A = 1,
- UTILITY_FLAG_B = 2,
- UTILITY_FLAG_C = 4
+ UTILITY_FLAG_A = 1 << 0,
+ UTILITY_FLAG_B = 1 << 1,
+ UTILITY_FLAG_C = 1 << 2
} UtilityFlagType;
typedef struct