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
This commit is contained in:
Philip Withnall 2016-08-22 15:39:02 +01:00
parent 8f19871876
commit d3c204c774

View File

@ -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,