summaryrefslogtreecommitdiff
path: root/gtk/gtkshortcutcontroller.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-08-13 16:02:27 +0200
committerMatthias Clasen <mclasen@redhat.com>2020-03-18 23:00:50 -0400
commitd4127fe0d4a8c373f3fc3fab38c04a12d97c16ad (patch)
treebf12dd2e238cbf7fc52fb9bc89c25db090282365 /gtk/gtkshortcutcontroller.h
parent22801f0d4dec20c65d0017fb44aad25c444e29b1 (diff)
downloadgtk+-d4127fe0d4a8c373f3fc3fab38c04a12d97c16ad.tar.gz
shortcutcontroller: Add GtkShortcutScope
Allow setting the scope for a controller. The scope determines at what point in event propagation the shortcuts will be activated. Local scope is the usual activation, global scope means that the root widget activates the shortcuts - ie they are activated at the very start of event propagation (for global capture events) or the very end (for global bubble events). Managed scope so far is unimplemented. This is supposed to be used to replace accelerators and mnemonics.
Diffstat (limited to 'gtk/gtkshortcutcontroller.h')
-rw-r--r--gtk/gtkshortcutcontroller.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk/gtkshortcutcontroller.h b/gtk/gtkshortcutcontroller.h
index e078e3241a..fea66f3455 100644
--- a/gtk/gtkshortcutcontroller.h
+++ b/gtk/gtkshortcutcontroller.h
@@ -46,10 +46,16 @@ GDK_AVAILABLE_IN_ALL
GtkEventController * gtk_shortcut_controller_new (void);
GDK_AVAILABLE_IN_ALL
-void gtk_shortcut_controller_add_shortcut (GtkShortcutController *controller,
+void gtk_shortcut_controller_set_scope (GtkShortcutController *self,
+ GtkShortcutScope scope);
+GDK_AVAILABLE_IN_ALL
+GtkShortcutScope gtk_shortcut_controller_get_scope (GtkShortcutController *self);
+
+GDK_AVAILABLE_IN_ALL
+void gtk_shortcut_controller_add_shortcut (GtkShortcutController *self,
GtkShortcut *shortcut);
GDK_AVAILABLE_IN_ALL
-void gtk_shortcut_controller_remove_shortcut (GtkShortcutController *controller,
+void gtk_shortcut_controller_remove_shortcut (GtkShortcutController *self,
GtkShortcut *shortcut);
G_END_DECLS