]> Dogcows Code - chaz/tint2/blob - src/taskbar/task.h
Fix for incorrect task cycling when windows visible on all desktops are present
[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 int tooltip_enabled;
48 } Global_task;
49
50
51
52 typedef struct {
53 // always start with area
54 Area area;
55
56 // TODO: group task with list of windows here
57 Window win;
58 int desktop;
59 int current_state;
60 Imlib_Image icon[TASK_STATE_COUNT];
61 Pixmap state_pix[TASK_STATE_COUNT];
62 unsigned int icon_width;
63 unsigned int icon_height;
64 char *title;
65 int urgent_tick;
66 } Task;
67
68
69 Task *add_task (Window win);
70 void remove_task (Task *tsk);
71
72 void draw_task (void *obj, cairo_t *c);
73 void on_change_task (void *obj);
74
75 void get_icon (Task *tsk);
76 int get_title(Task *tsk);
77 void active_task();
78 void set_task_state(Task* tsk, int state);
79 void set_task_redraw(Task* tsk);
80
81 Task *find_active_task(Task *current_task, Task *active_task);
82 Task *next_task (Task *tsk);
83 Task *prev_task (Task *tsk);
84
85 void add_urgent(Task *tsk);
86 void del_urgent(Task *tsk);
87
88 #endif
89
This page took 0.034067 seconds and 4 git commands to generate.