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>
|
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------
|
|
|
|
// global task parameter
|
|
|
|
typedef struct {
|
|
|
|
Area area;
|
2009-01-17 14:07:56 +00:00
|
|
|
|
2008-10-02 18:47:02 +00:00
|
|
|
int text;
|
|
|
|
int icon;
|
|
|
|
int centered;
|
2009-02-07 23:28:13 +00:00
|
|
|
|
2008-10-02 18:47:02 +00:00
|
|
|
int icon_posy;
|
2009-02-07 23:28:13 +00:00
|
|
|
int icon_size1;
|
|
|
|
int maximum_width;
|
2009-06-25 21:47:38 +00:00
|
|
|
int maximum_height;
|
2008-10-02 18:47:02 +00:00
|
|
|
// starting position for text ~ task_padding + task_border + icon_size
|
|
|
|
double text_posx, text_posy;
|
2009-02-07 23:28:13 +00:00
|
|
|
|
|
|
|
int font_shadow;
|
2008-10-02 18:47:02 +00:00
|
|
|
PangoFontDescription *font_desc;
|
|
|
|
config_color font;
|
|
|
|
config_color font_active;
|
|
|
|
} Global_task;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
// always start with area
|
|
|
|
Area area;
|
|
|
|
|
|
|
|
// TODO: group task with list of windows here
|
|
|
|
Window win;
|
2009-02-07 23:28:13 +00:00
|
|
|
int desktop;
|
2008-10-02 18:47:02 +00:00
|
|
|
long *icon_data;
|
|
|
|
int icon_width;
|
|
|
|
int icon_height;
|
|
|
|
char *title;
|
|
|
|
} Task;
|
|
|
|
|
|
|
|
|
|
|
|
|
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-02-07 23:28:13 +00:00
|
|
|
|
2008-10-02 18:47:02 +00:00
|
|
|
#endif
|
|
|
|
|