1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1998, 2001 Tim Janik
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
19 #ifndef __GTK_ACCEL_MAP_H__
20 #define __GTK_ACCEL_MAP_H__
23 #include <gtk/gtkaccelgroup.h>
28 /* --- notifier --- */
29 typedef void (*GtkAccelMapNotify) (gpointer data,
30 GQuark accel_path_quark,
33 GtkAccelGroup *accel_group,
35 guint old_accel_mods);
36 typedef void (*GtkAccelMapForeach) (gpointer data,
37 const gchar *accel_path,
43 /* --- public API --- */
44 GQuark gtk_accel_map_add_entry (const gchar *accel_path,
47 void gtk_accel_map_add_notifer (const gchar *accel_path,
49 GtkAccelMapNotify notify_func,
50 GtkAccelGroup *accel_group);
51 void gtk_accel_map_remove_notifer (const gchar *accel_path,
53 GtkAccelMapNotify notify_func);
54 GQuark gtk_accel_map_lookup_entry (const gchar *accel_path,
56 gboolean gtk_accel_map_change_entry (const gchar *accel_path,
58 GdkModifierType accel_mods,
60 void gtk_accel_map_load (const gchar *file_name);
61 void gtk_accel_map_save (const gchar *file_name);
62 void gtk_accel_map_foreach (gpointer data,
63 GtkAccelMapForeach foreach_func);
64 void gtk_accel_map_load_fd (gint fd);
65 void gtk_accel_map_load_scanner (GScanner *scanner);
66 void gtk_accel_map_save_fd (gint fd);
69 /* --- filter functions --- */
70 void gtk_accel_map_add_filter (const gchar *filter_pattern);
71 void gtk_accel_map_foreach_unfilterd (gpointer data,
72 GtkAccelMapForeach foreach_func);
75 /* --- internal API --- */
76 void _gtk_accel_map_init (void);
81 #endif /* __GTK_ACCEL_MAP_H__ */