1998-02-27 07:54:42 +03:00
|
|
|
#ifndef __MAIN_H
|
|
|
|
#define __MAIN_H
|
|
|
|
/* Toggling functions */
|
2002-01-17 10:17:54 +03:00
|
|
|
void toggle_fast_reload (void);
|
|
|
|
void toggle_mix_all_files (void);
|
1998-02-27 07:54:42 +03:00
|
|
|
void toggle_show_backup (void);
|
|
|
|
void toggle_show_hidden (void);
|
|
|
|
|
|
|
|
#define UP_OPTIMIZE 0
|
|
|
|
#define UP_RELOAD 1
|
|
|
|
#define UP_ONLY_CURRENT 2
|
|
|
|
|
2003-09-11 01:33:12 +04:00
|
|
|
#define UP_KEEPSEL ((char *) -1)
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
extern int quote;
|
|
|
|
extern volatile int quit;
|
|
|
|
|
2003-06-22 13:17:46 +04:00
|
|
|
/* If true, after executing a command, wait for a keystroke */
|
|
|
|
enum { pause_never, pause_on_dumb_terminals, pause_always };
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
void subshell_chdir (char *command);
|
|
|
|
|
|
|
|
/* See main.c for details on these variables */
|
|
|
|
extern int mark_moves_down;
|
|
|
|
extern int auto_menu;
|
|
|
|
extern int pause_after_run;
|
|
|
|
extern int auto_save_setup;
|
|
|
|
extern int use_internal_view;
|
|
|
|
extern int use_internal_edit;
|
|
|
|
extern int fast_reload_w;
|
|
|
|
extern int clear_before_exec;
|
|
|
|
extern int mou_auto_repeat;
|
|
|
|
extern char *other_dir;
|
|
|
|
extern int mouse_move_pages;
|
2001-06-06 02:49:15 +04:00
|
|
|
|
|
|
|
#ifdef HAVE_CHARSET
|
|
|
|
extern int source_codepage;
|
|
|
|
extern int display_codepage;
|
|
|
|
#else
|
1998-02-27 07:54:42 +03:00
|
|
|
extern int eight_bit_clean;
|
|
|
|
extern int full_eight_bits;
|
2001-06-26 01:36:38 +04:00
|
|
|
#endif /* !HAVE_CHARSET */
|
2001-06-06 02:49:15 +04:00
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
extern int confirm_view_dir;
|
|
|
|
extern int fast_refresh;
|
|
|
|
extern int navigate_with_arrows;
|
2001-09-08 08:06:03 +04:00
|
|
|
extern int force_ugly_line_drawing;
|
1998-02-27 07:54:42 +03:00
|
|
|
extern int drop_menus;
|
|
|
|
extern int cd_symlinks;
|
|
|
|
extern int show_all_if_ambiguous;
|
|
|
|
extern int slow_terminal;
|
|
|
|
extern int update_prompt; /* To comunicate with subshell */
|
|
|
|
extern int confirm_delete;
|
|
|
|
extern int confirm_execute;
|
|
|
|
extern int confirm_exit;
|
|
|
|
extern int confirm_overwrite;
|
|
|
|
extern int force_colors;
|
|
|
|
extern int boot_current_is_left;
|
|
|
|
extern int acs_vline;
|
|
|
|
extern int acs_hline;
|
|
|
|
extern int use_file_to_check_type;
|
|
|
|
extern int vfs_use_limit;
|
|
|
|
extern int alternate_plus_minus;
|
|
|
|
extern int only_leading_plus_minus;
|
|
|
|
extern int output_starts_shell;
|
|
|
|
extern int midnight_shutdown;
|
|
|
|
extern char cmd_buf [512];
|
2003-10-26 09:16:54 +03:00
|
|
|
extern char *shell;
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2002-11-15 09:38:55 +03:00
|
|
|
/* Ugly hack in order to distinguish between left and right panel in menubar */
|
1998-02-27 07:54:42 +03:00
|
|
|
extern int is_right; /* If the selected menu was the right */
|
|
|
|
#define MENU_PANEL (is_right ? right_panel : left_panel)
|
2002-11-15 09:38:55 +03:00
|
|
|
#define MENU_PANEL_IDX (is_right ? 1 : 0)
|
1998-02-27 07:54:42 +03:00
|
|
|
#define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing)
|
|
|
|
|
2004-08-16 08:20:56 +04:00
|
|
|
typedef void (*key_callback) (void);
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
/* The keymaps are of this type */
|
|
|
|
typedef struct {
|
|
|
|
int key_code;
|
|
|
|
key_callback fn;
|
|
|
|
} key_map;
|
|
|
|
|
1998-04-30 07:21:52 +04:00
|
|
|
void update_panels (int force_update, char *current_file);
|
1998-02-27 07:54:42 +03:00
|
|
|
void repaint_screen (void);
|
|
|
|
void do_update_prompt (void);
|
|
|
|
|
|
|
|
enum cd_enum {
|
|
|
|
cd_parse_command,
|
|
|
|
cd_exact
|
|
|
|
};
|
|
|
|
|
1998-04-17 04:21:53 +04:00
|
|
|
int do_cd (char *new_dir, enum cd_enum cd_type); /* For find.c */
|
|
|
|
void change_panel (void);
|
|
|
|
int load_prompt (int fd, void *unused);
|
1998-02-27 07:54:42 +03:00
|
|
|
void save_cwds_stat (void);
|
1998-04-17 04:21:53 +04:00
|
|
|
int quiet_quit_cmd (void); /* For cmd.c and command.c */
|
1998-02-27 07:54:42 +03:00
|
|
|
|
1998-04-17 04:21:53 +04:00
|
|
|
void touch_bar (void);
|
2002-12-26 19:10:45 +03:00
|
|
|
void update_xterm_title_path (void);
|
2003-02-05 11:37:21 +03:00
|
|
|
void load_hint (int force);
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2001-10-20 11:01:08 +04:00
|
|
|
void print_vfs_message(char *msg, ...)
|
|
|
|
__attribute__ ((format (printf, 1, 2)));
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
extern char *prompt;
|
|
|
|
extern char *mc_home;
|
2001-09-08 08:06:03 +04:00
|
|
|
char *get_mc_lib_dir (void);
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
int maybe_cd (int char_code, int move_up_dir);
|
|
|
|
void do_possible_cd (char *dir);
|
|
|
|
|
|
|
|
#ifdef WANT_WIDGETS
|
|
|
|
extern WButtonBar *the_bar;
|
|
|
|
extern WLabel *the_prompt;
|
|
|
|
extern WLabel *the_hint;
|
|
|
|
extern Dlg_head *midnight_dlg;
|
2002-11-11 10:35:08 +03:00
|
|
|
|
|
|
|
struct WMenu;
|
|
|
|
extern struct WMenu *the_menubar;
|
2001-06-26 01:36:38 +04:00
|
|
|
#endif /* WANT_WIDGETS */
|
1998-02-27 07:54:42 +03:00
|
|
|
|
1998-12-03 00:27:27 +03:00
|
|
|
void done_menu (void);
|
|
|
|
void init_menu (void);
|
|
|
|
|
2003-07-23 07:22:32 +04:00
|
|
|
#define MC_BASE "/.mc/"
|
1998-12-15 22:53:55 +03:00
|
|
|
|
2002-11-13 11:32:49 +03:00
|
|
|
struct WPanel;
|
2003-05-05 19:30:43 +04:00
|
|
|
void directory_history_add (struct WPanel *panel, const char *dir);
|
2002-11-13 11:32:49 +03:00
|
|
|
int do_panel_cd (struct WPanel *panel, char *new_dir, enum cd_enum cd_type);
|
2001-06-26 01:36:38 +04:00
|
|
|
|
|
|
|
#endif /* !__MAIN_H */
|