src/layout.c: fixed missin case statement in set_display_type()
[free-mc.git] / src / main.h
blob2996259770256d4106d14bbf2a8da2500b35c849
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 /* run mode and params */
13 typedef enum
15 MC_RUN_FULL = 0,
16 MC_RUN_EDITOR,
17 MC_RUN_VIEWER,
18 MC_RUN_DIFFVIEWER
19 } mc_run_mode_t;
21 extern mc_run_mode_t mc_run_mode;
23 * MC_RUN_FULL: dir for left panel
24 * MC_RUN_EDITOR: file to edit
25 * MC_RUN_VIEWER: file to view
26 * MC_RUN_DIFFVIEWER: first file to compare
28 extern char *mc_run_param0;
30 * MC_RUN_FULL: dir for right panel
31 * MC_RUN_EDITOR: unused
32 * MC_RUN_VIEWER: unused
33 * MC_RUN_DIFFVIEWER: second file to compare
35 extern char *mc_run_param1;
37 void toggle_show_hidden (void);
39 extern int quote;
40 extern volatile int quit;
42 /* If true, after executing a command, wait for a keystroke */
43 enum { pause_never, pause_on_dumb_terminals, pause_always };
45 void subshell_chdir (const char *command);
47 struct WButtonBar;
49 void midnight_set_buttonbar (struct WButtonBar *b);
51 /* See main.c for details on these variables */
52 extern int auto_menu;
53 extern int pause_after_run;
54 extern int auto_save_setup;
55 extern int use_internal_view;
56 extern int use_internal_edit;
57 extern int clear_before_exec;
59 #ifdef HAVE_CHARSET
60 extern int source_codepage;
61 extern int default_source_codepage;
62 extern int display_codepage;
63 extern char *autodetect_codeset;
64 extern gboolean is_autodetect_codeset_enabled;
65 #else
66 extern int eight_bit_clean;
67 extern int full_eight_bits;
68 #endif /* !HAVE_CHARSET */
70 extern char *clipboard_store_path;
71 extern char *clipboard_paste_path;
73 extern int utf8_display;
75 extern int fast_refresh;
76 extern int drop_menus;
77 extern int cd_symlinks;
78 extern int show_all_if_ambiguous;
79 extern int update_prompt; /* To comunicate with subshell */
80 extern int safe_delete;
81 extern int confirm_delete;
82 extern int confirm_directory_hotlist_delete;
83 extern int confirm_execute;
84 extern int confirm_exit;
85 extern int confirm_overwrite;
86 extern int confirm_history_cleanup;
87 extern int confirm_view_dir;
88 extern int boot_current_is_left;
89 extern int use_file_to_check_type;
90 extern int vfs_use_limit;
91 extern int only_leading_plus_minus;
92 extern int output_starts_shell;
93 extern int midnight_shutdown;
94 extern char *shell;
95 extern int auto_fill_mkdir_name;
96 /* Ugly hack in order to distinguish between left and right panel in menubar */
97 extern int is_right; /* If the selected menu was the right */
98 #define MENU_PANEL (is_right ? right_panel : left_panel)
99 #define MENU_PANEL_IDX (is_right ? 1 : 0)
100 #define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing)
102 #ifdef HAVE_SUBSHELL_SUPPORT
103 void do_update_prompt (void);
104 int load_prompt (int fd, void *unused);
105 #endif
107 enum cd_enum
109 cd_parse_command,
110 cd_exact
113 int do_cd (const char *new_dir, enum cd_enum cd_type); /* For find.c */
114 void sort_cmd (void);
115 void change_panel (void);
116 void save_cwds_stat (void);
117 gboolean quiet_quit_cmd (void); /* For cmd.c and command.c */
119 void touch_bar (void);
120 void update_xterm_title_path (void);
121 void load_hint (int force);
123 void print_vfs_message (const char *msg, ...) __attribute__ ((format (__printf__, 1, 2)));
125 extern const char *mc_prompt;
126 extern char *mc_home;
127 extern char *mc_home_alt;
129 struct mc_fhl_struct;
130 extern struct mc_fhl_struct *mc_filehighlight;
132 char *get_mc_lib_dir (void);
134 void done_menu (void);
135 void init_menu (void);
137 char *remove_encoding_from_path (const char *);
139 struct WPanel;
141 void directory_history_add (struct WPanel *panel, const char *dir);
142 int do_panel_cd (struct WPanel *panel, const char *new_dir, enum cd_enum cd_type);
144 #endif /* MC_MAIN_H */