summaryrefslogtreecommitdiffstats
path: root/src/filemanager/filemanager.h
blob: ca607ce8d9c955e5e0ae1d4efe117c1eccc0997f (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
/** \file filemanager.h
 *  \brief Header: main dialog (file panels) for Midnight Commander
 */

#ifndef MC__FILEMANAGER_H
#define MC__FILEMANAGER_H

#include "lib/widget.h"

#include "panel.h"
#include "layout.h"

/* TODO: merge content of layout.h here */

/*** typedefs(not structures) and defined constants **********************************************/

#define MENU_PANEL (mc_global.widget.is_right ? right_panel : left_panel)
#define MENU_PANEL_IDX  (mc_global.widget.is_right ? 1 : 0)
#define SELECTED_IS_PANEL (get_panel_type (MENU_PANEL_IDX) == view_listing)

#define other_panel get_other_panel()

/*** enums ***************************************************************************************/

/*** structures declarations (and typedefs of structures)*****************************************/

/*** global variables defined in .c file *********************************************************/

extern WMenuBar *the_menubar;
extern WLabel *the_prompt;
extern WLabel *the_hint;
extern WButtonBar *the_bar;

extern WPanel *left_panel;
extern WPanel *right_panel;
extern WPanel *current_panel;

extern const char *mc_prompt;

/*** declarations of public functions ************************************************************/

void update_menu (void);
void midnight_set_buttonbar (WButtonBar * b);
char *get_random_hint (gboolean force);
void load_hint (gboolean force);
WPanel *change_panel (void);
void save_cwds_stat (void);
gboolean quiet_quit_cmd (void);
gboolean do_nc (void);

/*** inline functions ****************************************************************************/

#endif /* MC__FILEMANAGER_H */