Ticket #1648: implemented single-line boxes.
[kaloumi3.git] / src / main.h
blob492dae765f64d15b5b4b7b5aca6426f88a4dcb48
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 "lib/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 const char *edit_one_file;
33 extern const char *view_one_file;
34 extern int mark_moves_down;
35 extern int auto_menu;
36 extern int pause_after_run;
37 extern int auto_save_setup;
38 extern int use_internal_view;
39 extern int use_internal_edit;
40 extern int fast_reload_w;
41 extern int clear_before_exec;
42 extern char *other_dir;
43 extern int mouse_move_pages;
45 extern int option_tab_spacing;
47 extern int quick_search_case_sensitive;
49 #ifdef HAVE_CHARSET
50 extern int source_codepage;
51 extern int default_source_codepage;
52 extern int display_codepage;
53 extern char* autodetect_codeset;
54 extern gboolean is_autodetect_codeset_enabled;
55 #else
56 extern int eight_bit_clean;
57 extern int full_eight_bits;
58 #endif /* !HAVE_CHARSET */
60 extern int utf8_display;
62 extern int fast_refresh;
63 extern int navigate_with_arrows;
64 extern int drop_menus;
65 extern int cd_symlinks;
66 extern int show_all_if_ambiguous;
67 extern int update_prompt; /* To comunicate with subshell */
68 extern int safe_delete;
69 extern int confirm_delete;
70 extern int confirm_directory_hotlist_delete;
71 extern int confirm_execute;
72 extern int confirm_exit;
73 extern int confirm_overwrite;
74 extern int confirm_history_cleanup;
75 extern int confirm_view_dir;
76 extern int boot_current_is_left;
77 extern int use_file_to_check_type;
78 extern int vfs_use_limit;
79 extern int only_leading_plus_minus;
80 extern int output_starts_shell;
81 extern int midnight_shutdown;
82 extern char *shell;
83 extern int auto_fill_mkdir_name;
84 /* Ugly hack in order to distinguish between left and right panel in menubar */
85 extern int is_right; /* If the selected menu was the right */
86 #define MENU_PANEL (is_right ? right_panel : left_panel)
87 #define MENU_PANEL_IDX (is_right ? 1 : 0)
88 #define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing)
90 #ifdef USE_INTERNAL_EDIT
91 extern GArray *editor_keymap;
92 extern GArray *editor_x_keymap;
93 #endif
94 extern GArray *viewer_keymap;
95 extern GArray *viewer_hex_keymap;
96 extern GArray *main_keymap;
97 extern GArray *main_x_keymap;
98 extern GArray *panel_keymap;
99 extern GArray *input_keymap;
100 extern GArray *tree_keymap;
101 extern GArray *help_keymap;
103 extern const global_keymap_t *panel_map;
104 extern const global_keymap_t *input_map;
105 extern const global_keymap_t *tree_map;
106 extern const global_keymap_t *help_map;
108 #ifdef HAVE_SUBSHELL_SUPPORT
109 void do_update_prompt (void);
110 int load_prompt (int fd, void *unused);
111 #endif
113 enum cd_enum {
114 cd_parse_command,
115 cd_exact
118 int do_cd (const char *new_dir, enum cd_enum cd_type); /* For find.c */
119 void sort_cmd (void);
120 void change_panel (void);
121 void save_cwds_stat (void);
122 void quiet_quit_cmd (void); /* For cmd.c and command.c */
124 void touch_bar (void);
125 void update_xterm_title_path (void);
126 void load_hint (int force);
128 void print_vfs_message(const char *msg, ...)
129 __attribute__ ((format (__printf__, 1, 2)));
131 extern const char *mc_prompt;
132 extern const char *edit_one_file;
133 extern char *mc_home;
134 extern char *mc_home_alt;
136 struct mc_fhl_struct;
137 extern struct mc_fhl_struct *mc_filehighlight;
139 char *get_mc_lib_dir (void);
141 void done_menu (void);
142 void init_menu (void);
144 char *remove_encoding_from_path (const char *);
146 struct WPanel;
148 void directory_history_add (struct WPanel *panel, const char *dir);
149 int do_panel_cd (struct WPanel *panel, const char *new_dir, enum cd_enum cd_type);
151 #endif /* MC_MAIN_H */