Refactoring of subshell support.
[midnight-commander.git] / src / filemanager / layout.h
bloba5c2292bbaa00f2321efe3d136e5780e834afef4
1 /** \file layout.h
2 * \brief Header: panel layout module
3 */
5 #ifndef MC__LAYOUT_H
6 #define MC__LAYOUT_H
8 #include "lib/global.h"
9 #include "lib/widget.h"
11 /*** typedefs(not structures) and defined constants **********************************************/
13 typedef enum
15 view_listing = 0, /* Directory listing */
16 view_info = 1, /* Information panel */
17 view_tree = 2, /* Tree view */
18 view_quick = 3, /* Quick view */
19 view_nothing = 4, /* Undefined */
20 } panel_view_mode_t;
22 /*** enums ***************************************************************************************/
24 /*** structures declarations (and typedefs of structures)*****************************************/
26 struct WPanel;
28 typedef struct
30 int horizontal_split;
32 /* vertical split */
33 int vertical_equal;
34 int left_panel_size;
36 /* horizontal split */
37 int horizontal_equal;
38 int top_panel_size;
39 } panels_layout_t;
41 /*** global variables defined in .c file *********************************************************/
43 extern int output_lines;
44 extern gboolean command_prompt;
45 extern int menubar_visible;
46 extern int output_start_y;
47 extern gboolean xterm_title;
48 extern int free_space;
49 extern int nice_rotating_dash;
51 extern panels_layout_t panels_layout;
53 /*** declarations of public functions ************************************************************/
54 void layout_change (void);
55 void layout_box (void);
56 void setup_panels (void);
57 void panels_split_equal (void);
58 void panels_split_more (void);
59 void panels_split_less (void);
60 void destroy_panels (void);
61 void setup_cmdline (void);
62 void set_display_type (int num, panel_view_mode_t type);
63 void swap_panels (void);
64 panel_view_mode_t get_display_type (int idx);
65 panel_view_mode_t get_current_type (void);
66 panel_view_mode_t get_other_type (void);
67 int get_current_index (void);
68 int get_other_index (void);
69 const char *get_nth_panel_name (int num);
71 struct Widget *get_panel_widget (int idx);
73 struct WPanel *get_other_panel (void);
75 void save_panel_dir (int idx);
76 char *get_panel_dir_for (const struct WPanel *widget);
78 void set_hintbar (const char *str);
80 /* Rotating dash routines */
81 void use_dash (gboolean flag); /* Disable/Enable rotate_dash routines */
82 void rotate_dash (void);
84 #ifdef ENABLE_SUBSHELL
85 gboolean do_load_prompt (void);
86 int load_prompt (int fd, void *unused);
87 #endif
89 void update_xterm_title_path (void);
91 void title_path_prepare (char **path, char **login);
93 /*** inline functions ****************************************************************************/
95 #endif /* MC__LAYOUT_H */