]> Pileus Git - ~andy/gtk/blob - gtk/gtkaccelmap.h
applied patch from owen to get rid of accel map notifiers. changed things
[~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 (*GtkAccelMapForeach)              (gpointer        data,
30                                                  const gchar    *accel_path,
31                                                  guint           accel_key,
32                                                  guint           accel_mods,
33                                                  gboolean        changed);
34
35
36 /* --- public API --- */
37 void       gtk_accel_map_add_entry      (const gchar            *accel_path,
38                                          guint                   accel_key,
39                                          guint                   accel_mods);
40 gboolean   gtk_accel_map_lookup_entry   (const gchar            *accel_path,
41                                          GtkAccelKey            *key);
42 gboolean   gtk_accel_map_change_entry   (const gchar            *accel_path,
43                                          guint                   accel_key,
44                                          GdkModifierType         accel_mods,
45                                          gboolean                replace);
46 void       gtk_accel_map_load           (const gchar            *file_name);
47 void       gtk_accel_map_save           (const gchar            *file_name);
48 void       gtk_accel_map_foreach        (gpointer                data,
49                                          GtkAccelMapForeach      foreach_func);
50 void       gtk_accel_map_load_fd        (gint                    fd);
51 void       gtk_accel_map_load_scanner   (GScanner               *scanner);
52 void       gtk_accel_map_save_fd        (gint                    fd);
53
54
55 /* --- filter functions --- */
56 void    gtk_accel_map_add_filter        (const gchar            *filter_pattern);
57 void    gtk_accel_map_foreach_unfilterd (gpointer                data,
58                                          GtkAccelMapForeach      foreach_func);
59
60
61 /* --- internal API --- */
62 void            _gtk_accel_map_init             (void);
63
64 void            _gtk_accel_map_add_group         (const gchar   *accel_path,
65                                                   GtkAccelGroup *accel_group);
66 void            _gtk_accel_map_remove_group      (const gchar   *accel_path,
67                                                   GtkAccelGroup *accel_group);
68 gboolean        _gtk_accel_path_is_valid         (const gchar   *accel_path);
69
70
71 G_END_DECLS
72
73 #endif /* __GTK_ACCEL_MAP_H__ */