Add Mooffie as author of new high-level mouse API.
[midnight-commander.git] / src / filemanager / layout.h
blob51108f34a70112b70dcf6b8d9e693bee988f0f31
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 #include "panel.h"
13 /*** typedefs(not structures) and defined constants **********************************************/
15 typedef enum
17 view_listing = 0, /* Directory listing */
18 view_info = 1, /* Information panel */
19 view_tree = 2, /* Tree view */
20 view_quick = 3, /* Quick view */
21 view_nothing = 4, /* Undefined */
22 } panel_view_mode_t;
24 /*** enums ***************************************************************************************/
26 /*** structures declarations (and typedefs of structures)*****************************************/
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 int ok_to_refresh;
53 extern panels_layout_t panels_layout;
55 /*** declarations of public functions ************************************************************/
56 void layout_change (void);
57 void layout_box (void);
58 void setup_panels (void);
59 void panels_split_equal (void);
60 void panels_split_more (void);
61 void panels_split_less (void);
62 void destroy_panels (void);
63 void setup_cmdline (void);
64 void set_display_type (int num, panel_view_mode_t type);
65 void swap_panels (void);
66 panel_view_mode_t get_display_type (int idx);
67 panel_view_mode_t get_current_type (void);
68 panel_view_mode_t get_other_type (void);
69 int get_current_index (void);
70 int get_other_index (void);
71 const char *get_nth_panel_name (int num);
73 Widget *get_panel_widget (int idx);
75 WPanel *get_other_panel (void);
77 void save_panel_dir (int idx);
78 char *get_panel_dir_for (const WPanel * widget);
80 void set_hintbar (const char *str);
82 /* Rotating dash routines */
83 void use_dash (gboolean flag); /* Disable/Enable rotate_dash routines */
84 void rotate_dash (gboolean show);
86 #ifdef ENABLE_SUBSHELL
87 gboolean do_load_prompt (void);
88 int load_prompt (int fd, void *unused);
89 #endif
91 void update_xterm_title_path (void);
93 void title_path_prepare (char **path, char **login);
95 /*** inline functions ****************************************************************************/
97 #endif /* MC__LAYOUT_H */