23af6a5232b904ef7d379b280f2ab92e8709394b
[platform/upstream/gobject-introspection.git] / tests / gimarshallingtests.h
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2  * vim: tabstop=4 shiftwidth=4 expandtab
3  */
4
5 #include <glib-object.h>
6
7 #ifndef __GI_MARSHALLING_TESTS_H__
8 #define __GI_MARSHALLING_TESTS_H__
9
10 typedef struct _GIMarshallingTestsSimpleStruct GIMarshallingTestsSimpleStruct;
11 typedef struct _GIMarshallingTestsBoxedStruct GIMarshallingTestsBoxedStruct;
12
13 /* Constants */
14
15 #define GI_MARSHALLING_TESTS_CONSTANT_NUMBER 42
16 #define GI_MARSHALLING_TESTS_CONSTANT_UTF8   "const \xe2\x99\xa5 utf8"
17
18
19 /* Booleans */
20
21 gboolean gi_marshalling_tests_boolean_return_true (void);
22 gboolean gi_marshalling_tests_boolean_return_false (void);
23
24 void gi_marshalling_tests_boolean_in_true (gboolean v);
25 void gi_marshalling_tests_boolean_in_false (gboolean v);
26
27 void gi_marshalling_tests_boolean_out_true (gboolean *v);
28 void gi_marshalling_tests_boolean_out_false (gboolean *v);
29
30 void gi_marshalling_tests_boolean_inout_true_false (gboolean *v);
31 void gi_marshalling_tests_boolean_inout_false_true (gboolean *v);
32
33
34 /* Integers */
35
36 gint8 gi_marshalling_tests_int8_return_max (void);
37 gint8 gi_marshalling_tests_int8_return_min (void);
38
39 void gi_marshalling_tests_int8_in_max (gint8 v);
40 void gi_marshalling_tests_int8_in_min (gint8 v);
41
42 void gi_marshalling_tests_int8_out_max (gint8 *v);
43 void gi_marshalling_tests_int8_out_min (gint8 *v);
44
45 void gi_marshalling_tests_int8_inout_max_min (gint8 *v);
46 void gi_marshalling_tests_int8_inout_min_max (gint8 *v);
47
48
49 guint8 gi_marshalling_tests_uint8_return (void);
50
51 void gi_marshalling_tests_uint8_in (guint8 v);
52
53 void gi_marshalling_tests_uint8_out (guint8 *v);
54 void gi_marshalling_tests_uint8_inout (guint8 *v);
55
56
57 gint16 gi_marshalling_tests_int16_return_max (void);
58 gint16 gi_marshalling_tests_int16_return_min (void);
59
60 void gi_marshalling_tests_int16_in_max (gint16 v);
61 void gi_marshalling_tests_int16_in_min (gint16 v);
62
63 void gi_marshalling_tests_int16_out_max (gint16 *v);
64 void gi_marshalling_tests_int16_out_min (gint16 *v);
65
66 void gi_marshalling_tests_int16_inout_max_min (gint16 *v);
67 void gi_marshalling_tests_int16_inout_min_max (gint16 *v);
68
69
70 guint16 gi_marshalling_tests_uint16_return (void);
71
72 void gi_marshalling_tests_uint16_in (guint16 v);
73
74 void gi_marshalling_tests_uint16_out (guint16 *v);
75 void gi_marshalling_tests_uint16_inout (guint16 *v);
76
77
78 gint32 gi_marshalling_tests_int32_return_max (void);
79 gint32 gi_marshalling_tests_int32_return_min (void);
80
81 void gi_marshalling_tests_int32_in_max (gint32 v);
82 void gi_marshalling_tests_int32_in_min (gint32 v);
83
84 void gi_marshalling_tests_int32_out_max (gint32 *v);
85 void gi_marshalling_tests_int32_out_min (gint32 *v);
86
87 void gi_marshalling_tests_int32_inout_max_min (gint32 *v);
88 void gi_marshalling_tests_int32_inout_min_max (gint32 *v);
89
90
91 guint32 gi_marshalling_tests_uint32_return (void);
92
93 void gi_marshalling_tests_uint32_in (guint32 v);
94
95 void gi_marshalling_tests_uint32_out (guint32 *v);
96 void gi_marshalling_tests_uint32_inout (guint32 *v);
97
98
99 gint64 gi_marshalling_tests_int64_return_max (void);
100 gint64 gi_marshalling_tests_int64_return_min (void);
101
102 void gi_marshalling_tests_int64_in_max (gint64 v);
103 void gi_marshalling_tests_int64_in_min (gint64 v);
104
105 void gi_marshalling_tests_int64_out_max (gint64 *v);
106 void gi_marshalling_tests_int64_out_min (gint64 *v);
107
108 void gi_marshalling_tests_int64_inout_max_min (gint64 *v);
109 void gi_marshalling_tests_int64_inout_min_max (gint64 *v);
110
111
112 guint64 gi_marshalling_tests_uint64_return (void);
113
114 void gi_marshalling_tests_uint64_in (guint64 v);
115
116 void gi_marshalling_tests_uint64_out (guint64 *v);
117 void gi_marshalling_tests_uint64_inout (guint64 *v);
118
119
120 gshort gi_marshalling_tests_short_return_max (void);
121 gshort gi_marshalling_tests_short_return_min (void);
122
123 void gi_marshalling_tests_short_in_max (gshort short_);
124 void gi_marshalling_tests_short_in_min (gshort short_);
125
126 void gi_marshalling_tests_short_out_max (gshort *short_);
127 void gi_marshalling_tests_short_out_min (gshort *short_);
128
129 void gi_marshalling_tests_short_inout_max_min (gshort *short_);
130 void gi_marshalling_tests_short_inout_min_max (gshort *short_);
131
132
133 gushort gi_marshalling_tests_ushort_return (void);
134
135 void gi_marshalling_tests_ushort_in (gushort ushort_);
136
137 void gi_marshalling_tests_ushort_out (gushort *ushort_);
138 void gi_marshalling_tests_ushort_inout (gushort *ushort_);
139
140
141 gint gi_marshalling_tests_int_return_max (void);
142 gint gi_marshalling_tests_int_return_min (void);
143
144 void gi_marshalling_tests_int_in_max (gint int_);
145 void gi_marshalling_tests_int_in_min (gint int_);
146
147 void gi_marshalling_tests_int_out_max (gint *int_);
148 void gi_marshalling_tests_int_out_min (gint *int_);
149
150 void gi_marshalling_tests_int_inout_max_min (gint *int_);
151 void gi_marshalling_tests_int_inout_min_max (gint *int_);
152
153
154 guint gi_marshalling_tests_uint_return (void);
155
156 void gi_marshalling_tests_uint_in (guint uint_);
157
158 void gi_marshalling_tests_uint_out (guint *uint_);
159 void gi_marshalling_tests_uint_inout (guint *uint_);
160
161
162 glong gi_marshalling_tests_long_return_max (void);
163 glong gi_marshalling_tests_long_return_min (void);
164
165 void gi_marshalling_tests_long_in_max (glong long_);
166 void gi_marshalling_tests_long_in_min (glong long_);
167
168 void gi_marshalling_tests_long_out_max (glong *long_);
169 void gi_marshalling_tests_long_out_min (glong *long_);
170
171 void gi_marshalling_tests_long_inout_max_min (glong *long_);
172 void gi_marshalling_tests_long_inout_min_max (glong *long_);
173
174
175 gulong gi_marshalling_tests_ulong_return (void);
176
177 void gi_marshalling_tests_ulong_in (gulong ulong_);
178
179 void gi_marshalling_tests_ulong_out (gulong *ulong_);
180 void gi_marshalling_tests_ulong_inout (gulong *ulong_);
181
182
183 gssize gi_marshalling_tests_ssize_return_max (void);
184 gssize gi_marshalling_tests_ssize_return_min (void);
185
186 void gi_marshalling_tests_ssize_in_max (gssize ssize);
187 void gi_marshalling_tests_ssize_in_min (gssize ssize);
188
189 void gi_marshalling_tests_ssize_out_max (gssize *ssize);
190 void gi_marshalling_tests_ssize_out_min (gssize *ssize);
191
192 void gi_marshalling_tests_ssize_inout_max_min (gssize *ssize);
193 void gi_marshalling_tests_ssize_inout_min_max (gssize *ssize);
194
195
196 gsize gi_marshalling_tests_size_return (void);
197
198 void gi_marshalling_tests_size_in (gsize size);
199
200 void gi_marshalling_tests_size_out (gsize *size);
201 void gi_marshalling_tests_size_inout (gsize *size);
202
203
204 /* Floating-point */
205
206 gfloat gi_marshalling_tests_float_return (void);
207
208 void gi_marshalling_tests_float_in (gfloat v);
209
210 void gi_marshalling_tests_float_out (gfloat *v);
211
212 void gi_marshalling_tests_float_inout (gfloat *v);
213
214
215 gdouble gi_marshalling_tests_double_return (void);
216
217 void gi_marshalling_tests_double_in (gdouble v);
218
219 void gi_marshalling_tests_double_out (gdouble *v);
220
221 void gi_marshalling_tests_double_inout (gdouble *v);
222
223
224 /* Timestamps */
225
226 time_t gi_marshalling_tests_time_t_return (void);
227
228 void gi_marshalling_tests_time_t_in (time_t v);
229
230 void gi_marshalling_tests_time_t_out (time_t *v);
231
232 void gi_marshalling_tests_time_t_inout (time_t *v);
233
234
235 /* GType */
236
237 GType gi_marshalling_tests_gtype_return (void);
238
239 GType gi_marshalling_tests_gtype_string_return (void);
240
241 void gi_marshalling_tests_gtype_in (GType gtype);
242
243 void gi_marshalling_tests_gtype_string_in (GType gtype);
244
245 void gi_marshalling_tests_gtype_out (GType *gtype);
246
247 void gi_marshalling_tests_gtype_string_out (GType *gtype);
248
249 void gi_marshalling_tests_gtype_inout (GType *gtype);
250
251
252 /* UTF-8 */
253
254 const gchar *gi_marshalling_tests_utf8_none_return (void);
255 gchar *gi_marshalling_tests_utf8_full_return (void);
256
257 void gi_marshalling_tests_utf8_none_in (const gchar *utf8);
258 void gi_marshalling_tests_utf8_full_in (gchar *utf8);
259
260 void gi_marshalling_tests_utf8_none_out (gchar **utf8);
261 void gi_marshalling_tests_utf8_full_out (gchar **utf8);
262
263 void gi_marshalling_tests_utf8_dangling_out (gchar **utf8);
264
265 void gi_marshalling_tests_utf8_none_inout (gchar **utf8);
266 void gi_marshalling_tests_utf8_full_inout (gchar **utf8);
267
268 GSList *gi_marshalling_tests_filename_list_return (void);
269
270 /* Enum */
271
272 typedef enum
273 {
274   GI_MARSHALLING_TESTS_ENUM_VALUE1,
275   GI_MARSHALLING_TESTS_ENUM_VALUE2,
276   GI_MARSHALLING_TESTS_ENUM_VALUE3 = 42
277 } GIMarshallingTestsEnum;
278
279 typedef enum
280 {
281   GI_MARSHALLING_TESTS_SECOND_ENUM_SECONDVALUE1,
282   GI_MARSHALLING_TESTS_SECOND_ENUM_SECONDVALUE2,
283 } GIMarshallingTestsSecondEnum;
284
285 GIMarshallingTestsEnum gi_marshalling_tests_enum_returnv (void);
286
287 void gi_marshalling_tests_enum_in (GIMarshallingTestsEnum v);
288
289 void gi_marshalling_tests_enum_out (GIMarshallingTestsEnum *v);
290
291 void gi_marshalling_tests_enum_inout (GIMarshallingTestsEnum *v);
292
293
294 /* GEnum */
295
296 typedef enum
297 {
298   GI_MARSHALLING_TESTS_GENUM_VALUE1,
299   GI_MARSHALLING_TESTS_GENUM_VALUE2,
300   GI_MARSHALLING_TESTS_GENUM_VALUE3 = 42
301 } GIMarshallingTestsGEnum;
302
303 GType gi_marshalling_tests_genum_get_type (void) G_GNUC_CONST;
304 #define GI_MARSHALLING_TESTS_TYPE_GENUM (gi_marshalling_tests_genum_get_type ())
305
306 GIMarshallingTestsGEnum gi_marshalling_tests_genum_returnv (void);
307
308 void gi_marshalling_tests_genum_in (GIMarshallingTestsGEnum v);
309
310 void gi_marshalling_tests_genum_out (GIMarshallingTestsGEnum *v);
311
312 void gi_marshalling_tests_genum_inout (GIMarshallingTestsGEnum *v);
313
314
315 /* GFlags */
316
317 typedef enum
318 {
319   GI_MARSHALLING_TESTS_FLAGS_VALUE1 = 1 << 0,
320   GI_MARSHALLING_TESTS_FLAGS_VALUE2 = 1 << 1,
321   GI_MARSHALLING_TESTS_FLAGS_VALUE3 = 1 << 2,
322   GI_MARSHALLING_TESTS_FLAGS_MASK = GI_MARSHALLING_TESTS_FLAGS_VALUE1 |
323                                     GI_MARSHALLING_TESTS_FLAGS_VALUE2,
324   GI_MARSHALLING_TESTS_FLAGS_MASK2 = GI_MARSHALLING_TESTS_FLAGS_MASK
325 } GIMarshallingTestsFlags;
326
327 GType gi_marshalling_tests_flags_get_type (void) G_GNUC_CONST;
328 #define GI_MARSHALLING_TESTS_TYPE_FLAGS (gi_marshalling_tests_flags_get_type ())
329
330 GIMarshallingTestsFlags gi_marshalling_tests_flags_returnv (void);
331
332 void gi_marshalling_tests_flags_in (GIMarshallingTestsFlags v);
333 void gi_marshalling_tests_flags_in_zero (GIMarshallingTestsFlags v);
334
335 void gi_marshalling_tests_flags_out (GIMarshallingTestsFlags *v);
336
337 void gi_marshalling_tests_flags_inout (GIMarshallingTestsFlags *v);
338
339 /* Flags with no GType */
340
341 typedef enum
342 {
343   GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE1 = 1 << 0,
344   GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2 = 1 << 1,
345   GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE3 = 1 << 2,
346   GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_MASK = GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE1 |
347                                             GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2,
348   GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_MASK2 = GI_MARSHALLING_TESTS_FLAGS_MASK
349 } GIMarshallingTestsNoTypeFlags;
350
351 GIMarshallingTestsNoTypeFlags gi_marshalling_tests_no_type_flags_returnv (void);
352
353 void gi_marshalling_tests_no_type_flags_in (GIMarshallingTestsNoTypeFlags v);
354 void gi_marshalling_tests_no_type_flags_in_zero (GIMarshallingTestsNoTypeFlags v);
355
356 void gi_marshalling_tests_no_type_flags_out (GIMarshallingTestsNoTypeFlags *v);
357
358 void gi_marshalling_tests_no_type_flags_inout (GIMarshallingTestsNoTypeFlags *v);
359
360 /* Arrays */
361
362 gboolean gi_marshalling_tests_init_function (gint *n_args, char ***argv);
363
364 /* Fixed-size */
365 const gint *gi_marshalling_tests_array_fixed_int_return (void);
366 const gshort *gi_marshalling_tests_array_fixed_short_return (void);
367
368 void gi_marshalling_tests_array_fixed_int_in (const gint *ints);
369 void gi_marshalling_tests_array_fixed_short_in (const gshort *shorts);
370
371 void gi_marshalling_tests_array_fixed_out (gint **ints);
372
373 void gi_marshalling_tests_array_fixed_out_struct (GIMarshallingTestsSimpleStruct **structs);
374
375 void gi_marshalling_tests_array_fixed_inout (gint **ints);
376
377 /* Variable-size */
378
379 const gint *gi_marshalling_tests_array_return (gint *length);
380 const gint *gi_marshalling_tests_array_return_etc (gint first, gint *length, gint last, gint *sum);
381
382 void gi_marshalling_tests_array_in (const gint *ints, gint length);
383 void gi_marshalling_tests_array_in_len_before (gint length, const gint *ints);
384 void gi_marshalling_tests_array_in_len_zero_terminated (const gint *ints, gint length);
385 void gi_marshalling_tests_array_string_in (const gchar **strings, gint length);
386 void gi_marshalling_tests_array_uint8_in (const guint8 *chars, gint length);
387 void gi_marshalling_tests_array_struct_in (GIMarshallingTestsBoxedStruct **structs, gint length);
388 void gi_marshalling_tests_array_struct_take_in (GIMarshallingTestsBoxedStruct **structs, gint length);
389 void gi_marshalling_tests_array_simple_struct_in (GIMarshallingTestsSimpleStruct *structs, gint length);
390 void gi_marshalling_tests_multi_array_key_value_in (gint length, const gchar **keys, const GValue *values);
391 void gi_marshalling_tests_array_enum_in (GIMarshallingTestsEnum *_enum, gint length);
392 void gi_marshalling_tests_array_in_guint64_len (const gint *ints, guint64 length);
393 void gi_marshalling_tests_array_in_guint8_len (const gint *ints, guint8 length);
394
395 void gi_marshalling_tests_array_out (gint **ints, gint *length);
396 void gi_marshalling_tests_array_out_etc (gint first, gint **ints, gint *length, gint last, gint *sum);
397
398 void gi_marshalling_tests_array_inout (gint **ints, gint *length);
399 void gi_marshalling_tests_array_inout_etc (gint first, gint **ints, gint *length, gint last, gint *sum);
400
401 void gi_marshalling_tests_array_in_nonzero_nonlen (gint first, const guint8 *chars);
402
403 /* Zero-terminated */
404
405 gchar **gi_marshalling_tests_array_zero_terminated_return (void);
406 gchar **gi_marshalling_tests_array_zero_terminated_return_null (void);
407 GIMarshallingTestsBoxedStruct **gi_marshalling_tests_array_zero_terminated_return_struct (void);
408
409 void gi_marshalling_tests_array_zero_terminated_in (gchar **utf8s);
410
411 void gi_marshalling_tests_array_zero_terminated_out (gchar ***utf8s);
412
413 void gi_marshalling_tests_array_zero_terminated_inout (gchar ***utf8s);
414
415 GVariant **gi_marshalling_tests_array_gvariant_none_in (GVariant **variants);
416
417 GVariant **gi_marshalling_tests_array_gvariant_container_in (GVariant **variants);
418
419 GVariant **gi_marshalling_tests_array_gvariant_full_in (GVariant **variants);
420
421
422 /* GArray */
423
424 GArray *gi_marshalling_tests_garray_int_none_return (void);
425 GArray *gi_marshalling_tests_garray_uint64_none_return (void);
426 GArray *gi_marshalling_tests_garray_utf8_none_return (void);
427 GArray *gi_marshalling_tests_garray_utf8_container_return (void);
428 GArray *gi_marshalling_tests_garray_utf8_full_return (void);
429
430 void gi_marshalling_tests_garray_int_none_in (GArray *array_);
431 void gi_marshalling_tests_garray_uint64_none_in (GArray *array_);
432 void gi_marshalling_tests_garray_utf8_none_in (GArray *array_);
433
434 void gi_marshalling_tests_garray_utf8_none_out (GArray **array_);
435 void gi_marshalling_tests_garray_utf8_container_out (GArray **array_);
436 void gi_marshalling_tests_garray_utf8_full_out (GArray **array_);
437
438 void gi_marshalling_tests_garray_utf8_none_inout (GArray **array_);
439 void gi_marshalling_tests_garray_utf8_container_inout (GArray **array_);
440 void gi_marshalling_tests_garray_utf8_full_inout (GArray **array_);
441
442 /* GPtrArray */
443 GPtrArray *gi_marshalling_tests_gptrarray_utf8_none_return (void);
444 GPtrArray *gi_marshalling_tests_gptrarray_utf8_container_return (void);
445 GPtrArray *gi_marshalling_tests_gptrarray_utf8_full_return (void);
446
447 void gi_marshalling_tests_gptrarray_utf8_none_in (GPtrArray *parray_);
448
449 void gi_marshalling_tests_gptrarray_utf8_none_out (GPtrArray **parray_);
450 void gi_marshalling_tests_gptrarray_utf8_container_out (GPtrArray **parray_);
451 void gi_marshalling_tests_gptrarray_utf8_full_out (GPtrArray **parray_);
452
453 void gi_marshalling_tests_gptrarray_utf8_none_inout (GPtrArray **parray_);
454 void gi_marshalling_tests_gptrarray_utf8_container_inout (GPtrArray **parray_);
455 void gi_marshalling_tests_gptrarray_utf8_full_inout (GPtrArray **parray_);
456
457 /* GByteArray */
458
459 GByteArray *gi_marshalling_tests_bytearray_full_return (void);
460 void gi_marshalling_tests_bytearray_none_in (GByteArray* v);
461
462 /* GBytes */
463
464 GBytes *gi_marshalling_tests_gbytes_full_return (void);
465 void gi_marshalling_tests_gbytes_none_in (GBytes* v);
466
467 /* GStrv */
468
469 GStrv gi_marshalling_tests_gstrv_return (void);
470 void gi_marshalling_tests_gstrv_in (GStrv g_strv);
471 void gi_marshalling_tests_gstrv_out (GStrv *g_strv);
472 void gi_marshalling_tests_gstrv_inout (GStrv *g_strv);
473
474 /* GList */
475
476 GList *gi_marshalling_tests_glist_int_none_return (void);
477 GList *gi_marshalling_tests_glist_uint32_none_return (void);
478 GList *gi_marshalling_tests_glist_utf8_none_return (void);
479 GList *gi_marshalling_tests_glist_utf8_container_return (void);
480 GList *gi_marshalling_tests_glist_utf8_full_return (void);
481
482 void gi_marshalling_tests_glist_int_none_in (GList *list);
483 void gi_marshalling_tests_glist_uint32_none_in (GList *list);
484 void gi_marshalling_tests_glist_utf8_none_in (GList *list);
485
486 void gi_marshalling_tests_glist_utf8_none_out (GList **list);
487 void gi_marshalling_tests_glist_utf8_container_out (GList **list);
488 void gi_marshalling_tests_glist_utf8_full_out (GList **list);
489
490 void gi_marshalling_tests_glist_utf8_none_inout (GList **list);
491 void gi_marshalling_tests_glist_utf8_container_inout (GList **list);
492 void gi_marshalling_tests_glist_utf8_full_inout (GList **list);
493
494
495 /* GSList */
496
497 GSList *gi_marshalling_tests_gslist_int_none_return (void);
498 GSList *gi_marshalling_tests_gslist_utf8_none_return (void);
499 GSList *gi_marshalling_tests_gslist_utf8_container_return (void);
500 GSList *gi_marshalling_tests_gslist_utf8_full_return (void);
501
502 void gi_marshalling_tests_gslist_int_none_in (GSList *list);
503 void gi_marshalling_tests_gslist_utf8_none_in (GSList *list);
504
505 void gi_marshalling_tests_gslist_utf8_none_out (GSList **list);
506 void gi_marshalling_tests_gslist_utf8_container_out (GSList **list);
507 void gi_marshalling_tests_gslist_utf8_full_out (GSList **list);
508
509 void gi_marshalling_tests_gslist_utf8_none_inout (GSList **list);
510 void gi_marshalling_tests_gslist_utf8_container_inout (GSList **list);
511 void gi_marshalling_tests_gslist_utf8_full_inout (GSList **list);
512
513
514 /* GHashTable */
515
516 GHashTable *gi_marshalling_tests_ghashtable_int_none_return (void);
517 GHashTable *gi_marshalling_tests_ghashtable_utf8_none_return (void);
518 GHashTable *gi_marshalling_tests_ghashtable_utf8_container_return (void);
519 GHashTable *gi_marshalling_tests_ghashtable_utf8_full_return (void);
520
521 void gi_marshalling_tests_ghashtable_int_none_in (GHashTable *hash_table);
522 void gi_marshalling_tests_ghashtable_utf8_none_in (GHashTable *hash_table);
523 void gi_marshalling_tests_ghashtable_utf8_container_in (GHashTable *hash_table);
524 void gi_marshalling_tests_ghashtable_utf8_full_in (GHashTable *hash_table);
525
526 void gi_marshalling_tests_ghashtable_utf8_none_out (GHashTable **hash_table);
527 void gi_marshalling_tests_ghashtable_utf8_container_out (GHashTable **hash_table);
528 void gi_marshalling_tests_ghashtable_utf8_full_out (GHashTable **hash_table);
529
530 void gi_marshalling_tests_ghashtable_utf8_none_inout (GHashTable **hash_table);
531 void gi_marshalling_tests_ghashtable_utf8_container_inout (GHashTable **hash_table);
532 void gi_marshalling_tests_ghashtable_utf8_full_inout (GHashTable **hash_table);
533
534
535 /* GValue */
536
537 GValue *gi_marshalling_tests_gvalue_return (void);
538
539 void gi_marshalling_tests_gvalue_in (GValue *value);
540 void gi_marshalling_tests_gvalue_int64_in (GValue *value);
541 void gi_marshalling_tests_gvalue_in_with_type (GValue *value, GType type);
542
543 void gi_marshalling_tests_gvalue_in_enum (GValue *value);
544
545 void gi_marshalling_tests_gvalue_out (GValue **value);
546 void gi_marshalling_tests_gvalue_int64_out (GValue **value);
547 void gi_marshalling_tests_gvalue_out_caller_allocates (GValue *value);
548
549 void gi_marshalling_tests_gvalue_inout (GValue **value);
550
551 void gi_marshalling_tests_gvalue_flat_array (guint         n_values,
552                                              const GValue *values);
553
554 GValue *gi_marshalling_tests_return_gvalue_flat_array (void);
555
556 GValue *gi_marshalling_tests_gvalue_flat_array_round_trip (const GValue one,
557                                                            const GValue two,
558                                                            const GValue three);
559
560 /* GClosure */
561
562 void gi_marshalling_tests_gclosure_in (GClosure *closure);
563 GClosure *gi_marshalling_tests_gclosure_return (void);
564
565 /* Callback return values */
566
567 /**
568  * GIMarshallingTestsCallbackReturnValueOnly:
569  */
570 typedef glong (* GIMarshallingTestsCallbackReturnValueOnly) ();
571
572 glong gi_marshalling_tests_callback_return_value_only (GIMarshallingTestsCallbackReturnValueOnly callback);
573
574 /**
575  * GIMarshallingTestsCallbackOneOutParameter:
576  * @a: (out):
577  */
578 typedef void (* GIMarshallingTestsCallbackOneOutParameter) (gfloat *a);
579
580 void gi_marshalling_tests_callback_one_out_parameter (GIMarshallingTestsCallbackOneOutParameter  callback,
581                                                       gfloat                                    *a);
582
583 /**
584  * GIMarshallingTestsCallbackMultipleOutParameters:
585  * @a: (out):
586  * @b: (out):
587  */
588 typedef void (* GIMarshallingTestsCallbackMultipleOutParameters) (gfloat *a, gfloat *b);
589
590 void gi_marshalling_tests_callback_multiple_out_parameters (GIMarshallingTestsCallbackMultipleOutParameters  callback,
591                                                             gfloat                                          *a,
592                                                             gfloat                                          *b);
593
594 /**
595  * GIMarshallingTestsCallbackReturnValueAndOneOutParameter:
596  * @a: (out):
597  */
598 typedef glong (* GIMarshallingTestsCallbackReturnValueAndOneOutParameter) (glong *a);
599
600 glong gi_marshalling_tests_callback_return_value_and_one_out_parameter (GIMarshallingTestsCallbackReturnValueAndOneOutParameter  callback,
601                                                                         glong                                                   *a);
602
603 /**
604  * GIMarshallingTestsCallbackReturnValueAndMultipleOutParameters:
605  * @a: (out):
606  * @b: (out):
607  */
608 typedef glong (* GIMarshallingTestsCallbackReturnValueAndMultipleOutParameters) (glong *a, glong *b);
609
610 glong gi_marshalling_tests_callback_return_value_and_multiple_out_parameters (GIMarshallingTestsCallbackReturnValueAndMultipleOutParameters  callback,
611                                                                               glong                                                         *a,
612                                                                               glong                                                         *b);
613
614 /* Pointer */
615
616 gpointer gi_marshalling_tests_pointer_in_return (gpointer pointer);
617
618 /* Structure */
619
620 struct _GIMarshallingTestsSimpleStruct {
621     glong long_;
622     gint8 int8;
623 };
624
625 typedef struct {
626     GIMarshallingTestsSimpleStruct simple_struct;
627 } GIMarshallingTestsNestedStruct;
628
629 typedef struct {
630     GIMarshallingTestsNestedStruct *pointer;
631 } GIMarshallingTestsNotSimpleStruct;
632
633
634 GIMarshallingTestsSimpleStruct *gi_marshalling_tests_simple_struct_returnv (void);
635
636 void gi_marshalling_tests_simple_struct_inv (GIMarshallingTestsSimpleStruct *struct_);
637
638 void gi_marshalling_tests_simple_struct_method (GIMarshallingTestsSimpleStruct *struct_);
639
640
641 typedef struct {
642     glong long_;
643 } GIMarshallingTestsPointerStruct;
644
645 GType gi_marshalling_tests_pointer_struct_get_type (void) G_GNUC_CONST;
646
647 GIMarshallingTestsPointerStruct *gi_marshalling_tests_pointer_struct_returnv (void);
648
649 void gi_marshalling_tests_pointer_struct_inv (GIMarshallingTestsPointerStruct *struct_);
650
651 struct _GIMarshallingTestsBoxedStruct {
652     glong long_;
653     GStrv g_strv;
654 };
655
656 GType gi_marshalling_tests_boxed_struct_get_type (void) G_GNUC_CONST;
657
658 GIMarshallingTestsBoxedStruct *gi_marshalling_tests_boxed_struct_new (void);
659
660 GIMarshallingTestsBoxedStruct *gi_marshalling_tests_boxed_struct_returnv (void);
661
662 void gi_marshalling_tests_boxed_struct_inv (GIMarshallingTestsBoxedStruct *struct_);
663
664 void gi_marshalling_tests_boxed_struct_out (GIMarshallingTestsBoxedStruct **struct_);
665
666 void gi_marshalling_tests_boxed_struct_inout (GIMarshallingTestsBoxedStruct **struct_);
667
668 typedef union {
669     glong long_;
670 } GIMarshallingTestsUnion;
671
672 GType gi_marshalling_tests_union_get_type (void) G_GNUC_CONST;
673
674 GIMarshallingTestsUnion *gi_marshalling_tests_union_returnv (void);
675
676 void gi_marshalling_tests_union_inv (GIMarshallingTestsUnion *union_);
677
678 void gi_marshalling_tests_union_out (GIMarshallingTestsUnion **union_);
679
680 void gi_marshalling_tests_union_inout (GIMarshallingTestsUnion **union_);
681
682 void gi_marshalling_tests_union_method (GIMarshallingTestsUnion *union_);
683
684  /* Object */
685
686 #define GI_MARSHALLING_TESTS_TYPE_OBJECT             (gi_marshalling_tests_object_get_type ())
687 #define GI_MARSHALLING_TESTS_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_OBJECT, GIMarshallingTestsObject))
688 #define GI_MARSHALLING_TESTS_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_OBJECT, GIMarshallingTestsObjectClass))
689 #define GI_MARSHALLING_TESTS_IS_OBJECT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_OBJECT))
690 #define GI_MARSHALLING_TESTS_IS_OBJECT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_OBJECT))
691 #define GI_MARSHALLING_TESTS_OBJECT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_OBJECT, GIMarshallingTestsObjectClass))
692
693 typedef struct _GIMarshallingTestsObjectClass GIMarshallingTestsObjectClass;
694 typedef struct _GIMarshallingTestsObject GIMarshallingTestsObject;
695
696 typedef int (* GIMarshallingTestsCallbackIntInt) (int val, void *user_data);
697
698 struct _GIMarshallingTestsObjectClass
699 {
700         GObjectClass parent_class;
701
702     /**
703      * GIMarshallingTestsObjectClass::method_int8_in:
704      * @in: (in):
705      */
706     void (* method_int8_in) (GIMarshallingTestsObject *self, gint8 in);
707
708     /**
709      * GIMarshallingTestsObjectClass::method_int8_out:
710      * @out: (out):
711      */
712     void (* method_int8_out) (GIMarshallingTestsObject *self, gint8 *out);
713
714     /**
715      * GIMarshallingTestsObjectClass::method_int8_arg_and_out_caller:
716      * @out: (out caller-allocates):
717      */
718     void (* method_int8_arg_and_out_caller) (GIMarshallingTestsObject *self, gint8 arg, gint8 *out);
719
720     /**
721      * GIMarshallingTestsObjectClass::method_int8_arg_and_out_callee:
722      * @out: (out):
723      */
724     void (* method_int8_arg_and_out_callee) (GIMarshallingTestsObject *self, gint8 arg, gint8 **out);
725
726     /**
727      * GIMarshallingTestsObjectClass::method_str_arg_out_ret:
728      * @out: (out caller-allocates):
729      *
730      * Returns: (transfer none)
731      */
732     const gchar* (* method_str_arg_out_ret) (GIMarshallingTestsObject *self, const gchar* arg, guint *out);
733
734     /**
735      * GIMarshallingTestsObjectClass::method_with_default_implementation:
736      * @in: (in):
737      */
738     void (* method_with_default_implementation) (GIMarshallingTestsObject *self, gint8 in);
739
740     /**
741      * GIMarshallingTestsObjectClass::method_deep_hierarchy:
742      * @in: (in):
743      */
744     void (* method_deep_hierarchy) (GIMarshallingTestsObject *self, gint8 in);
745
746     void (* vfunc_with_callback) (GIMarshallingTestsObject *self,
747                                   GIMarshallingTestsCallbackIntInt callback,
748                                   void *callback_data);
749
750     /**
751      * GIMarshallingTestsObjectClass::vfunc_return_value_only:
752      */
753     glong (* vfunc_return_value_only) (GIMarshallingTestsObject *self);
754
755     /**
756      * GIMarshallingTestsObjectClass::vfunc_one_out_parameter:
757      * @a: (out):
758      */
759     void  (* vfunc_one_out_parameter) (GIMarshallingTestsObject *self, gfloat *a);
760
761     /**
762      * GIMarshallingTestsObjectClass::vfunc_multiple_out_parameters:
763      * @a: (out):
764      * @b: (out):
765      */
766     void  (* vfunc_multiple_out_parameters) (GIMarshallingTestsObject *self, gfloat *a, gfloat *b);
767
768     /**
769      * GIMarshallingTestsObjectClass::vfunc_caller_allocated_out_parameter:
770      * @a: (out):
771      */
772     void  (* vfunc_caller_allocated_out_parameter) (GIMarshallingTestsObject *self, GValue *a);
773
774     /**
775      * GIMarshallingTestsObjectClass::vfunc_return_value_and_one_out_parameter:
776      * @a: (out):
777      */
778     glong (* vfunc_return_value_and_one_out_parameter) (GIMarshallingTestsObject *self, glong *a);
779
780     /**
781      * GIMarshallingTestsObjectClass::vfunc_return_value_and_multiple_out_parameters:
782      * @a: (out):
783      * @b: (out):
784      */
785     glong (* vfunc_return_value_and_multiple_out_parameters) (GIMarshallingTestsObject *self, glong *a, glong *b);
786
787     /**
788      * GIMarshallingTestsObjectClass::vfunc_meth_with_err:
789      * @x:
790      * @error: A #GError
791      */
792     gboolean (*vfunc_meth_with_err) (GIMarshallingTestsObject *object, gint x, GError **error);
793 };
794
795 struct _GIMarshallingTestsObject
796 {
797         GObject parent_instance;
798
799     gint int_;
800 };
801
802 GType gi_marshalling_tests_object_get_type (void) G_GNUC_CONST;
803 void gi_marshalling_tests_object_static_method (void);
804 void gi_marshalling_tests_object_method (GIMarshallingTestsObject *object);
805 void gi_marshalling_tests_object_overridden_method (GIMarshallingTestsObject *object);
806 GIMarshallingTestsObject *gi_marshalling_tests_object_new (gint int_);
807
808 void gi_marshalling_tests_object_method_array_in (GIMarshallingTestsObject *object, const gint *ints, gint length);
809 void gi_marshalling_tests_object_method_array_out (GIMarshallingTestsObject *object, gint **ints, gint *length);
810 void gi_marshalling_tests_object_method_array_inout (GIMarshallingTestsObject *object, gint **ints, gint *length);
811 const gint *gi_marshalling_tests_object_method_array_return (GIMarshallingTestsObject *object, gint *length);
812
813 void gi_marshalling_tests_object_method_int8_in (GIMarshallingTestsObject *object, gint8 in);
814 void gi_marshalling_tests_object_method_int8_out (GIMarshallingTestsObject *object, gint8 *out);
815 void gi_marshalling_tests_object_method_int8_arg_and_out_caller (GIMarshallingTestsObject *object, gint8 arg, gint8 *out);
816 void gi_marshalling_tests_object_method_int8_arg_and_out_callee (GIMarshallingTestsObject *object, gint8 arg, gint8 **out);
817 const gchar* gi_marshalling_tests_object_method_str_arg_out_ret (GIMarshallingTestsObject *object, const gchar* arg, guint *out);
818 void gi_marshalling_tests_object_method_with_default_implementation (GIMarshallingTestsObject *object, gint8 in);
819 void gi_marshalling_tests_object_method_variant_array_in (GIMarshallingTestsObject *object, GVariant **in, gsize n_in);
820
821 glong gi_marshalling_tests_object_vfunc_return_value_only (GIMarshallingTestsObject *self);
822 void gi_marshalling_tests_object_vfunc_one_out_parameter (GIMarshallingTestsObject *self, gfloat *a);
823 void gi_marshalling_tests_object_vfunc_multiple_out_parameters (GIMarshallingTestsObject *self, gfloat *a, gfloat *b);
824 void gi_marshalling_tests_object_vfunc_caller_allocated_out_parameter (GIMarshallingTestsObject *self, GValue *a);
825 glong gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter (GIMarshallingTestsObject *self, glong *a);
826 glong gi_marshalling_tests_object_vfunc_return_value_and_multiple_out_parameters (GIMarshallingTestsObject *self, glong *a, glong *b);
827 gboolean gi_marshalling_tests_object_vfunc_meth_with_error (GIMarshallingTestsObject *object, gint x, GError **error);
828
829 GIMarshallingTestsObject *gi_marshalling_tests_object_none_return (void);
830 GIMarshallingTestsObject *gi_marshalling_tests_object_full_return (void);
831
832 void gi_marshalling_tests_object_none_in (GIMarshallingTestsObject *object);
833 void gi_marshalling_tests_object_full_in (GIMarshallingTestsObject *object);
834
835 void gi_marshalling_tests_object_none_out (GIMarshallingTestsObject **object);
836 void gi_marshalling_tests_object_full_out (GIMarshallingTestsObject **object);
837
838 void gi_marshalling_tests_object_none_inout (GIMarshallingTestsObject **object);
839 void gi_marshalling_tests_object_full_inout (GIMarshallingTestsObject **object);
840 void gi_marshalling_tests_object_inout_same (GIMarshallingTestsObject **object);
841
842 void gi_marshalling_tests_object_int8_in (GIMarshallingTestsObject *object, gint8 in);
843 void gi_marshalling_tests_object_int8_out (GIMarshallingTestsObject *object, gint8 *out);
844
845 void gi_marshalling_tests_object_vfunc_with_callback (GIMarshallingTestsObject *object,
846                                                       GIMarshallingTestsCallbackIntInt callback,
847                                                       void *callback_data);
848 void gi_marshalling_tests_object_call_vfunc_with_callback (GIMarshallingTestsObject *object);
849
850 #define GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT             (gi_marshalling_tests_sub_object_get_type ())
851 #define GI_MARSHALLING_TESTS_SUB_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT, GIMarshallingTestsSubObject))
852 #define GI_MARSHALLING_TESTS_SUB_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT, GIMarshallingTestsSubObjectClass))
853 #define GI_MARSHALLING_TESTS_IS_SUB_OBJECT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT))
854 #define GI_MARSHALLING_TESTS_IS_SUB_OBJECT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT))
855 #define GI_MARSHALLING_TESTS_SUB_OBJECT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT, GIMarshallingTestsSubObjectClass))
856
857 typedef struct _GIMarshallingTestsSubObjectClass GIMarshallingTestsSubObjectClass;
858 typedef struct _GIMarshallingTestsSubObject GIMarshallingTestsSubObject;
859
860 struct _GIMarshallingTestsSubObjectClass
861 {
862         GIMarshallingTestsObjectClass parent_class;
863 };
864
865 struct _GIMarshallingTestsSubObject
866 {
867         GIMarshallingTestsObject parent_instance;
868 };
869
870 GType gi_marshalling_tests_sub_object_get_type (void) G_GNUC_CONST;
871
872 void gi_marshalling_tests_sub_object_sub_method (GIMarshallingTestsSubObject *object);
873 void gi_marshalling_tests_sub_object_overwritten_method (GIMarshallingTestsSubObject *object);
874
875 #define GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT             (gi_marshalling_tests_sub_sub_object_get_type ())
876 #define GI_MARSHALLING_TESTS_SUB_SUB_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT, GIMarshallingTestsSubSubObject))
877 #define GI_MARSHALLING_TESTS_SUB_SUB_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT, GIMarshallingTestsSubSubObjectClass))
878 #define GI_MARSHALLING_TESTS_IS_SUB_SUB_OBJECT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT))
879 #define GI_MARSHALLING_TESTS_IS_SUB_SUB_OBJECT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT))
880 #define GI_MARSHALLING_TESTS_SUB_SUB_OBJECT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT, GIMarshallingTestsSubSubObjectClass))
881
882 typedef struct _GIMarshallingTestsSubSubObjectClass GIMarshallingTestsSubSubObjectClass;
883 typedef struct _GIMarshallingTestsSubSubObject GIMarshallingTestsSubSubObject;
884
885 struct _GIMarshallingTestsSubSubObjectClass
886 {
887         GIMarshallingTestsSubObjectClass parent_class;
888 };
889
890 struct _GIMarshallingTestsSubSubObject
891 {
892         GIMarshallingTestsSubObject parent_instance;
893 };
894
895 GType gi_marshalling_tests_sub_sub_object_get_type (void) G_GNUC_CONST;
896
897 /* Interfaces */
898
899 #define GI_MARSHALLING_TESTS_TYPE_INTERFACE              (gi_marshalling_tests_interface_get_type ())
900 #define GI_MARSHALLING_TESTS_INTERFACE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE, GIMarshallingTestsInterface))
901 #define GI_MARSHALLING_TESTS_IS_INTERFACE(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE))
902 #define GI_MARSHALLING_TESTS_INTERFACE_GET_IFACE(obj)    (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GI_MARSHALLING_TESTS_TYPE_INTERFACE, GIMarshallingTestsInterfaceIface))
903
904 typedef struct _GIMarshallingTestsInterface GIMarshallingTestsInterface;
905 typedef struct _GIMarshallingTestsInterfaceIface GIMarshallingTestsInterfaceIface;
906
907 struct _GIMarshallingTestsInterfaceIface {
908     GTypeInterface base_iface;
909
910     /**
911      * GIMarshallingTestsInterfaceIface::test_int8_in:
912      * @in: (in):
913      */
914     void (* test_int8_in) (GIMarshallingTestsInterface *self, gint8 in);
915 };
916
917 GType gi_marshalling_tests_interface_get_type (void) G_GNUC_CONST;
918
919 void gi_marshalling_tests_interface_test_int8_in (GIMarshallingTestsInterface *self, gint8 in);
920
921 void gi_marshalling_tests_test_interface_test_int8_in (GIMarshallingTestsInterface *test_iface, gint8 in);
922
923 /* GIMarshallingTestsInterface2 allows us testing vfunc clashes when a class'
924    vfunc implementation ambiguously relates to its prototype */
925
926 #define GI_MARSHALLING_TESTS_TYPE_INTERFACE2              (gi_marshalling_tests_interface2_get_type ())
927 #define GI_MARSHALLING_TESTS_INTERFACE2(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE2, GIMarshallingTestsInterface2))
928 #define GI_MARSHALLING_TESTS_IS_INTERFACE2(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE2))
929 #define GI_MARSHALLING_TESTS_INTERFACE2_GET_IFACE(obj)    (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GI_MARSHALLING_TESTS_TYPE_INTERFACE2, GIMarshallingTestsInterface2Iface))
930
931 typedef struct _GIMarshallingTestsInterface2 GIMarshallingTestsInterface2;
932 typedef struct _GIMarshallingTestsInterface2Iface GIMarshallingTestsInterface2Iface;
933
934 struct _GIMarshallingTestsInterface2Iface {
935     GTypeInterface base_iface;
936
937     /**
938      * GIMarshallingTestsInterface2Iface::test_int8_in:
939      * @in: (in):
940      */
941     void (* test_int8_in) (GIMarshallingTestsInterface2 *self, gint8 in);
942 };
943
944 GType gi_marshalling_tests_interface2_get_type (void) G_GNUC_CONST;
945
946 /* GIMarshallingTestsInterface3 tests passing arrays of variants from C to @lang */
947
948 #define GI_MARSHALLING_TESTS_TYPE_INTERFACE3              (gi_marshalling_tests_interface3_get_type ())
949 #define GI_MARSHALLING_TESTS_INTERFACE3(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE3, GIMarshallingTestsInterface3))
950 #define GI_MARSHALLING_TESTS_IS_INTERFACE3(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE3))
951 #define GI_MARSHALLING_TESTS_INTERFACE3_GET_IFACE(obj)    (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GI_MARSHALLING_TESTS_TYPE_INTERFACE3, GIMarshallingTestsInterface3Iface))
952
953 typedef struct _GIMarshallingTestsInterface3 GIMarshallingTestsInterface3;
954 typedef struct _GIMarshallingTestsInterface3Iface GIMarshallingTestsInterface3Iface;
955
956 struct _GIMarshallingTestsInterface3Iface {
957     GTypeInterface base_iface;
958  
959     /**
960      * GIMarshallingTestsInterface3::test_variant_array_in:
961      * @in: (in) (array length=n_in):
962      */
963     void (* test_variant_array_in) (GIMarshallingTestsInterface3 *self, GVariant **in, gsize n_in);
964 };
965
966 GType gi_marshalling_tests_interface3_get_type (void) G_GNUC_CONST;
967
968 void gi_marshalling_tests_interface3_test_variant_array_in (GIMarshallingTestsInterface3 *self, GVariant **in, gsize n_in);
969
970 /* Multiple output arguments */
971
972 void gi_marshalling_tests_int_out_out (gint *int0, gint *int1);
973 void gi_marshalling_tests_int_three_in_three_out(gint a, gint b, gint c,
974                                                  gint *out0, gint *out1, gint *out2);
975 gint gi_marshalling_tests_int_return_out (gint *int_);
976
977
978 /* GError */
979
980 #define GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN "gi-marshalling-tests-gerror-domain"
981 #define GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE 5
982 #define GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE "gi-marshalling-tests-gerror-message"
983 #define GI_MARSHALLING_TESTS_CONSTANT_GERROR_DEBUG_MESSAGE "we got an error, life is shit"
984
985 void gi_marshalling_tests_gerror(GError **error);
986 void gi_marshalling_tests_gerror_array_in(gint *in_ints, GError **error);
987 void gi_marshalling_tests_gerror_out(GError **error, gchar **debug);
988 void gi_marshalling_tests_gerror_out_transfer_none(GError **err, const gchar **debug);
989 GError *gi_marshalling_tests_gerror_return(void);
990
991 /* GParamSpec */
992 GParamSpec *gi_marshalling_tests_param_spec_return (void);
993 void gi_marshalling_tests_param_spec_out(GParamSpec **param);
994
995 /* Overrides */
996
997 #define GI_MARSHALLING_TESTS_OVERRIDES_CONSTANT 42
998
999
1000 typedef struct {
1001     glong long_;
1002 } GIMarshallingTestsOverridesStruct;
1003
1004 GType gi_marshalling_tests_overrides_struct_get_type (void) G_GNUC_CONST;
1005
1006 GIMarshallingTestsOverridesStruct *gi_marshalling_tests_overrides_struct_new (void);
1007
1008 glong gi_marshalling_tests_overrides_struct_method (GIMarshallingTestsOverridesStruct *struct_);
1009
1010 GIMarshallingTestsOverridesStruct *gi_marshalling_tests_overrides_struct_returnv (void);
1011
1012
1013 #define GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT             (gi_marshalling_tests_overrides_object_get_type ())
1014 #define GI_MARSHALLING_TESTS_OVERRIDES_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, GIMarshallingTestsOverridesObject))
1015 #define GI_MARSHALLING_TESTS_OVERRIDES_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, GIMarshallingTestsOverridesObjectClass))
1016 #define GI_MARSHALLING_TESTS_IS_OVERRIDES_OBJECT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT))
1017 #define GI_MARSHALLING_TESTS_IS_OVERRIDES_OBJECT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT))
1018 #define GI_MARSHALLING_TESTS_OVERRIDES_OBJECT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, GIMarshallingTestsOverridesObjectClass))
1019
1020 typedef struct _GIMarshallingTestsOverridesObjectClass GIMarshallingTestsOverridesObjectClass;
1021 typedef struct _GIMarshallingTestsOverridesObject GIMarshallingTestsOverridesObject;
1022
1023 struct _GIMarshallingTestsOverridesObjectClass
1024 {
1025     GObjectClass parent_class;
1026 };
1027
1028 struct _GIMarshallingTestsOverridesObject
1029 {
1030     GObject parent_instance;
1031
1032     glong long_;
1033 };
1034
1035 GType gi_marshalling_tests_overrides_object_get_type (void) G_GNUC_CONST;
1036
1037 GIMarshallingTestsOverridesObject *gi_marshalling_tests_overrides_object_new (void);
1038
1039 glong gi_marshalling_tests_overrides_object_method (GIMarshallingTestsOverridesObject *object);
1040
1041 GIMarshallingTestsOverridesObject *gi_marshalling_tests_overrides_object_returnv (void);
1042
1043 /* Properties Object */
1044
1045 #define GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT (gi_marshalling_tests_properties_object_get_type ())
1046 #define GI_MARSHALLING_TESTS_PROPERTIES_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT, GIMarshallingTestsPropertiesObject))
1047 #define GI_MARSHALLING_TESTS_PROPERTIES_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT, GIMarshallingTestsPropertiesObjectClass))
1048 #define GI_MARSHALLING_TESTS_IS_PROPERTIES_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT))
1049 #define GI_MARSHALLING_TESTS_IS_PROPERTIES_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT))
1050 #define GI_MARSHALLING_TESTS_PROPERTIES_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT, GIMarshallingTestsPropertiesObjectClass))
1051
1052 typedef struct _GIMarshallingTestsPropertiesObject GIMarshallingTestsPropertiesObject;
1053 typedef struct _GIMarshallingTestsPropertiesObjectClass GIMarshallingTestsPropertiesObjectClass;
1054
1055 struct _GIMarshallingTestsPropertiesObject {
1056     GObject parent_instance;
1057
1058     gboolean some_boolean;
1059     gchar some_char;
1060     guchar some_uchar;
1061     gint some_int;
1062     guint some_uint;
1063     glong some_long;
1064     gulong some_ulong;
1065     gint64 some_int64;
1066     guint64 some_uint64;
1067     gfloat some_float;
1068     gdouble some_double;
1069     gchar **some_strv;
1070     GIMarshallingTestsBoxedStruct* some_boxed_struct; 
1071     GVariant *some_variant;
1072 };
1073
1074 struct _GIMarshallingTestsPropertiesObjectClass {
1075     GObjectClass parent_class;
1076 };
1077
1078 GType gi_marshalling_tests_properties_object_get_type (void) G_GNUC_CONST;
1079
1080 GIMarshallingTestsPropertiesObject *gi_marshalling_tests_properties_object_new (void);
1081
1082 #endif /* _GI_MARSHALLING_TESTS_H_ */