1 #ifndef __GITESTTYPES_H__
2 #define __GITESTTYPES_H__
4 #include <glib-object.h>
8 gboolean test_boolean (gboolean in);
9 gint8 test_int8 (gint8 in);
10 guint8 test_uint8 (guint8 in);
11 gint16 test_int16 (gint16 in);
12 guint16 test_uint16 (guint16 in);
13 gint32 test_int32 (gint32 in);
14 guint32 test_uint32 (guint32 in);
15 gint64 test_int64 (gint64 in);
16 guint64 test_uint64 (guint64 in);
17 gshort test_short (gshort in);
18 gushort test_ushort (gushort in);
19 gint test_int (gint in);
20 guint test_uint (guint in);
21 glong test_long (glong in);
22 gulong test_ulong (gulong in);
23 gssize test_ssize (gssize in);
24 gsize test_size (gsize in);
25 gfloat test_float (gfloat in);
26 gdouble test_double (gdouble in);
27 time_t test_timet (time_t in);
28 GType test_gtype (GType in);
31 G_CONST_RETURN char *test_utf8_const_return (void);
32 char *test_utf8_nonconst_return (void);
33 void test_utf8_nonconst_in (char *in);
34 void test_utf8_const_in (const char *in);
35 void test_utf8_out (char **out);
36 void test_utf8_inout (char **inout);
37 GSList *test_filename_return (void);
39 /* multiple output arguments */
40 void test_multi_double_args (gdouble in, gdouble *one, gdouble *two);
41 void test_utf8_out_out (char **out0, char **out1);
42 char *test_utf8_out_nonconst_return (char **out);
46 gboolean test_strv_in (char **arr);
47 int test_array_int_in (int n_ints, int *ints);
48 void test_array_int_out (int *n_ints, int **ints);
49 void test_array_int_inout (int *n_ints, int **ints);
50 int test_array_gint8_in (int n_ints, gint8 *ints);
51 int test_array_gint16_in (int n_ints, gint16 *ints);
52 gint32 test_array_gint32_in (int n_ints, gint32 *ints);
53 gint64 test_array_gint64_in (int n_ints, gint64 *ints);
54 char *test_array_gtype_in (int n_types, GType *types);
55 char **test_strv_out_container (void);
56 char **test_strv_out (void);
57 const char * const * test_strv_out_c (void);
58 void test_strv_outarg (char ***retp);
59 int test_array_fixed_size_int_in (int *ints);
60 void test_array_fixed_size_int_out (int **ints);
61 int *test_array_fixed_size_int_return (void);
64 int test_array_int_in_take (int n_ints, int *ints);
65 gboolean test_strv_in_container (char **arr);
67 int *test_array_int_full_out(int *len);
68 int *test_array_int_none_out(int *len);
72 G_CONST_RETURN GList *test_glist_nothing_return (void);
73 GList *test_glist_nothing_return2 (void);
74 GList *test_glist_container_return (void);
75 GList *test_glist_everything_return (void);
76 void test_glist_nothing_in (const GList *in);
77 void test_glist_nothing_in2 (GList *in);
78 void test_glist_container_in (GList *in);
79 void test_glist_everything_in (GList *in);
80 void test_glist_free (GList *in);
83 G_CONST_RETURN GSList *test_gslist_nothing_return (void);
84 GSList *test_gslist_nothing_return2 (void);
85 GSList *test_gslist_container_return (void);
86 GSList *test_gslist_everything_return (void);
87 void test_gslist_nothing_in (const GSList *in);
88 void test_gslist_nothing_in2 (GSList *in);
89 void test_gslist_container_in (GSList *in);
90 void test_gslist_everything_in (GSList *in);
91 void test_gslist_free (GSList *in);
94 G_CONST_RETURN GHashTable *test_ghash_null_return (void);
95 G_CONST_RETURN GHashTable *test_ghash_nothing_return (void);
96 GHashTable *test_ghash_nothing_return2 (void);
97 GHashTable *test_ghash_container_return (void);
98 GHashTable *test_ghash_everything_return (void);
99 void test_ghash_null_in (const GHashTable *in);
100 void test_ghash_nothing_in (const GHashTable *in);
101 void test_ghash_nothing_in2 (GHashTable *in);
102 void test_ghash_container_in (GHashTable *in);
103 void test_ghash_everything_in (GHashTable *in);
104 void test_ghash_free (GHashTable *in);
105 GHashTable *test_ghash_nested_everything_return (void);
106 GHashTable *test_ghash_nested_everything_return2 (void);
111 int test_closure (GClosure *closure);
112 int test_closure_one_arg (GClosure *closure, int arg);
115 int test_int_value_arg(const GValue *v);
116 const GValue *test_value_return(int i);
134 GType test_enum_get_type (void) G_GNUC_CONST;
135 #define TEST_TYPE_ENUM (test_enum_get_type ())
136 GType test_flags_get_type (void) G_GNUC_CONST;
137 #define TES_TYPE_FLAGS (test_flags_get_type ())
139 const gchar * test_enum_param(TestEnum e);
142 typedef struct _TestStructA TestStructA;
143 typedef struct _TestStructB TestStructB;
153 void test_struct_a_clone (TestStructA *a,
159 TestStructA nested_a;
162 void test_struct_b_clone (TestStructB *b,
165 /* This one has a non-basic member */
172 /* plain-old-data boxed types */
173 typedef struct _TestSimpleBoxedA TestSimpleBoxedA;
174 typedef struct _TestSimpleBoxedB TestSimpleBoxedB;
176 struct _TestSimpleBoxedA
184 GType test_simple_boxed_a_get_type (void);
185 TestSimpleBoxedA * test_simple_boxed_a_copy (TestSimpleBoxedA *a);
186 gboolean test_simple_boxed_a_equals (TestSimpleBoxedA *a,
187 TestSimpleBoxedA *other_a);
188 const TestSimpleBoxedA *test_simple_boxed_a_const_return (void);
191 struct _TestSimpleBoxedB
194 TestSimpleBoxedA nested_a;
197 GType test_simple_boxed_b_get_type (void);
198 TestSimpleBoxedB *test_simple_boxed_b_copy (TestSimpleBoxedB *b);
201 #define TEST_TYPE_BOXED (test_boxed_get_type())
203 typedef struct _TestBoxed TestBoxed;
204 typedef struct _TestBoxedPrivate TestBoxedPrivate;
209 TestSimpleBoxedA nested_a;
211 TestBoxedPrivate *priv;
214 GType test_boxed_get_type (void);
215 TestBoxed *test_boxed_new (void);
216 TestBoxed *test_boxed_copy (TestBoxed *boxed);
217 gboolean test_boxed_equals (TestBoxed *boxed,
221 #define TEST_TYPE_OBJ (test_obj_get_type ())
222 #define TEST_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TEST_TYPE_OBJ, TestObj))
223 #define TEST_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TEST_TYPE_OBJ))
224 #define TEST_OBJ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TEST_TYPE_OBJ, TestObjClass))
226 typedef struct _TestObj TestObj;
227 typedef struct _TestObjClass TestObjClass;
231 * @bare: (allow-none):
235 GObject parent_instance;
243 GObjectClass parent_class;
245 int (*matrix) (TestObj *obj, const char *somestr);
248 guint test_signal_with_static_scope_arg;
251 GType test_obj_get_type (void);
252 TestObj* test_obj_new_from_file (const char *x, GError **error);
253 void test_obj_set_bare (TestObj *obj, GObject *bare);
254 int test_obj_instance_method (TestObj *obj);
255 double test_obj_static_method (int x);
258 int test_obj_do_matrix (TestObj *obj, const char *somestr);
261 #define TEST_TYPE_SUB_OBJ (test_sub_obj_get_type ())
262 #define TEST_SUB_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TEST_TYPE_SUB_OBJ, TestSubObj))
263 #define TEST_IS_SUB_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TEST_TYPE_SUB_OBJ))
264 #define TEST_SUB_OBJ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TEST_TYPE_SUB_OBJ, TestSubObjClass))
266 typedef struct _TestSubObj TestSubObj;
267 typedef struct _TestSubObjClass TestSubObjClass;
271 TestObj parent_instance;
274 struct _TestSubObjClass
276 TestObjClass parent_class;
279 GType test_sub_obj_get_type (void);
280 TestSubObj* test_sub_obj_new (void);
281 void test_sub_obj_unset_bare (TestSubObj *obj);
282 int test_sub_obj_instance_method (TestSubObj *obj);
285 typedef int (*TestCallback) ();
286 typedef int (*TestCallbackUserData) (gpointer user_data);
288 int test_callback (TestCallback callback);
289 int test_callback_user_data (TestCallbackUserData callback,
291 int test_callback_destroy_notify (TestCallbackUserData callback,
293 GDestroyNotify notify);
294 int test_callback_thaw_notifications (void);
296 void test_callback_async (TestCallbackUserData callback, gpointer user_data);
297 int test_callback_thaw_async (void);
299 int test_callback_infinite (TestCallbackUserData callback,
303 #define TEST_TYPE_INTERFACE (test_interface_get_type ())
304 #define TEST_INTERFACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TEST_TYPE_INTERFACE, TestInterface))
305 #define TEST_IS_INTERFACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TEST_TYPE_INTERFACE))
306 #define TEST_INTERFACE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TEST_TYPE_INTERFACE, TestInterfaceIface))
308 typedef struct _TestInterfaceIface TestInterfaceIface;
310 struct _TestInterfaceIface {
311 GTypeInterface base_iface;
314 GType test_interface_get_type (void) G_GNUC_CONST;
316 /* gobject with non-standard prefix */
317 #define TEST_TYPE_WI_802_1X (test_wi_802_1x_get_type ())
318 #define TEST_WI_802_1X(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TEST_TYPE_WI_802_1X, TestWi8021x))
319 #define TEST_IS_WI_802_1X(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TEST_TYPE_WI_802_1X))
320 #define TEST_WI_802_1X_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TEST_TYPE_WI_802_1X, TestWi8021xClass))
324 GObject parent_instance;
331 GObjectClass parent_class;
334 GType test_wi_802_1x_get_type (void);
335 TestWi8021x* test_wi_802_1x_new (void);
336 gboolean test_wi_802_1x_get_testbool (TestWi8021x *obj);
337 void test_wi_802_1x_set_testbool (TestWi8021x *obj, gboolean v);
338 int test_wi_802_1x_static_method (int x);
340 #endif /* __GITESTTYPES_H__ */