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