Ticket #1930: src/strutil8bit.c: fixed missing include of fs.h
[free-mc.git] / src / main.h
blob9c843fa829b97ae8bbd64b71a4f7995fcbd7db4a
2 /** \file main.h
3 * \brief Header: this is a main module header
4 */
6 #ifndef MC_MAIN_H
7 #define MC_MAIN_H
9 #include "global.h"
10 #include "keybind.h"
12 /* Toggling functions */
13 void toggle_fast_reload (void);
14 void toggle_mix_all_files (void);
15 void toggle_show_backup (void);
16 void toggle_show_hidden (void);
17 void toggle_kilobyte_si (void);
19 extern int quote;
20 extern volatile int quit;
22 /* If true, after executing a command, wait for a keystroke */
23 enum { pause_never, pause_on_dumb_terminals, pause_always };
25 void subshell_chdir (const char *command);
27 struct WButtonBar;
29 void midnight_set_buttonbar (struct WButtonBar *b);
31 /* See main.c for details on these variables */
32 extern int mark_moves_down;
33 extern int auto_menu;
34 extern int pause_after_run;
35 extern int auto_save_setup;
36 extern int use_internal_view;
37 extern int use_internal_edit;
38 extern int fast_reload_w;
39 extern int clear_before_exec;
40 extern char *other_dir;
41 extern int mouse_move_pages;
43 extern int option_tab_spacing;
45 #ifdef HAVE_CHARSET
46 extern int source_codepage;
47 extern int display_codepage;
48 #else
49 extern int eight_bit_clean;
50 extern int full_eight_bits;
51 #endif /* !HAVE_CHARSET */
53 extern int utf8_display;
55 extern int confirm_view_dir;
56 extern int fast_refresh;
57 extern int navigate_with_arrows;
58 extern int drop_menus;
59 extern int cd_symlinks;
60 extern int show_all_if_ambiguous;
61 extern int update_prompt; /* To comunicate with subshell */
62 extern int safe_delete;
63 extern int confirm_delete;
64 extern int confirm_directory_hotlist_delete;
65 extern int confirm_execute;
66 extern int confirm_exit;
67 extern int confirm_overwrite;
68 extern int boot_current_is_left;
69 extern int use_file_to_check_type;
70 extern int vfs_use_limit;
71 extern int only_leading_plus_minus;
72 extern int output_starts_shell;
73 extern int midnight_shutdown;
74 extern char *shell;
75 extern int auto_fill_mkdir_name;
76 /* Ugly hack in order to distinguish between left and right panel in menubar */
77 extern int is_right; /* If the selected menu was the right */
78 #define MENU_PANEL (is_right ? right_panel : left_panel)
79 #define MENU_PANEL_IDX (is_right ? 1 : 0)
80 #define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing)
82 #ifdef USE_INTERNAL_EDIT
83 extern GArray *editor_keymap;
84 extern GArray *editor_x_keymap;
85 #endif
86 extern GArray *viewer_keymap;
87 extern GArray *viewer_hex_keymap;
88 extern GArray *main_keymap;
89 extern GArray *main_x_keymap;
90 extern GArray *panel_keymap;
91 extern GArray *input_keymap;
92 extern GArray *tree_keymap;
93 extern GArray *help_keymap;
95 extern const global_keymap_t *panel_map;
96 extern const global_keymap_t *input_map;
97 extern const global_keymap_t *tree_map;
98 extern const global_keymap_t *help_map;
100 #ifdef HAVE_SUBSHELL_SUPPORT
101 void do_update_prompt (void);
102 #endif
104 enum cd_enum {
105 cd_parse_command,
106 cd_exact
109 int do_cd (const char *new_dir, enum cd_enum cd_type); /* For find.c */
110 void sort_cmd (void);
111 void change_panel (void);
112 int load_prompt (int, void *);
113 void save_cwds_stat (void);
114 void quiet_quit_cmd (void); /* For cmd.c and command.c */
116 void touch_bar (void);
117 void update_xterm_title_path (void);
118 void load_hint (int force);
120 void print_vfs_message(const char *msg, ...)
121 __attribute__ ((format (__printf__, 1, 2)));
123 extern const char *prompt;
124 extern const char *edit_one_file;
125 extern char *mc_home;
126 extern char *mc_home_alt;
128 struct mc_fhl_struct;
129 extern struct mc_fhl_struct *mc_filehighlight;
131 char *get_mc_lib_dir (void);
133 void done_menu (void);
134 void init_menu (void);
136 char *remove_encoding_from_path (const char *);
138 struct WPanel;
140 void directory_history_add (struct WPanel *panel, const char *dir);
141 int do_panel_cd (struct WPanel *panel, const char *new_dir, enum cd_enum cd_type);
143 #endif /* MC_MAIN_H */