[gobject-introspection] Add a test signal with an argument flagged as G_SIGNAL_TYPE_STATIC_SCOPE



commit e3bddab5ed270b208fbabbc06164dde675d8799e
Author: Johan Bilien <jobi litl com>
Date:   Tue Mar 24 11:12:38 2009 +0000

    Add a test signal with an argument flagged as G_SIGNAL_TYPE_STATIC_SCOPE
---
 tests/everything/everything.c |   14 ++++++++++++++
 tests/everything/everything.h |    1 +
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/tests/everything/everything.c b/tests/everything/everything.c
index c597f85..570b79c 100644
--- a/tests/everything/everything.c
+++ b/tests/everything/everything.c
@@ -800,6 +800,7 @@ test_obj_class_init (TestObjClass *klass)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
   GParamSpec *pspec;
+  GType param_types[1];
 
   klass->test_signal =
     g_signal_newv ("test",
@@ -813,6 +814,19 @@ test_obj_class_init (TestObjClass *klass)
                    0     /* n_params */,
                    NULL  /* param_types */);
 
+  param_types[0] = test_simple_boxed_a_get_type() | G_SIGNAL_TYPE_STATIC_SCOPE;
+  klass->test_signal_with_static_scope_arg =
+    g_signal_newv ("test-with-static-scope-arg",
+                   G_TYPE_FROM_CLASS (gobject_class),
+                   G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
+                   NULL /* closure */,
+                   NULL /* accumulator */,
+                   NULL /* accumulator data */,
+                   g_cclosure_marshal_VOID__BOXED,
+                   G_TYPE_NONE /* return_type */,
+                   1     /* n_params */,
+                   param_types);
+
   gobject_class->set_property = test_obj_set_property;
   gobject_class->get_property = test_obj_get_property;
   gobject_class->dispose = test_obj_dispose;
diff --git a/tests/everything/everything.h b/tests/everything/everything.h
index 2474566..df054ff 100644
--- a/tests/everything/everything.h
+++ b/tests/everything/everything.h
@@ -201,6 +201,7 @@ struct _TestObjClass
   int (*matrix) (TestObj *obj, const char *somestr);
 
   guint test_signal;
+  guint test_signal_with_static_scope_arg;
 };
 
 GType      test_obj_get_type (void);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]