2018-10-28 10:25:47 +00:00
|
|
|
#ifndef _SWAYBAR_TRAY_TRAY_H
|
|
|
|
#define _SWAYBAR_TRAY_TRAY_H
|
|
|
|
|
|
|
|
#include "config.h"
|
2020-12-02 22:46:49 +00:00
|
|
|
#ifdef HAVE_LIBSYSTEMD
|
2018-10-28 10:25:47 +00:00
|
|
|
#include <systemd/sd-bus.h>
|
2020-12-02 22:46:49 +00:00
|
|
|
#elif HAVE_LIBELOGIND
|
2018-10-28 10:25:47 +00:00
|
|
|
#include <elogind/sd-bus.h>
|
2020-12-02 22:48:11 +00:00
|
|
|
#elif HAVE_BASU
|
|
|
|
#include <basu/sd-bus.h>
|
2018-10-28 10:25:47 +00:00
|
|
|
#endif
|
|
|
|
#include <cairo.h>
|
|
|
|
#include <stdint.h>
|
2018-12-07 12:33:45 +00:00
|
|
|
#include "swaybar/tray/host.h"
|
2018-12-06 12:51:52 +00:00
|
|
|
#include "list.h"
|
2018-10-28 10:25:47 +00:00
|
|
|
|
|
|
|
struct swaybar;
|
|
|
|
struct swaybar_output;
|
2018-12-05 17:28:14 +00:00
|
|
|
struct swaybar_watcher;
|
2018-10-28 10:25:47 +00:00
|
|
|
|
|
|
|
struct swaybar_tray {
|
|
|
|
struct swaybar *bar;
|
|
|
|
|
|
|
|
int fd;
|
|
|
|
sd_bus *bus;
|
2018-12-05 17:28:14 +00:00
|
|
|
|
2018-12-07 12:33:45 +00:00
|
|
|
struct swaybar_host host_xdg;
|
|
|
|
struct swaybar_host host_kde;
|
2018-12-07 12:33:45 +00:00
|
|
|
list_t *items; // struct swaybar_sni *
|
2018-12-05 17:28:14 +00:00
|
|
|
struct swaybar_watcher *watcher_xdg;
|
|
|
|
struct swaybar_watcher *watcher_kde;
|
2018-12-06 12:51:52 +00:00
|
|
|
|
|
|
|
list_t *basedirs; // char *
|
|
|
|
list_t *themes; // struct swaybar_theme *
|
2018-10-28 10:25:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct swaybar_tray *create_tray(struct swaybar *bar);
|
|
|
|
void destroy_tray(struct swaybar_tray *tray);
|
|
|
|
void tray_in(int fd, short mask, void *data);
|
|
|
|
uint32_t render_tray(cairo_t *cairo, struct swaybar_output *output, double *x);
|
|
|
|
|
|
|
|
#endif
|