From aa6ad09183d623647bc8fd5315721bd8b196cafa Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Date: Sun, 24 Jan 2016 02:34:20 +0100 Subject: swaybar: rename state to bar --- swaybar/bar.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 swaybar/bar.h (limited to 'swaybar/bar.h') diff --git a/swaybar/bar.h b/swaybar/bar.h new file mode 100644 index 00000000..89496da6 --- /dev/null +++ b/swaybar/bar.h @@ -0,0 +1,55 @@ +#ifndef _SWAYBAR_BAR_H +#define _SWAYBAR_BAR_H + +#include "client/registry.h" +#include "client/window.h" +#include "list.h" + +struct bar { + struct config *config; + struct status_line *status; + struct output *output; + /* list_t *outputs; */ + + int ipc_event_socketfd; + int ipc_socketfd; + int status_read_fd; + pid_t status_command_pid; +}; + +struct output { + struct window *window; + struct registry *registry; + list_t *workspaces; + char *name; +}; + +struct workspace { + int num; + char *name; + bool focused; + bool visible; + bool urgent; +}; + +/** + * Setup bar. + */ +void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id, int desired_output); + +/** + * Bar mainloop. + */ +void bar_run(struct bar *bar); + +/** + * free workspace list. + */ +void free_workspaces(list_t *workspaces); + +/** + * Teardown bar. + */ +void bar_teardown(struct bar *bar); + +#endif /* _SWAYBAR_BAR_H */ -- cgit v1.2.3