Fixed variable declarations and added missing includes.
[kaloumi3.git] / src / main.h
blob3ad59c1fc49141e59c699bae3765ce049d17d178
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 #ifdef HAVE_CHARSET
48 extern int source_codepage;
49 extern int default_source_codepage;
50 extern int display_codepage;
51 extern char* autodetect_codeset;
52 extern gboolean is_autodetect_codeset_enabled;
53 #else
54 extern int eight_bit_clean;
55 extern int full_eight_bits;
56 #endif /* !HAVE_CHARSET */
58 extern int utf8_display;
60 extern int fast_refresh;
61 extern int navigate_with_arrows;
62 extern int drop_menus;
63 extern int cd_symlinks;
64 extern int show_all_if_ambiguous;
65 extern int update_prompt; /* To comunicate with subshell */
66 extern int safe_delete;
67 extern int confirm_delete;
68 extern int confirm_directory_hotlist_delete;
69 extern int confirm_execute;
70 extern int confirm_exit;
71 extern int confirm_overwrite;
72 extern int confirm_history_cleanup;
73 extern int confirm_view_dir;
74 extern int boot_current_is_left;
75 extern int use_file_to_check_type;
76 extern int vfs_use_limit;
77 extern int only_leading_plus_minus;
78 extern int output_starts_shell;
79 extern int midnight_shutdown;
80 extern char *shell;
81 extern int auto_fill_mkdir_name;
82 /* Ugly hack in order to distinguish between left and right panel in menubar */
83 extern int is_right; /* If the selected menu was the right */
84 #define MENU_PANEL (is_right ? right_panel : left_panel)
85 #define MENU_PANEL_IDX (is_right ? 1 : 0)
86 #define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing)
88 #ifdef USE_INTERNAL_EDIT
89 extern GArray *editor_keymap;
90 extern GArray *editor_x_keymap;
91 #endif
92 extern GArray *viewer_keymap;
93 extern GArray *viewer_hex_keymap;
94 extern GArray *main_keymap;
95 extern GArray *main_x_keymap;
96 extern GArray *panel_keymap;
97 extern GArray *input_keymap;
98 extern GArray *tree_keymap;
99 extern GArray *help_keymap;
101 extern const global_keymap_t *panel_map;
102 extern const global_keymap_t *input_map;
103 extern const global_keymap_t *tree_map;
104 extern const global_keymap_t *help_map;
106 #ifdef HAVE_SUBSHELL_SUPPORT
107 void do_update_prompt (void);
108 int load_prompt (int fd, void *unused);
109 #endif
111 enum cd_enum {
112 cd_parse_command,
113 cd_exact
116 int do_cd (const char *new_dir, enum cd_enum cd_type); /* For find.c */
117 void sort_cmd (void);
118 void change_panel (void);
119 void save_cwds_stat (void);
120 void quiet_quit_cmd (void); /* For cmd.c and command.c */
122 void touch_bar (void);
123 void update_xterm_title_path (void);
124 void load_hint (int force);
126 void print_vfs_message(const char *msg, ...)
127 __attribute__ ((format (__printf__, 1, 2)));
129 extern const char *mc_prompt;
130 extern const char *edit_one_file;
131 extern char *mc_home;
132 extern char *mc_home_alt;
134 struct mc_fhl_struct;
135 extern struct mc_fhl_struct *mc_filehighlight;
137 char *get_mc_lib_dir (void);
139 void done_menu (void);
140 void init_menu (void);
142 char *remove_encoding_from_path (const char *);
144 struct WPanel;
146 void directory_history_add (struct WPanel *panel, const char *dir);
147 int do_panel_cd (struct WPanel *panel, const char *new_dir, enum cd_enum cd_type);
149 #endif /* MC_MAIN_H */