1 /**************************************************************************
2 * Copyright (C) 2008 Pål Staurland (staura@gmail.com)
3 * Modified (C) 2008/2009 thierry lorthiois (lorthiois@bbsoft.fr)
6 * - draw panel and all objects according to panel_layout
9 **************************************************************************/
14 #include <pango/pangocairo.h>
21 #include "systraybar.h"
28 extern int signal_pending
;
29 // --------------------------------------------------
31 extern int mouse_middle
;
32 extern int mouse_right
;
33 extern int mouse_scroll_up
;
34 extern int mouse_scroll_down
;
35 extern int mouse_tilt_left
;
36 extern int mouse_tilt_right
;
39 enum { SINGLE_DESKTOP
=0, MULTI_DESKTOP
};
40 enum { BOTTOM_LAYER
, NORMAL_LAYER
, TOP_LAYER
};
41 extern int panel_mode
;
43 extern int panel_dock
;
44 extern int panel_layer
;
47 enum { LEFT
=0x01, RIGHT
=0x02, CENTER
=0X04, TOP
=0X08, BOTTOM
=0x10 };
48 extern int panel_position
;
49 extern int panel_horizontal
;
51 extern int panel_refresh
;
52 extern int task_dragged
;
55 enum { STRUT_MINIMUM
, STRUT_FOLLOW_SIZE
, STRUT_NONE
};
56 extern int panel_autohide
;
57 extern int panel_autohide_show_timeout
;
58 extern int panel_autohide_hide_timeout
;
59 extern int panel_autohide_height
; // for vertical panels this is of course the width
60 extern int panel_strut_policy
;
62 extern Task
*task_active
;
63 extern Task
*task_drag
;
64 extern int max_tick_urgent
;
66 extern GArray
* backgrounds
;
68 extern Imlib_Image default_icon
;
71 // tint2 use one panel per monitor and one taskbar per desktop.
73 // always start with area
74 // area.list own all objects of the panel according to config file
77 // --------------------------------------------------
82 // position relative to root window
85 int pourcentx
, pourcenty
;
86 // location of the panel (monitor number)
89 // --------------------------------------------------
90 // task and taskbar parameter per panel
91 Global_taskbar g_taskbar
;
94 // --------------------------------------------------
95 // taskbar point to the first taskbar in panel.area.list.
96 // number of tasbar == nb_desktop. taskbar[i] is for desktop(i).
97 // taskbar[i] is used to loop over taskbar,
98 // while panel->area.list is used to loop over all panel's objects
102 // --------------------------------------------------
106 // --------------------------------------------------
108 #ifdef ENABLE_BATTERY
114 int hidden_width
, hidden_height
;
115 Pixmap hidden_pixmap
;
116 timeout
* autohide_timeout
;
120 extern Panel panel_config
;
121 extern Panel
*panel1
;
124 // realloc panels according to number of monitor
125 // use panel_config as default value
128 void init_panel_size_and_position(Panel
*panel
);
129 void cleanup_panel();
130 void resize_panel(void *obj
);
132 void set_panel_properties(Panel
*p
);
133 void visible_object();
135 // draw background panel
136 void set_panel_background(Panel
*p
);
138 // detect witch panel
139 Panel
*get_panel(Window win
);
141 Taskbar
*click_taskbar (Panel
*panel
, int x
, int y
);
142 Task
*click_task (Panel
*panel
, int x
, int y
);
143 int click_padding(Panel
*panel
, int x
, int y
);
144 int click_clock(Panel
*panel
, int x
, int y
);
145 Area
* click_area(Panel
*panel
, int x
, int y
);
147 void autohide_trigger_show();
148 void autohide_trigger_hide();