]> Dogcows Code - chaz/tint2/blob - src/taskbar/task.h
rendering engine : _on_change_layout() called when pos/size changed
[chaz/tint2] / src / taskbar / task.h
1 /**************************************************************************
2 * task :
3 * -
4 *
5 **************************************************************************/
6
7 #ifndef TASK_H
8 #define TASK_H
9
10 #include <X11/Xlib.h>
11 #include <pango/pangocairo.h>
12 #include <Imlib2.h>
13 #include "common.h"
14 #include "timer.h"
15
16
17 enum { TASK_NORMAL, TASK_ACTIVE, TASK_ICONIFIED, TASK_URGENT, TASK_STATE_COUNT };
18 extern timeout* urgent_timeout;
19 extern GSList* urgent_list;
20
21 // --------------------------------------------------
22 // global task parameter
23 typedef struct {
24 Area area;
25
26 int text;
27 int icon;
28 int centered;
29
30 int icon_posy;
31 int icon_size1;
32 int maximum_width;
33 int maximum_height;
34 int alpha[TASK_STATE_COUNT];
35 int saturation[TASK_STATE_COUNT];
36 int brightness[TASK_STATE_COUNT];
37 int config_asb_mask;
38 Background* background[TASK_STATE_COUNT];
39 int config_background_mask;
40 // starting position for text ~ task_padding + task_border + icon_size
41 double text_posx, text_height;
42
43 int font_shadow;
44 PangoFontDescription *font_desc;
45 Color font[TASK_STATE_COUNT];
46 int config_font_mask;
47 } Global_task;
48
49
50
51 typedef struct {
52 // always start with area
53 Area area;
54
55 // TODO: group task with list of windows here
56 Window win;
57 int desktop;
58 int current_state;
59 Imlib_Image icon[TASK_STATE_COUNT];
60 Pixmap state_pix[TASK_STATE_COUNT];
61 unsigned int icon_width;
62 unsigned int icon_height;
63 char *title;
64 int urgent_tick;
65 } Task;
66
67
68 Task *add_task (Window win);
69 void remove_task (Task *tsk);
70
71 void draw_task (void *obj, cairo_t *c);
72 void on_change_task (void *obj);
73
74 void get_icon (Task *tsk);
75 void get_title(Task *tsk);
76 void active_task();
77 void set_task_state(Task* tsk, int state);
78 void set_task_redraw(Task* tsk);
79
80 Task *next_task (Task *tsk);
81 Task *prev_task (Task *tsk);
82
83 void add_urgent(Task *tsk);
84 void del_urgent(Task *tsk);
85
86 #endif
87
This page took 0.03359 seconds and 4 git commands to generate.