]> Dogcows Code - chaz/tint2/blob - src/systray/systraybar.h
*fix* issue 175
[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
16 // XEMBED messages
17 #define XEMBED_EMBEDDED_NOTIFY 0
18 // Flags for _XEMBED_INFO
19 #define XEMBED_MAPPED (1 << 0)
20
21
22 typedef struct {
23 // always start with area
24 Area area;
25
26 GSList *list_icons;
27 int sort;
28 } Systraybar;
29
30
31 typedef struct
32 {
33 Window id;
34 Window tray_id;
35 int x, y;
36 int width, height;
37 // TODO: manage icon's show/hide
38 int hide;
39 int wrong_format;
40 } TrayWindow;
41
42
43 // net_sel_win != None when protocol started
44 extern Window net_sel_win;
45 extern Systraybar systray;
46 extern int refresh_systray;
47 extern int systray_enabled;
48 extern int systray_max_icon_size;
49
50 void init_systray();
51 void init_systray_panel(void *p);
52 void cleanup_systray();
53 void draw_systray(void *obj, cairo_t *c, int active);
54 void resize_systray(void *obj);
55
56
57 // systray protocol
58 // many tray icon doesn't manage stop/restart of the systray manager
59 void start_net();
60 void stop_net();
61 void net_message(XClientMessageEvent *e);
62
63 gboolean add_icon(Window id);
64 void remove_icon(TrayWindow *traywin);
65
66 void refresh_systray_icon();
67
68 void kde_update_icons();
69
70 #endif
71
This page took 0.041484 seconds and 5 git commands to generate.