swaybar: add StatusNotifierHost to tray

This commit is contained in:
Ian Fan 2018-12-07 12:33:45 +00:00
parent 746600e6ed
commit e6cb55e2f8
5 changed files with 212 additions and 0 deletions

View file

@ -0,0 +1,17 @@
#ifndef _SWAYBAR_TRAY_HOST_H
#define _SWAYBAR_TRAY_HOST_H
#include <stdbool.h>
struct swaybar_tray;
struct swaybar_host {
struct swaybar_tray *tray;
char *service;
char *watcher_interface;
};
bool init_host(struct swaybar_host *host, char *protocol, struct swaybar_tray *tray);
void finish_host(struct swaybar_host *host);
#endif

View file

@ -9,6 +9,7 @@
#endif
#include <cairo.h>
#include <stdint.h>
#include "swaybar/tray/host.h"
#include "list.h"
struct swaybar;
@ -21,6 +22,9 @@ struct swaybar_tray {
int fd;
sd_bus *bus;
struct swaybar_host host_xdg;
struct swaybar_host host_kde;
list_t *items; // char *
struct swaybar_watcher *watcher_xdg;
struct swaybar_watcher *watcher_kde;