summaryrefslogtreecommitdiff
path: root/tests/scanner/annotation.c
diff options
context:
space:
mode:
authorJohan Dahlin <jdahlin@async.com.br>2009-01-12 23:54:48 +0000
committerJohan Dahlin <johan@src.gnome.org>2009-01-12 23:54:48 +0000
commit6de1b29629397bc7328f1a44da7530ea2ff53dac (patch)
treea3bbbe7e24b8fd51776d19592b007008cd900cea /tests/scanner/annotation.c
parent9256e916164ec557ed66f92a0d6d95bb286cdf8b (diff)
downloadgobject-introspection-6de1b29629397bc7328f1a44da7530ea2ff53dac.tar.gz
Bug 546739 – Introspection should know precise signal parameter types
2009-01-12 Johan Dahlin <jdahlin@async.com.br> Bug 546739 – Introspection should know precise signal parameter types * giscanner/annotationparser.py: * tests/scanner/annotation-1.0-expected.gir: * tests/scanner/annotation-1.0-expected.tgir: * tests/scanner/annotation.c (annotation_object_class_init): Annotations are parsed for signals, the (type) annotation is introduced. svn path=/trunk/; revision=1026
Diffstat (limited to 'tests/scanner/annotation.c')
-rw-r--r--tests/scanner/annotation.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/scanner/annotation.c b/tests/scanner/annotation.c
index 8239400e..98b3b061 100644
--- a/tests/scanner/annotation.c
+++ b/tests/scanner/annotation.c
@@ -4,9 +4,39 @@ static char backslash_parsing_tester = '\\';
G_DEFINE_TYPE (AnnotationObject, annotation_object, G_TYPE_OBJECT);
+enum {
+ STRING_SIGNAL,
+ LAST_SIGNAL
+};
+
+static guint annotation_object_signals[LAST_SIGNAL] = { 0 };
+
static void
annotation_object_class_init (AnnotationObjectClass *klass)
{
+ GObjectClass *gobject_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+
+ /**
+ * AnnotationObject::string-signal:
+ * @annotation: the annotation object
+ * @string: (type utf8): a string
+ *
+ * This is a signal which has a broken signal handler,
+ * it says it's pointer but it's actually a string.
+ *
+ * Since: 1.0
+ * Deprecated: 1.2: Use other-signal instead
+ */
+ annotation_object_signals[STRING_SIGNAL] =
+ g_signal_new ("string-signal",
+ G_OBJECT_CLASS_TYPE (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL,
+ (GSignalCMarshaller)g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
}