aboutsummaryrefslogtreecommitdiffstats
path: root/systray/tray.h
diff options
context:
space:
mode:
authorNikita Langer <nikitalanger@icloud.com>2026-08-22 18:23:18 +0200
committerNikita Langer <nikitalanger@icloud.com>2026-08-22 18:23:18 +0200
commit98f342c73911d1ba4afcdcd36bd5b4fb9cade224 (patch)
tree1dd0db18d76f5af51e161f919179e84142c3cc25 /systray/tray.h
parent960d0661f6ed5ab6fd9c371c53a5f5b137864da1 (diff)
downloaddwl-98f342c73911d1ba4afcdcd36bd5b4fb9cade224.tar.gz
dwl-98f342c73911d1ba4afcdcd36bd5b4fb9cade224.tar.bz2
dwl-98f342c73911d1ba4afcdcd36bd5b4fb9cade224.tar.xz
dwl-98f342c73911d1ba4afcdcd36bd5b4fb9cade224.zip
systrayHEADmaster
Diffstat (limited to 'systray/tray.h')
-rw-r--r--systray/tray.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/systray/tray.h b/systray/tray.h
new file mode 100644
index 0000000..af4e5e3
--- /dev/null
+++ b/systray/tray.h
@@ -0,0 +1,37 @@
+#ifndef TRAY_H
+#define TRAY_H
+
+#include "watcher.h"
+
+#include <pixman.h>
+#include <wayland-util.h>
+
+#include <stdint.h>
+
+typedef void (*TrayNotifyCb)(void *data);
+
+typedef struct {
+ pixman_image_t *image;
+ struct fcft_font *font;
+ uint32_t *scheme;
+ TrayNotifyCb cb;
+ Watcher *watcher;
+ void *monitor;
+ int height;
+ int spacing;
+
+ struct wl_list link;
+} Tray;
+
+Tray *createtray (void *monitor, int height, int spacing, uint32_t *colorscheme,
+ const char **fonts, const char *fontattrs, TrayNotifyCb cb,
+ Watcher *watcher);
+void destroytray (Tray *tray);
+
+int tray_get_width (const Tray *tray);
+int tray_get_icon_width (const Tray *tray);
+void tray_update (Tray *tray);
+void tray_leftclicked (Tray *tray, unsigned int index);
+void tray_rightclicked (Tray *tray, unsigned int index, const char **menucmd);
+
+#endif /* TRAY_H */