[gtk+] gtkbindings: Add an example for gtk_binding_entry_add_signal()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkbindings: Add an example for gtk_binding_entry_add_signal()
- Date: Tue, 23 Aug 2016 10:51:23 +0000 (UTC)
commit d3c204c77460f0142901dafb11a2252e098a2c59
Author: Philip Withnall <philip withnall collabora co uk>
Date: Mon Aug 22 15:39:02 2016 +0100
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
gtk/gtkbindings.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c
index f71fcac..a06a050 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]