From 1451ee8fd13dd35227d11e393c80871c70ad90f0 Mon Sep 17 00:00:00 2001 From: Calvin Lee Date: Wed, 7 Jun 2017 21:32:48 -0700 Subject: Reorganize Tray Code Remove tray code from bar.c and render.c --- include/swaybar/tray/tray.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'include/swaybar/tray/tray.h') diff --git a/include/swaybar/tray/tray.h b/include/swaybar/tray/tray.h index 7d371008..b718e555 100644 --- a/include/swaybar/tray/tray.h +++ b/include/swaybar/tray/tray.h @@ -5,6 +5,7 @@ #include #include "swaybar/tray/dbus.h" #include "swaybar/tray/sni.h" +#include "swaybar/bar.h" #include "list.h" extern struct tray *tray; @@ -14,13 +15,18 @@ struct tray { }; /** - * Initializes the tray host with D-Bus + * Processes a mouse event on the bar */ -int init_tray(); +void tray_mouse_event(struct output *output, int x, int y, + uint32_t button, uint32_t state); + +uint32_t tray_render(struct output *output, struct config *config); + +void tray_upkeep(struct bar *bar); /** - * Returns an item if `x` and `y` collide with it and NULL otherwise + * Initializes the tray with D-Bus */ -struct StatusNotifierItem *collides_with_sni(int x, int y); +void init_tray(); #endif /* _SWAYBAR_TRAY_H */ -- cgit v1.2.3-54-g00ecf