mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
Reorganize Tray Code
Remove tray code from bar.c and render.c
This commit is contained in:
parent
790887ce76
commit
1451ee8fd1
5 changed files with 152 additions and 123 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue