blob: 4c70fba6f1f85f346dd942fc707771a7b1eacbea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
/** \file layout.h
* \brief Header: panel layout module
*/
#ifndef MC__LAYOUT_H
#define MC__LAYOUT_H
#include "lib/global.h"
#include "lib/widget.h"
#include "panel.h"
/*** typedefs(not structures) and defined constants **********************************************/
typedef enum
{
view_listing = 0, // Directory listing
view_info = 1, // Information panel
view_tree = 2, // Tree view
view_quick = 3, // Quick view
view_nothing = 4, // Undefined
} panel_view_mode_t;
/*** enums ***************************************************************************************/
/*** structures declarations (and typedefs of structures)*****************************************/
typedef struct
{
gboolean horizontal_split;
// vertical split
gboolean vertical_equal;
int left_panel_size;
// horizontal split
gboolean horizontal_equal;
int top_panel_size;
} panels_layout_t;
/*** global variables defined in .c file *********************************************************/
extern int output_lines;
extern gboolean command_prompt;
extern gboolean menubar_visible;
extern int output_start_y;
extern gboolean xterm_title;
extern gboolean free_space;
extern gboolean nice_rotating_dash;
extern int ok_to_refresh;
extern panels_layout_t panels_layout;
/*** declarations of public functions ************************************************************/
void layout_change (void);
void layout_box (void);
void panel_update_cols (Widget *widget, panel_display_t frame_size);
void setup_panels (void);
void panels_split_equal (void);
void panels_split_more (void);
void panels_split_less (void);
void destroy_panels (void);
void setup_cmdline (void);
void create_panel (int num, panel_view_mode_t type);
void swap_panels (void);
panel_view_mode_t get_panel_type (int idx);
MC_MOCKABLE panel_view_mode_t get_current_type (void);
panel_view_mode_t get_other_type (void);
int get_current_index (void);
int get_other_index (void);
const char *get_nth_panel_name (int num);
Widget *get_panel_widget (int idx);
WPanel *get_other_panel (void);
void save_panel_dir (int idx);
char *get_panel_dir_for (const WPanel *widget);
void set_hintbar (const char *str);
// Rotating dash routines
void use_dash (gboolean flag); // Disable/Enable rotate_dash routines
void rotate_dash (gboolean show);
#ifdef ENABLE_SUBSHELL
gboolean do_load_prompt (void);
int load_prompt (int fd, void *unused);
#endif
void update_xterm_title_path (void);
void update_terminal_cwd (void);
void title_path_prepare (char **path, char **login);
/*** inline functions ****************************************************************************/
#endif
|