2009-01-20 21:16:54 +00:00
|
|
|
/**************************************************************************
|
|
|
|
* Copyright (C) 2008 thierry lorthiois (lorthiois@bbsoft.fr)
|
|
|
|
*
|
|
|
|
* taskbar
|
|
|
|
*
|
|
|
|
**************************************************************************/
|
2008-10-02 18:47:02 +00:00
|
|
|
|
|
|
|
#ifndef TASKBAR_H
|
|
|
|
#define TASKBAR_H
|
|
|
|
|
|
|
|
#include "task.h"
|
2010-11-13 10:27:26 +00:00
|
|
|
#include "taskbarname.h"
|
2008-10-02 18:47:02 +00:00
|
|
|
|
2010-10-23 11:16:29 +00:00
|
|
|
enum { TASKBAR_NORMAL, TASKBAR_ACTIVE, TASKBAR_STATE_COUNT };
|
2015-04-11 09:51:10 +00:00
|
|
|
extern GHashTable *win_to_task_table;
|
2010-04-23 14:37:39 +00:00
|
|
|
extern Task *task_active;
|
|
|
|
extern Task *task_drag;
|
2010-09-18 18:19:43 +00:00
|
|
|
extern int taskbar_enabled;
|
2015-01-30 09:53:16 +00:00
|
|
|
extern int taskbar_distribute_size;
|
2015-03-20 21:19:02 +00:00
|
|
|
extern int hide_inactive_tasks;
|
2015-03-21 09:49:10 +00:00
|
|
|
extern int hide_task_diff_monitor;
|
2015-03-28 22:38:57 +00:00
|
|
|
enum { TASKBAR_NOSORT, TASKBAR_SORT_CENTER, TASKBAR_SORT_TITLE };
|
|
|
|
extern int taskbar_sort_method;
|
2015-06-11 22:52:10 +00:00
|
|
|
extern int taskbar_alignment;
|
2010-11-13 10:27:26 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
// always start with area
|
|
|
|
Area area;
|
|
|
|
Pixmap state_pix[TASKBAR_STATE_COUNT];
|
|
|
|
|
2015-04-11 09:51:10 +00:00
|
|
|
gchar *name;
|
2010-11-14 15:34:14 +00:00
|
|
|
int posy;
|
2010-11-13 10:27:26 +00:00
|
|
|
} Taskbarname;
|
|
|
|
|
2009-09-25 21:40:06 +00:00
|
|
|
// tint2 use one taskbar per desktop.
|
2008-10-02 18:47:02 +00:00
|
|
|
typedef struct {
|
2009-09-20 20:48:00 +00:00
|
|
|
// always start with area
|
|
|
|
Area area;
|
2008-10-02 18:47:02 +00:00
|
|
|
|
2009-09-20 20:48:00 +00:00
|
|
|
int desktop;
|
2010-10-23 11:16:29 +00:00
|
|
|
Pixmap state_pix[TASKBAR_STATE_COUNT];
|
2009-01-20 21:16:54 +00:00
|
|
|
|
2010-11-13 10:27:26 +00:00
|
|
|
Taskbarname bar_name;
|
|
|
|
|
2009-09-20 20:48:00 +00:00
|
|
|
// task parameters
|
|
|
|
int text_width;
|
2008-10-02 18:47:02 +00:00
|
|
|
} Taskbar;
|
|
|
|
|
2010-01-09 00:11:01 +00:00
|
|
|
typedef struct {
|
|
|
|
//always start with area
|
|
|
|
Area area;
|
2010-11-13 10:27:26 +00:00
|
|
|
Area area_name;
|
2010-10-23 11:16:29 +00:00
|
|
|
Background* background[TASKBAR_STATE_COUNT];
|
2010-11-13 10:27:26 +00:00
|
|
|
Background* background_name[TASKBAR_STATE_COUNT];
|
2010-01-09 00:11:01 +00:00
|
|
|
} Global_taskbar;
|
2008-10-02 18:47:02 +00:00
|
|
|
|
2010-04-16 18:50:03 +00:00
|
|
|
|
2010-04-18 14:28:45 +00:00
|
|
|
// default global data
|
2010-04-18 12:07:36 +00:00
|
|
|
void default_taskbar();
|
2010-04-18 14:28:45 +00:00
|
|
|
|
2010-04-18 12:07:36 +00:00
|
|
|
// freed memory
|
2009-02-07 23:28:13 +00:00
|
|
|
void cleanup_taskbar();
|
2008-10-02 18:47:02 +00:00
|
|
|
|
2010-04-18 12:07:36 +00:00
|
|
|
void init_taskbar();
|
2010-09-18 18:06:29 +00:00
|
|
|
void init_taskbar_panel(void *p);
|
2010-04-18 12:07:36 +00:00
|
|
|
|
2010-10-23 11:16:29 +00:00
|
|
|
void draw_taskbar (void *obj, cairo_t *c);
|
2010-09-18 18:06:29 +00:00
|
|
|
void taskbar_remove_task(gpointer key, gpointer value, gpointer user_data);
|
2008-10-02 18:47:02 +00:00
|
|
|
Task *task_get_task (Window win);
|
2010-01-09 18:29:00 +00:00
|
|
|
GPtrArray* task_get_tasks(Window win);
|
2008-10-02 18:47:02 +00:00
|
|
|
void task_refresh_tasklist ();
|
|
|
|
|
2010-09-16 23:24:25 +00:00
|
|
|
int resize_taskbar(void *obj);
|
2010-10-24 12:41:35 +00:00
|
|
|
void on_change_taskbar (void *obj);
|
2010-10-23 11:16:29 +00:00
|
|
|
void set_taskbar_state(Taskbar *tskbar, int state);
|
2008-11-08 20:23:42 +00:00
|
|
|
|
2010-09-23 18:09:30 +00:00
|
|
|
// show/hide taskbar according to current desktop
|
|
|
|
void visible_taskbar(void *p);
|
|
|
|
|
2015-03-28 21:07:33 +00:00
|
|
|
void sort_taskbar_for_win(Window win);
|
2015-03-22 16:07:04 +00:00
|
|
|
void sort_tasks(Taskbar *taskbar);
|
2008-10-02 18:47:02 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|