diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-12-07 12:33:45 +0000 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-12-31 20:40:18 +0000 |
commit | 74655f835aa9fe0e976473d443f62d253602696c (patch) | |
tree | 238835505b049fc4b0479f0fa25e2c30deb0adb6 /include/swaybar | |
parent | e6cb55e2f8176b0ea8a6dbf15c728c56d8b74056 (diff) |
swaybar: add StatusNotifierItem to tray
Diffstat (limited to 'include/swaybar')
-rw-r--r-- | include/swaybar/tray/item.h | 38 | ||||
-rw-r--r-- | include/swaybar/tray/tray.h | 2 |
2 files changed, 39 insertions, 1 deletions
diff --git a/include/swaybar/tray/item.h b/include/swaybar/tray/item.h new file mode 100644 index 00000000..57affb78 --- /dev/null +++ b/include/swaybar/tray/item.h @@ -0,0 +1,38 @@ +#ifndef _SWAYBAR_TRAY_ITEM_H +#define _SWAYBAR_TRAY_ITEM_H + +#include <stdbool.h> +#include "swaybar/tray/tray.h" +#include "list.h" + +struct swaybar_pixmap { + int size; + unsigned char pixels[]; +}; + +struct swaybar_sni { + // icon properties + struct swaybar_tray *tray; + cairo_surface_t *icon; + int min_size; + int max_size; + + // dbus properties + char *watcher_id; + char *service; + char *path; + char *interface; + + char *status; + char *icon_name; + list_t *icon_pixmap; // struct swaybar_pixmap * + char *attention_icon_name; + list_t *attention_icon_pixmap; // struct swaybar_pixmap * + bool item_is_menu; + char *menu; +}; + +struct swaybar_sni *create_sni(char *id, struct swaybar_tray *tray); +void destroy_sni(struct swaybar_sni *sni); + +#endif diff --git a/include/swaybar/tray/tray.h b/include/swaybar/tray/tray.h index 1d976b4a..8958b69a 100644 --- a/include/swaybar/tray/tray.h +++ b/include/swaybar/tray/tray.h @@ -24,7 +24,7 @@ struct swaybar_tray { struct swaybar_host host_xdg; struct swaybar_host host_kde; - list_t *items; // char * + list_t *items; // struct swaybar_sni * struct swaybar_watcher *watcher_xdg; struct swaybar_watcher *watcher_kde; |