]> Dogcows Code - chaz/tint2/blob - src/systray/systraybar.h
*fix* only changed systray icons are rendered
[chaz/tint2] / src / systray / systraybar.h
1 /**************************************************************************
2 * Copyright (C) 2009 thierry lorthiois (lorthiois@bbsoft.fr)
3 *
4 * systraybar
5 * systray implementation come from 'docker-1.5' by Ben Jansens,
6 * and from systray/xembed specification (freedesktop.org).
7 *
8 **************************************************************************/
9
10 #ifndef SYSTRAYBAR_H
11 #define SYSTRAYBAR_H
12
13 #include "common.h"
14 #include "area.h"
15 #include <X11/extensions/Xdamage.h>
16
17 // XEMBED messages
18 #define XEMBED_EMBEDDED_NOTIFY 0
19 // Flags for _XEMBED_INFO
20 #define XEMBED_MAPPED (1 << 0)
21
22
23 typedef struct {
24 // always start with area
25 Area area;
26
27 GSList *list_icons;
28 int sort;
29 int alpha, saturation, brightness;
30 } Systraybar;
31
32
33 typedef struct
34 {
35 Window id;
36 Window tray_id;
37 int x, y;
38 int width, height;
39 // TODO: manage icon's show/hide
40 int hide;
41 int depth;
42 Damage damage;
43 } TrayWindow;
44
45
46 // net_sel_win != None when protocol started
47 extern Window net_sel_win;
48 extern Systraybar systray;
49 extern int refresh_systray;
50 extern int systray_enabled;
51 extern int systray_max_icon_size;
52
53 void init_systray();
54 void init_systray_panel(void *p);
55 void cleanup_systray();
56 void draw_systray(void *obj, cairo_t *c, int active);
57 void resize_systray(void *obj);
58
59
60 // systray protocol
61 // many tray icon doesn't manage stop/restart of the systray manager
62 void start_net();
63 void stop_net();
64 void net_message(XClientMessageEvent *e);
65
66 gboolean add_icon(Window id);
67 void remove_icon(TrayWindow *traywin);
68
69 void refresh_systray_icon();
70 void systray_render_icon(TrayWindow* traywin);
71 void kde_update_icons();
72
73 #endif
74
This page took 0.040423 seconds and 5 git commands to generate.