]> Dogcows Code - chaz/tint2/blob - src/panel.h
fixed issue 46 and 59 : urgent task
[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 "battery.h"
18 #include "common.h"
19 #include "clock.h"
20 #include "task.h"
21 #include "taskbar.h"
22 #include "systraybar.h"
23
24
25
26 extern int signal_pending;
27 // --------------------------------------------------
28 // mouse events
29 extern int mouse_middle;
30 extern int mouse_right;
31 extern int mouse_scroll_up;
32 extern int mouse_scroll_down;
33
34 //panel mode
35 enum { SINGLE_DESKTOP=0, MULTI_DESKTOP, SINGLE_MONITOR };
36 extern int panel_mode;
37
38 //panel position
39 enum { LEFT=0x01, RIGHT=0x02, CENTER=0X04, TOP=0X08, BOTTOM=0x10 };
40 extern int panel_position;
41
42 extern int panel_refresh;
43
44 extern Task *task_active;
45 extern Task *task_drag;
46 extern Task *task_urgent;
47
48
49 typedef struct {
50 // always start with area
51 // area.list own all objects of the panel according to config file
52 Area area;
53
54 // --------------------------------------------------
55 // panel
56 Window main_win;
57 Pixmap temp_pmap;
58
59 // position relative to root window
60 int posx, posy;
61 int marginx, marginy;
62 float initial_width, initial_height;
63 int pourcentx, pourcenty;
64 // location of the panel (monitor number)
65 int monitor;
66
67 // --------------------------------------------------
68 // task and taskbar parameter per panel
69 Area g_taskbar;
70 Global_task g_task;
71
72 // --------------------------------------------------
73 // taskbar point to the first taskbar in panel.area.list.
74 // number of tasbar == nb_desktop
75 Taskbar *taskbar;
76 int nb_desktop;
77
78 // --------------------------------------------------
79 // clock
80 Clock clock;
81
82 // --------------------------------------------------
83 // battery
84 Battery battery;
85
86 } Panel;
87
88
89 extern Panel *panel1;
90 extern int nb_panel;
91
92
93 void init_panel();
94 void cleanup_panel();
95 void resize_panel(void *obj);
96
97 void set_panel_properties(Panel *p);
98 void visible_object();
99
100 // draw background panel
101 void set_panel_background(Panel *p);
102
103 // detect witch panel
104 Panel *get_panel(Window win);
105
106 #endif
107
This page took 0.040779 seconds and 5 git commands to generate.