| 1 |
#include "na-marshal.h" |
| 2 |
|
| 3 |
#include <glib-object.h> |
| 4 |
|
| 5 |
|
| 6 |
#ifdef G_ENABLE_DEBUG |
| 7 |
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) |
| 8 |
#define g_marshal_value_peek_char(v) g_value_get_schar (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 |
#define g_marshal_value_peek_variant(v) g_value_get_variant (v) |
| 26 |
#else |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int |
| 32 |
#define g_marshal_value_peek_char(v) (v)->data[0].v_int |
| 33 |
#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint |
| 34 |
#define g_marshal_value_peek_int(v) (v)->data[0].v_int |
| 35 |
#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint |
| 36 |
#define g_marshal_value_peek_long(v) (v)->data[0].v_long |
| 37 |
#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong |
| 38 |
#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 |
| 39 |
#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 |
| 40 |
#define g_marshal_value_peek_enum(v) (v)->data[0].v_long |
| 41 |
#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong |
| 42 |
#define g_marshal_value_peek_float(v) (v)->data[0].v_float |
| 43 |
#define g_marshal_value_peek_double(v) (v)->data[0].v_double |
| 44 |
#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer |
| 45 |
#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer |
| 46 |
#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer |
| 47 |
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer |
| 48 |
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer |
| 49 |
#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer |
| 50 |
#endif |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
void |
| 55 |
_na_marshal_VOID__OBJECT_OBJECT (GClosure *closure, |
| 56 |
GValue *return_value G_GNUC_UNUSED, |
| 57 |
guint n_param_values, |
| 58 |
const GValue *param_values, |
| 59 |
gpointer invocation_hint G_GNUC_UNUSED, |
| 60 |
gpointer marshal_data) |
| 61 |
{ |
| 62 |
typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, |
| 63 |
gpointer arg_1, |
| 64 |
gpointer arg_2, |
| 65 |
gpointer data2); |
| 66 |
register GMarshalFunc_VOID__OBJECT_OBJECT callback; |
| 67 |
register GCClosure *cc = (GCClosure*) closure; |
| 68 |
register gpointer data1, data2; |
| 69 |
|
| 70 |
g_return_if_fail (n_param_values == 3); |
| 71 |
|
| 72 |
if (G_CCLOSURE_SWAP_DATA (closure)) |
| 73 |
{ |
| 74 |
data1 = closure->data; |
| 75 |
data2 = g_value_peek_pointer (param_values + 0); |
| 76 |
} |
| 77 |
else |
| 78 |
{ |
| 79 |
data1 = g_value_peek_pointer (param_values + 0); |
| 80 |
data2 = closure->data; |
| 81 |
} |
| 82 |
callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); |
| 83 |
|
| 84 |
callback (data1, |
| 85 |
g_marshal_value_peek_object (param_values + 1), |
| 86 |
g_marshal_value_peek_object (param_values + 2), |
| 87 |
data2); |
| 88 |
} |
| 89 |
|
| 90 |
|
| 91 |
void |
| 92 |
_na_marshal_VOID__OBJECT_STRING_LONG_LONG (GClosure *closure, |
| 93 |
GValue *return_value G_GNUC_UNUSED, |
| 94 |
guint n_param_values, |
| 95 |
const GValue *param_values, |
| 96 |
gpointer invocation_hint G_GNUC_UNUSED, |
| 97 |
gpointer marshal_data) |
| 98 |
{ |
| 99 |
typedef void (*GMarshalFunc_VOID__OBJECT_STRING_LONG_LONG) (gpointer data1, |
| 100 |
gpointer arg_1, |
| 101 |
gpointer arg_2, |
| 102 |
glong arg_3, |
| 103 |
glong arg_4, |
| 104 |
gpointer data2); |
| 105 |
register GMarshalFunc_VOID__OBJECT_STRING_LONG_LONG callback; |
| 106 |
register GCClosure *cc = (GCClosure*) closure; |
| 107 |
register gpointer data1, data2; |
| 108 |
|
| 109 |
g_return_if_fail (n_param_values == 5); |
| 110 |
|
| 111 |
if (G_CCLOSURE_SWAP_DATA (closure)) |
| 112 |
{ |
| 113 |
data1 = closure->data; |
| 114 |
data2 = g_value_peek_pointer (param_values + 0); |
| 115 |
} |
| 116 |
else |
| 117 |
{ |
| 118 |
data1 = g_value_peek_pointer (param_values + 0); |
| 119 |
data2 = closure->data; |
| 120 |
} |
| 121 |
callback = (GMarshalFunc_VOID__OBJECT_STRING_LONG_LONG) (marshal_data ? marshal_data : cc->callback); |
| 122 |
|
| 123 |
callback (data1, |
| 124 |
g_marshal_value_peek_object (param_values + 1), |
| 125 |
g_marshal_value_peek_string (param_values + 2), |
| 126 |
g_marshal_value_peek_long (param_values + 3), |
| 127 |
g_marshal_value_peek_long (param_values + 4), |
| 128 |
data2); |
| 129 |
} |
| 130 |
|
| 131 |
|
| 132 |
void |
| 133 |
_na_marshal_VOID__OBJECT_LONG (GClosure *closure, |
| 134 |
GValue *return_value G_GNUC_UNUSED, |
| 135 |
guint n_param_values, |
| 136 |
const GValue *param_values, |
| 137 |
gpointer invocation_hint G_GNUC_UNUSED, |
| 138 |
gpointer marshal_data) |
| 139 |
{ |
| 140 |
typedef void (*GMarshalFunc_VOID__OBJECT_LONG) (gpointer data1, |
| 141 |
gpointer arg_1, |
| 142 |
glong arg_2, |
| 143 |
gpointer data2); |
| 144 |
register GMarshalFunc_VOID__OBJECT_LONG callback; |
| 145 |
register GCClosure *cc = (GCClosure*) closure; |
| 146 |
register gpointer data1, data2; |
| 147 |
|
| 148 |
g_return_if_fail (n_param_values == 3); |
| 149 |
|
| 150 |
if (G_CCLOSURE_SWAP_DATA (closure)) |
| 151 |
{ |
| 152 |
data1 = closure->data; |
| 153 |
data2 = g_value_peek_pointer (param_values + 0); |
| 154 |
} |
| 155 |
else |
| 156 |
{ |
| 157 |
data1 = g_value_peek_pointer (param_values + 0); |
| 158 |
data2 = closure->data; |
| 159 |
} |
| 160 |
callback = (GMarshalFunc_VOID__OBJECT_LONG) (marshal_data ? marshal_data : cc->callback); |
| 161 |
|
| 162 |
callback (data1, |
| 163 |
g_marshal_value_peek_object (param_values + 1), |
| 164 |
g_marshal_value_peek_long (param_values + 2), |
| 165 |
data2); |
| 166 |
} |
| 167 |
|