[gtk/wip/otte/matthiasc/popup2: 19/92] window: Implement root mnemonic api



commit 5e1611d51f3ee34696b7239bb339582fc25316d1
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Mar 3 22:24:21 2019 -0500

    window: Implement root mnemonic api
    
    Hook up the root mnemonic api to the existing
    mnemonic machinery.

 gtk/gtkwindow.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 7897622194..7b2939415e 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -2445,6 +2445,29 @@ gtk_window_root_check_resize (GtkRoot *root)
   gtk_window_check_resize (GTK_WINDOW (root));
 }
 
+static void
+gtk_window_root_add_mnemonic (GtkRoot   *root,
+                              guint      keyval,
+                              GtkWidget *target)
+{
+  gtk_window_add_mnemonic (GTK_WINDOW (root), keyval, target);
+}
+
+static void
+gtk_window_root_remove_mnemonic (GtkRoot   *root,
+                                 guint      keyval,
+                                 GtkWidget *target)
+{
+  gtk_window_remove_mnemonic (GTK_WINDOW (root), keyval, target);
+}
+
+static gboolean
+gtk_window_root_activate_key (GtkRoot     *root,
+                              GdkEventKey *event)
+{
+  return gtk_window_activate_key (GTK_WINDOW (root), event);
+}
+
 static void
 gtk_window_root_interface_init (GtkRootInterface *iface)
 {
@@ -2452,6 +2475,9 @@ gtk_window_root_interface_init (GtkRootInterface *iface)
   iface->get_renderer = gtk_window_root_get_renderer;
   iface->get_surface_transform = gtk_window_root_get_surface_transform;
   iface->check_resize = gtk_window_root_check_resize;
+  iface->add_mnemonic = gtk_window_root_add_mnemonic;
+  iface->remove_mnemonic = gtk_window_root_remove_mnemonic;
+  iface->activate_key = gtk_window_root_activate_key;
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]