aboutsummaryrefslogtreecommitdiff
path: root/include/swaybar/tray
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2018-10-28 10:25:47 +0000
committerFurkan Sahin <furkan-dev@proton.me>2018-10-28 10:25:47 +0000
commit6e645617ed477cea8bde146d1bf5647c11fd63bc (patch)
treebbb234ad123657f1a8ed1f311cf9183b67e7e961 /include/swaybar/tray
parent007dafcc3fbfe6402bdd58cb34f53416c886a584 (diff)
swaybar: add tray interface
Diffstat (limited to 'include/swaybar/tray')
-rw-r--r--include/swaybar/tray/tray.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/swaybar/tray/tray.h b/include/swaybar/tray/tray.h
new file mode 100644
index 00000000..217e2d45
--- /dev/null
+++ b/include/swaybar/tray/tray.h
@@ -0,0 +1,28 @@
+#ifndef _SWAYBAR_TRAY_TRAY_H
+#define _SWAYBAR_TRAY_TRAY_H
+
+#include "config.h"
+#ifdef HAVE_SYSTEMD
+#include <systemd/sd-bus.h>
+#elif HAVE_ELOGIND
+#include <elogind/sd-bus.h>
+#endif
+#include <cairo.h>
+#include <stdint.h>
+
+struct swaybar;
+struct swaybar_output;
+
+struct swaybar_tray {
+ struct swaybar *bar;
+
+ int fd;
+ sd_bus *bus;
+};
+
+struct swaybar_tray *create_tray(struct swaybar *bar);
+void destroy_tray(struct swaybar_tray *tray);
+void tray_in(int fd, short mask, void *data);
+uint32_t render_tray(cairo_t *cairo, struct swaybar_output *output, double *x);
+
+#endif