1 #include "gq-marshal.h"
3 #include <glib-object.h>
7 #define g_marshal_value_peek_boolean(v) g_value_get_boolean(v)
8 #define g_marshal_value_peek_char(v) g_value_get_char(v)
9 #define g_marshal_value_peek_uchar(v) g_value_get_uchar(v)
10 #define g_marshal_value_peek_int(v) g_value_get_int(v)
11 #define g_marshal_value_peek_uint(v) g_value_get_uint(v)
12 #define g_marshal_value_peek_long(v) g_value_get_long(v)
13 #define g_marshal_value_peek_ulong(v) g_value_get_ulong(v)
14 #define g_marshal_value_peek_int64(v) g_value_get_int64(v)
15 #define g_marshal_value_peek_uint64(v) g_value_get_uint64(v)
16 #define g_marshal_value_peek_enum(v) g_value_get_enum(v)
17 #define g_marshal_value_peek_flags(v) g_value_get_flags(v)
18 #define g_marshal_value_peek_float(v) g_value_get_float(v)
19 #define g_marshal_value_peek_double(v) g_value_get_double(v)
20 #define g_marshal_value_peek_string(v) (char*) g_value_get_string(v)
21 #define g_marshal_value_peek_param(v) g_value_get_param(v)
22 #define g_marshal_value_peek_boxed(v) g_value_get_boxed(v)
23 #define g_marshal_value_peek_pointer(v) g_value_get_pointer(v)
24 #define g_marshal_value_peek_object(v) g_value_get_object(v)
25 #else /* !G_ENABLE_DEBUG */
26 /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
27 * Do not access GValues directly in your code. Instead, use the
28 * g_value_get_*() functions
30 #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
31 #define g_marshal_value_peek_char(v) (v)->data[0].v_int
32 #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
33 #define g_marshal_value_peek_int(v) (v)->data[0].v_int
34 #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
35 #define g_marshal_value_peek_long(v) (v)->data[0].v_long
36 #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
37 #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
38 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
39 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long
40 #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
41 #define g_marshal_value_peek_float(v) (v)->data[0].v_float
42 #define g_marshal_value_peek_double(v) (v)->data[0].v_double
43 #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
44 #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
45 #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
46 #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
47 #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
48 #endif /* !G_ENABLE_DEBUG */
51 /* VOID:VOID (gq-marshal.list:1) */
53 /* VOID:INT,INT,INT,INT (gq-marshal.list:2) */
55 gq_marshal_VOID__INT_INT_INT_INT(GClosure *closure,
56 GValue *return_value G_GNUC_UNUSED,
58 const GValue *param_values,
59 gpointer invocation_hint G_GNUC_UNUSED,
60 gpointer marshal_data)
62 typedef void (*GMarshalFunc_VOID__INT_INT_INT_INT) (gpointer data1,
68 register GMarshalFunc_VOID__INT_INT_INT_INT callback;
69 register GCClosure *cc = (GCClosure*) closure;
70 register gpointer data1, data2;
72 g_return_if_fail(n_param_values == 5);
74 if (G_CCLOSURE_SWAP_DATA(closure))
76 data1 = closure->data;
77 data2 = g_value_peek_pointer(param_values + 0);
81 data1 = g_value_peek_pointer(param_values + 0);
82 data2 = closure->data;
84 callback = (GMarshalFunc_VOID__INT_INT_INT_INT) (marshal_data ? marshal_data : cc->callback);
87 g_marshal_value_peek_int(param_values + 1),
88 g_marshal_value_peek_int(param_values + 2),
89 g_marshal_value_peek_int(param_values + 3),
90 g_marshal_value_peek_int(param_values + 4),
94 void gq_marshal_VOID__INT_INT(GClosure *closure,
95 GValue *return_value G_GNUC_UNUSED,
97 const GValue *param_values,
98 gpointer invocation_hint G_GNUC_UNUSED,
99 gpointer marshal_data)
101 typedef void (*GMarshalFunc_VOID__INT_INT) (gpointer data1,
105 register GMarshalFunc_VOID__INT_INT callback;
106 register GCClosure *cc = (GCClosure*) closure;
107 register gpointer data1, data2;
109 g_return_if_fail(n_param_values == 3);
111 if (G_CCLOSURE_SWAP_DATA(closure))
113 data1 = closure->data;
114 data2 = g_value_peek_pointer(param_values + 0);
118 data1 = g_value_peek_pointer(param_values + 0);
119 data2 = closure->data;
121 callback = (GMarshalFunc_VOID__INT_INT) (marshal_data ? marshal_data : cc->callback);
124 g_marshal_value_peek_int(param_values + 1),
125 g_marshal_value_peek_int(param_values + 2),
129 /* VOID:DOUBLE (gq-marshal.list:3) */
131 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */