+#include <ffi.h>
+static ffi_type *
+value_to_ffi_type (const GValue *gvalue,
+ gpointer *value,
+ gint *enum_tmpval,
+ gboolean *tmpval_used)
+{
+ ffi_type *rettype = NULL;
+ GType type = g_type_fundamental (G_VALUE_TYPE (gvalue));
+ g_assert (type != G_TYPE_INVALID);
+
+ if (enum_tmpval)
+ {
+ g_assert (tmpval_used != NULL);
+ *tmpval_used = FALSE;
+ }
+
+ switch (type)
+ {
+ case G_TYPE_BOOLEAN:
+ case G_TYPE_CHAR:
+ case G_TYPE_INT:
+ rettype = &ffi_type_sint;
+ *value = (gpointer)&(gvalue->data[0].v_int);
+ break;
+ case G_TYPE_ENUM:
+ /* enums are stored in v_long even though they are integers, which makes
+ * marshalling through libffi somewhat complicated. They need to be
+ * marshalled as signed ints, but we need to use a temporary int sized
+ * value to pass to libffi otherwise it'll pull the wrong value on
+ * BE machines with 32-bit integers when treating v_long as 32-bit int.
+ */
+ g_assert (enum_tmpval != NULL);
+ rettype = &ffi_type_sint;
+ *enum_tmpval = g_value_get_enum (gvalue);
+ *value = enum_tmpval;
+ *tmpval_used = TRUE;
+ break;
+ case G_TYPE_UCHAR:
+ case G_TYPE_UINT:
+ case G_TYPE_FLAGS:
+ rettype = &ffi_type_uint;
+ *value = (gpointer)&(gvalue->data[0].v_uint);
+ break;
+ case G_TYPE_STRING:
+ case G_TYPE_OBJECT:
+ case G_TYPE_BOXED:
+ case G_TYPE_PARAM:
+ case G_TYPE_POINTER:
+ case G_TYPE_INTERFACE:
+ case G_TYPE_VARIANT:
+ rettype = &ffi_type_pointer;
+ *value = (gpointer)&(gvalue->data[0].v_pointer);
+ break;
+ case G_TYPE_FLOAT:
+ rettype = &ffi_type_float;
+ *value = (gpointer)&(gvalue->data[0].v_float);
+ break;
+ case G_TYPE_DOUBLE:
+ rettype = &ffi_type_double;
+ *value = (gpointer)&(gvalue->data[0].v_double);
+ break;
+ case G_TYPE_LONG:
+ rettype = &ffi_type_slong;
+ *value = (gpointer)&(gvalue->data[0].v_long);
+ break;
+ case G_TYPE_ULONG:
+ rettype = &ffi_type_ulong;
+ *value = (gpointer)&(gvalue->data[0].v_ulong);
+ break;
+ case G_TYPE_INT64:
+ rettype = &ffi_type_sint64;
+ *value = (gpointer)&(gvalue->data[0].v_int64);
+ break;
+ case G_TYPE_UINT64:
+ rettype = &ffi_type_uint64;
+ *value = (gpointer)&(gvalue->data[0].v_uint64);
+ break;
+ default:
+ rettype = &ffi_type_pointer;
+ *value = NULL;
+ g_warning ("value_to_ffi_type: Unsupported fundamental type: %s", g_type_name (type));
+ break;
+ }
+ return rettype;
+}
+
+static void
+value_from_ffi_type (GValue *gvalue, gpointer *value)
+{
+ ffi_arg *int_val = (ffi_arg*) value;
+
+ switch (g_type_fundamental (G_VALUE_TYPE (gvalue)))
+ {
+ case G_TYPE_INT:
+ g_value_set_int (gvalue, (gint) *int_val);
+ break;
+ case G_TYPE_FLOAT:
+ g_value_set_float (gvalue, *(gfloat*)value);
+ break;
+ case G_TYPE_DOUBLE:
+ g_value_set_double (gvalue, *(gdouble*)value);
+ break;
+ case G_TYPE_BOOLEAN:
+ g_value_set_boolean (gvalue, (gboolean) *int_val);
+ break;
+ case G_TYPE_STRING:
+ g_value_take_string (gvalue, *(gchar**)value);
+ break;
+ case G_TYPE_CHAR:
+ g_value_set_schar (gvalue, (gint8) *int_val);
+ break;
+ case G_TYPE_UCHAR:
+ g_value_set_uchar (gvalue, (guchar) *int_val);
+ break;
+ case G_TYPE_UINT:
+ g_value_set_uint (gvalue, (guint) *int_val);
+ break;
+ case G_TYPE_POINTER:
+ g_value_set_pointer (gvalue, *(gpointer*)value);
+ break;
+ case G_TYPE_LONG:
+ g_value_set_long (gvalue, (glong) *int_val);
+ break;
+ case G_TYPE_ULONG:
+ g_value_set_ulong (gvalue, (gulong) *int_val);
+ break;
+ case G_TYPE_INT64:
+ g_value_set_int64 (gvalue, (gint64) *int_val);
+ break;
+ case G_TYPE_UINT64:
+ g_value_set_uint64 (gvalue, (guint64) *int_val);
+ break;
+ case G_TYPE_BOXED:
+ g_value_take_boxed (gvalue, *(gpointer*)value);
+ break;
+ case G_TYPE_ENUM:
+ g_value_set_enum (gvalue, (gint) *int_val);
+ break;
+ case G_TYPE_FLAGS:
+ g_value_set_flags (gvalue, (guint) *int_val);
+ break;
+ case G_TYPE_PARAM:
+ g_value_take_param (gvalue, *(gpointer*)value);
+ break;
+ case G_TYPE_OBJECT:
+ g_value_take_object (gvalue, *(gpointer*)value);
+ break;
+ case G_TYPE_VARIANT:
+ g_value_take_variant (gvalue, *(gpointer*)value);
+ break;
+ default:
+ g_warning ("value_from_ffi_type: Unsupported fundamental type: %s",
+ g_type_name (g_type_fundamental (G_VALUE_TYPE (gvalue))));
+ }
+}
+
+typedef union {
+ gpointer _gpointer;
+ float _float;
+ double _double;
+ gint _gint;
+ guint _guint;
+ glong _glong;
+ gulong _gulong;
+ gint64 _gint64;
+ guint64 _guint64;
+} va_arg_storage;
+
+static ffi_type *
+va_to_ffi_type (GType gtype,
+ va_list *va,
+ va_arg_storage *storage)
+{
+ ffi_type *rettype = NULL;
+ GType type = g_type_fundamental (gtype);
+ g_assert (type != G_TYPE_INVALID);
+
+ switch (type)
+ {
+ case G_TYPE_BOOLEAN:
+ case G_TYPE_CHAR:
+ case G_TYPE_INT:
+ case G_TYPE_ENUM:
+ rettype = &ffi_type_sint;
+ storage->_gint = va_arg (*va, gint);
+ break;
+ case G_TYPE_UCHAR:
+ case G_TYPE_UINT:
+ case G_TYPE_FLAGS:
+ rettype = &ffi_type_uint;
+ storage->_guint = va_arg (*va, guint);
+ break;
+ case G_TYPE_STRING:
+ case G_TYPE_OBJECT:
+ case G_TYPE_BOXED:
+ case G_TYPE_PARAM:
+ case G_TYPE_POINTER:
+ case G_TYPE_INTERFACE:
+ case G_TYPE_VARIANT:
+ rettype = &ffi_type_pointer;
+ storage->_gpointer = va_arg (*va, gpointer);
+ break;
+ case G_TYPE_FLOAT:
+ /* Float args are passed as doubles in varargs */
+ rettype = &ffi_type_float;
+ storage->_float = (float)va_arg (*va, double);
+ break;
+ case G_TYPE_DOUBLE:
+ rettype = &ffi_type_double;
+ storage->_double = va_arg (*va, double);
+ break;
+ case G_TYPE_LONG:
+ rettype = &ffi_type_slong;
+ storage->_glong = va_arg (*va, glong);
+ break;
+ case G_TYPE_ULONG:
+ rettype = &ffi_type_ulong;
+ storage->_gulong = va_arg (*va, gulong);
+ break;
+ case G_TYPE_INT64:
+ rettype = &ffi_type_sint64;
+ storage->_gint64 = va_arg (*va, gint64);
+ break;
+ case G_TYPE_UINT64:
+ rettype = &ffi_type_uint64;
+ storage->_guint64 = va_arg (*va, guint64);
+ break;
+ default:
+ rettype = &ffi_type_pointer;
+ storage->_guint64 = 0;
+ g_warning ("va_to_ffi_type: Unsupported fundamental type: %s", g_type_name (type));
+ break;
+ }
+ return rettype;
+}
+
+/**
+ * g_cclosure_marshal_generic:
+ * @closure: A #GClosure.
+ * @return_gvalue: A #GValue to store the return value. May be %NULL
+ * if the callback of closure doesn't return a value.
+ * @n_param_values: The length of the @param_values array.
+ * @param_values: An array of #GValues holding the arguments
+ * on which to invoke the callback of closure.
+ * @invocation_hint: The invocation hint given as the last argument to
+ * g_closure_invoke().
+ * @marshal_data: Additional data specified when registering the
+ * marshaller, see g_closure_set_marshal() and
+ * g_closure_set_meta_marshal()
+ *
+ * A generic marshaller function implemented via
+ * [libffi](http://sourceware.org/libffi/).
+ *
+ * Normally this function is not passed explicitly to g_signal_new(),
+ * but used automatically by GLib when specifying a %NULL marshaller.
+ *
+ * Since: 2.30
+ */
+void
+g_cclosure_marshal_generic (GClosure *closure,
+ GValue *return_gvalue,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ ffi_type *rtype;
+ void *rvalue;
+ int n_args;
+ ffi_type **atypes;
+ void **args;
+ int i;
+ ffi_cif cif;
+ GCClosure *cc = (GCClosure*) closure;
+ gint *enum_tmpval;
+ gboolean tmpval_used = FALSE;
+
+ enum_tmpval = g_alloca (sizeof (gint));
+ if (return_gvalue && G_VALUE_TYPE (return_gvalue))
+ {
+ rtype = value_to_ffi_type (return_gvalue, &rvalue, enum_tmpval, &tmpval_used);
+ }
+ else
+ {
+ rtype = &ffi_type_void;
+ }
+
+ rvalue = g_alloca (MAX (rtype->size, sizeof (ffi_arg)));
+
+ n_args = n_param_values + 1;
+ atypes = g_alloca (sizeof (ffi_type *) * n_args);
+ args = g_alloca (sizeof (gpointer) * n_args);
+
+ if (tmpval_used)
+ enum_tmpval = g_alloca (sizeof (gint));
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ atypes[n_args-1] = value_to_ffi_type (param_values + 0,
+ &args[n_args-1],
+ enum_tmpval,
+ &tmpval_used);
+ atypes[0] = &ffi_type_pointer;
+ args[0] = &closure->data;
+ }
+ else
+ {
+ atypes[0] = value_to_ffi_type (param_values + 0,
+ &args[0],
+ enum_tmpval,
+ &tmpval_used);
+ atypes[n_args-1] = &ffi_type_pointer;
+ args[n_args-1] = &closure->data;
+ }
+
+ for (i = 1; i < n_args - 1; i++)
+ {
+ if (tmpval_used)
+ enum_tmpval = g_alloca (sizeof (gint));
+
+ atypes[i] = value_to_ffi_type (param_values + i,
+ &args[i],
+ enum_tmpval,
+ &tmpval_used);
+ }
+
+ if (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, n_args, rtype, atypes) != FFI_OK)
+ return;
+
+ ffi_call (&cif, marshal_data ? marshal_data : cc->callback, rvalue, args);
+
+ if (return_gvalue && G_VALUE_TYPE (return_gvalue))
+ value_from_ffi_type (return_gvalue, rvalue);
+}
+
+void
+g_cclosure_marshal_generic_va (GClosure *closure,
+ GValue *return_value,
+ gpointer instance,
+ va_list args_list,
+ gpointer marshal_data,
+ int n_params,
+ GType *param_types)
+{
+ ffi_type *rtype;
+ void *rvalue;
+ int n_args;
+ ffi_type **atypes;
+ void **args;
+ va_arg_storage *storage;
+ int i;
+ ffi_cif cif;
+ GCClosure *cc = (GCClosure*) closure;
+ gint *enum_tmpval;
+ gboolean tmpval_used = FALSE;
+ va_list args_copy;
+
+ enum_tmpval = g_alloca (sizeof (gint));
+ if (return_value && G_VALUE_TYPE (return_value))
+ {
+ rtype = value_to_ffi_type (return_value, &rvalue, enum_tmpval, &tmpval_used);
+ }
+ else
+ {
+ rtype = &ffi_type_void;
+ }
+
+ rvalue = g_alloca (MAX (rtype->size, sizeof (ffi_arg)));
+
+ n_args = n_params + 2;
+ atypes = g_alloca (sizeof (ffi_type *) * n_args);
+ args = g_alloca (sizeof (gpointer) * n_args);
+ storage = g_alloca (sizeof (va_arg_storage) * n_params);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ atypes[n_args-1] = &ffi_type_pointer;
+ args[n_args-1] = &instance;
+ atypes[0] = &ffi_type_pointer;
+ args[0] = &closure->data;
+ }
+ else
+ {
+ atypes[0] = &ffi_type_pointer;
+ args[0] = &instance;
+ atypes[n_args-1] = &ffi_type_pointer;
+ args[n_args-1] = &closure->data;
+ }
+
+ G_VA_COPY (args_copy, args_list);
+
+ /* Box non-primitive arguments */
+ for (i = 0; i < n_params; i++)
+ {
+ GType type = param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE;
+ GType fundamental = G_TYPE_FUNDAMENTAL (type);
+
+ atypes[i+1] = va_to_ffi_type (type,
+ &args_copy,
+ &storage[i]);
+ args[i+1] = &storage[i];
+
+ if ((param_types[i] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0)
+ {
+ if (fundamental == G_TYPE_STRING && storage[i]._gpointer != NULL)
+ storage[i]._gpointer = g_strdup (storage[i]._gpointer);
+ else if (fundamental == G_TYPE_PARAM && storage[i]._gpointer != NULL)
+ storage[i]._gpointer = g_param_spec_ref (storage[i]._gpointer);
+ else if (fundamental == G_TYPE_BOXED && storage[i]._gpointer != NULL)
+ storage[i]._gpointer = g_boxed_copy (type, storage[i]._gpointer);
+ else if (fundamental == G_TYPE_VARIANT && storage[i]._gpointer != NULL)
+ storage[i]._gpointer = g_variant_ref_sink (storage[i]._gpointer);
+ }
+ if (fundamental == G_TYPE_OBJECT && storage[i]._gpointer != NULL)
+ storage[i]._gpointer = g_object_ref (storage[i]._gpointer);
+ }
+
+ va_end (args_copy);
+
+ if (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, n_args, rtype, atypes) != FFI_OK)
+ return;
+
+ ffi_call (&cif, marshal_data ? marshal_data : cc->callback, rvalue, args);
+
+ /* Unbox non-primitive arguments */
+ for (i = 0; i < n_params; i++)
+ {
+ GType type = param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE;
+ GType fundamental = G_TYPE_FUNDAMENTAL (type);
+
+ if ((param_types[i] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0)
+ {
+ if (fundamental == G_TYPE_STRING && storage[i]._gpointer != NULL)
+ g_free (storage[i]._gpointer);
+ else if (fundamental == G_TYPE_PARAM && storage[i]._gpointer != NULL)
+ g_param_spec_unref (storage[i]._gpointer);
+ else if (fundamental == G_TYPE_BOXED && storage[i]._gpointer != NULL)
+ g_boxed_free (type, storage[i]._gpointer);
+ else if (fundamental == G_TYPE_VARIANT && storage[i]._gpointer != NULL)
+ g_variant_unref (storage[i]._gpointer);
+ }
+ if (fundamental == G_TYPE_OBJECT && storage[i]._gpointer != NULL)
+ g_object_unref (storage[i]._gpointer);
+ }
+
+ if (return_value && G_VALUE_TYPE (return_value))
+ value_from_ffi_type (return_value, rvalue);
+}
+
+/**
+ * g_cclosure_marshal_VOID__VOID:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 1
+ * @param_values: a #GValue array holding only the instance
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__BOOLEAN:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gboolean parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__CHAR:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gchar parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, gchar arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__UCHAR:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #guchar parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, guchar arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__INT:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gint parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, gint arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__UINT:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #guint parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, guint arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__LONG:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #glong parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, glong arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__ULONG:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gulong parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, gulong arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__ENUM:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the enumeration parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter denotes an enumeration type..
+ */
+
+/**
+ * g_cclosure_marshal_VOID__FLAGS:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the flags parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter denotes a flags type.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__FLOAT:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gfloat parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__DOUBLE:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gdouble parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__STRING:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gchar* parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__PARAM:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #GParamSpec* parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__BOXED:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #GBoxed* parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__POINTER:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #gpointer parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__OBJECT:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #GObject* parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_VOID__VARIANT:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding the instance and the #GVariant* parameter
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)`.
+ *
+ * Since: 2.26
+ */
+
+/**
+ * g_cclosure_marshal_VOID__UINT_POINTER:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: ignored
+ * @n_param_values: 3
+ * @param_values: a #GValue array holding instance, arg1 and arg2
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)`.
+ */
+
+/**
+ * g_cclosure_marshal_BOOLEAN__FLAGS:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: a #GValue which can store the returned #gboolean
+ * @n_param_values: 2
+ * @param_values: a #GValue array holding instance and arg1
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter
+ * denotes a flags type.
+ */
+
+/**
+ * g_cclosure_marshal_BOOL__FLAGS:
+ *
+ * Another name for g_cclosure_marshal_BOOLEAN__FLAGS().
+ */
+/**
+ * g_cclosure_marshal_STRING__OBJECT_POINTER:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: a #GValue, which can store the returned string
+ * @n_param_values: 3
+ * @param_values: a #GValue array holding instance, arg1 and arg2
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)`.
+ */
+/**
+ * g_cclosure_marshal_BOOLEAN__OBJECT_BOXED_BOXED:
+ * @closure: the #GClosure to which the marshaller belongs
+ * @return_value: a #GValue, which can store the returned string
+ * @n_param_values: 3
+ * @param_values: a #GValue array holding instance, arg1 and arg2
+ * @invocation_hint: the invocation hint given as the last argument
+ * to g_closure_invoke()
+ * @marshal_data: additional data specified when registering the marshaller
+ *
+ * A marshaller for a #GCClosure with a callback of type
+ * `gboolean (*callback) (gpointer instance, GBoxed *arg1, GBoxed *arg2, gpointer user_data)`.
+ *
+ * Since: 2.26
+ */