]> Pileus Git - ~andy/gtk/blob - gtk/gtkaccelmap.h
added gtkaccelmap.sgml. other updates.
[~andy/gtk] / gtk / gtkaccelmap.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1998, 2001 Tim Janik
3  *
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.
8  *
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.
13  *
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.
18  */
19 #ifndef __GTK_ACCEL_MAP_H__
20 #define __GTK_ACCEL_MAP_H__
21
22
23 #include <gtk/gtkaccelgroup.h>
24
25 G_BEGIN_DECLS
26
27
28 /* --- notifier --- */
29 typedef void (*GtkAccelMapNotify)               (gpointer        data,
30                                                  GQuark          accel_path_quark,
31                                                  guint           accel_key,
32                                                  guint           accel_mods,
33                                                  GtkAccelGroup  *accel_group,
34                                                  guint           old_accel_key,
35                                                  guint           old_accel_mods);
36 typedef void (*GtkAccelMapForeach)              (gpointer        data,
37                                                  const gchar    *accel_path,
38                                                  guint           accel_key,
39                                                  guint           accel_mods,
40                                                  gboolean        changed);
41
42
43 /* --- public API --- */
44 GQuark     gtk_accel_map_add_entry      (const gchar            *accel_path,
45                                          guint                   accel_key,
46                                          guint                   accel_mods);
47 void       gtk_accel_map_add_notifer    (const gchar            *accel_path,
48                                          gpointer                notify_data,
49                                          GtkAccelMapNotify       notify_func,
50                                          GtkAccelGroup          *accel_group);
51 void       gtk_accel_map_remove_notifer (const gchar            *accel_path,
52                                          gpointer                notify_data,
53                                          GtkAccelMapNotify       notify_func);
54 GQuark     gtk_accel_map_lookup_entry   (const gchar            *accel_path,
55                                          GtkAccelKey            *key);
56 gboolean   gtk_accel_map_change_entry   (const gchar            *accel_path,
57                                          guint                   accel_key,
58                                          GdkModifierType         accel_mods,
59                                          gboolean                replace);
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);
67
68
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);
73
74
75 /* --- internal API --- */
76 void            _gtk_accel_map_init             (void);
77
78
79 G_END_DECLS
80
81 #endif /* __GTK_ACCEL_MAP_H__ */