]> Dogcows Code - chaz/tint2/blob - src/systray/systraybar.h
add comment
[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 "timer.h"
16 #include <X11/extensions/Xdamage.h>
17
18 // XEMBED messages
19 #define XEMBED_EMBEDDED_NOTIFY 0
20 // Flags for _XEMBED_INFO
21 #define XEMBED_MAPPED (1 << 0)
22
23
24 typedef struct {
25 // always start with area
26 Area area;
27
28 GSList *list_icons;
29 int sort;
30 int alpha, saturation, brightness;
31 } Systraybar;
32
33
34 typedef struct
35 {
36 Window id;
37 Window tray_id;
38 int x, y;
39 int width, height;
40 // TODO: manage icon's show/hide
41 int hide;
42 int depth;
43 Damage damage;
44 timeout* render_timeout;
45 } TrayWindow;
46
47
48 // net_sel_win != None when protocol started
49 extern Window net_sel_win;
50 extern Systraybar systray;
51 extern int refresh_systray;
52 extern int systray_enabled;
53 extern int systray_max_icon_size;
54
55 // default global data
56 void default_systray();
57
58 // freed memory
59 void cleanup_systray();
60
61 // initialize protocol and panel position
62 void init_systray();
63 void init_systray_panel(void *p);
64
65 void draw_systray(void *obj, cairo_t *c);
66 int resize_systray(void *obj);
67
68
69 // systray protocol
70 // many tray icon doesn't manage stop/restart of the systray manager
71 void start_net();
72 void stop_net();
73 void net_message(XClientMessageEvent *e);
74
75 gboolean add_icon(Window id);
76 void remove_icon(TrayWindow *traywin);
77
78 void refresh_systray_icon();
79 void systray_render_icon(TrayWindow* traywin);
80 void kde_update_icons();
81
82 #endif
83
This page took 0.03357 seconds and 4 git commands to generate.