From fd69f1cd794c775783120047f36e575dcc55b56a Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Mon, 2 Jul 2018 12:18:26 +0300 Subject: [PATCH] eventcontrollerkey: Document key-pressed and key-released None of the GtkEventControllerKey signals are documented; this commit adds documentation for a couple of them. --- gtk/gtkeventcontrollerkey.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gtk/gtkeventcontrollerkey.c b/gtk/gtkeventcontrollerkey.c index 0587101a63..394acbb6dd 100644 --- a/gtk/gtkeventcontrollerkey.c +++ b/gtk/gtkeventcontrollerkey.c @@ -166,12 +166,32 @@ gtk_event_controller_key_class_init (GtkEventControllerKeyClass *klass) object_class->finalize = gtk_event_controller_finalize; controller_class->handle_event = gtk_event_controller_key_handle_event; + /** + * GtkEventControllerKey::key-pressed: + * @controller: the object which received the signal. + * @keyval: the pressed key. + * @keycode: the raw code of the pressed key. + * @state: the bitmask, representing the state of modifier keys and pointer buttons. See #GdkModifierType. + * + * This signal is emitted whenever a key is pressed. + * + * Returns: %TRUE if the key press was handled, %FALSE otherwise. + */ signals[KEY_PRESSED] = g_signal_new (I_("key-pressed"), GTK_TYPE_EVENT_CONTROLLER_KEY, G_SIGNAL_RUN_LAST, 0, _gtk_boolean_handled_accumulator, NULL, NULL, G_TYPE_BOOLEAN, 3, G_TYPE_UINT, G_TYPE_UINT, GDK_TYPE_MODIFIER_TYPE); + /** + * GtkEventControllerKey::key-released: + * @controller: the object which received the signal. + * @keyval: the released key. + * @keycode: the raw code of the released key. + * @state: the bitmask, representing the state of modifier keys and pointer buttons. See #GdkModifierType. + * + * This signal is emitted whenever a key is released. + */ signals[KEY_RELEASED] = g_signal_new (I_("key-released"), GTK_TYPE_EVENT_CONTROLLER_KEY,