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