diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2021-03-03 14:13:47 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2021-03-03 14:18:22 +0100 |
commit | e241d266caac2966bbfdf40ea29443e334a6aa47 (patch) | |
tree | fbada38425ac081695f6353de782b002cd501b44 /tests/gimarshallingtests.h | |
parent | 869bbfa6f47d128946313a8518a54ec085439a70 (diff) | |
download | gobject-introspection-e241d266caac2966bbfdf40ea29443e334a6aa47.tar.gz |
tests: Add "signals" test objectwip/carlosg/signal-tests
It is worth to test marshalling of signal arguments, add
a basic (and barebones) object to add signals and emission
methods to, so bindings can test the signal handlers.
Related: https://gitlab.gnome.org/GNOME/gjs/-/issues/377
Diffstat (limited to 'tests/gimarshallingtests.h')
-rw-r--r-- | tests/gimarshallingtests.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 5df1035e..c605c5a5 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -2049,4 +2049,38 @@ GType gi_marshalling_tests_properties_object_get_type (void) G_GNUC_CONST; _GI_TEST_EXTERN GIMarshallingTestsPropertiesObject *gi_marshalling_tests_properties_object_new (void); +/* Signals object */ + +#define GI_MARSHALLING_TESTS_TYPE_SIGNALS_OBJECT (gi_marshalling_tests_signals_object_get_type ()) +#define GI_MARSHALLING_TESTS_SIGNALS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_SIGNALS_OBJECT, GIMarshallingTestsSignalsObject)) +#define GI_MARSHALLING_TESTS_SIGNALS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_SIGNALS_OBJECT, GIMarshallingTestsSignalsObjectClass)) +#define GI_MARSHALLING_TESTS_IS_SIGNALS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_SIGNALS_OBJECT)) +#define GI_MARSHALLING_TESTS_IS_SIGNALS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_SIGNALS_OBJECT)) +#define GI_MARSHALLING_TESTS_SIGNALS_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_SIGNALS_OBJECT, GIMarshallingTestsSignalsObjectClass)) + +typedef struct _GIMarshallingTestsSignalsObject GIMarshallingTestsSignalsObject; +typedef struct _GIMarshallingTestsSignalsObjectClass GIMarshallingTestsSignalsObjectClass; + +struct _GIMarshallingTestsSignalsObject { + GObject parent_instance; +}; + +struct _GIMarshallingTestsSignalsObjectClass { + GObjectClass parent_class; +}; + + +_GI_TEST_EXTERN +GType gi_marshalling_tests_signals_object_get_type (void) G_GNUC_CONST; + + +_GI_TEST_EXTERN +GIMarshallingTestsSignalsObject *gi_marshalling_tests_signals_object_new (void); + +_GI_TEST_EXTERN +void gi_marshalling_tests_signals_object_emit_boxed_gptrarray_utf8 (GIMarshallingTestsSignalsObject *object); + +_GI_TEST_EXTERN +void gi_marshalling_tests_signals_object_emit_boxed_gptrarray_boxed_struct (GIMarshallingTestsSignalsObject *object); + #endif /* _GI_MARSHALLING_TESTS_H_ */ |