[gtk/gtk-3-24] EventControllerKey: Add missing docs from master
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24] EventControllerKey: Add missing docs from master
- Date: Fri, 14 Dec 2018 23:23:34 +0000 (UTC)
commit 112645edf299942a86f8d42556c7c560beca42c2
Author: Daniel Boles <dboles src gmail com>
Date: Fri Dec 14 22:58:50 2018 +0000
EventControllerKey: Add missing docs from master
These never got backported, meaning a pretty useless documentation page.
We still need to add other missing bits, but let's sync these up first.
gtk/gtkeventcontrollerkey.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
---
diff --git a/gtk/gtkeventcontrollerkey.c b/gtk/gtkeventcontrollerkey.c
index b270efb9b8..2abc4c9726 100644
--- a/gtk/gtkeventcontrollerkey.c
+++ b/gtk/gtkeventcontrollerkey.c
@@ -17,6 +17,18 @@
* Author(s): Carlos Garnacho <carlosg gnome org>
*/
+/**
+ * SECTION:gtkeventcontrollerkey
+ * @Short_description: Event controller for key events
+ * @Title: GtkEventControllerKey
+ * @See_also: #GtkEventController
+ *
+ * #GtkEventControllerKey is an event controller meant for situations
+ * where you need access to key events.
+ *
+ * This object was added in 3.24.
+ **/
+
#include "config.h"
#include "gtkintl.h"
@@ -153,12 +165,37 @@ 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.
+ *
+ * Since: 3.24
+ */
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.
+ *
+ * Since: 3.24
+ */
signals[KEY_RELEASED] =
g_signal_new (I_("key-released"),
GTK_TYPE_EVENT_CONTROLLER_KEY,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]