diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2016-08-22 15:39:02 +0100 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2016-08-23 11:51:13 +0100 |
commit | d3c204c77460f0142901dafb11a2252e098a2c59 (patch) | |
tree | 287749349b8e8dab0481edfda837bb5d56cd03af /gtk/gtkbindings.c | |
parent | 8f198718767202f2f4a171b83d02854077b817ef (diff) | |
download | gtk+-d3c204c77460f0142901dafb11a2252e098a2c59.tar.gz |
gtkbindings: Add an example for gtk_binding_entry_add_signal()
Otherwise the way the varargs are supposed to be used is completely
opaque.
https://bugzilla.gnome.org/show_bug.cgi?id=770236
Diffstat (limited to 'gtk/gtkbindings.c')
-rw-r--r-- | gtk/gtkbindings.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c index f71fcac335..a06a050a9b 100644 --- a/gtk/gtkbindings.c +++ b/gtk/gtkbindings.c @@ -993,6 +993,20 @@ _gtk_binding_entry_add_signall (GtkBindingSet *binding_set, * @binding_set. When the binding is activated, @signal_name will be * emitted on the target widget, with @n_args @Varargs used as * arguments. + * + * Each argument to the signal must be passed as a pair of varargs: the + * #GType of the argument, followed by the argument value (which must + * be of the given type). There must be @n_args pairs in total. + * + * ## Adding a Key Binding + * + * |[<!-- language="C" --> + * gtk_binding_entry_add_signal (binding_set, keyval, modmask, + * "move-cursor", 3, + * G_TYPE_ENUM, step, + * G_TYPE_INT, count, + * G_TYPE_BOOLEAN, FALSE); + * ]| */ void gtk_binding_entry_add_signal (GtkBindingSet *binding_set, |