]> Dogcows Code - chaz/tint2/blob - src/systray/systraybar.h
dd5e08dd8c9b9c5793590c153fde86d47346a8ee
[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 int icon_size, icons_per_column, icons_per_row, marging;
32 } Systraybar;
33
34
35 typedef struct
36 {
37 Window id;
38 Window tray_id;
39 int x, y;
40 int width, height;
41 // TODO: manage icon's show/hide
42 int hide;
43 int depth;
44 Damage damage;
45 timeout* render_timeout;
46 } TrayWindow;
47
48
49 // net_sel_win != None when protocol started
50 extern Window net_sel_win;
51 extern Systraybar systray;
52 extern int refresh_systray;
53 extern int systray_enabled;
54 extern int systray_max_icon_size;
55
56 // default global data
57 void default_systray();
58
59 // freed memory
60 void cleanup_systray();
61
62 // initialize protocol and panel position
63 void init_systray();
64 void init_systray_panel(void *p);
65
66 void draw_systray(void *obj, cairo_t *c);
67 int resize_systray(void *obj);
68
69
70 // systray protocol
71 // many tray icon doesn't manage stop/restart of the systray manager
72 void start_net();
73 void stop_net();
74 void net_message(XClientMessageEvent *e);
75
76 gboolean add_icon(Window id);
77 void remove_icon(TrayWindow *traywin);
78
79 void refresh_systray_icon();
80 void systray_render_icon(TrayWindow* traywin);
81 void kde_update_icons();
82
83 #endif
84
This page took 0.033448 seconds and 3 git commands to generate.