1 /*
2  * Copyright © 2013 Canonical Limited
3  * Copyright © 2016 Sébastien Wilmet
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the licence, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * Authors: Ryan Lortie <desrt@desrt.ca>
19  *          Sébastien Wilmet <swilmet@gnome.org>
20  */
21 
22 #ifndef __GTK_APPLICATION_ACCELS_H__
23 #define __GTK_APPLICATION_ACCELS_H__
24 
25 #include <gio/gio.h>
26 #include "gtkwindowprivate.h"
27 
28 G_BEGIN_DECLS
29 
30 #define GTK_TYPE_APPLICATION_ACCELS (gtk_application_accels_get_type ())
31 G_DECLARE_FINAL_TYPE (GtkApplicationAccels, gtk_application_accels,
32                       GTK, APPLICATION_ACCELS,
33                       GObject)
34 
35 GtkApplicationAccels *
36                 gtk_application_accels_new                          (void);
37 
38 void            gtk_application_accels_set_accels_for_action        (GtkApplicationAccels *accels,
39                                                                      const gchar          *detailed_action_name,
40                                                                      const gchar * const  *accelerators);
41 
42 gchar **        gtk_application_accels_get_accels_for_action        (GtkApplicationAccels *accels,
43                                                                      const gchar          *detailed_action_name);
44 
45 gchar **        gtk_application_accels_get_actions_for_accel        (GtkApplicationAccels *accels,
46                                                                      const gchar          *accel);
47 
48 gchar **        gtk_application_accels_list_action_descriptions     (GtkApplicationAccels *accels);
49 
50 void            gtk_application_accels_foreach_key                  (GtkApplicationAccels     *accels,
51                                                                      GtkWindow                *window,
52                                                                      GtkWindowKeysForeachFunc  callback,
53                                                                      gpointer                  user_data);
54 
55 gboolean        gtk_application_accels_activate                     (GtkApplicationAccels *accels,
56                                                                      GActionGroup         *action_group,
57                                                                      guint                 key,
58                                                                      GdkModifierType       modifier);
59 
60 G_END_DECLS
61 
62 #endif /* __GTK_APPLICATION_ACCELS_H__ */
63