summaryrefslogtreecommitdiff
path: root/girepository
diff options
context:
space:
mode:
authorJohan Dahlin <jdahlin@litl.com>2011-08-13 11:21:05 -0300
committerJohan Dahlin <jdahlin@litl.com>2011-08-13 11:21:05 -0300
commitd7a2b1dc90bd61bcd0908c3fd8b124bb84ecc862 (patch)
treed151b1c18fdc4e334515f66725ecd8e853b6b00a /girepository
parent0d76fc0c49bbe4f1b0d1490e8e41d02db7c4bf4a (diff)
downloadgobject-introspection-d7a2b1dc90bd61bcd0908c3fd8b124bb84ecc862.tar.gz
Add signal flags
This adds all GSignalFlags into the gir. https://bugzilla.gnome.org/show_bug.cgi?id=656457
Diffstat (limited to 'girepository')
-rw-r--r--girepository/gdump.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/girepository/gdump.c b/girepository/gdump.c
index e607f323..aab067b6 100644
--- a/girepository/gdump.c
+++ b/girepository/gdump.c
@@ -166,9 +166,33 @@ dump_signals (GType type, GOutputStream *out)
sigid = sig_ids[i];
g_signal_query (sigid, &query);
- escaped_printf (out, " <signal name=\"%s\" return=\"%s\">\n",
+ escaped_printf (out, " <signal name=\"%s\" return=\"%s\"",
query.signal_name, g_type_name (query.return_type));
+ if (query.signal_flags & G_SIGNAL_RUN_FIRST)
+ escaped_printf (out, " when=\"first\"");
+ else if (query.signal_flags & G_SIGNAL_RUN_LAST)
+ escaped_printf (out, " when=\"last\"");
+ else if (query.signal_flags & G_SIGNAL_RUN_CLEANUP)
+ escaped_printf (out, " when=\"cleanup\"");
+#if GLIB_CHECK_VERSION(2, 29, 15)
+ else if (query.signal_flags & G_SIGNAL_MUST_COLLECT)
+ escaped_printf (out, " when=\"must-collect\"");
+#endif
+ if (query.signal_flags & G_SIGNAL_NO_RECURSE)
+ escaped_printf (out, " no-recurse=\"1\"");
+
+ if (query.signal_flags & G_SIGNAL_DETAILED)
+ escaped_printf (out, " detailed=\"1\"");
+
+ if (query.signal_flags & G_SIGNAL_ACTION)
+ escaped_printf (out, " action=\"1\"");
+
+ if (query.signal_flags & G_SIGNAL_NO_HOOKS)
+ escaped_printf (out, " no-hooks=\"1\"");
+
+ goutput_write (out, ">\n");
+
for (j = 0; j < query.n_params; j++)
{
escaped_printf (out, " <param type=\"%s\"/>\n",