Details
gtk_accel_map_add_entry ()
Registers a new accelerator with the global accelerator map.
This function should only be called once per accel_path
with the canonical accel_key and accel_mods for this path.
To change the accelerator during runtime programatically, use
gtk_accel_map_change_entry().
The accelerator path must consist of "<WINDOWTYPE>/Category1/Category2/.../Action",
where <WINDOWTYPE> should be a unique application-specific identifier, that
corresponds to the kind of window the accelerator is being used in, e.g. "Gimp-Image",
"Abiword-Document" or "Gnumeric-Settings".
The Category1/.../Action portion is most appropriately chosen by the action the
accelerator triggers, i.e. for accelerators on menu items, choose the item's menu path,
e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All".
So a full valid accelerator path may look like:
"<Gimp-Toolbox>/File/Dialogs/Tool Options...".
gtk_accel_map_lookup_entry ()
Looks up the accelerator entry for accel_path and fills in key.
gtk_accel_map_change_entry ()
Changes the accel_key and accel_mods currently associated with accel_path.
Due to conflicts with other accelerators, a change may not always be possible,
replace indicates whether other accelerators may be deleted to resolve such
conflicts. A change will only occur if all conflicts could be resolved (which
might not be the case if conflicting accelerators are locked). Successful
changes are indicated by a TRUE return value.
gtk_accel_map_load ()
void gtk_accel_map_load (const gchar *file_name); |
Parses a file previously saved with gtk_accel_map_save() for
accelerator specifications, and propagates them accordingly.
gtk_accel_map_save ()
void gtk_accel_map_save (const gchar *file_name); |
Saves current accelerator specifications (accelerator path, key
and modifiers) to file_name.
The file is written in a format suitable to be read back in by
gtk_accel_map_load().
gtk_accel_map_foreach ()
Loops over the entries in the accelerator map whose accel path
doesn't match any of the filters added with gtk_accel_map_add_filter(),
and execute foreach_func on each. The signature of foreach_func is
that of GtkAccelMapForeach, the changed parameter indicates whether
this accelerator was changed during runtime (thus, would need
saving during an accelerator map dump).
gtk_accel_map_load_fd ()
void gtk_accel_map_load_fd (gint fd); |
Filedescriptor variant of gtk_accel_map_load().
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 gtk_accel_map_save().
Note that the file descriptor will not be closed by this function.
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 gtk_accel_map_foreach().
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 ()
Loops over all entries in the accelerator map, and execute
foreach_func on each. The signature of foreach_func is that of
GtkAccelMapForeach, the changed parameter indicates whether
this accelerator was changed during runtime (thus, would need
saving during an accelerator map dump).