Converted README to markdown
[rox-filer.git] / ROX-Filer / src / panel.h
blob14480227f5bda6b2cac52b86cc5c7356baff6de6
1 /*
2 * ROX-Filer, filer for the ROX desktop project
3 * By Thomas Leonard, <tal197@users.sourceforge.net>.
4 */
6 #ifndef _PANEL_H
7 #define _PANEL_H
9 typedef enum {
10 PANEL_TOP,
11 PANEL_BOTTOM,
12 PANEL_LEFT,
13 PANEL_RIGHT,
15 PANEL_NUMBER_OF_SIDES, /* (goes after valid sides) */
17 PANEL_DEFAULT_SIDE /* Read from file, or use free side */
18 } PanelSide;
20 #define MENU_MARGIN(side) ((side) == PANEL_BOTTOM ? 32 : 8)
22 struct _Panel {
23 GtkWidget *window;
24 GtkAdjustment *adj; /* Scroll position of the bar */
25 PanelSide side;
26 guchar *name; /* Leaf name */
28 GtkWidget *before; /* Icons at the left/top end */
29 GtkWidget *after; /* Icons at the right/bottom end */
31 GtkWidget *gap; /* Event box between sides */
33 int autoscroll_to; /* Timeout */
34 int autoscroll_speed; /* 0 => not scrolling */
35 GdkRectangle geometry;
36 /* Options */
37 int style; /* Possible values defined in panel.c */
38 int width;
39 gboolean xinerama;
40 int monitor;
41 gboolean avoid;
44 extern Panel *current_panel[PANEL_NUMBER_OF_SIDES];
46 void panel_init(void);
47 Panel *panel_new(const gchar *name, PanelSide side);
48 void panel_icon_may_update(Icon *icon);
49 void panel_save(Panel *panel);
51 gboolean panel_add(PanelSide side,
52 const gchar *path, const gchar *label, gboolean after, const gchar *shortcut, const gchar *args,
53 gboolean locked);
54 gboolean panel_remove_item(PanelSide side, const gchar *path,
55 const gchar *label);
56 void panel_mark_used(GdkRegion *used);
57 void panel_update_size(void);
59 /* Side names here are English for implementation */
60 PanelSide panel_name_to_side(gchar *side);
61 const char *panel_side_to_name(PanelSide side);
63 GtkWidget *panel_new_panel_submenu(void);
65 #endif /* _PANEL_H */