summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/gimarshallingtests.c20
-rw-r--r--tests/gimarshallingtests.h10
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 09333391..bd3fe811 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -4363,6 +4363,26 @@ glong
return return_value;
}
+/**
+ * gi_marshalling_tests_callback_owned_boxed:
+ * @callback: (scope call) (closure callback_data):
+ * @callback_data: (allow-none):
+ */
+glong
+gi_marshalling_tests_callback_owned_boxed (GIMarshallingTestsCallbackOwnedBoxed callback,
+ void *callback_data)
+{
+ static GIMarshallingTestsBoxedStruct *box = NULL;
+ glong ret;
+
+ if (!box)
+ box = gi_marshalling_tests_boxed_struct_new ();
+ box->long_++;
+ callback (box, callback_data);
+ ret = box->long_;
+ return ret;
+}
+
gboolean
gi_marshalling_tests_object_vfunc_meth_with_error (GIMarshallingTestsObject *self, gint x, GError **error)
{
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h
index e57f92ed..5568a6f9 100644
--- a/tests/gimarshallingtests.h
+++ b/tests/gimarshallingtests.h
@@ -618,6 +618,16 @@ glong gi_marshalling_tests_callback_return_value_and_multiple_out_parameters (GI
glong *a,
glong *b);
+/**
+ * GIMarshallingTestsCallbackOwnedBoxed
+* @box: (transfer none): the boxed structure.
+ */
+typedef void (* GIMarshallingTestsCallbackOwnedBoxed) (GIMarshallingTestsBoxedStruct *box,
+ void *user_data);
+
+glong gi_marshalling_tests_callback_owned_boxed (GIMarshallingTestsCallbackOwnedBoxed callback,
+ void *callback_data);
+
/* Pointer */
gpointer gi_marshalling_tests_pointer_in_return (gpointer pointer);