sway-patched-tray-menu-github/include/swaybar/bar.h

49 lines
960 B
C
Raw Normal View History

2016-01-24 02:34:20 +01:00
#ifndef _SWAYBAR_BAR_H
#define _SWAYBAR_BAR_H
#include <wayland-client.h>
#include "pool-buffer.h"
#include "list.h"
2016-01-23 20:55:01 +01:00
struct swaybar_config;
struct swaybar_output;
struct swaybar_workspace;
struct swaybar {
struct wl_display *display;
struct wl_compositor *compositor;
struct zwlr_layer_shell_v1 *layer_shell;
struct wl_shm *shm;
2016-01-23 20:55:01 +01:00
struct swaybar_config *config;
struct swaybar_output *focused_output;
2018-03-29 05:56:02 +02:00
int ipc_event_socketfd;
int ipc_socketfd;
struct wl_list outputs;
2016-01-23 20:55:01 +01:00
};
struct swaybar_output {
struct wl_list link;
struct swaybar *bar;
struct wl_output *output;
struct wl_surface *surface;
struct zwlr_layer_surface_v1 *layer_surface;
2016-01-24 00:23:09 +01:00
char *name;
int idx;
bool focused;
2016-01-23 20:55:01 +01:00
uint32_t width, height;
struct pool_buffer buffers[2];
struct pool_buffer *current_buffer;
2016-01-23 20:55:01 +01:00
};
void bar_setup(struct swaybar *bar,
const char *socket_path,
const char *bar_id);
void bar_run(struct swaybar *bar);
void bar_teardown(struct swaybar *bar);
#endif