summaryrefslogtreecommitdiff
path: root/src/plugin-marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin-marshal.c')
-rw-r--r--src/plugin-marshal.c260
1 files changed, 260 insertions, 0 deletions
diff --git a/src/plugin-marshal.c b/src/plugin-marshal.c
new file mode 100644
index 0000000..defddf4
--- /dev/null
+++ b/src/plugin-marshal.c
@@ -0,0 +1,260 @@
1
2#include <glib-object.h>
3
4
5#ifdef G_ENABLE_DEBUG
6#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
7#define g_marshal_value_peek_char(v) g_value_get_char (v)
8#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
9#define g_marshal_value_peek_int(v) g_value_get_int (v)
10#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
11#define g_marshal_value_peek_long(v) g_value_get_long (v)
12#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
13#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
14#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
15#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
16#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
17#define g_marshal_value_peek_float(v) g_value_get_float (v)
18#define g_marshal_value_peek_double(v) g_value_get_double (v)
19#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
20#define g_marshal_value_peek_param(v) g_value_get_param (v)
21#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
22#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
23#define g_marshal_value_peek_object(v) g_value_get_object (v)
24#else /* !G_ENABLE_DEBUG */
25/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
26 * Do not access GValues directly in your code. Instead, use the
27 * g_value_get_*() functions
28 */
29#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
30#define g_marshal_value_peek_char(v) (v)->data[0].v_int
31#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
32#define g_marshal_value_peek_int(v) (v)->data[0].v_int
33#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
34#define g_marshal_value_peek_long(v) (v)->data[0].v_long
35#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
36#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
37#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
38#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
39#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
40#define g_marshal_value_peek_float(v) (v)->data[0].v_float
41#define g_marshal_value_peek_double(v) (v)->data[0].v_double
42#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
43#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
44#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
45#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
46#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
47#endif /* !G_ENABLE_DEBUG */
48
49
50/* VOID:POINTER (plugin-marshal.list:1) */
51
52/* VOID:POINTER,POINTER (plugin-marshal.list:2) */
53void
54syl_plugin_marshal_VOID__POINTER_POINTER (GClosure *closure,
55 GValue *return_value G_GNUC_UNUSED,
56 guint n_param_values,
57 const GValue *param_values,
58 gpointer invocation_hint G_GNUC_UNUSED,
59 gpointer marshal_data)
60{
61 typedef void (*GMarshalFunc_VOID__POINTER_POINTER) (gpointer data1,
62 gpointer arg_1,
63 gpointer arg_2,
64 gpointer data2);
65 register GMarshalFunc_VOID__POINTER_POINTER callback;
66 register GCClosure *cc = (GCClosure*) closure;
67 register gpointer data1, data2;
68
69 g_return_if_fail (n_param_values == 3);
70
71 if (G_CCLOSURE_SWAP_DATA (closure))
72 {
73 data1 = closure->data;
74 data2 = g_value_peek_pointer (param_values + 0);
75 }
76 else
77 {
78 data1 = g_value_peek_pointer (param_values + 0);
79 data2 = closure->data;
80 }
81 callback = (GMarshalFunc_VOID__POINTER_POINTER) (marshal_data ? marshal_data : cc->callback);
82
83 callback (data1,
84 g_marshal_value_peek_pointer (param_values + 1),
85 g_marshal_value_peek_pointer (param_values + 2),
86 data2);
87}
88
89/* VOID:POINTER,POINTER,STRING,STRING,POINTER (plugin-marshal.list:3) */
90void
91syl_plugin_marshal_VOID__POINTER_POINTER_STRING_STRING_POINTER (GClosure *closure,
92 GValue *return_value G_GNUC_UNUSED,
93 guint n_param_values,
94 const GValue *param_values,
95 gpointer invocation_hint G_GNUC_UNUSED,
96 gpointer marshal_data)
97{
98 typedef void (*GMarshalFunc_VOID__POINTER_POINTER_STRING_STRING_POINTER) (gpointer data1,
99 gpointer arg_1,
100 gpointer arg_2,
101 gpointer arg_3,
102 gpointer arg_4,
103 gpointer arg_5,
104 gpointer data2);
105 register GMarshalFunc_VOID__POINTER_POINTER_STRING_STRING_POINTER callback;
106 register GCClosure *cc = (GCClosure*) closure;
107 register gpointer data1, data2;
108
109 g_return_if_fail (n_param_values == 6);
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__POINTER_POINTER_STRING_STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
122
123 callback (data1,
124 g_marshal_value_peek_pointer (param_values + 1),
125 g_marshal_value_peek_pointer (param_values + 2),
126 g_marshal_value_peek_string (param_values + 3),
127 g_marshal_value_peek_string (param_values + 4),
128 g_marshal_value_peek_pointer (param_values + 5),
129 data2);
130}
131
132/* BOOLEAN:POINTER,INT,INT,STRING,POINTER (plugin-marshal.list:4) */
133void
134syl_plugin_marshal_BOOLEAN__POINTER_INT_INT_STRING_POINTER (GClosure *closure,
135 GValue *return_value G_GNUC_UNUSED,
136 guint n_param_values,
137 const GValue *param_values,
138 gpointer invocation_hint G_GNUC_UNUSED,
139 gpointer marshal_data)
140{
141 typedef gboolean (*GMarshalFunc_BOOLEAN__POINTER_INT_INT_STRING_POINTER) (gpointer data1,
142 gpointer arg_1,
143 gint arg_2,
144 gint arg_3,
145 gpointer arg_4,
146 gpointer arg_5,
147 gpointer data2);
148 register GMarshalFunc_BOOLEAN__POINTER_INT_INT_STRING_POINTER callback;
149 register GCClosure *cc = (GCClosure*) closure;
150 register gpointer data1, data2;
151 gboolean v_return;
152
153 g_return_if_fail (return_value != NULL);
154 g_return_if_fail (n_param_values == 6);
155
156 if (G_CCLOSURE_SWAP_DATA (closure))
157 {
158 data1 = closure->data;
159 data2 = g_value_peek_pointer (param_values + 0);
160 }
161 else
162 {
163 data1 = g_value_peek_pointer (param_values + 0);
164 data2 = closure->data;
165 }
166 callback = (GMarshalFunc_BOOLEAN__POINTER_INT_INT_STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
167
168 v_return = callback (data1,
169 g_marshal_value_peek_pointer (param_values + 1),
170 g_marshal_value_peek_int (param_values + 2),
171 g_marshal_value_peek_int (param_values + 3),
172 g_marshal_value_peek_string (param_values + 4),
173 g_marshal_value_peek_pointer (param_values + 5),
174 data2);
175
176 g_value_set_boolean (return_value, v_return);
177}
178
179/* VOID:POINTER,POINTER,BOOLEAN (plugin-marshal.list:5) */
180void
181syl_plugin_marshal_VOID__POINTER_POINTER_BOOLEAN (GClosure *closure,
182 GValue *return_value G_GNUC_UNUSED,
183 guint n_param_values,
184 const GValue *param_values,
185 gpointer invocation_hint G_GNUC_UNUSED,
186 gpointer marshal_data)
187{
188 typedef void (*GMarshalFunc_VOID__POINTER_POINTER_BOOLEAN) (gpointer data1,
189 gpointer arg_1,
190 gpointer arg_2,
191 gboolean arg_3,
192 gpointer data2);
193 register GMarshalFunc_VOID__POINTER_POINTER_BOOLEAN callback;
194 register GCClosure *cc = (GCClosure*) closure;
195 register gpointer data1, data2;
196
197 g_return_if_fail (n_param_values == 4);
198
199 if (G_CCLOSURE_SWAP_DATA (closure))
200 {
201 data1 = closure->data;
202 data2 = g_value_peek_pointer (param_values + 0);
203 }
204 else
205 {
206 data1 = g_value_peek_pointer (param_values + 0);
207 data2 = closure->data;
208 }
209 callback = (GMarshalFunc_VOID__POINTER_POINTER_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
210
211 callback (data1,
212 g_marshal_value_peek_pointer (param_values + 1),
213 g_marshal_value_peek_pointer (param_values + 2),
214 g_marshal_value_peek_boolean (param_values + 3),
215 data2);
216}
217
218/* VOID:INT (plugin-marshal.list:6) */
219
220/* VOID:POINTER,STRING,STRING,POINTER (plugin-marshal.list:7) */
221void
222syl_plugin_marshal_VOID__POINTER_STRING_STRING_POINTER (GClosure *closure,
223 GValue *return_value G_GNUC_UNUSED,
224 guint n_param_values,
225 const GValue *param_values,
226 gpointer invocation_hint G_GNUC_UNUSED,
227 gpointer marshal_data)
228{
229 typedef void (*GMarshalFunc_VOID__POINTER_STRING_STRING_POINTER) (gpointer data1,
230 gpointer arg_1,
231 gpointer arg_2,
232 gpointer arg_3,
233 gpointer arg_4,
234 gpointer data2);
235 register GMarshalFunc_VOID__POINTER_STRING_STRING_POINTER callback;
236 register GCClosure *cc = (GCClosure*) closure;
237 register gpointer data1, data2;
238
239 g_return_if_fail (n_param_values == 5);
240
241 if (G_CCLOSURE_SWAP_DATA (closure))
242 {
243 data1 = closure->data;
244 data2 = g_value_peek_pointer (param_values + 0);
245 }
246 else
247 {
248 data1 = g_value_peek_pointer (param_values + 0);
249 data2 = closure->data;
250 }
251 callback = (GMarshalFunc_VOID__POINTER_STRING_STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
252
253 callback (data1,
254 g_marshal_value_peek_pointer (param_values + 1),
255 g_marshal_value_peek_string (param_values + 2),
256 g_marshal_value_peek_string (param_values + 3),
257 g_marshal_value_peek_pointer (param_values + 4),
258 data2);
259}
260