[gtk/wip/matthiasc/popup4: 14/57] window: Implement root mnemonic api



commit d726ecb091a568a9ec52d237543050249c242a4d
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 e462adaff8..ebbc8c9927 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -2399,6 +2399,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)
 {
@@ -2406,6 +2429,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]