1 #ifndef _SWAYBAR_TRAY_TRAY_H 2 #define _SWAYBAR_TRAY_TRAY_H 3 4 #include "config.h" 5 #if HAVE_LIBSYSTEMD 6 #include <systemd/sd-bus.h> 7 #elif HAVE_LIBELOGIND 8 #include <elogind/sd-bus.h> 9 #elif HAVE_BASU 10 #include <basu/sd-bus.h> 11 #endif 12 #include <cairo.h> 13 #include <stdint.h> 14 #include "swaybar/tray/host.h" 15 #include "list.h" 16 17 struct swaybar; 18 struct swaybar_output; 19 struct swaybar_watcher; 20 21 struct swaybar_tray { 22 struct swaybar *bar; 23 24 int fd; 25 sd_bus *bus; 26 27 struct swaybar_host host_xdg; 28 struct swaybar_host host_kde; 29 list_t *items; // struct swaybar_sni * 30 struct swaybar_watcher *watcher_xdg; 31 struct swaybar_watcher *watcher_kde; 32 33 list_t *basedirs; // char * 34 list_t *themes; // struct swaybar_theme * 35 }; 36 37 struct swaybar_tray *create_tray(struct swaybar *bar); 38 void destroy_tray(struct swaybar_tray *tray); 39 void tray_in(int fd, short mask, void *data); 40 uint32_t render_tray(cairo_t *cairo, struct swaybar_output *output, double *x); 41 42 #endif 43