Add a test signal with an argument flagged as G_SIGNAL_TYPE_STATIC_SCOPE
authorJohan Bilien <jobi@litl.com>
Tue, 24 Mar 2009 11:12:38 +0000 (11:12 +0000)
committerJohan Bilien <jobi@litl.com>
Tue, 24 Mar 2009 11:12:38 +0000 (11:12 +0000)
tests/everything/everything.c
tests/everything/everything.h

index c597f85..570b79c 100644 (file)
@@ -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;
index 2474566..df054ff 100644 (file)
@@ -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);