]> Dogcows Code - chaz/tint2/blob - src/panel.h
allow to choose the number of blink for 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 "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 extern int tick_urgent;
51 extern int max_tick_urgent;
52
53
54 typedef struct {
55 // always start with area
56 // area.list own all objects of the panel according to config file
57 Area area;
58
59 // --------------------------------------------------
60 // panel
61 Window main_win;
62 Pixmap temp_pmap;
63
64 // position relative to root window
65 int posx, posy;
66 int marginx, marginy;
67 float initial_width, initial_height;
68 int pourcentx, pourcenty;
69 // location of the panel (monitor number)
70 int monitor;
71
72 // --------------------------------------------------
73 // task and taskbar parameter per panel
74 Area g_taskbar;
75 Global_task g_task;
76
77 // --------------------------------------------------
78 // taskbar point to the first taskbar in panel.area.list.
79 // number of tasbar == nb_desktop
80 Taskbar *taskbar;
81 int nb_desktop;
82
83 // --------------------------------------------------
84 // clock
85 Clock clock;
86
87 // --------------------------------------------------
88 // battery
89 #ifdef ENABLE_BATTERY
90 Battery battery;
91 #endif
92 } Panel;
93
94
95 extern Panel *panel1;
96 extern int nb_panel;
97
98
99 void init_panel();
100 void cleanup_panel();
101 void resize_panel(void *obj);
102
103 void set_panel_properties(Panel *p);
104 void visible_object();
105
106 // draw background panel
107 void set_panel_background(Panel *p);
108
109 // detect witch panel
110 Panel *get_panel(Window win);
111
112 #endif
113
This page took 0.046551 seconds and 5 git commands to generate.