summaryrefslogtreecommitdiff
path: root/gtk/gtkshortcuttrigger.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-08-16 03:59:24 +0200
committerMatthias Clasen <mclasen@redhat.com>2020-03-25 23:14:27 -0400
commitbde4cbe3772023df5ec24e4b2281a94b83af7048 (patch)
tree5f5be71035d0f03fb4bfab02d1e14c2d657e182b /gtk/gtkshortcuttrigger.h
parent0b7e74318b561456c1a3a13595bdf42287b15472 (diff)
downloadgtk+-bde4cbe3772023df5ec24e4b2281a94b83af7048.tar.gz
shortcuttrigger: Add support for mnemonics
Mnemonics need to be triggered with help from the controllers (who determine the modifiers). Support for that has been added, too. Mnemonics do not use this yet though.
Diffstat (limited to 'gtk/gtkshortcuttrigger.h')
-rw-r--r--gtk/gtkshortcuttrigger.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk/gtkshortcuttrigger.h b/gtk/gtkshortcuttrigger.h
index 2323bb0d13..c9b499e74d 100644
--- a/gtk/gtkshortcuttrigger.h
+++ b/gtk/gtkshortcuttrigger.h
@@ -37,6 +37,8 @@ G_BEGIN_DECLS
* @GTK_SHORTCUT_TRIGGER_NEVER: Never ever trigger
* @GTK_SHORTCUT_TRIGGER_KEYVAL: Trigger if a key event with matching
* modifiers and keyval is received.
+ * @GTK_SHORTCUT_TRIGGER_MNEMONIC: Trigger if a key event with matching
+ * keyval is received and mnemonics are enabled for this event.
* @GTK_SHORTCUT_TRIGGER_ALTERNAITVE: Trigger if either if two
* alternatives triggers
*
@@ -45,6 +47,7 @@ G_BEGIN_DECLS
typedef enum {
GTK_SHORTCUT_TRIGGER_NEVER,
GTK_SHORTCUT_TRIGGER_KEYVAL,
+ GTK_SHORTCUT_TRIGGER_MNEMONIC,
GTK_SHORTCUT_TRIGGER_ALTERNATIVE
} GtkShortcutTriggerType;
@@ -74,7 +77,8 @@ gboolean gtk_shortcut_trigger_print_label (GtkShortcutTrig
GDK_AVAILABLE_IN_ALL
gboolean gtk_shortcut_trigger_trigger (GtkShortcutTrigger *self,
- GdkEvent *event);
+ GdkEvent *event,
+ gboolean enable_mnemonics);
GDK_AVAILABLE_IN_ALL
GtkShortcutTrigger * gtk_never_trigger_get (void);
@@ -88,6 +92,11 @@ GDK_AVAILABLE_IN_ALL
guint gtk_keyval_trigger_get_keyval (GtkShortcutTrigger *self);
GDK_AVAILABLE_IN_ALL
+GtkShortcutTrigger * gtk_mnemonic_trigger_new (guint keyval);
+GDK_AVAILABLE_IN_ALL
+guint gtk_mnemonic_trigger_get_keyval (GtkShortcutTrigger *self);
+
+GDK_AVAILABLE_IN_ALL
GtkShortcutTrigger * gtk_alternative_trigger_new (GtkShortcutTrigger *one,
GtkShortcutTrigger *two);
GDK_AVAILABLE_IN_ALL