Synopsis#include <gtk/gtk.h> GtkAccelMap; void (*GtkAccelMapForeach) (gpointer data, const gchar *accel_path, guint accel_key, GdkModifierType accel_mods, gboolean changed); void gtk_accel_map_add_entry (const gchar *accel_path, guint accel_key, GdkModifierType accel_mods); gboolean gtk_accel_map_lookup_entry (const gchar *accel_path, GtkAccelKey *key); gboolean gtk_accel_map_change_entry (const gchar *accel_path, guint accel_key, GdkModifierType accel_mods, gboolean replace); void gtk_accel_map_load (const gchar *file_name); void gtk_accel_map_save (const gchar *file_name); void gtk_accel_map_foreach (gpointer data, GtkAccelMapForeach foreach_func); void gtk_accel_map_load_fd (gint fd); void gtk_accel_map_save_fd (gint fd); void gtk_accel_map_load_scanner (GScanner *scanner); void gtk_accel_map_add_filter (const gchar *filter_pattern); void gtk_accel_map_foreach_unfiltered (gpointer data, GtkAccelMapForeach foreach_func); GtkAccelMap* gtk_accel_map_get (void); void gtk_accel_map_lock_path (const gchar *accel_path); void gtk_accel_map_unlock_path (const gchar *accel_path); DetailsGtkAccelMapForeach ()void (*GtkAccelMapForeach) (gpointer data, const gchar *accel_path, guint accel_key, GdkModifierType accel_mods, gboolean changed);
gtk_accel_map_add_entry ()void gtk_accel_map_add_entry (const gchar *accel_path, guint accel_key, GdkModifierType accel_mods);
Registers a new accelerator with the global accelerator map.
This function should only be called once per
Note that
gtk_accel_map_lookup_entry ()gboolean gtk_accel_map_lookup_entry (const gchar *accel_path, GtkAccelKey *key);
Looks up the accelerator entry for
gtk_accel_map_change_entry ()gboolean gtk_accel_map_change_entry (const gchar *accel_path, guint accel_key, GdkModifierType accel_mods, gboolean replace);
Changes the
Note that
gtk_accel_map_load ()void gtk_accel_map_load (const gchar *file_name);
Parses a file previously saved with
gtk_accel_map_save ()void gtk_accel_map_save (const gchar *file_name);
Saves current accelerator specifications (accelerator path, key
and modifiers) to
gtk_accel_map_foreach ()void gtk_accel_map_foreach (gpointer data, GtkAccelMapForeach foreach_func);
Loops over the entries in the accelerator map whose accel path
doesn't match any of the filters added with
gtk_accel_map_load_fd ()void gtk_accel_map_load_fd (gint fd);
Filedescriptor variant of Note that the file descriptor will not be closed by this function.
gtk_accel_map_save_fd ()void gtk_accel_map_save_fd (gint fd);
Filedescriptor variant of Note that the file descriptor will not be closed by this function.
gtk_accel_map_load_scanner ()void gtk_accel_map_load_scanner (GScanner *scanner);
GScanner variant of
gtk_accel_map_add_filter ()void gtk_accel_map_add_filter (const gchar *filter_pattern); Adds a filter to the global list of accel path filters.
Accel map entries whose accel path matches one of the filters
are skipped by This function is intended for GTK+ modules that create their own menus, but don't want them to be saved into the applications accelerator map dump.
gtk_accel_map_foreach_unfiltered ()void gtk_accel_map_foreach_unfiltered (gpointer data, GtkAccelMapForeach foreach_func);
Loops over all entries in the accelerator map, and execute
gtk_accel_map_get ()GtkAccelMap* gtk_accel_map_get (void); Gets the singleton global GtkAccelMap object. This object is useful only for notification of changes to the accelerator map via the ::changed signal; it isn't a parameter to the other accelerator map functions.
Since 2.4 gtk_accel_map_lock_path ()void gtk_accel_map_lock_path (const gchar *accel_path);
Locks the given accelerator path. If the accelerator map doesn't yet contain
an entry for
Locking an accelerator path prevents its accelerator from being changed
during runtime. A locked accelerator path can be unlocked by
If called more than once, Note that locking of individual accelerator paths is independent from locking the GtkAccelGroup containing them. For runtime accelerator changes to be possible both the accelerator path and its GtkAccelGroup have to be unlocked.
Since 2.4 gtk_accel_map_unlock_path ()void gtk_accel_map_unlock_path (const gchar *accel_path);
Undoes the last call to
Since 2.4 Signal DetailsThe
|
|
the global accel map object |
|
the path of the accelerator that changed |
|
the key value for the new accelerator |
|
the modifier mask for the new accelerator |
|
user data set when the signal handler was connected. |
Since 2.4