summaryrefslogtreecommitdiff
path: root/gtk/gtkapplication.h
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-07-09 23:44:51 -0400
committerRyan Lortie <desrt@desrt.ca>2013-10-15 09:24:12 -0400
commit9a6ee36e9c5db83ce2e216a89706e547d73efd93 (patch)
tree2249f17440f8a7efb7e519664dc42886fb602acb /gtk/gtkapplication.h
parentafa8b0178fa57b49eb13aa4c4e3b460bcedcd9c9 (diff)
downloadgtk+-9a6ee36e9c5db83ce2e216a89706e547d73efd93.tar.gz
GtkApplication: a new approach to accels
Rework how accels are handled on GtkApplicationWindow. Instead of having GtkApplication fill the GtkAccelMap which is then used by GtkApplicationWindow to create a GtkAccelGroup filled with closures that is then associated with the window, do it directly. GtkApplication now keeps a list of accels and their actions. Accelerators on a GtkApplicationWindow ask GtkApplication to execute the appropriate action. This saves a fair bit of complexity and memory use (due to not having to create all those closures and accelmap entries). The new approach also supports multiple accels per action (although there is not yet a public API for it). This patch (and the ones before) Reviewed and ACK'd by Matthias Clasen.
Diffstat (limited to 'gtk/gtkapplication.h')
-rw-r--r--gtk/gtkapplication.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/gtk/gtkapplication.h b/gtk/gtkapplication.h
index 28eed3e3bb..ab2af65a27 100644
--- a/gtk/gtkapplication.h
+++ b/gtk/gtkapplication.h
@@ -127,7 +127,18 @@ GtkWindow * gtk_application_get_window_by_id (GtkApplication
GDK_AVAILABLE_IN_3_6
GtkWindow * gtk_application_get_active_window (GtkApplication *application);
+GDK_AVAILABLE_IN_3_10
+gchar ** gtk_application_list_action_descriptions (GtkApplication *application);
+
+GDK_AVAILABLE_IN_3_10
+gchar ** gtk_application_get_accels_for_action (GtkApplication *application,
+ const gchar *detailed_action_name);
+
+GDK_AVAILABLE_IN_3_10
+void gtk_application_set_accels_for_action (GtkApplication *application,
+ const gchar *detailed_action_name,
+ const gchar * const *accels);
+
G_END_DECLS
#endif /* __GTK_APPLICATION_H__ */
-