2008-10-02 18:47:02 +00:00
|
|
|
/**************************************************************************
|
2009-01-17 14:07:56 +00:00
|
|
|
* task :
|
|
|
|
* -
|
2008-10-02 18:47:02 +00:00
|
|
|
*
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
#ifndef TASK_H
|
|
|
|
#define TASK_H
|
|
|
|
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <pango/pangocairo.h>
|
2009-08-28 12:14:45 +00:00
|
|
|
#include <Imlib2.h>
|
2008-10-02 18:47:02 +00:00
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------
|
|
|
|
// global task parameter
|
|
|
|
typedef struct {
|
2009-07-26 13:46:50 +00:00
|
|
|
Area area;
|
|
|
|
|
|
|
|
int text;
|
|
|
|
int icon;
|
|
|
|
int centered;
|
|
|
|
|
|
|
|
int icon_posy;
|
|
|
|
int icon_size1;
|
|
|
|
int maximum_width;
|
|
|
|
int maximum_height;
|
2009-09-19 20:56:15 +00:00
|
|
|
int alpha, saturation, brightness;
|
|
|
|
int alpha_active, saturation_active, brightness_active;
|
2009-07-26 13:46:50 +00:00
|
|
|
// starting position for text ~ task_padding + task_border + icon_size
|
|
|
|
double text_posx, text_posy;
|
|
|
|
|
|
|
|
int font_shadow;
|
|
|
|
PangoFontDescription *font_desc;
|
|
|
|
config_color font;
|
|
|
|
config_color font_active;
|
2008-10-02 18:47:02 +00:00
|
|
|
} Global_task;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2009-07-26 13:46:50 +00:00
|
|
|
// always start with area
|
|
|
|
Area area;
|
|
|
|
|
|
|
|
// TODO: group task with list of windows here
|
|
|
|
Window win;
|
|
|
|
int desktop;
|
2009-09-19 20:56:15 +00:00
|
|
|
Imlib_Image icon;
|
|
|
|
Imlib_Image icon_active;
|
2009-09-01 15:56:52 +00:00
|
|
|
unsigned int icon_width;
|
|
|
|
unsigned int icon_height;
|
2009-07-26 13:46:50 +00:00
|
|
|
char *title;
|
2008-10-02 18:47:02 +00:00
|
|
|
} Task;
|
|
|
|
|
|
|
|
|
2009-11-11 17:12:24 +00:00
|
|
|
typedef struct {
|
|
|
|
Task* tsk;
|
|
|
|
int tick;
|
|
|
|
} Task_urgent;
|
|
|
|
|
|
|
|
|
2008-10-02 18:47:02 +00:00
|
|
|
|
2009-06-29 19:50:29 +00:00
|
|
|
Task *add_task (Window win);
|
2008-10-02 18:47:02 +00:00
|
|
|
void remove_task (Task *tsk);
|
|
|
|
|
2009-02-28 23:04:53 +00:00
|
|
|
void draw_task (void *obj, cairo_t *c, int active);
|
2008-10-02 18:47:02 +00:00
|
|
|
|
|
|
|
void get_icon (Task *tsk);
|
|
|
|
void get_title(Task *tsk);
|
2009-10-23 21:28:44 +00:00
|
|
|
void active_task();
|
2009-02-07 23:28:13 +00:00
|
|
|
|
2009-11-11 20:09:34 +00:00
|
|
|
void add_urgent(Task *tsk);
|
|
|
|
void del_urgent(Task *tsk);
|
|
|
|
int is_urgent(Task *tsk);
|
|
|
|
|
2008-10-02 18:47:02 +00:00
|
|
|
#endif
|
|
|
|
|