diff options
Diffstat (limited to 'systray/tray.h')
-rw-r--r-- | systray/tray.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/systray/tray.h b/systray/tray.h new file mode 100644 index 0000000..af4e5e3 --- /dev/null +++ b/systray/tray.h @@ -0,0 +1,37 @@ +#ifndef TRAY_H +#define TRAY_H + +#include "watcher.h" + +#include <pixman.h> +#include <wayland-util.h> + +#include <stdint.h> + +typedef void (*TrayNotifyCb)(void *data); + +typedef struct { + pixman_image_t *image; + struct fcft_font *font; + uint32_t *scheme; + TrayNotifyCb cb; + Watcher *watcher; + void *monitor; + int height; + int spacing; + + struct wl_list link; +} Tray; + +Tray *createtray (void *monitor, int height, int spacing, uint32_t *colorscheme, + const char **fonts, const char *fontattrs, TrayNotifyCb cb, + Watcher *watcher); +void destroytray (Tray *tray); + +int tray_get_width (const Tray *tray); +int tray_get_icon_width (const Tray *tray); +void tray_update (Tray *tray); +void tray_leftclicked (Tray *tray, unsigned int index); +void tray_rightclicked (Tray *tray, unsigned int index, const char **menucmd); + +#endif /* TRAY_H */ |