aboutsummaryrefslogtreecommitdiff
path: root/include/swaybar/tray/tray.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/swaybar/tray/tray.h')
-rw-r--r--include/swaybar/tray/tray.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/swaybar/tray/tray.h b/include/swaybar/tray/tray.h
new file mode 100644
index 0000000..7d37100
--- /dev/null
+++ b/include/swaybar/tray/tray.h
@@ -0,0 +1,26 @@
+#ifndef _SWAYBAR_TRAY_H
+#define _SWAYBAR_TRAY_H
+
+#include <stdint.h>
+#include <stdbool.h>
+#include "swaybar/tray/dbus.h"
+#include "swaybar/tray/sni.h"
+#include "list.h"
+
+extern struct tray *tray;
+
+struct tray {
+ list_t *items;
+};
+
+/**
+ * Initializes the tray host with D-Bus
+ */
+int init_tray();
+
+/**
+ * Returns an item if `x` and `y` collide with it and NULL otherwise
+ */
+struct StatusNotifierItem *collides_with_sni(int x, int y);
+
+#endif /* _SWAYBAR_TRAY_H */