diff options
author | Calvin Lee <cyrus296@gmail.com> | 2017-06-07 21:32:48 -0700 |
---|---|---|
committer | Calvin Lee <cyrus296@gmail.com> | 2017-06-07 21:32:48 -0700 |
commit | 1451ee8fd13dd35227d11e393c80871c70ad90f0 (patch) | |
tree | 74a34de797c46c2734751d77b4dc4ac5694af9a7 /include/swaybar/tray | |
parent | 790887ce762fb51d18e966de22bd2ab5b6a593c7 (diff) |
Reorganize Tray Code
Remove tray code from bar.c and render.c
Diffstat (limited to 'include/swaybar/tray')
-rw-r--r-- | include/swaybar/tray/tray.h | 14 |
1 files changed, 10 insertions, 4 deletions
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 <stdbool.h> #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 */ |