]> Dogcows Code - chaz/tint2/blob - src/panel.h
merge change described in issue 122 (by jackp)
[chaz/tint2] / src / panel.h
1 /**************************************************************************
2 * Copyright (C) 2008 Pål Staurland (staura@gmail.com)
3 * Modified (C) 2008/2009 thierry lorthiois (lorthiois@bbsoft.fr)
4 *
5 * panel :
6 * - draw panel and all objects according to panel_layout
7 *
8 *
9 **************************************************************************/
10
11 #ifndef PANEL_H
12 #define PANEL_H
13
14 #include <pango/pangocairo.h>
15 #include <sys/time.h>
16
17 #include "common.h"
18 #include "clock.h"
19 #include "task.h"
20 #include "taskbar.h"
21 #include "systraybar.h"
22
23 #ifdef ENABLE_BATTERY
24 #include "battery.h"
25 #endif
26
27
28 extern int signal_pending;
29 // --------------------------------------------------
30 // mouse events
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;
37
38 //panel mode
39 enum { SINGLE_DESKTOP=0, MULTI_DESKTOP };
40 extern int panel_mode;
41 extern int wm_menu;
42
43 //panel position
44 enum { LEFT=0x01, RIGHT=0x02, CENTER=0X04, TOP=0X08, BOTTOM=0x10 };
45 extern int panel_position;
46 extern int panel_horizontal;
47
48 extern int panel_refresh;
49
50 extern Task *task_active;
51 extern Task *task_drag;
52 extern Task *task_urgent;
53 extern int tick_urgent;
54 extern int max_tick_urgent;
55
56
57 typedef struct {
58 // always start with area
59 // area.list own all objects of the panel according to config file
60 Area area;
61
62 // --------------------------------------------------
63 // panel
64 Window main_win;
65 Pixmap temp_pmap;
66
67 // position relative to root window
68 int posx, posy;
69 int marginx, marginy;
70 float initial_width, initial_height;
71 int pourcentx, pourcenty;
72 // location of the panel (monitor number)
73 int monitor;
74
75 // --------------------------------------------------
76 // task and taskbar parameter per panel
77 Area g_taskbar;
78 Global_task g_task;
79
80 // --------------------------------------------------
81 // taskbar point to the first taskbar in panel.area.list.
82 // number of tasbar == nb_desktop
83 Taskbar *taskbar;
84 int nb_desktop;
85
86 // --------------------------------------------------
87 // clock
88 Clock clock;
89
90 // --------------------------------------------------
91 // battery
92 #ifdef ENABLE_BATTERY
93 Battery battery;
94 #endif
95 } Panel;
96
97
98 extern Panel *panel1;
99 extern int nb_panel;
100
101
102 void init_panel();
103 void cleanup_panel();
104 void resize_panel(void *obj);
105
106 void set_panel_properties(Panel *p);
107 void visible_object();
108
109 // draw background panel
110 void set_panel_background(Panel *p);
111
112 // detect witch panel
113 Panel *get_panel(Window win);
114
115 #endif
116
This page took 0.042979 seconds and 5 git commands to generate.