Coverage Report

Created: 2025-07-01 07:09

/src/glib/gobject/gmarshal.c
Line
Count
Source (jump to first uncovered line)
1
/* GObject - GLib Type, Object, Parameter and Signal Library
2
 *
3
 * This library is free software; you can redistribute it and/or
4
 * modify it under the terms of the GNU Lesser General Public
5
 * License as published by the Free Software Foundation; either
6
 * version 2.1 of the License, or (at your option) any later version.
7
 *
8
 * This library is distributed in the hope that it will be useful,
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11
 * Lesser General Public License for more details.
12
 *
13
 * You should have received a copy of the GNU Lesser General
14
 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
15
 */
16
17
#include "config.h"
18
19
#include "gobject.h"
20
#include "genums.h"
21
#include "gboxed.h"
22
#include "gvaluetypes.h"
23
24
25
#ifdef G_ENABLE_DEBUG
26
0
#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
27
0
#define g_marshal_value_peek_char(v)     g_value_get_schar (v)
28
0
#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
29
0
#define g_marshal_value_peek_int(v)      g_value_get_int (v)
30
0
#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
31
0
#define g_marshal_value_peek_long(v)     g_value_get_long (v)
32
0
#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
33
#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
34
#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
35
0
#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
36
0
#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
37
0
#define g_marshal_value_peek_float(v)    g_value_get_float (v)
38
0
#define g_marshal_value_peek_double(v)   g_value_get_double (v)
39
0
#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
40
0
#define g_marshal_value_peek_param(v)    g_value_get_param (v)
41
0
#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
42
0
#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
43
0
#define g_marshal_value_peek_object(v)   g_value_get_object (v)
44
0
#define g_marshal_value_peek_variant(v)  g_value_get_variant (v)
45
#else /* !G_ENABLE_DEBUG */
46
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
47
 *          Do not access GValues directly in your code. Instead, use the
48
 *          g_value_get_*() functions
49
 */
50
#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
51
#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
52
#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
53
#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
54
#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
55
#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
56
#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
57
#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
58
#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
59
#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
60
#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
61
#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
62
#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
63
#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
64
#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
65
#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
66
#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
67
#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
68
#define g_marshal_value_peek_variant(v)  (v)->data[0].v_pointer
69
#endif /* !G_ENABLE_DEBUG */
70
71
72
/**
73
 * g_cclosure_marshal_VOID__VOID:
74
 * @closure: A #GClosure.
75
 * @return_value: A #GValue to store the return value. May be %NULL
76
 *   if the callback of closure doesn't return a value.
77
 * @n_param_values: The length of the @param_values array.
78
 * @param_values: An array of #GValues holding the arguments
79
 *   on which to invoke the callback of closure.
80
 * @invocation_hint: The invocation hint given as the last argument to
81
 *   g_closure_invoke().
82
 * @marshal_data: Additional data specified when registering the
83
 *   marshaller, see g_closure_set_marshal() and
84
 *   g_closure_set_meta_marshal()
85
 *
86
 * A #GClosureMarshal function for use with signals with no arguments.
87
 */
88
/* VOID:VOID */
89
void
90
g_cclosure_marshal_VOID__VOID (GClosure     *closure,
91
                               GValue       *return_value G_GNUC_UNUSED,
92
                               guint         n_param_values,
93
                               const GValue *param_values,
94
                               gpointer      invocation_hint G_GNUC_UNUSED,
95
                               gpointer      marshal_data)
96
0
{
97
0
  typedef void (*GMarshalFunc_VOID__VOID) (gpointer     data1,
98
0
                                           gpointer     data2);
99
0
  GMarshalFunc_VOID__VOID callback;
100
0
  GCClosure *cc = (GCClosure*) closure;
101
0
  gpointer data1, data2;
102
103
0
  g_return_if_fail (n_param_values == 1);
104
105
0
  if (G_CCLOSURE_SWAP_DATA (closure))
106
0
    {
107
0
      data1 = closure->data;
108
0
      data2 = g_value_peek_pointer (param_values + 0);
109
0
    }
110
0
  else
111
0
    {
112
0
      data1 = g_value_peek_pointer (param_values + 0);
113
0
      data2 = closure->data;
114
0
    }
115
0
  callback = (GMarshalFunc_VOID__VOID) (marshal_data ? marshal_data : cc->callback);
116
117
0
  callback (data1,
118
0
            data2);
119
0
}
120
121
/**
122
 * g_cclosure_marshal_VOID__VOIDv:
123
 * @closure: the #GClosure to which the marshaller belongs
124
 * @return_value: (nullable): a #GValue to store the return
125
 *  value. May be %NULL if the callback of @closure doesn't return a
126
 *  value.
127
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
128
 * @args: va_list of arguments to be passed to the closure.
129
 * @marshal_data: (nullable): additional data specified when
130
 *  registering the marshaller, see g_closure_set_marshal() and
131
 *  g_closure_set_meta_marshal()
132
 * @n_params: the length of the @param_types array
133
 * @param_types: (array length=n_params): the #GType of each argument from
134
 *  @args.
135
 *
136
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__VOID().
137
 */
138
void
139
g_cclosure_marshal_VOID__VOIDv (GClosure     *closure,
140
                                GValue       *return_value,
141
                                gpointer      instance,
142
                                va_list       args,
143
                                gpointer      marshal_data,
144
                                int           n_params,
145
                                GType        *param_types)
146
0
{
147
0
  typedef void (*GMarshalFunc_VOID__VOID) (gpointer     instance,
148
0
                                           gpointer     data);
149
0
  GCClosure *cc = (GCClosure*) closure;
150
0
  gpointer data1, data2;
151
0
  GMarshalFunc_VOID__VOID callback;
152
153
0
  if (G_CCLOSURE_SWAP_DATA (closure))
154
0
    {
155
0
      data1 = closure->data;
156
0
      data2 = instance;
157
0
    }
158
0
  else
159
0
    {
160
0
      data1 = instance;
161
0
      data2 = closure->data;
162
0
    }
163
0
  callback = (GMarshalFunc_VOID__VOID) (marshal_data ? marshal_data : cc->callback);
164
165
0
  callback (data1,
166
0
            data2);
167
0
}
168
169
/**
170
 * g_cclosure_marshal_VOID__BOOLEAN:
171
 * @closure: A #GClosure.
172
 * @return_value: A #GValue to store the return value. May be %NULL
173
 *   if the callback of closure doesn't return a value.
174
 * @n_param_values: The length of the @param_values array.
175
 * @param_values: An array of #GValues holding the arguments
176
 *   on which to invoke the callback of closure.
177
 * @invocation_hint: The invocation hint given as the last argument to
178
 *   g_closure_invoke().
179
 * @marshal_data: Additional data specified when registering the
180
 *   marshaller, see g_closure_set_marshal() and
181
 *   g_closure_set_meta_marshal()
182
 *
183
 * A #GClosureMarshal function for use with signals with a single
184
 * boolean argument.
185
 */
186
/* VOID:BOOLEAN */
187
void
188
g_cclosure_marshal_VOID__BOOLEAN (GClosure     *closure,
189
                                  GValue       *return_value G_GNUC_UNUSED,
190
                                  guint         n_param_values,
191
                                  const GValue *param_values,
192
                                  gpointer      invocation_hint G_GNUC_UNUSED,
193
                                  gpointer      marshal_data)
194
0
{
195
0
  typedef void (*GMarshalFunc_VOID__BOOLEAN) (gpointer     data1,
196
0
                                              gboolean     arg_1,
197
0
                                              gpointer     data2);
198
0
  GMarshalFunc_VOID__BOOLEAN callback;
199
0
  GCClosure *cc = (GCClosure*) closure;
200
0
  gpointer data1, data2;
201
202
0
  g_return_if_fail (n_param_values == 2);
203
204
0
  if (G_CCLOSURE_SWAP_DATA (closure))
205
0
    {
206
0
      data1 = closure->data;
207
0
      data2 = g_value_peek_pointer (param_values + 0);
208
0
    }
209
0
  else
210
0
    {
211
0
      data1 = g_value_peek_pointer (param_values + 0);
212
0
      data2 = closure->data;
213
0
    }
214
0
  callback = (GMarshalFunc_VOID__BOOLEAN) (marshal_data ? marshal_data : cc->callback);
215
216
0
  callback (data1,
217
0
            g_marshal_value_peek_boolean (param_values + 1),
218
0
            data2);
219
0
}
220
221
/**
222
 * g_cclosure_marshal_VOID__BOOLEANv:
223
 * @closure: the #GClosure to which the marshaller belongs
224
 * @return_value: (nullable): a #GValue to store the return
225
 *  value. May be %NULL if the callback of @closure doesn't return a
226
 *  value.
227
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
228
 * @args: va_list of arguments to be passed to the closure.
229
 * @marshal_data: (nullable): additional data specified when
230
 *  registering the marshaller, see g_closure_set_marshal() and
231
 *  g_closure_set_meta_marshal()
232
 * @n_params: the length of the @param_types array
233
 * @param_types: (array length=n_params): the #GType of each argument from
234
 *  @args.
235
 *
236
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__BOOLEAN().
237
 */
238
void
239
g_cclosure_marshal_VOID__BOOLEANv (GClosure     *closure,
240
                                   GValue       *return_value,
241
                                   gpointer      instance,
242
                                   va_list       args,
243
                                   gpointer      marshal_data,
244
                                   int           n_params,
245
                                   GType        *param_types)
246
0
{
247
0
  typedef void (*GMarshalFunc_VOID__BOOLEAN) (gpointer     instance,
248
0
                                              gboolean     arg_0,
249
0
                                              gpointer     data);
250
0
  GCClosure *cc = (GCClosure*) closure;
251
0
  gpointer data1, data2;
252
0
  GMarshalFunc_VOID__BOOLEAN callback;
253
0
  gboolean arg0;
254
0
  va_list args_copy;
255
256
0
  G_VA_COPY (args_copy, args);
257
0
  arg0 = (gboolean) va_arg (args_copy, gboolean);
258
0
  va_end (args_copy);
259
260
0
  if (G_CCLOSURE_SWAP_DATA (closure))
261
0
    {
262
0
      data1 = closure->data;
263
0
      data2 = instance;
264
0
    }
265
0
  else
266
0
    {
267
0
      data1 = instance;
268
0
      data2 = closure->data;
269
0
    }
270
0
  callback = (GMarshalFunc_VOID__BOOLEAN) (marshal_data ? marshal_data : cc->callback);
271
272
0
  callback (data1,
273
0
            arg0,
274
0
            data2);
275
0
}
276
277
/**
278
 * g_cclosure_marshal_VOID__CHAR:
279
 * @closure: A #GClosure.
280
 * @return_value: A #GValue to store the return value. May be %NULL
281
 *   if the callback of closure doesn't return a value.
282
 * @n_param_values: The length of the @param_values array.
283
 * @param_values: An array of #GValues holding the arguments
284
 *   on which to invoke the callback of closure.
285
 * @invocation_hint: The invocation hint given as the last argument to
286
 *   g_closure_invoke().
287
 * @marshal_data: Additional data specified when registering the
288
 *   marshaller, see g_closure_set_marshal() and
289
 *   g_closure_set_meta_marshal()
290
 *
291
 * A #GClosureMarshal function for use with signals with a single
292
 * character argument.
293
 */
294
/* VOID:CHAR */
295
void
296
g_cclosure_marshal_VOID__CHAR (GClosure     *closure,
297
                               GValue       *return_value G_GNUC_UNUSED,
298
                               guint         n_param_values,
299
                               const GValue *param_values,
300
                               gpointer      invocation_hint G_GNUC_UNUSED,
301
                               gpointer      marshal_data)
302
0
{
303
0
  typedef void (*GMarshalFunc_VOID__CHAR) (gpointer     data1,
304
0
                                           gchar        arg_1,
305
0
                                           gpointer     data2);
306
0
  GMarshalFunc_VOID__CHAR callback;
307
0
  GCClosure *cc = (GCClosure*) closure;
308
0
  gpointer data1, data2;
309
310
0
  g_return_if_fail (n_param_values == 2);
311
312
0
  if (G_CCLOSURE_SWAP_DATA (closure))
313
0
    {
314
0
      data1 = closure->data;
315
0
      data2 = g_value_peek_pointer (param_values + 0);
316
0
    }
317
0
  else
318
0
    {
319
0
      data1 = g_value_peek_pointer (param_values + 0);
320
0
      data2 = closure->data;
321
0
    }
322
0
  callback = (GMarshalFunc_VOID__CHAR) (marshal_data ? marshal_data : cc->callback);
323
324
0
  callback (data1,
325
0
            g_marshal_value_peek_char (param_values + 1),
326
0
            data2);
327
0
}
328
329
/**
330
 * g_cclosure_marshal_VOID__CHARv:
331
 * @closure: the #GClosure to which the marshaller belongs
332
 * @return_value: (nullable): a #GValue to store the return
333
 *  value. May be %NULL if the callback of @closure doesn't return a
334
 *  value.
335
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
336
 * @args: va_list of arguments to be passed to the closure.
337
 * @marshal_data: (nullable): additional data specified when
338
 *  registering the marshaller, see g_closure_set_marshal() and
339
 *  g_closure_set_meta_marshal()
340
 * @n_params: the length of the @param_types array
341
 * @param_types: (array length=n_params): the #GType of each argument from
342
 *  @args.
343
 *
344
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__CHAR().
345
 */
346
void
347
g_cclosure_marshal_VOID__CHARv (GClosure     *closure,
348
                                GValue       *return_value,
349
                                gpointer      instance,
350
                                va_list       args,
351
                                gpointer      marshal_data,
352
                                int           n_params,
353
                                GType        *param_types)
354
0
{
355
0
  typedef void (*GMarshalFunc_VOID__CHAR) (gpointer     instance,
356
0
                                           gchar        arg_0,
357
0
                                           gpointer     data);
358
0
  GCClosure *cc = (GCClosure*) closure;
359
0
  gpointer data1, data2;
360
0
  GMarshalFunc_VOID__CHAR callback;
361
0
  gchar arg0;
362
0
  va_list args_copy;
363
364
0
  G_VA_COPY (args_copy, args);
365
0
  arg0 = (gchar) va_arg (args_copy, gint);
366
0
  va_end (args_copy);
367
368
0
  if (G_CCLOSURE_SWAP_DATA (closure))
369
0
    {
370
0
      data1 = closure->data;
371
0
      data2 = instance;
372
0
    }
373
0
  else
374
0
    {
375
0
      data1 = instance;
376
0
      data2 = closure->data;
377
0
    }
378
0
  callback = (GMarshalFunc_VOID__CHAR) (marshal_data ? marshal_data : cc->callback);
379
380
0
  callback (data1,
381
0
            arg0,
382
0
            data2);
383
0
}
384
385
/**
386
 * g_cclosure_marshal_VOID__UCHAR:
387
 * @closure: A #GClosure.
388
 * @return_value: A #GValue to store the return value. May be %NULL
389
 *   if the callback of closure doesn't return a value.
390
 * @n_param_values: The length of the @param_values array.
391
 * @param_values: An array of #GValues holding the arguments
392
 *   on which to invoke the callback of closure.
393
 * @invocation_hint: The invocation hint given as the last argument to
394
 *   g_closure_invoke().
395
 * @marshal_data: Additional data specified when registering the
396
 *   marshaller, see g_closure_set_marshal() and
397
 *   g_closure_set_meta_marshal()
398
 *
399
 * A #GClosureMarshal function for use with signals with a single
400
 * unsigned character argument.
401
 */
402
/* VOID:UCHAR */
403
void
404
g_cclosure_marshal_VOID__UCHAR (GClosure     *closure,
405
                                GValue       *return_value G_GNUC_UNUSED,
406
                                guint         n_param_values,
407
                                const GValue *param_values,
408
                                gpointer      invocation_hint G_GNUC_UNUSED,
409
                                gpointer      marshal_data)
410
0
{
411
0
  typedef void (*GMarshalFunc_VOID__UCHAR) (gpointer     data1,
412
0
                                            guchar       arg_1,
413
0
                                            gpointer     data2);
414
0
  GMarshalFunc_VOID__UCHAR callback;
415
0
  GCClosure *cc = (GCClosure*) closure;
416
0
  gpointer data1, data2;
417
418
0
  g_return_if_fail (n_param_values == 2);
419
420
0
  if (G_CCLOSURE_SWAP_DATA (closure))
421
0
    {
422
0
      data1 = closure->data;
423
0
      data2 = g_value_peek_pointer (param_values + 0);
424
0
    }
425
0
  else
426
0
    {
427
0
      data1 = g_value_peek_pointer (param_values + 0);
428
0
      data2 = closure->data;
429
0
    }
430
0
  callback = (GMarshalFunc_VOID__UCHAR) (marshal_data ? marshal_data : cc->callback);
431
432
0
  callback (data1,
433
0
            g_marshal_value_peek_uchar (param_values + 1),
434
0
            data2);
435
0
}
436
437
/**
438
 * g_cclosure_marshal_VOID__UCHARv:
439
 * @closure: the #GClosure to which the marshaller belongs
440
 * @return_value: (nullable): a #GValue to store the return
441
 *  value. May be %NULL if the callback of @closure doesn't return a
442
 *  value.
443
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
444
 * @args: va_list of arguments to be passed to the closure.
445
 * @marshal_data: (nullable): additional data specified when
446
 *  registering the marshaller, see g_closure_set_marshal() and
447
 *  g_closure_set_meta_marshal()
448
 * @n_params: the length of the @param_types array
449
 * @param_types: (array length=n_params): the #GType of each argument from
450
 *  @args.
451
 *
452
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UCHAR().
453
 */
454
void
455
g_cclosure_marshal_VOID__UCHARv (GClosure     *closure,
456
                                 GValue       *return_value,
457
                                 gpointer      instance,
458
                                 va_list       args,
459
                                 gpointer      marshal_data,
460
                                 int           n_params,
461
                                 GType        *param_types)
462
0
{
463
0
  typedef void (*GMarshalFunc_VOID__UCHAR) (gpointer     instance,
464
0
                                            guchar       arg_0,
465
0
                                            gpointer     data);
466
0
  GCClosure *cc = (GCClosure*) closure;
467
0
  gpointer data1, data2;
468
0
  GMarshalFunc_VOID__UCHAR callback;
469
0
  guchar arg0;
470
0
  va_list args_copy;
471
472
0
  G_VA_COPY (args_copy, args);
473
0
  arg0 = (guchar) va_arg (args_copy, guint);
474
0
  va_end (args_copy);
475
476
0
  if (G_CCLOSURE_SWAP_DATA (closure))
477
0
    {
478
0
      data1 = closure->data;
479
0
      data2 = instance;
480
0
    }
481
0
  else
482
0
    {
483
0
      data1 = instance;
484
0
      data2 = closure->data;
485
0
    }
486
0
  callback = (GMarshalFunc_VOID__UCHAR) (marshal_data ? marshal_data : cc->callback);
487
488
0
  callback (data1,
489
0
            arg0,
490
0
            data2);
491
0
}
492
493
/**
494
 * g_cclosure_marshal_VOID__INT:
495
 * @closure: A #GClosure.
496
 * @return_value: A #GValue to store the return value. May be %NULL
497
 *   if the callback of closure doesn't return a value.
498
 * @n_param_values: The length of the @param_values array.
499
 * @param_values: An array of #GValues holding the arguments
500
 *   on which to invoke the callback of closure.
501
 * @invocation_hint: The invocation hint given as the last argument to
502
 *   g_closure_invoke().
503
 * @marshal_data: Additional data specified when registering the
504
 *   marshaller, see g_closure_set_marshal() and
505
 *   g_closure_set_meta_marshal()
506
 *
507
 * A #GClosureMarshal function for use with signals with a single
508
 * integer argument.
509
 */
510
/* VOID:INT */
511
void
512
g_cclosure_marshal_VOID__INT (GClosure     *closure,
513
                              GValue       *return_value G_GNUC_UNUSED,
514
                              guint         n_param_values,
515
                              const GValue *param_values,
516
                              gpointer      invocation_hint G_GNUC_UNUSED,
517
                              gpointer      marshal_data)
518
0
{
519
0
  typedef void (*GMarshalFunc_VOID__INT) (gpointer     data1,
520
0
                                          gint         arg_1,
521
0
                                          gpointer     data2);
522
0
  GMarshalFunc_VOID__INT callback;
523
0
  GCClosure *cc = (GCClosure*) closure;
524
0
  gpointer data1, data2;
525
526
0
  g_return_if_fail (n_param_values == 2);
527
528
0
  if (G_CCLOSURE_SWAP_DATA (closure))
529
0
    {
530
0
      data1 = closure->data;
531
0
      data2 = g_value_peek_pointer (param_values + 0);
532
0
    }
533
0
  else
534
0
    {
535
0
      data1 = g_value_peek_pointer (param_values + 0);
536
0
      data2 = closure->data;
537
0
    }
538
0
  callback = (GMarshalFunc_VOID__INT) (marshal_data ? marshal_data : cc->callback);
539
540
0
  callback (data1,
541
0
            g_marshal_value_peek_int (param_values + 1),
542
0
            data2);
543
0
}
544
545
/**
546
 * g_cclosure_marshal_VOID__INTv:
547
 * @closure: the #GClosure to which the marshaller belongs
548
 * @return_value: (nullable): a #GValue to store the return
549
 *  value. May be %NULL if the callback of @closure doesn't return a
550
 *  value.
551
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
552
 * @args: va_list of arguments to be passed to the closure.
553
 * @marshal_data: (nullable): additional data specified when
554
 *  registering the marshaller, see g_closure_set_marshal() and
555
 *  g_closure_set_meta_marshal()
556
 * @n_params: the length of the @param_types array
557
 * @param_types: (array length=n_params): the #GType of each argument from
558
 *  @args.
559
 *
560
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__INT().
561
 */
562
void
563
g_cclosure_marshal_VOID__INTv (GClosure     *closure,
564
                               GValue       *return_value,
565
                               gpointer      instance,
566
                               va_list       args,
567
                               gpointer      marshal_data,
568
                               int           n_params,
569
                               GType        *param_types)
570
0
{
571
0
  typedef void (*GMarshalFunc_VOID__INT) (gpointer     instance,
572
0
                                          gint         arg_0,
573
0
                                          gpointer     data);
574
0
  GCClosure *cc = (GCClosure*) closure;
575
0
  gpointer data1, data2;
576
0
  GMarshalFunc_VOID__INT callback;
577
0
  gint arg0;
578
0
  va_list args_copy;
579
580
0
 G_VA_COPY (args_copy, args);
581
0
  arg0 = (gint) va_arg (args_copy, gint);
582
0
  va_end (args_copy);
583
584
0
  if (G_CCLOSURE_SWAP_DATA (closure))
585
0
    {
586
0
      data1 = closure->data;
587
0
      data2 = instance;
588
0
    }
589
0
  else
590
0
    {
591
0
      data1 = instance;
592
0
      data2 = closure->data;
593
0
    }
594
0
  callback = (GMarshalFunc_VOID__INT) (marshal_data ? marshal_data : cc->callback);
595
596
0
  callback (data1,
597
0
            arg0,
598
0
            data2);
599
0
}
600
601
/**
602
 * g_cclosure_marshal_VOID__UINT:
603
 * @closure: A #GClosure.
604
 * @return_value: A #GValue to store the return value. May be %NULL
605
 *   if the callback of closure doesn't return a value.
606
 * @n_param_values: The length of the @param_values array.
607
 * @param_values: An array of #GValues holding the arguments
608
 *   on which to invoke the callback of closure.
609
 * @invocation_hint: The invocation hint given as the last argument to
610
 *   g_closure_invoke().
611
 * @marshal_data: Additional data specified when registering the
612
 *   marshaller, see g_closure_set_marshal() and
613
 *   g_closure_set_meta_marshal()
614
 *
615
 * A #GClosureMarshal function for use with signals with with a single
616
 * unsigned integer argument.
617
 */
618
/* VOID:UINT */
619
void
620
g_cclosure_marshal_VOID__UINT (GClosure     *closure,
621
                               GValue       *return_value G_GNUC_UNUSED,
622
                               guint         n_param_values,
623
                               const GValue *param_values,
624
                               gpointer      invocation_hint G_GNUC_UNUSED,
625
                               gpointer      marshal_data)
626
0
{
627
0
  typedef void (*GMarshalFunc_VOID__UINT) (gpointer     data1,
628
0
                                           guint        arg_1,
629
0
                                           gpointer     data2);
630
0
  GMarshalFunc_VOID__UINT callback;
631
0
  GCClosure *cc = (GCClosure*) closure;
632
0
  gpointer data1, data2;
633
634
0
  g_return_if_fail (n_param_values == 2);
635
636
0
  if (G_CCLOSURE_SWAP_DATA (closure))
637
0
    {
638
0
      data1 = closure->data;
639
0
      data2 = g_value_peek_pointer (param_values + 0);
640
0
    }
641
0
  else
642
0
    {
643
0
      data1 = g_value_peek_pointer (param_values + 0);
644
0
      data2 = closure->data;
645
0
    }
646
0
  callback = (GMarshalFunc_VOID__UINT) (marshal_data ? marshal_data : cc->callback);
647
648
0
  callback (data1,
649
0
            g_marshal_value_peek_uint (param_values + 1),
650
0
            data2);
651
0
}
652
653
/**
654
 * g_cclosure_marshal_VOID__UINTv:
655
 * @closure: the #GClosure to which the marshaller belongs
656
 * @return_value: (nullable): a #GValue to store the return
657
 *  value. May be %NULL if the callback of @closure doesn't return a
658
 *  value.
659
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
660
 * @args: va_list of arguments to be passed to the closure.
661
 * @marshal_data: (nullable): additional data specified when
662
 *  registering the marshaller, see g_closure_set_marshal() and
663
 *  g_closure_set_meta_marshal()
664
 * @n_params: the length of the @param_types array
665
 * @param_types: (array length=n_params): the #GType of each argument from
666
 *  @args.
667
 *
668
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UINT().
669
 */
670
void
671
g_cclosure_marshal_VOID__UINTv (GClosure     *closure,
672
                                GValue       *return_value,
673
                                gpointer      instance,
674
                                va_list       args,
675
                                gpointer      marshal_data,
676
                                int           n_params,
677
                                GType        *param_types)
678
0
{
679
0
  typedef void (*GMarshalFunc_VOID__UINT) (gpointer     instance,
680
0
                                           guint        arg_0,
681
0
                                           gpointer     data);
682
0
  GCClosure *cc = (GCClosure*) closure;
683
0
  gpointer data1, data2;
684
0
  GMarshalFunc_VOID__UINT callback;
685
0
  guint arg0;
686
0
  va_list args_copy;
687
688
0
  G_VA_COPY (args_copy, args);
689
0
  arg0 = (guint) va_arg (args_copy, guint);
690
0
  va_end (args_copy);
691
692
0
  if (G_CCLOSURE_SWAP_DATA (closure))
693
0
    {
694
0
      data1 = closure->data;
695
0
      data2 = instance;
696
0
    }
697
0
  else
698
0
    {
699
0
      data1 = instance;
700
0
      data2 = closure->data;
701
0
    }
702
0
  callback = (GMarshalFunc_VOID__UINT) (marshal_data ? marshal_data : cc->callback);
703
704
0
  callback (data1,
705
0
            arg0,
706
0
            data2);
707
0
}
708
709
/**
710
 * g_cclosure_marshal_VOID__LONG:
711
 * @closure: A #GClosure.
712
 * @return_value: A #GValue to store the return value. May be %NULL
713
 *   if the callback of closure doesn't return a value.
714
 * @n_param_values: The length of the @param_values array.
715
 * @param_values: An array of #GValues holding the arguments
716
 *   on which to invoke the callback of closure.
717
 * @invocation_hint: The invocation hint given as the last argument to
718
 *   g_closure_invoke().
719
 * @marshal_data: Additional data specified when registering the
720
 *   marshaller, see g_closure_set_marshal() and
721
 *   g_closure_set_meta_marshal()
722
 *
723
 * A #GClosureMarshal function for use with signals with with a single
724
 * long integer argument.
725
 */
726
/* VOID:LONG */
727
void
728
g_cclosure_marshal_VOID__LONG (GClosure     *closure,
729
                               GValue       *return_value G_GNUC_UNUSED,
730
                               guint         n_param_values,
731
                               const GValue *param_values,
732
                               gpointer      invocation_hint G_GNUC_UNUSED,
733
                               gpointer      marshal_data)
734
0
{
735
0
  typedef void (*GMarshalFunc_VOID__LONG) (gpointer     data1,
736
0
                                           glong        arg_1,
737
0
                                           gpointer     data2);
738
0
  GMarshalFunc_VOID__LONG callback;
739
0
  GCClosure *cc = (GCClosure*) closure;
740
0
  gpointer data1, data2;
741
742
0
  g_return_if_fail (n_param_values == 2);
743
744
0
  if (G_CCLOSURE_SWAP_DATA (closure))
745
0
    {
746
0
      data1 = closure->data;
747
0
      data2 = g_value_peek_pointer (param_values + 0);
748
0
    }
749
0
  else
750
0
    {
751
0
      data1 = g_value_peek_pointer (param_values + 0);
752
0
      data2 = closure->data;
753
0
    }
754
0
  callback = (GMarshalFunc_VOID__LONG) (marshal_data ? marshal_data : cc->callback);
755
756
0
  callback (data1,
757
0
            g_marshal_value_peek_long (param_values + 1),
758
0
            data2);
759
0
}
760
761
/**
762
 * g_cclosure_marshal_VOID__LONGv:
763
 * @closure: the #GClosure to which the marshaller belongs
764
 * @return_value: (nullable): a #GValue to store the return
765
 *  value. May be %NULL if the callback of @closure doesn't return a
766
 *  value.
767
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
768
 * @args: va_list of arguments to be passed to the closure.
769
 * @marshal_data: (nullable): additional data specified when
770
 *  registering the marshaller, see g_closure_set_marshal() and
771
 *  g_closure_set_meta_marshal()
772
 * @n_params: the length of the @param_types array
773
 * @param_types: (array length=n_params): the #GType of each argument from
774
 *  @args.
775
 *
776
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__LONG().
777
 */
778
void
779
g_cclosure_marshal_VOID__LONGv (GClosure     *closure,
780
                                GValue       *return_value,
781
                                gpointer      instance,
782
                                va_list       args,
783
                                gpointer      marshal_data,
784
                                int           n_params,
785
                                GType        *param_types)
786
0
{
787
0
  typedef void (*GMarshalFunc_VOID__LONG) (gpointer     instance,
788
0
                                           glong        arg_0,
789
0
                                           gpointer     data);
790
0
  GCClosure *cc = (GCClosure*) closure;
791
0
  gpointer data1, data2;
792
0
  GMarshalFunc_VOID__LONG callback;
793
0
  glong arg0;
794
0
  va_list args_copy;
795
796
0
  G_VA_COPY (args_copy, args);
797
0
  arg0 = (glong) va_arg (args_copy, glong);
798
0
  va_end (args_copy);
799
800
0
  if (G_CCLOSURE_SWAP_DATA (closure))
801
0
    {
802
0
      data1 = closure->data;
803
0
      data2 = instance;
804
0
    }
805
0
  else
806
0
    {
807
0
      data1 = instance;
808
0
      data2 = closure->data;
809
0
    }
810
0
  callback = (GMarshalFunc_VOID__LONG) (marshal_data ? marshal_data : cc->callback);
811
812
0
  callback (data1,
813
0
            arg0,
814
0
            data2);
815
0
}
816
817
/**
818
 * g_cclosure_marshal_VOID__ULONG:
819
 * @closure: A #GClosure.
820
 * @return_value: A #GValue to store the return value. May be %NULL
821
 *   if the callback of closure doesn't return a value.
822
 * @n_param_values: The length of the @param_values array.
823
 * @param_values: An array of #GValues holding the arguments
824
 *   on which to invoke the callback of closure.
825
 * @invocation_hint: The invocation hint given as the last argument to
826
 *   g_closure_invoke().
827
 * @marshal_data: Additional data specified when registering the
828
 *   marshaller, see g_closure_set_marshal() and
829
 *   g_closure_set_meta_marshal()
830
 *
831
 * A #GClosureMarshal function for use with signals with a single
832
 * unsigned long integer argument.
833
 */
834
/* VOID:ULONG */
835
void
836
g_cclosure_marshal_VOID__ULONG (GClosure     *closure,
837
                                GValue       *return_value G_GNUC_UNUSED,
838
                                guint         n_param_values,
839
                                const GValue *param_values,
840
                                gpointer      invocation_hint G_GNUC_UNUSED,
841
                                gpointer      marshal_data)
842
0
{
843
0
  typedef void (*GMarshalFunc_VOID__ULONG) (gpointer     data1,
844
0
                                            gulong       arg_1,
845
0
                                            gpointer     data2);
846
0
  GMarshalFunc_VOID__ULONG callback;
847
0
  GCClosure *cc = (GCClosure*) closure;
848
0
  gpointer data1, data2;
849
850
0
  g_return_if_fail (n_param_values == 2);
851
852
0
  if (G_CCLOSURE_SWAP_DATA (closure))
853
0
    {
854
0
      data1 = closure->data;
855
0
      data2 = g_value_peek_pointer (param_values + 0);
856
0
    }
857
0
  else
858
0
    {
859
0
      data1 = g_value_peek_pointer (param_values + 0);
860
0
      data2 = closure->data;
861
0
    }
862
0
  callback = (GMarshalFunc_VOID__ULONG) (marshal_data ? marshal_data : cc->callback);
863
864
0
  callback (data1,
865
0
            g_marshal_value_peek_ulong (param_values + 1),
866
0
            data2);
867
0
}
868
869
/**
870
 * g_cclosure_marshal_VOID__ULONGv:
871
 * @closure: the #GClosure to which the marshaller belongs
872
 * @return_value: (nullable): a #GValue to store the return
873
 *  value. May be %NULL if the callback of @closure doesn't return a
874
 *  value.
875
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
876
 * @args: va_list of arguments to be passed to the closure.
877
 * @marshal_data: (nullable): additional data specified when
878
 *  registering the marshaller, see g_closure_set_marshal() and
879
 *  g_closure_set_meta_marshal()
880
 * @n_params: the length of the @param_types array
881
 * @param_types: (array length=n_params): the #GType of each argument from
882
 *  @args.
883
 *
884
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__ULONG().
885
 */
886
void
887
g_cclosure_marshal_VOID__ULONGv (GClosure     *closure,
888
                                 GValue       *return_value,
889
                                 gpointer      instance,
890
                                 va_list       args,
891
                                 gpointer      marshal_data,
892
                                 int           n_params,
893
                                 GType        *param_types)
894
0
{
895
0
  typedef void (*GMarshalFunc_VOID__ULONG) (gpointer     instance,
896
0
                                            gulong       arg_0,
897
0
                                            gpointer     data);
898
0
  GCClosure *cc = (GCClosure*) closure;
899
0
  gpointer data1, data2;
900
0
  GMarshalFunc_VOID__ULONG callback;
901
0
  gulong arg0;
902
0
  va_list args_copy;
903
904
0
  G_VA_COPY (args_copy, args);
905
0
  arg0 = (gulong) va_arg (args_copy, gulong);
906
0
  va_end (args_copy);
907
908
0
  if (G_CCLOSURE_SWAP_DATA (closure))
909
0
    {
910
0
      data1 = closure->data;
911
0
      data2 = instance;
912
0
    }
913
0
  else
914
0
    {
915
0
      data1 = instance;
916
0
      data2 = closure->data;
917
0
    }
918
0
  callback = (GMarshalFunc_VOID__ULONG) (marshal_data ? marshal_data : cc->callback);
919
920
0
  callback (data1,
921
0
            arg0,
922
0
            data2);
923
0
}
924
925
/**
926
 * g_cclosure_marshal_VOID__ENUM:
927
 * @closure: A #GClosure.
928
 * @return_value: A #GValue to store the return value. May be %NULL
929
 *   if the callback of closure doesn't return a value.
930
 * @n_param_values: The length of the @param_values array.
931
 * @param_values: An array of #GValues holding the arguments
932
 *   on which to invoke the callback of closure.
933
 * @invocation_hint: The invocation hint given as the last argument to
934
 *   g_closure_invoke().
935
 * @marshal_data: Additional data specified when registering the
936
 *   marshaller, see g_closure_set_marshal() and
937
 *   g_closure_set_meta_marshal()
938
 *
939
 * A #GClosureMarshal function for use with signals with a single
940
 * argument with an enumerated type.
941
 */
942
/* VOID:ENUM */
943
void
944
g_cclosure_marshal_VOID__ENUM (GClosure     *closure,
945
                               GValue       *return_value G_GNUC_UNUSED,
946
                               guint         n_param_values,
947
                               const GValue *param_values,
948
                               gpointer      invocation_hint G_GNUC_UNUSED,
949
                               gpointer      marshal_data)
950
0
{
951
0
  typedef void (*GMarshalFunc_VOID__ENUM) (gpointer     data1,
952
0
                                           gint         arg_1,
953
0
                                           gpointer     data2);
954
0
  GMarshalFunc_VOID__ENUM callback;
955
0
  GCClosure *cc = (GCClosure*) closure;
956
0
  gpointer data1, data2;
957
958
0
  g_return_if_fail (n_param_values == 2);
959
960
0
  if (G_CCLOSURE_SWAP_DATA (closure))
961
0
    {
962
0
      data1 = closure->data;
963
0
      data2 = g_value_peek_pointer (param_values + 0);
964
0
    }
965
0
  else
966
0
    {
967
0
      data1 = g_value_peek_pointer (param_values + 0);
968
0
      data2 = closure->data;
969
0
    }
970
0
  callback = (GMarshalFunc_VOID__ENUM) (marshal_data ? marshal_data : cc->callback);
971
972
0
  callback (data1,
973
0
            g_marshal_value_peek_enum (param_values + 1),
974
0
            data2);
975
0
}
976
977
/**
978
 * g_cclosure_marshal_VOID__ENUMv:
979
 * @closure: the #GClosure to which the marshaller belongs
980
 * @return_value: (nullable): a #GValue to store the return
981
 *  value. May be %NULL if the callback of @closure doesn't return a
982
 *  value.
983
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
984
 * @args: va_list of arguments to be passed to the closure.
985
 * @marshal_data: (nullable): additional data specified when
986
 *  registering the marshaller, see g_closure_set_marshal() and
987
 *  g_closure_set_meta_marshal()
988
 * @n_params: the length of the @param_types array
989
 * @param_types: (array length=n_params): the #GType of each argument from
990
 *  @args.
991
 *
992
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__ENUM().
993
 */
994
void
995
g_cclosure_marshal_VOID__ENUMv (GClosure     *closure,
996
                                GValue       *return_value,
997
                                gpointer      instance,
998
                                va_list       args,
999
                                gpointer      marshal_data,
1000
                                int           n_params,
1001
                                GType        *param_types)
1002
0
{
1003
0
  typedef void (*GMarshalFunc_VOID__ENUM) (gpointer     instance,
1004
0
                                           gint         arg_0,
1005
0
                                           gpointer     data);
1006
0
  GCClosure *cc = (GCClosure*) closure;
1007
0
  gpointer data1, data2;
1008
0
  GMarshalFunc_VOID__ENUM callback;
1009
0
  gint arg0;
1010
0
  va_list args_copy;
1011
1012
0
  G_VA_COPY (args_copy, args);
1013
0
  arg0 = (gint) va_arg (args_copy, gint);
1014
0
  va_end (args_copy);
1015
1016
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1017
0
    {
1018
0
      data1 = closure->data;
1019
0
      data2 = instance;
1020
0
    }
1021
0
  else
1022
0
    {
1023
0
      data1 = instance;
1024
0
      data2 = closure->data;
1025
0
    }
1026
0
  callback = (GMarshalFunc_VOID__ENUM) (marshal_data ? marshal_data : cc->callback);
1027
1028
0
  callback (data1,
1029
0
            arg0,
1030
0
            data2);
1031
0
}
1032
1033
/**
1034
 * g_cclosure_marshal_VOID__FLAGS:
1035
 * @closure: A #GClosure.
1036
 * @return_value: A #GValue to store the return value. May be %NULL
1037
 *   if the callback of closure doesn't return a value.
1038
 * @n_param_values: The length of the @param_values array.
1039
 * @param_values: An array of #GValues holding the arguments
1040
 *   on which to invoke the callback of closure.
1041
 * @invocation_hint: The invocation hint given as the last argument to
1042
 *   g_closure_invoke().
1043
 * @marshal_data: Additional data specified when registering the
1044
 *   marshaller, see g_closure_set_marshal() and
1045
 *   g_closure_set_meta_marshal()
1046
 *
1047
 * A #GClosureMarshal function for use with signals with a single
1048
 * argument with a flags types.
1049
 */
1050
/* VOID:FLAGS */
1051
void
1052
g_cclosure_marshal_VOID__FLAGS (GClosure     *closure,
1053
                                GValue       *return_value G_GNUC_UNUSED,
1054
                                guint         n_param_values,
1055
                                const GValue *param_values,
1056
                                gpointer      invocation_hint G_GNUC_UNUSED,
1057
                                gpointer      marshal_data)
1058
0
{
1059
0
  typedef void (*GMarshalFunc_VOID__FLAGS) (gpointer     data1,
1060
0
                                            guint        arg_1,
1061
0
                                            gpointer     data2);
1062
0
  GMarshalFunc_VOID__FLAGS callback;
1063
0
  GCClosure *cc = (GCClosure*) closure;
1064
0
  gpointer data1, data2;
1065
1066
0
  g_return_if_fail (n_param_values == 2);
1067
1068
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1069
0
    {
1070
0
      data1 = closure->data;
1071
0
      data2 = g_value_peek_pointer (param_values + 0);
1072
0
    }
1073
0
  else
1074
0
    {
1075
0
      data1 = g_value_peek_pointer (param_values + 0);
1076
0
      data2 = closure->data;
1077
0
    }
1078
0
  callback = (GMarshalFunc_VOID__FLAGS) (marshal_data ? marshal_data : cc->callback);
1079
1080
0
  callback (data1,
1081
0
            g_marshal_value_peek_flags (param_values + 1),
1082
0
            data2);
1083
0
}
1084
1085
/**
1086
 * g_cclosure_marshal_VOID__FLAGSv:
1087
 * @closure: the #GClosure to which the marshaller belongs
1088
 * @return_value: (nullable): a #GValue to store the return
1089
 *  value. May be %NULL if the callback of @closure doesn't return a
1090
 *  value.
1091
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1092
 * @args: va_list of arguments to be passed to the closure.
1093
 * @marshal_data: (nullable): additional data specified when
1094
 *  registering the marshaller, see g_closure_set_marshal() and
1095
 *  g_closure_set_meta_marshal()
1096
 * @n_params: the length of the @param_types array
1097
 * @param_types: (array length=n_params): the #GType of each argument from
1098
 *  @args.
1099
 *
1100
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__FLAGS().
1101
 */
1102
void
1103
g_cclosure_marshal_VOID__FLAGSv (GClosure     *closure,
1104
                                 GValue       *return_value,
1105
                                 gpointer      instance,
1106
                                 va_list       args,
1107
                                 gpointer      marshal_data,
1108
                                 int           n_params,
1109
                                 GType        *param_types)
1110
0
{
1111
0
  typedef void (*GMarshalFunc_VOID__FLAGS) (gpointer     instance,
1112
0
                                            guint        arg_0,
1113
0
                                            gpointer     data);
1114
0
  GCClosure *cc = (GCClosure*) closure;
1115
0
  gpointer data1, data2;
1116
0
  GMarshalFunc_VOID__FLAGS callback;
1117
0
  guint arg0;
1118
0
  va_list args_copy;
1119
1120
0
  G_VA_COPY (args_copy, args);
1121
0
  arg0 = (guint) va_arg (args_copy, guint);
1122
0
  va_end (args_copy);
1123
1124
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1125
0
    {
1126
0
      data1 = closure->data;
1127
0
      data2 = instance;
1128
0
    }
1129
0
  else
1130
0
    {
1131
0
      data1 = instance;
1132
0
      data2 = closure->data;
1133
0
    }
1134
0
  callback = (GMarshalFunc_VOID__FLAGS) (marshal_data ? marshal_data : cc->callback);
1135
1136
0
  callback (data1,
1137
0
            arg0,
1138
0
            data2);
1139
0
}
1140
1141
/**
1142
 * g_cclosure_marshal_VOID__FLOAT:
1143
 * @closure: A #GClosure.
1144
 * @return_value: A #GValue to store the return value. May be %NULL
1145
 *   if the callback of closure doesn't return a value.
1146
 * @n_param_values: The length of the @param_values array.
1147
 * @param_values: An array of #GValues holding the arguments
1148
 *   on which to invoke the callback of closure.
1149
 * @invocation_hint: The invocation hint given as the last argument to
1150
 *   g_closure_invoke().
1151
 * @marshal_data: Additional data specified when registering the
1152
 *   marshaller, see g_closure_set_marshal() and
1153
 *   g_closure_set_meta_marshal()
1154
 *
1155
 * A #GClosureMarshal function for use with signals with one
1156
 * single-precision floating point argument.
1157
 */
1158
/* VOID:FLOAT */
1159
void
1160
g_cclosure_marshal_VOID__FLOAT (GClosure     *closure,
1161
                                GValue       *return_value G_GNUC_UNUSED,
1162
                                guint         n_param_values,
1163
                                const GValue *param_values,
1164
                                gpointer      invocation_hint G_GNUC_UNUSED,
1165
                                gpointer      marshal_data)
1166
0
{
1167
0
  typedef void (*GMarshalFunc_VOID__FLOAT) (gpointer     data1,
1168
0
                                            gfloat       arg_1,
1169
0
                                            gpointer     data2);
1170
0
  GMarshalFunc_VOID__FLOAT callback;
1171
0
  GCClosure *cc = (GCClosure*) closure;
1172
0
  gpointer data1, data2;
1173
1174
0
  g_return_if_fail (n_param_values == 2);
1175
1176
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1177
0
    {
1178
0
      data1 = closure->data;
1179
0
      data2 = g_value_peek_pointer (param_values + 0);
1180
0
    }
1181
0
  else
1182
0
    {
1183
0
      data1 = g_value_peek_pointer (param_values + 0);
1184
0
      data2 = closure->data;
1185
0
    }
1186
0
  callback = (GMarshalFunc_VOID__FLOAT) (marshal_data ? marshal_data : cc->callback);
1187
1188
0
  callback (data1,
1189
0
            g_marshal_value_peek_float (param_values + 1),
1190
0
            data2);
1191
0
}
1192
1193
/**
1194
 * g_cclosure_marshal_VOID__FLOATv:
1195
 * @closure: the #GClosure to which the marshaller belongs
1196
 * @return_value: (nullable): a #GValue to store the return
1197
 *  value. May be %NULL if the callback of @closure doesn't return a
1198
 *  value.
1199
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1200
 * @args: va_list of arguments to be passed to the closure.
1201
 * @marshal_data: (nullable): additional data specified when
1202
 *  registering the marshaller, see g_closure_set_marshal() and
1203
 *  g_closure_set_meta_marshal()
1204
 * @n_params: the length of the @param_types array
1205
 * @param_types: (array length=n_params): the #GType of each argument from
1206
 *  @args.
1207
 *
1208
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__FLOAT().
1209
 */
1210
void
1211
g_cclosure_marshal_VOID__FLOATv (GClosure     *closure,
1212
                                 GValue       *return_value,
1213
                                 gpointer      instance,
1214
                                 va_list       args,
1215
                                 gpointer      marshal_data,
1216
                                 int           n_params,
1217
                                 GType        *param_types)
1218
0
{
1219
0
  typedef void (*GMarshalFunc_VOID__FLOAT) (gpointer     instance,
1220
0
                                            gfloat       arg_0,
1221
0
                                            gpointer     data);
1222
0
  GCClosure *cc = (GCClosure*) closure;
1223
0
  gpointer data1, data2;
1224
0
  GMarshalFunc_VOID__FLOAT callback;
1225
0
  gfloat arg0;
1226
0
  va_list args_copy;
1227
1228
0
  G_VA_COPY (args_copy, args);
1229
0
  arg0 = (gfloat) va_arg (args_copy, gdouble);
1230
0
  va_end (args_copy);
1231
1232
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1233
0
    {
1234
0
      data1 = closure->data;
1235
0
      data2 = instance;
1236
0
    }
1237
0
  else
1238
0
    {
1239
0
      data1 = instance;
1240
0
      data2 = closure->data;
1241
0
    }
1242
0
  callback = (GMarshalFunc_VOID__FLOAT) (marshal_data ? marshal_data : cc->callback);
1243
1244
0
  callback (data1,
1245
0
            arg0,
1246
0
            data2);
1247
0
}
1248
1249
/**
1250
 * g_cclosure_marshal_VOID__DOUBLE:
1251
 * @closure: A #GClosure.
1252
 * @return_value: A #GValue to store the return value. May be %NULL
1253
 *   if the callback of closure doesn't return a value.
1254
 * @n_param_values: The length of the @param_values array.
1255
 * @param_values: An array of #GValues holding the arguments
1256
 *   on which to invoke the callback of closure.
1257
 * @invocation_hint: The invocation hint given as the last argument to
1258
 *   g_closure_invoke().
1259
 * @marshal_data: Additional data specified when registering the
1260
 *   marshaller, see g_closure_set_marshal() and
1261
 *   g_closure_set_meta_marshal()
1262
 *
1263
 * A #GClosureMarshal function for use with signals with one
1264
 * double-precision floating point argument.
1265
 */
1266
/* VOID:DOUBLE */
1267
void
1268
g_cclosure_marshal_VOID__DOUBLE (GClosure     *closure,
1269
                                 GValue       *return_value G_GNUC_UNUSED,
1270
                                 guint         n_param_values,
1271
                                 const GValue *param_values,
1272
                                 gpointer      invocation_hint G_GNUC_UNUSED,
1273
                                 gpointer      marshal_data)
1274
0
{
1275
0
  typedef void (*GMarshalFunc_VOID__DOUBLE) (gpointer     data1,
1276
0
                                             gdouble      arg_1,
1277
0
                                             gpointer     data2);
1278
0
  GMarshalFunc_VOID__DOUBLE callback;
1279
0
  GCClosure *cc = (GCClosure*) closure;
1280
0
  gpointer data1, data2;
1281
1282
0
  g_return_if_fail (n_param_values == 2);
1283
1284
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1285
0
    {
1286
0
      data1 = closure->data;
1287
0
      data2 = g_value_peek_pointer (param_values + 0);
1288
0
    }
1289
0
  else
1290
0
    {
1291
0
      data1 = g_value_peek_pointer (param_values + 0);
1292
0
      data2 = closure->data;
1293
0
    }
1294
0
  callback = (GMarshalFunc_VOID__DOUBLE) (marshal_data ? marshal_data : cc->callback);
1295
1296
0
  callback (data1,
1297
0
            g_marshal_value_peek_double (param_values + 1),
1298
0
            data2);
1299
0
}
1300
1301
/**
1302
 * g_cclosure_marshal_VOID__DOUBLEv:
1303
 * @closure: the #GClosure to which the marshaller belongs
1304
 * @return_value: (nullable): a #GValue to store the return
1305
 *  value. May be %NULL if the callback of @closure doesn't return a
1306
 *  value.
1307
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1308
 * @args: va_list of arguments to be passed to the closure.
1309
 * @marshal_data: (nullable): additional data specified when
1310
 *  registering the marshaller, see g_closure_set_marshal() and
1311
 *  g_closure_set_meta_marshal()
1312
 * @n_params: the length of the @param_types array
1313
 * @param_types: (array length=n_params): the #GType of each argument from
1314
 *  @args.
1315
 *
1316
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__DOUBLE().
1317
 */
1318
void
1319
g_cclosure_marshal_VOID__DOUBLEv (GClosure     *closure,
1320
                                  GValue       *return_value,
1321
                                  gpointer      instance,
1322
                                  va_list       args,
1323
                                  gpointer      marshal_data,
1324
                                  int           n_params,
1325
                                  GType        *param_types)
1326
0
{
1327
0
  typedef void (*GMarshalFunc_VOID__DOUBLE) (gpointer     instance,
1328
0
                                             gdouble      arg_0,
1329
0
                                             gpointer     data);
1330
0
  GCClosure *cc = (GCClosure*) closure;
1331
0
  gpointer data1, data2;
1332
0
  GMarshalFunc_VOID__DOUBLE callback;
1333
0
  gdouble arg0;
1334
0
  va_list args_copy;
1335
1336
0
  G_VA_COPY (args_copy, args);
1337
0
  arg0 = (gdouble) va_arg (args_copy, gdouble);
1338
0
  va_end (args_copy);
1339
1340
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1341
0
    {
1342
0
      data1 = closure->data;
1343
0
      data2 = instance;
1344
0
    }
1345
0
  else
1346
0
    {
1347
0
      data1 = instance;
1348
0
      data2 = closure->data;
1349
0
    }
1350
0
  callback = (GMarshalFunc_VOID__DOUBLE) (marshal_data ? marshal_data : cc->callback);
1351
1352
0
  callback (data1,
1353
0
            arg0,
1354
0
            data2);
1355
0
}
1356
1357
/**
1358
 * g_cclosure_marshal_VOID__STRING:
1359
 * @closure: A #GClosure.
1360
 * @return_value: A #GValue to store the return value. May be %NULL
1361
 *   if the callback of closure doesn't return a value.
1362
 * @n_param_values: The length of the @param_values array.
1363
 * @param_values: An array of #GValues holding the arguments
1364
 *   on which to invoke the callback of closure.
1365
 * @invocation_hint: The invocation hint given as the last argument to
1366
 *   g_closure_invoke().
1367
 * @marshal_data: Additional data specified when registering the
1368
 *   marshaller, see g_closure_set_marshal() and
1369
 *   g_closure_set_meta_marshal()
1370
 *
1371
 * A #GClosureMarshal function for use with signals with a single string
1372
 * argument.
1373
 */
1374
/* VOID:STRING */
1375
void
1376
g_cclosure_marshal_VOID__STRING (GClosure     *closure,
1377
                                 GValue       *return_value G_GNUC_UNUSED,
1378
                                 guint         n_param_values,
1379
                                 const GValue *param_values,
1380
                                 gpointer      invocation_hint G_GNUC_UNUSED,
1381
                                 gpointer      marshal_data)
1382
0
{
1383
0
  typedef void (*GMarshalFunc_VOID__STRING) (gpointer     data1,
1384
0
                                             gpointer     arg_1,
1385
0
                                             gpointer     data2);
1386
0
  GMarshalFunc_VOID__STRING callback;
1387
0
  GCClosure *cc = (GCClosure*) closure;
1388
0
  gpointer data1, data2;
1389
1390
0
  g_return_if_fail (n_param_values == 2);
1391
1392
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1393
0
    {
1394
0
      data1 = closure->data;
1395
0
      data2 = g_value_peek_pointer (param_values + 0);
1396
0
    }
1397
0
  else
1398
0
    {
1399
0
      data1 = g_value_peek_pointer (param_values + 0);
1400
0
      data2 = closure->data;
1401
0
    }
1402
0
  callback = (GMarshalFunc_VOID__STRING) (marshal_data ? marshal_data : cc->callback);
1403
1404
0
  callback (data1,
1405
0
            g_marshal_value_peek_string (param_values + 1),
1406
0
            data2);
1407
0
}
1408
1409
/**
1410
 * g_cclosure_marshal_VOID__STRINGv:
1411
 * @closure: the #GClosure to which the marshaller belongs
1412
 * @return_value: (nullable): a #GValue to store the return
1413
 *  value. May be %NULL if the callback of @closure doesn't return a
1414
 *  value.
1415
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1416
 * @args: va_list of arguments to be passed to the closure.
1417
 * @marshal_data: (nullable): additional data specified when
1418
 *  registering the marshaller, see g_closure_set_marshal() and
1419
 *  g_closure_set_meta_marshal()
1420
 * @n_params: the length of the @param_types array
1421
 * @param_types: (array length=n_params): the #GType of each argument from
1422
 *  @args.
1423
 *
1424
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__STRING().
1425
 */
1426
void
1427
g_cclosure_marshal_VOID__STRINGv (GClosure     *closure,
1428
                                  GValue       *return_value,
1429
                                  gpointer      instance,
1430
                                  va_list       args,
1431
                                  gpointer      marshal_data,
1432
                                  int           n_params,
1433
                                  GType        *param_types)
1434
0
{
1435
0
  typedef void (*GMarshalFunc_VOID__STRING) (gpointer     instance,
1436
0
                                             gpointer     arg_0,
1437
0
                                             gpointer     data);
1438
0
  GCClosure *cc = (GCClosure*) closure;
1439
0
  gpointer data1, data2;
1440
0
  GMarshalFunc_VOID__STRING callback;
1441
0
  gpointer arg0;
1442
0
  va_list args_copy;
1443
1444
0
  G_VA_COPY (args_copy, args);
1445
0
  arg0 = (gpointer) va_arg (args_copy, gpointer);
1446
0
  if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL)
1447
0
    arg0 = g_strdup (arg0);
1448
0
  va_end (args_copy);
1449
1450
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1451
0
    {
1452
0
      data1 = closure->data;
1453
0
      data2 = instance;
1454
0
    }
1455
0
  else
1456
0
    {
1457
0
      data1 = instance;
1458
0
      data2 = closure->data;
1459
0
    }
1460
0
  callback = (GMarshalFunc_VOID__STRING) (marshal_data ? marshal_data : cc->callback);
1461
1462
0
  callback (data1,
1463
0
            arg0,
1464
0
            data2);
1465
0
  if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL)
1466
0
    g_free (arg0);
1467
0
}
1468
1469
/**
1470
 * g_cclosure_marshal_VOID__PARAM:
1471
 * @closure: A #GClosure.
1472
 * @return_value: A #GValue to store the return value. May be %NULL
1473
 *   if the callback of closure doesn't return a value.
1474
 * @n_param_values: The length of the @param_values array.
1475
 * @param_values: An array of #GValues holding the arguments
1476
 *   on which to invoke the callback of closure.
1477
 * @invocation_hint: The invocation hint given as the last argument to
1478
 *   g_closure_invoke().
1479
 * @marshal_data: Additional data specified when registering the
1480
 *   marshaller, see g_closure_set_marshal() and
1481
 *   g_closure_set_meta_marshal()
1482
 *
1483
 * A #GClosureMarshal function for use with signals with a single
1484
 * argument of type #GParamSpec.
1485
 */
1486
/* VOID:PARAM */
1487
void
1488
g_cclosure_marshal_VOID__PARAM (GClosure     *closure,
1489
                                GValue       *return_value G_GNUC_UNUSED,
1490
                                guint         n_param_values,
1491
                                const GValue *param_values,
1492
                                gpointer      invocation_hint G_GNUC_UNUSED,
1493
                                gpointer      marshal_data)
1494
0
{
1495
0
  typedef void (*GMarshalFunc_VOID__PARAM) (gpointer     data1,
1496
0
                                            gpointer     arg_1,
1497
0
                                            gpointer     data2);
1498
0
  GMarshalFunc_VOID__PARAM callback;
1499
0
  GCClosure *cc = (GCClosure*) closure;
1500
0
  gpointer data1, data2;
1501
1502
0
  g_return_if_fail (n_param_values == 2);
1503
1504
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1505
0
    {
1506
0
      data1 = closure->data;
1507
0
      data2 = g_value_peek_pointer (param_values + 0);
1508
0
    }
1509
0
  else
1510
0
    {
1511
0
      data1 = g_value_peek_pointer (param_values + 0);
1512
0
      data2 = closure->data;
1513
0
    }
1514
0
  callback = (GMarshalFunc_VOID__PARAM) (marshal_data ? marshal_data : cc->callback);
1515
1516
0
  callback (data1,
1517
0
            g_marshal_value_peek_param (param_values + 1),
1518
0
            data2);
1519
0
}
1520
1521
/**
1522
 * g_cclosure_marshal_VOID__PARAMv:
1523
 * @closure: the #GClosure to which the marshaller belongs
1524
 * @return_value: (nullable): a #GValue to store the return
1525
 *  value. May be %NULL if the callback of @closure doesn't return a
1526
 *  value.
1527
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1528
 * @args: va_list of arguments to be passed to the closure.
1529
 * @marshal_data: (nullable): additional data specified when
1530
 *  registering the marshaller, see g_closure_set_marshal() and
1531
 *  g_closure_set_meta_marshal()
1532
 * @n_params: the length of the @param_types array
1533
 * @param_types: (array length=n_params): the #GType of each argument from
1534
 *  @args.
1535
 *
1536
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__PARAM().
1537
 */
1538
void
1539
g_cclosure_marshal_VOID__PARAMv (GClosure     *closure,
1540
                                 GValue       *return_value,
1541
                                 gpointer      instance,
1542
                                 va_list       args,
1543
                                 gpointer      marshal_data,
1544
                                 int           n_params,
1545
                                 GType        *param_types)
1546
0
{
1547
0
  typedef void (*GMarshalFunc_VOID__PARAM) (gpointer     instance,
1548
0
                                            gpointer     arg_0,
1549
0
                                            gpointer     data);
1550
0
  GCClosure *cc = (GCClosure*) closure;
1551
0
  gpointer data1, data2;
1552
0
  GMarshalFunc_VOID__PARAM callback;
1553
0
  gpointer arg0;
1554
0
  va_list args_copy;
1555
1556
0
  G_VA_COPY (args_copy, args);
1557
0
  arg0 = (gpointer) va_arg (args_copy, gpointer);
1558
0
  if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL)
1559
0
    arg0 = g_param_spec_ref (arg0);
1560
0
  va_end (args_copy);
1561
1562
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1563
0
    {
1564
0
      data1 = closure->data;
1565
0
      data2 = instance;
1566
0
    }
1567
0
  else
1568
0
    {
1569
0
      data1 = instance;
1570
0
      data2 = closure->data;
1571
0
    }
1572
0
  callback = (GMarshalFunc_VOID__PARAM) (marshal_data ? marshal_data : cc->callback);
1573
1574
0
  callback (data1,
1575
0
            arg0,
1576
0
            data2);
1577
0
  if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL)
1578
0
    g_param_spec_unref (arg0);
1579
0
}
1580
1581
/**
1582
 * g_cclosure_marshal_VOID__BOXED:
1583
 * @closure: A #GClosure.
1584
 * @return_value: A #GValue to store the return value. May be %NULL
1585
 *   if the callback of closure doesn't return a value.
1586
 * @n_param_values: The length of the @param_values array.
1587
 * @param_values: An array of #GValues holding the arguments
1588
 *   on which to invoke the callback of closure.
1589
 * @invocation_hint: The invocation hint given as the last argument to
1590
 *   g_closure_invoke().
1591
 * @marshal_data: Additional data specified when registering the
1592
 *   marshaller, see g_closure_set_marshal() and
1593
 *   g_closure_set_meta_marshal()
1594
 *
1595
 * A #GClosureMarshal function for use with signals with a single
1596
 * argument which is any boxed pointer type.
1597
 */
1598
/* VOID:BOXED */
1599
void
1600
g_cclosure_marshal_VOID__BOXED (GClosure     *closure,
1601
                                GValue       *return_value G_GNUC_UNUSED,
1602
                                guint         n_param_values,
1603
                                const GValue *param_values,
1604
                                gpointer      invocation_hint G_GNUC_UNUSED,
1605
                                gpointer      marshal_data)
1606
0
{
1607
0
  typedef void (*GMarshalFunc_VOID__BOXED) (gpointer     data1,
1608
0
                                            gpointer     arg_1,
1609
0
                                            gpointer     data2);
1610
0
  GMarshalFunc_VOID__BOXED callback;
1611
0
  GCClosure *cc = (GCClosure*) closure;
1612
0
  gpointer data1, data2;
1613
1614
0
  g_return_if_fail (n_param_values == 2);
1615
1616
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1617
0
    {
1618
0
      data1 = closure->data;
1619
0
      data2 = g_value_peek_pointer (param_values + 0);
1620
0
    }
1621
0
  else
1622
0
    {
1623
0
      data1 = g_value_peek_pointer (param_values + 0);
1624
0
      data2 = closure->data;
1625
0
    }
1626
0
  callback = (GMarshalFunc_VOID__BOXED) (marshal_data ? marshal_data : cc->callback);
1627
1628
0
  callback (data1,
1629
0
            g_marshal_value_peek_boxed (param_values + 1),
1630
0
            data2);
1631
0
}
1632
1633
/**
1634
 * g_cclosure_marshal_VOID__BOXEDv:
1635
 * @closure: the #GClosure to which the marshaller belongs
1636
 * @return_value: (nullable): a #GValue to store the return
1637
 *  value. May be %NULL if the callback of @closure doesn't return a
1638
 *  value.
1639
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1640
 * @args: va_list of arguments to be passed to the closure.
1641
 * @marshal_data: (nullable): additional data specified when
1642
 *  registering the marshaller, see g_closure_set_marshal() and
1643
 *  g_closure_set_meta_marshal()
1644
 * @n_params: the length of the @param_types array
1645
 * @param_types: (array length=n_params): the #GType of each argument from
1646
 *  @args.
1647
 *
1648
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__BOXED().
1649
 */
1650
void
1651
g_cclosure_marshal_VOID__BOXEDv (GClosure     *closure,
1652
                                 GValue       *return_value,
1653
                                 gpointer      instance,
1654
                                 va_list       args,
1655
                                 gpointer      marshal_data,
1656
                                 int           n_params,
1657
                                 GType        *param_types)
1658
0
{
1659
0
  typedef void (*GMarshalFunc_VOID__BOXED) (gpointer     instance,
1660
0
                                            gpointer     arg_0,
1661
0
                                            gpointer     data);
1662
0
  GCClosure *cc = (GCClosure*) closure;
1663
0
  gpointer data1, data2;
1664
0
  GMarshalFunc_VOID__BOXED callback;
1665
0
  gpointer arg0;
1666
0
  va_list args_copy;
1667
1668
0
  G_VA_COPY (args_copy, args);
1669
0
  arg0 = (gpointer) va_arg (args_copy, gpointer);
1670
0
  if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL)
1671
0
    arg0 = g_boxed_copy (param_types[0] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg0);
1672
0
  va_end (args_copy);
1673
1674
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1675
0
    {
1676
0
      data1 = closure->data;
1677
0
      data2 = instance;
1678
0
    }
1679
0
  else
1680
0
    {
1681
0
      data1 = instance;
1682
0
      data2 = closure->data;
1683
0
    }
1684
0
  callback = (GMarshalFunc_VOID__BOXED) (marshal_data ? marshal_data : cc->callback);
1685
1686
0
  callback (data1,
1687
0
            arg0,
1688
0
            data2);
1689
0
  if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL)
1690
0
    g_boxed_free (param_types[0] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg0);
1691
0
}
1692
1693
/**
1694
 * g_cclosure_marshal_VOID__POINTER:
1695
 * @closure: A #GClosure.
1696
 * @return_value: A #GValue to store the return value. May be %NULL
1697
 *   if the callback of closure doesn't return a value.
1698
 * @n_param_values: The length of the @param_values array.
1699
 * @param_values: An array of #GValues holding the arguments
1700
 *   on which to invoke the callback of closure.
1701
 * @invocation_hint: The invocation hint given as the last argument to
1702
 *   g_closure_invoke().
1703
 * @marshal_data: Additional data specified when registering the
1704
 *   marshaller, see g_closure_set_marshal() and
1705
 *   g_closure_set_meta_marshal()
1706
 *
1707
 * A #GClosureMarshal function for use with signals with a single raw
1708
 * pointer argument type.
1709
 *
1710
 * If it is possible, it is better to use one of the more specific
1711
 * functions such as g_cclosure_marshal_VOID__OBJECT() or
1712
 * g_cclosure_marshal_VOID__OBJECT().
1713
 */
1714
/* VOID:POINTER */
1715
void
1716
g_cclosure_marshal_VOID__POINTER (GClosure     *closure,
1717
                                  GValue       *return_value G_GNUC_UNUSED,
1718
                                  guint         n_param_values,
1719
                                  const GValue *param_values,
1720
                                  gpointer      invocation_hint G_GNUC_UNUSED,
1721
                                  gpointer      marshal_data)
1722
0
{
1723
0
  typedef void (*GMarshalFunc_VOID__POINTER) (gpointer     data1,
1724
0
                                              gpointer     arg_1,
1725
0
                                              gpointer     data2);
1726
0
  GMarshalFunc_VOID__POINTER callback;
1727
0
  GCClosure *cc = (GCClosure*) closure;
1728
0
  gpointer data1, data2;
1729
1730
0
  g_return_if_fail (n_param_values == 2);
1731
1732
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1733
0
    {
1734
0
      data1 = closure->data;
1735
0
      data2 = g_value_peek_pointer (param_values + 0);
1736
0
    }
1737
0
  else
1738
0
    {
1739
0
      data1 = g_value_peek_pointer (param_values + 0);
1740
0
      data2 = closure->data;
1741
0
    }
1742
0
  callback = (GMarshalFunc_VOID__POINTER) (marshal_data ? marshal_data : cc->callback);
1743
1744
0
  callback (data1,
1745
0
            g_marshal_value_peek_pointer (param_values + 1),
1746
0
            data2);
1747
0
}
1748
1749
/**
1750
 * g_cclosure_marshal_VOID__POINTERv:
1751
 * @closure: the #GClosure to which the marshaller belongs
1752
 * @return_value: (nullable): a #GValue to store the return
1753
 *  value. May be %NULL if the callback of @closure doesn't return a
1754
 *  value.
1755
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1756
 * @args: va_list of arguments to be passed to the closure.
1757
 * @marshal_data: (nullable): additional data specified when
1758
 *  registering the marshaller, see g_closure_set_marshal() and
1759
 *  g_closure_set_meta_marshal()
1760
 * @n_params: the length of the @param_types array
1761
 * @param_types: (array length=n_params): the #GType of each argument from
1762
 *  @args.
1763
 *
1764
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__POINTER().
1765
 */
1766
void
1767
g_cclosure_marshal_VOID__POINTERv (GClosure     *closure,
1768
                                   GValue       *return_value,
1769
                                   gpointer      instance,
1770
                                   va_list       args,
1771
                                   gpointer      marshal_data,
1772
                                   int           n_params,
1773
                                   GType        *param_types)
1774
0
{
1775
0
  typedef void (*GMarshalFunc_VOID__POINTER) (gpointer     instance,
1776
0
                                              gpointer     arg_0,
1777
0
                                              gpointer     data);
1778
0
  GCClosure *cc = (GCClosure*) closure;
1779
0
  gpointer data1, data2;
1780
0
  GMarshalFunc_VOID__POINTER callback;
1781
0
  gpointer arg0;
1782
0
  va_list args_copy;
1783
1784
0
  G_VA_COPY (args_copy, args);
1785
0
  arg0 = (gpointer) va_arg (args_copy, gpointer);
1786
0
  va_end (args_copy);
1787
1788
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1789
0
    {
1790
0
      data1 = closure->data;
1791
0
      data2 = instance;
1792
0
    }
1793
0
  else
1794
0
    {
1795
0
      data1 = instance;
1796
0
      data2 = closure->data;
1797
0
    }
1798
0
  callback = (GMarshalFunc_VOID__POINTER) (marshal_data ? marshal_data : cc->callback);
1799
1800
0
  callback (data1,
1801
0
            arg0,
1802
0
            data2);
1803
0
}
1804
1805
/**
1806
 * g_cclosure_marshal_VOID__OBJECT:
1807
 * @closure: A #GClosure.
1808
 * @return_value: A #GValue to store the return value. May be %NULL
1809
 *   if the callback of closure doesn't return a value.
1810
 * @n_param_values: The length of the @param_values array.
1811
 * @param_values: An array of #GValues holding the arguments
1812
 *   on which to invoke the callback of closure.
1813
 * @invocation_hint: The invocation hint given as the last argument to
1814
 *   g_closure_invoke().
1815
 * @marshal_data: Additional data specified when registering the
1816
 *   marshaller, see g_closure_set_marshal() and
1817
 *   g_closure_set_meta_marshal()
1818
 *
1819
 * A #GClosureMarshal function for use with signals with a single
1820
 * #GObject argument.
1821
 */
1822
/* VOID:OBJECT */
1823
void
1824
g_cclosure_marshal_VOID__OBJECT (GClosure     *closure,
1825
                                 GValue       *return_value G_GNUC_UNUSED,
1826
                                 guint         n_param_values,
1827
                                 const GValue *param_values,
1828
                                 gpointer      invocation_hint G_GNUC_UNUSED,
1829
                                 gpointer      marshal_data)
1830
0
{
1831
0
  typedef void (*GMarshalFunc_VOID__OBJECT) (gpointer     data1,
1832
0
                                             gpointer     arg_1,
1833
0
                                             gpointer     data2);
1834
0
  GMarshalFunc_VOID__OBJECT callback;
1835
0
  GCClosure *cc = (GCClosure*) closure;
1836
0
  gpointer data1, data2;
1837
1838
0
  g_return_if_fail (n_param_values == 2);
1839
1840
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1841
0
    {
1842
0
      data1 = closure->data;
1843
0
      data2 = g_value_peek_pointer (param_values + 0);
1844
0
    }
1845
0
  else
1846
0
    {
1847
0
      data1 = g_value_peek_pointer (param_values + 0);
1848
0
      data2 = closure->data;
1849
0
    }
1850
0
  callback = (GMarshalFunc_VOID__OBJECT) (marshal_data ? marshal_data : cc->callback);
1851
1852
0
  callback (data1,
1853
0
            g_marshal_value_peek_object (param_values + 1),
1854
0
            data2);
1855
0
}
1856
1857
/**
1858
 * g_cclosure_marshal_VOID__OBJECTv:
1859
 * @closure: the #GClosure to which the marshaller belongs
1860
 * @return_value: (nullable): a #GValue to store the return
1861
 *  value. May be %NULL if the callback of @closure doesn't return a
1862
 *  value.
1863
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1864
 * @args: va_list of arguments to be passed to the closure.
1865
 * @marshal_data: (nullable): additional data specified when
1866
 *  registering the marshaller, see g_closure_set_marshal() and
1867
 *  g_closure_set_meta_marshal()
1868
 * @n_params: the length of the @param_types array
1869
 * @param_types: (array length=n_params): the #GType of each argument from
1870
 *  @args.
1871
 *
1872
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__OBJECT().
1873
 */
1874
void
1875
g_cclosure_marshal_VOID__OBJECTv (GClosure     *closure,
1876
                                  GValue       *return_value,
1877
                                  gpointer      instance,
1878
                                  va_list       args,
1879
                                  gpointer      marshal_data,
1880
                                  int           n_params,
1881
                                  GType        *param_types)
1882
0
{
1883
0
  typedef void (*GMarshalFunc_VOID__OBJECT) (gpointer     instance,
1884
0
                                             gpointer     arg_0,
1885
0
                                             gpointer     data);
1886
0
  GCClosure *cc = (GCClosure*) closure;
1887
0
  gpointer data1, data2;
1888
0
  GMarshalFunc_VOID__OBJECT callback;
1889
0
  gpointer arg0;
1890
0
  va_list args_copy;
1891
1892
0
  G_VA_COPY (args_copy, args);
1893
0
  arg0 = (gpointer) va_arg (args_copy, gpointer);
1894
0
  if (arg0 != NULL)
1895
0
    arg0 = g_object_ref (arg0);
1896
0
  va_end (args_copy);
1897
1898
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1899
0
    {
1900
0
      data1 = closure->data;
1901
0
      data2 = instance;
1902
0
    }
1903
0
  else
1904
0
    {
1905
0
      data1 = instance;
1906
0
      data2 = closure->data;
1907
0
    }
1908
0
  callback = (GMarshalFunc_VOID__OBJECT) (marshal_data ? marshal_data : cc->callback);
1909
1910
0
  callback (data1,
1911
0
            arg0,
1912
0
            data2);
1913
0
  if (arg0 != NULL)
1914
0
    g_object_unref (arg0);
1915
0
}
1916
1917
/**
1918
 * g_cclosure_marshal_VOID__VARIANT:
1919
 * @closure: A #GClosure.
1920
 * @return_value: A #GValue to store the return value. May be %NULL
1921
 *   if the callback of closure doesn't return a value.
1922
 * @n_param_values: The length of the @param_values array.
1923
 * @param_values: An array of #GValues holding the arguments
1924
 *   on which to invoke the callback of closure.
1925
 * @invocation_hint: The invocation hint given as the last argument to
1926
 *   g_closure_invoke().
1927
 * @marshal_data: Additional data specified when registering the
1928
 *   marshaller, see g_closure_set_marshal() and
1929
 *   g_closure_set_meta_marshal()
1930
 *
1931
 * A #GClosureMarshal function for use with signals with a single
1932
 * #GVariant argument.
1933
 */
1934
/* VOID:VARIANT */
1935
void
1936
g_cclosure_marshal_VOID__VARIANT (GClosure     *closure,
1937
                                  GValue       *return_value G_GNUC_UNUSED,
1938
                                  guint         n_param_values,
1939
                                  const GValue *param_values,
1940
                                  gpointer      invocation_hint G_GNUC_UNUSED,
1941
                                  gpointer      marshal_data)
1942
0
{
1943
0
  typedef void (*GMarshalFunc_VOID__VARIANT) (gpointer     data1,
1944
0
                                              gpointer     arg_1,
1945
0
                                              gpointer     data2);
1946
0
  GMarshalFunc_VOID__VARIANT callback;
1947
0
  GCClosure *cc = (GCClosure*) closure;
1948
0
  gpointer data1, data2;
1949
1950
0
  g_return_if_fail (n_param_values == 2);
1951
1952
0
  if (G_CCLOSURE_SWAP_DATA (closure))
1953
0
    {
1954
0
      data1 = closure->data;
1955
0
      data2 = g_value_peek_pointer (param_values + 0);
1956
0
    }
1957
0
  else
1958
0
    {
1959
0
      data1 = g_value_peek_pointer (param_values + 0);
1960
0
      data2 = closure->data;
1961
0
    }
1962
0
  callback = (GMarshalFunc_VOID__VARIANT) (marshal_data ? marshal_data : cc->callback);
1963
1964
0
  callback (data1,
1965
0
            g_marshal_value_peek_variant (param_values + 1),
1966
0
            data2);
1967
0
}
1968
1969
/**
1970
 * g_cclosure_marshal_VOID__VARIANTv:
1971
 * @closure: the #GClosure to which the marshaller belongs
1972
 * @return_value: (nullable): a #GValue to store the return
1973
 *  value. May be %NULL if the callback of @closure doesn't return a
1974
 *  value.
1975
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
1976
 * @args: va_list of arguments to be passed to the closure.
1977
 * @marshal_data: (nullable): additional data specified when
1978
 *  registering the marshaller, see g_closure_set_marshal() and
1979
 *  g_closure_set_meta_marshal()
1980
 * @n_params: the length of the @param_types array
1981
 * @param_types: (array length=n_params): the #GType of each argument from
1982
 *  @args.
1983
 *
1984
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__VARIANT().
1985
 */
1986
void
1987
g_cclosure_marshal_VOID__VARIANTv (GClosure     *closure,
1988
                                   GValue       *return_value,
1989
                                   gpointer      instance,
1990
                                   va_list       args,
1991
                                   gpointer      marshal_data,
1992
                                   int           n_params,
1993
                                   GType        *param_types)
1994
0
{
1995
0
  typedef void (*GMarshalFunc_VOID__VARIANT) (gpointer     instance,
1996
0
                                              gpointer     arg_0,
1997
0
                                              gpointer     data);
1998
0
  GCClosure *cc = (GCClosure*) closure;
1999
0
  gpointer data1, data2;
2000
0
  GMarshalFunc_VOID__VARIANT callback;
2001
0
  gpointer arg0;
2002
0
  va_list args_copy;
2003
2004
0
  G_VA_COPY (args_copy, args);
2005
0
  arg0 = (gpointer) va_arg (args_copy, gpointer);
2006
0
  if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL)
2007
0
    arg0 = g_variant_ref_sink (arg0);
2008
0
  va_end (args_copy);
2009
2010
0
  if (G_CCLOSURE_SWAP_DATA (closure))
2011
0
    {
2012
0
      data1 = closure->data;
2013
0
      data2 = instance;
2014
0
    }
2015
0
  else
2016
0
    {
2017
0
      data1 = instance;
2018
0
      data2 = closure->data;
2019
0
    }
2020
0
  callback = (GMarshalFunc_VOID__VARIANT) (marshal_data ? marshal_data : cc->callback);
2021
2022
0
  callback (data1,
2023
0
            arg0,
2024
0
            data2);
2025
0
  if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL)
2026
0
    g_variant_unref (arg0);
2027
0
}
2028
2029
/**
2030
 * g_cclosure_marshal_VOID__UINT_POINTER:
2031
 * @closure: A #GClosure.
2032
 * @return_value: A #GValue to store the return value. May be %NULL
2033
 *   if the callback of closure doesn't return a value.
2034
 * @n_param_values: The length of the @param_values array.
2035
 * @param_values: An array of #GValues holding the arguments
2036
 *   on which to invoke the callback of closure.
2037
 * @invocation_hint: The invocation hint given as the last argument to
2038
 *   g_closure_invoke().
2039
 * @marshal_data: Additional data specified when registering the
2040
 *   marshaller, see g_closure_set_marshal() and
2041
 *   g_closure_set_meta_marshal()
2042
 *
2043
 * A #GClosureMarshal function for use with signals with an unsigned int
2044
 * and a pointer as arguments.
2045
 */
2046
/* VOID:UINT,POINTER */
2047
void
2048
g_cclosure_marshal_VOID__UINT_POINTER (GClosure     *closure,
2049
                                       GValue       *return_value G_GNUC_UNUSED,
2050
                                       guint         n_param_values,
2051
                                       const GValue *param_values,
2052
                                       gpointer      invocation_hint G_GNUC_UNUSED,
2053
                                       gpointer      marshal_data)
2054
0
{
2055
0
  typedef void (*GMarshalFunc_VOID__UINT_POINTER) (gpointer     data1,
2056
0
                                                   guint        arg_1,
2057
0
                                                   gpointer     arg_2,
2058
0
                                                   gpointer     data2);
2059
0
  GMarshalFunc_VOID__UINT_POINTER callback;
2060
0
  GCClosure *cc = (GCClosure*) closure;
2061
0
  gpointer data1, data2;
2062
2063
0
  g_return_if_fail (n_param_values == 3);
2064
2065
0
  if (G_CCLOSURE_SWAP_DATA (closure))
2066
0
    {
2067
0
      data1 = closure->data;
2068
0
      data2 = g_value_peek_pointer (param_values + 0);
2069
0
    }
2070
0
  else
2071
0
    {
2072
0
      data1 = g_value_peek_pointer (param_values + 0);
2073
0
      data2 = closure->data;
2074
0
    }
2075
0
  callback = (GMarshalFunc_VOID__UINT_POINTER) (marshal_data ? marshal_data : cc->callback);
2076
2077
0
  callback (data1,
2078
0
            g_marshal_value_peek_uint (param_values + 1),
2079
0
            g_marshal_value_peek_pointer (param_values + 2),
2080
0
            data2);
2081
0
}
2082
2083
/**
2084
 * g_cclosure_marshal_VOID__UINT_POINTERv:
2085
 * @closure: the #GClosure to which the marshaller belongs
2086
 * @return_value: (nullable): a #GValue to store the return
2087
 *  value. May be %NULL if the callback of @closure doesn't return a
2088
 *  value.
2089
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
2090
 * @args: va_list of arguments to be passed to the closure.
2091
 * @marshal_data: (nullable): additional data specified when
2092
 *  registering the marshaller, see g_closure_set_marshal() and
2093
 *  g_closure_set_meta_marshal()
2094
 * @n_params: the length of the @param_types array
2095
 * @param_types: (array length=n_params): the #GType of each argument from
2096
 *  @args.
2097
 *
2098
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UINT_POINTER().
2099
 */
2100
void
2101
g_cclosure_marshal_VOID__UINT_POINTERv (GClosure     *closure,
2102
                                        GValue       *return_value,
2103
                                        gpointer      instance,
2104
                                        va_list       args,
2105
                                        gpointer      marshal_data,
2106
                                        int           n_params,
2107
                                        GType        *param_types)
2108
0
{
2109
0
  typedef void (*GMarshalFunc_VOID__UINT_POINTER) (gpointer     instance,
2110
0
                                                   guint        arg_0,
2111
0
                                                   gpointer     arg_1,
2112
0
                                                   gpointer     data);
2113
0
  GCClosure *cc = (GCClosure*) closure;
2114
0
  gpointer data1, data2;
2115
0
  GMarshalFunc_VOID__UINT_POINTER callback;
2116
0
  guint arg0;
2117
0
  gpointer arg1;
2118
0
  va_list args_copy;
2119
2120
0
  G_VA_COPY (args_copy, args);
2121
0
  arg0 = (guint) va_arg (args_copy, guint);
2122
0
  arg1 = (gpointer) va_arg (args_copy, gpointer);
2123
0
  va_end (args_copy);
2124
2125
0
  if (G_CCLOSURE_SWAP_DATA (closure))
2126
0
    {
2127
0
      data1 = closure->data;
2128
0
      data2 = instance;
2129
0
    }
2130
0
  else
2131
0
    {
2132
0
      data1 = instance;
2133
0
      data2 = closure->data;
2134
0
    }
2135
0
  callback = (GMarshalFunc_VOID__UINT_POINTER) (marshal_data ? marshal_data : cc->callback);
2136
2137
0
  callback (data1,
2138
0
            arg0,
2139
0
            arg1,
2140
0
            data2);
2141
0
}
2142
2143
/**
2144
 * g_cclosure_marshal_BOOLEAN__FLAGS:
2145
 * @closure: A #GClosure.
2146
 * @return_value: A #GValue to store the return value. May be %NULL
2147
 *   if the callback of closure doesn't return a value.
2148
 * @n_param_values: The length of the @param_values array.
2149
 * @param_values: An array of #GValues holding the arguments
2150
 *   on which to invoke the callback of closure.
2151
 * @invocation_hint: The invocation hint given as the last argument to
2152
 *   g_closure_invoke().
2153
 * @marshal_data: Additional data specified when registering the
2154
 *   marshaller, see g_closure_set_marshal() and
2155
 *   g_closure_set_meta_marshal()
2156
 *
2157
 * A #GClosureMarshal function for use with signals with handlers that
2158
 * take a flags type as an argument and return a boolean.  If you have
2159
 * such a signal, you will probably also need to use an accumulator,
2160
 * such as g_signal_accumulator_true_handled().
2161
 */
2162
/* BOOL:FLAGS */
2163
void
2164
g_cclosure_marshal_BOOLEAN__FLAGS (GClosure     *closure,
2165
                                   GValue       *return_value G_GNUC_UNUSED,
2166
                                   guint         n_param_values,
2167
                                   const GValue *param_values,
2168
                                   gpointer      invocation_hint G_GNUC_UNUSED,
2169
                                   gpointer      marshal_data)
2170
0
{
2171
0
  typedef gboolean (*GMarshalFunc_BOOLEAN__FLAGS) (gpointer     data1,
2172
0
                                                   guint        arg_1,
2173
0
                                                   gpointer     data2);
2174
0
  GMarshalFunc_BOOLEAN__FLAGS callback;
2175
0
  GCClosure *cc = (GCClosure*) closure;
2176
0
  gpointer data1, data2;
2177
0
  gboolean v_return;
2178
2179
0
  g_return_if_fail (return_value != NULL);
2180
0
  g_return_if_fail (n_param_values == 2);
2181
2182
0
  if (G_CCLOSURE_SWAP_DATA (closure))
2183
0
    {
2184
0
      data1 = closure->data;
2185
0
      data2 = g_value_peek_pointer (param_values + 0);
2186
0
    }
2187
0
  else
2188
0
    {
2189
0
      data1 = g_value_peek_pointer (param_values + 0);
2190
0
      data2 = closure->data;
2191
0
    }
2192
0
  callback = (GMarshalFunc_BOOLEAN__FLAGS) (marshal_data ? marshal_data : cc->callback);
2193
2194
0
  v_return = callback (data1,
2195
0
                       g_marshal_value_peek_flags (param_values + 1),
2196
0
                       data2);
2197
2198
0
  g_value_set_boolean (return_value, v_return);
2199
0
}
2200
2201
/**
2202
 * g_cclosure_marshal_BOOLEAN__FLAGSv:
2203
 * @closure: the #GClosure to which the marshaller belongs
2204
 * @return_value: (nullable): a #GValue to store the return
2205
 *  value. May be %NULL if the callback of @closure doesn't return a
2206
 *  value.
2207
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
2208
 * @args: va_list of arguments to be passed to the closure.
2209
 * @marshal_data: (nullable): additional data specified when
2210
 *  registering the marshaller, see g_closure_set_marshal() and
2211
 *  g_closure_set_meta_marshal()
2212
 * @n_params: the length of the @param_types array
2213
 * @param_types: (array length=n_params): the #GType of each argument from
2214
 *  @args.
2215
 *
2216
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_BOOLEAN__FLAGS().
2217
 */
2218
void
2219
g_cclosure_marshal_BOOLEAN__FLAGSv (GClosure     *closure,
2220
                                    GValue       *return_value,
2221
                                    gpointer      instance,
2222
                                    va_list       args,
2223
                                    gpointer      marshal_data,
2224
                                    int           n_params,
2225
                                    GType        *param_types)
2226
0
{
2227
0
  typedef gboolean (*GMarshalFunc_BOOLEAN__FLAGS) (gpointer     instance,
2228
0
                                                   guint        arg_0,
2229
0
                                                   gpointer     data);
2230
0
  GCClosure *cc = (GCClosure*) closure;
2231
0
  gpointer data1, data2;
2232
0
  GMarshalFunc_BOOLEAN__FLAGS callback;
2233
0
  guint arg0;
2234
0
  va_list args_copy;
2235
0
  gboolean v_return;
2236
2237
0
  g_return_if_fail (return_value != NULL);
2238
2239
0
  G_VA_COPY (args_copy, args);
2240
0
  arg0 = (guint) va_arg (args_copy, guint);
2241
0
  va_end (args_copy);
2242
2243
0
  if (G_CCLOSURE_SWAP_DATA (closure))
2244
0
    {
2245
0
      data1 = closure->data;
2246
0
      data2 = instance;
2247
0
    }
2248
0
  else
2249
0
    {
2250
0
      data1 = instance;
2251
0
      data2 = closure->data;
2252
0
    }
2253
0
  callback = (GMarshalFunc_BOOLEAN__FLAGS) (marshal_data ? marshal_data : cc->callback);
2254
2255
0
  v_return = callback (data1,
2256
0
                       arg0,
2257
0
                       data2);
2258
2259
0
  g_value_set_boolean (return_value, v_return);
2260
0
}
2261
2262
/**
2263
 * g_cclosure_marshal_STRING__OBJECT_POINTER:
2264
 * @closure: A #GClosure.
2265
 * @return_value: A #GValue to store the return value. May be %NULL
2266
 *   if the callback of closure doesn't return a value.
2267
 * @n_param_values: The length of the @param_values array.
2268
 * @param_values: An array of #GValues holding the arguments
2269
 *   on which to invoke the callback of closure.
2270
 * @invocation_hint: The invocation hint given as the last argument to
2271
 *   g_closure_invoke().
2272
 * @marshal_data: Additional data specified when registering the
2273
 *   marshaller, see g_closure_set_marshal() and
2274
 *   g_closure_set_meta_marshal()
2275
 *
2276
 * A #GClosureMarshal function for use with signals with handlers that
2277
 * take a #GObject and a pointer and produce a string.  It is highly
2278
 * unlikely that your signal handler fits this description.
2279
 */
2280
/* STRING:OBJECT,POINTER */
2281
void
2282
g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure     *closure,
2283
                                           GValue       *return_value G_GNUC_UNUSED,
2284
                                           guint         n_param_values,
2285
                                           const GValue *param_values,
2286
                                           gpointer      invocation_hint G_GNUC_UNUSED,
2287
                                           gpointer      marshal_data)
2288
0
{
2289
0
  typedef gchar* (*GMarshalFunc_STRING__OBJECT_POINTER) (gpointer     data1,
2290
0
                                                         gpointer     arg_1,
2291
0
                                                         gpointer     arg_2,
2292
0
                                                         gpointer     data2);
2293
0
  GMarshalFunc_STRING__OBJECT_POINTER callback;
2294
0
  GCClosure *cc = (GCClosure*) closure;
2295
0
  gpointer data1, data2;
2296
0
  gchar* v_return;
2297
2298
0
  g_return_if_fail (return_value != NULL);
2299
0
  g_return_if_fail (n_param_values == 3);
2300
2301
0
  if (G_CCLOSURE_SWAP_DATA (closure))
2302
0
    {
2303
0
      data1 = closure->data;
2304
0
      data2 = g_value_peek_pointer (param_values + 0);
2305
0
    }
2306
0
  else
2307
0
    {
2308
0
      data1 = g_value_peek_pointer (param_values + 0);
2309
0
      data2 = closure->data;
2310
0
    }
2311
0
  callback = (GMarshalFunc_STRING__OBJECT_POINTER) (marshal_data ? marshal_data : cc->callback);
2312
2313
0
  v_return = callback (data1,
2314
0
                       g_marshal_value_peek_object (param_values + 1),
2315
0
                       g_marshal_value_peek_pointer (param_values + 2),
2316
0
                       data2);
2317
2318
0
  g_value_take_string (return_value, v_return);
2319
0
}
2320
2321
/**
2322
 * g_cclosure_marshal_STRING__OBJECT_POINTERv:
2323
 * @closure: the #GClosure to which the marshaller belongs
2324
 * @return_value: (nullable): a #GValue to store the return
2325
 *  value. May be %NULL if the callback of @closure doesn't return a
2326
 *  value.
2327
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
2328
 * @args: va_list of arguments to be passed to the closure.
2329
 * @marshal_data: (nullable): additional data specified when
2330
 *  registering the marshaller, see g_closure_set_marshal() and
2331
 *  g_closure_set_meta_marshal()
2332
 * @n_params: the length of the @param_types array
2333
 * @param_types: (array length=n_params): the #GType of each argument from
2334
 *  @args.
2335
 *
2336
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_STRING__OBJECT_POINTER().
2337
 */
2338
void
2339
g_cclosure_marshal_STRING__OBJECT_POINTERv (GClosure     *closure,
2340
                                            GValue       *return_value,
2341
                                            gpointer      instance,
2342
                                            va_list       args,
2343
                                            gpointer      marshal_data,
2344
                                            int           n_params,
2345
                                            GType        *param_types)
2346
0
{
2347
0
  typedef gchar* (*GMarshalFunc_STRING__OBJECT_POINTER) (gpointer     instance,
2348
0
                                                         gpointer     arg_0,
2349
0
                                                         gpointer     arg_1,
2350
0
                                                         gpointer     data);
2351
0
  GCClosure *cc = (GCClosure*) closure;
2352
0
  gpointer data1, data2;
2353
0
  GMarshalFunc_STRING__OBJECT_POINTER callback;
2354
0
  gpointer arg0;
2355
0
  gpointer arg1;
2356
0
  va_list args_copy;
2357
0
  gchar* v_return;
2358
2359
0
  g_return_if_fail (return_value != NULL);
2360
2361
0
  G_VA_COPY (args_copy, args);
2362
0
  arg0 = (gpointer) va_arg (args_copy, gpointer);
2363
0
  if (arg0 != NULL)
2364
0
    arg0 = g_object_ref (arg0);
2365
0
  arg1 = (gpointer) va_arg (args_copy, gpointer);
2366
0
  va_end (args_copy);
2367
2368
0
  if (G_CCLOSURE_SWAP_DATA (closure))
2369
0
    {
2370
0
      data1 = closure->data;
2371
0
      data2 = instance;
2372
0
    }
2373
0
  else
2374
0
    {
2375
0
      data1 = instance;
2376
0
      data2 = closure->data;
2377
0
    }
2378
0
  callback = (GMarshalFunc_STRING__OBJECT_POINTER) (marshal_data ? marshal_data : cc->callback);
2379
2380
0
  v_return = callback (data1,
2381
0
                       arg0,
2382
0
                       arg1,
2383
0
                       data2);
2384
0
  if (arg0 != NULL)
2385
0
    g_object_unref (arg0);
2386
2387
0
  g_value_take_string (return_value, v_return);
2388
0
}
2389
2390
/**
2391
 * g_cclosure_marshal_BOOLEAN__BOXED_BOXED:
2392
 * @closure: A #GClosure.
2393
 * @return_value: A #GValue to store the return value. May be %NULL
2394
 *   if the callback of closure doesn't return a value.
2395
 * @n_param_values: The length of the @param_values array.
2396
 * @param_values: An array of #GValues holding the arguments
2397
 *   on which to invoke the callback of closure.
2398
 * @invocation_hint: The invocation hint given as the last argument to
2399
 *   g_closure_invoke().
2400
 * @marshal_data: Additional data specified when registering the
2401
 *   marshaller, see g_closure_set_marshal() and
2402
 *   g_closure_set_meta_marshal()
2403
 *
2404
 * A #GClosureMarshal function for use with signals with handlers that
2405
 * take two boxed pointers as arguments and return a boolean.  If you
2406
 * have such a signal, you will probably also need to use an
2407
 * accumulator, such as g_signal_accumulator_true_handled().
2408
 */
2409
/* BOOL:BOXED,BOXED */
2410
void
2411
g_cclosure_marshal_BOOLEAN__BOXED_BOXED (GClosure     *closure,
2412
                                         GValue       *return_value G_GNUC_UNUSED,
2413
                                         guint         n_param_values,
2414
                                         const GValue *param_values,
2415
                                         gpointer      invocation_hint G_GNUC_UNUSED,
2416
                                         gpointer      marshal_data)
2417
0
{
2418
0
  typedef gboolean (*GMarshalFunc_BOOLEAN__BOXED_BOXED) (gpointer     data1,
2419
0
                                                         gpointer     arg_1,
2420
0
                                                         gpointer     arg_2,
2421
0
                                                         gpointer     data2);
2422
0
  GMarshalFunc_BOOLEAN__BOXED_BOXED callback;
2423
0
  GCClosure *cc = (GCClosure*) closure;
2424
0
  gpointer data1, data2;
2425
0
  gboolean v_return;
2426
2427
0
  g_return_if_fail (return_value != NULL);
2428
0
  g_return_if_fail (n_param_values == 3);
2429
2430
0
  if (G_CCLOSURE_SWAP_DATA (closure))
2431
0
    {
2432
0
      data1 = closure->data;
2433
0
      data2 = g_value_peek_pointer (param_values + 0);
2434
0
    }
2435
0
  else
2436
0
    {
2437
0
      data1 = g_value_peek_pointer (param_values + 0);
2438
0
      data2 = closure->data;
2439
0
    }
2440
0
  callback = (GMarshalFunc_BOOLEAN__BOXED_BOXED) (marshal_data ? marshal_data : cc->callback);
2441
2442
0
  v_return = callback (data1,
2443
0
                       g_marshal_value_peek_boxed (param_values + 1),
2444
0
                       g_marshal_value_peek_boxed (param_values + 2),
2445
0
                       data2);
2446
2447
0
  g_value_set_boolean (return_value, v_return);
2448
0
}
2449
2450
/**
2451
 * g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv:
2452
 * @closure: the #GClosure to which the marshaller belongs
2453
 * @return_value: (nullable): a #GValue to store the return
2454
 *  value. May be %NULL if the callback of @closure doesn't return a
2455
 *  value.
2456
 * @instance: (type GObject.TypeInstance): the instance on which the closure is invoked.
2457
 * @args: va_list of arguments to be passed to the closure.
2458
 * @marshal_data: (nullable): additional data specified when
2459
 *  registering the marshaller, see g_closure_set_marshal() and
2460
 *  g_closure_set_meta_marshal()
2461
 * @n_params: the length of the @param_types array
2462
 * @param_types: (array length=n_params): the #GType of each argument from
2463
 *  @args.
2464
 *
2465
 * The #GVaClosureMarshal equivalent to g_cclosure_marshal_BOOLEAN__BOXED_BOXED().
2466
 */
2467
void
2468
g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv (GClosure     *closure,
2469
                                          GValue       *return_value,
2470
                                          gpointer      instance,
2471
                                          va_list       args,
2472
                                          gpointer      marshal_data,
2473
                                          int           n_params,
2474
                                          GType        *param_types)
2475
0
{
2476
0
  typedef gboolean (*GMarshalFunc_BOOLEAN__BOXED_BOXED) (gpointer     instance,
2477
0
                                                         gpointer     arg_0,
2478
0
                                                         gpointer     arg_1,
2479
0
                                                         gpointer     data);
2480
0
  GCClosure *cc = (GCClosure*) closure;
2481
0
  gpointer data1, data2;
2482
0
  GMarshalFunc_BOOLEAN__BOXED_BOXED callback;
2483
0
  gpointer arg0;
2484
0
  gpointer arg1;
2485
0
  va_list args_copy;
2486
0
  gboolean v_return;
2487
2488
0
  g_return_if_fail (return_value != NULL);
2489
2490
0
  G_VA_COPY (args_copy, args);
2491
0
  arg0 = (gpointer) va_arg (args_copy, gpointer);
2492
0
  if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL)
2493
0
    arg0 = g_boxed_copy (param_types[0] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg0);
2494
0
  arg1 = (gpointer) va_arg (args_copy, gpointer);
2495
0
  if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL)
2496
0
    arg1 = g_boxed_copy (param_types[1] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg1);
2497
0
  va_end (args_copy);
2498
2499
0
  if (G_CCLOSURE_SWAP_DATA (closure))
2500
0
    {
2501
0
      data1 = closure->data;
2502
0
      data2 = instance;
2503
0
    }
2504
0
  else
2505
0
    {
2506
0
      data1 = instance;
2507
0
      data2 = closure->data;
2508
0
    }
2509
0
  callback = (GMarshalFunc_BOOLEAN__BOXED_BOXED) (marshal_data ? marshal_data : cc->callback);
2510
2511
0
  v_return = callback (data1,
2512
0
                       arg0,
2513
0
                       arg1,
2514
0
                       data2);
2515
0
  if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL)
2516
0
    g_boxed_free (param_types[0] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg0);
2517
0
  if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL)
2518
0
    g_boxed_free (param_types[1] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg1);
2519
2520
0
  g_value_set_boolean (return_value, v_return);
2521
0
}