#include "gbinding.h"
#include "genums.h"
+#include "gmarshal.h"
#include "gobject.h"
#include "gsignal.h"
#include "gparamspecs.h"
if (transform_to != NULL)
{
+ if (G_CLOSURE_NEEDS_MARSHAL (transform_to))
+ g_closure_set_marshal (transform_to, g_cclosure_marshal_BOOLEAN__BOXED_BOXED);
+
data->transform_to_closure = g_closure_ref (transform_to);
g_closure_sink (data->transform_to_closure);
}
if (transform_from != NULL)
{
+ if (G_CLOSURE_NEEDS_MARSHAL (transform_from))
+ g_closure_set_marshal (transform_from, g_cclosure_marshal_BOOLEAN__BOXED_BOXED);
+
data->transform_from_closure = g_closure_ref (transform_from);
g_closure_sink (data->transform_from_closure);
}
* A marshaller for a #GCClosure with a callback of type
* <literal>gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)</literal>.
*/
+/**
+ * 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
+ * <literal>gboolean (*callback) (gpointer instance, GBoxed *arg1, GBoxed *arg2, gpointer user_data)</literal>.
+ *
+ * Since: 2.26
+ */
VOID:UINT,POINTER
BOOL:FLAGS
STRING:OBJECT,POINTER
+BOOL:BOXED,BOXED
#if IN_HEADER(__G_MARSHAL_H__)
#if IN_FILE(__G_SIGNAL_C__)
g_cclosure_marshal_BOOLEAN__FLAGS
+g_cclosure_marshal_BOOLEAN__BOXED_BOXED
g_cclosure_marshal_STRING__OBJECT_POINTER
g_cclosure_marshal_VOID__BOOLEAN
g_cclosure_marshal_VOID__BOXED
g_assert (unused_data);
}
-static void
-binding_transform_marshal (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint G_GNUC_UNUSED,
- gpointer marshal_data)
-{
- typedef gboolean (* GMarshalFunc_BOOLEAN__VALUE_VALUE) (gpointer data1,
- gpointer arg_2,
- gpointer arg_3,
- gpointer data2);
- register GMarshalFunc_BOOLEAN__VALUE_VALUE callback;
- register GCClosure *cc = (GCClosure *) closure;
- register gpointer data1, data2;
- gboolean v_return;
-
- if (G_CCLOSURE_SWAP_DATA (closure))
- {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- }
- else
- {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
-
- callback = (GMarshalFunc_BOOLEAN__VALUE_VALUE) (marshal_data ? marshal_data : cc->callback);
- v_return = callback (data1,
- g_value_get_boxed (param_values + 1),
- g_value_get_boxed (param_values + 2),
- data2);
-
- g_value_set_boolean (return_value, v_return);
-}
-
static void
binding_transform_closure (void)
{
GClosure *c2f_clos, *f2c_clos;
c2f_clos = g_cclosure_new (G_CALLBACK (celsius_to_fahrenheit), &unused_data_1, (GClosureNotify) data_free);
- g_closure_set_marshal (c2f_clos, binding_transform_marshal);
f2c_clos = g_cclosure_new (G_CALLBACK (fahrenheit_to_celsius), &unused_data_2, (GClosureNotify) data_free);
- g_closure_set_marshal (f2c_clos, binding_transform_marshal);
binding = g_object_bind_property_with_closures (source, "value",
target, "value",