vfs/vfs-impl.h: fixed missing includes
[free-mc.git] / src / keybind.h
blob3a771bf1c89e9c251de7eb2a0acc8fa08c9e83cb
2 #ifndef MC_KEYBIND_H
3 #define MC_KEYBIND_H
5 #include "global.h"
7 typedef struct name_keymap_t {
8 const char *name;
9 int val;
10 } name_keymap_t;
12 typedef struct key_config_t {
13 time_t mtime; /* mtime at the moment we read config file */
14 GArray *keymap;
15 GArray *ext_keymap;
16 gchar *labels[10];
17 } key_config_t;
19 /* The global keymaps are of this type */
20 #define KEYMAP_SHORTCUT_LENGTH 32 /* FIXME: is 32 bytes enough for shortcut? */
21 typedef struct global_keymap_t {
22 long key;
23 long command;
24 char caption[KEYMAP_SHORTCUT_LENGTH];
25 } global_keymap_t;
27 int lookup_action (const char *keyname);
28 void keybind_cmd_bind (GArray *keymap, const char *keybind, int action);
29 const char *lookup_keymap_shortcut (const global_keymap_t *keymap, int action);
31 /* viewer/actions_cmd.c */
32 extern const global_keymap_t default_viewer_keymap[];
33 extern const global_keymap_t default_viewer_hex_keymap[];
35 #ifdef USE_INTERNAL_EDIT
36 /* ../edit/editkey.c */
37 extern const global_keymap_t default_editor_keymap[];
38 extern const global_keymap_t default_editor_x_keymap[];
39 #endif
41 /* screen.c */
42 extern const global_keymap_t default_panel_keymap[];
44 /* widget.c */
45 extern const global_keymap_t default_input_keymap[];
47 /* main.c */
48 extern const global_keymap_t default_main_map[];
49 extern const global_keymap_t default_main_x_map[];
51 #endif /* MC_KEYBIND_H */