swayfx/include/bar/bar.h

56 lines
872 B
C
Raw Normal View History

2016-01-24 12:34:20 +11:00
#ifndef _SWAYBAR_BAR_H
#define _SWAYBAR_BAR_H
2016-01-24 06:55:01 +11:00
#include "client/registry.h"
#include "client/window.h"
#include "list.h"
2016-01-24 06:55:01 +11:00
2016-01-24 12:34:20 +11:00
struct bar {
struct config *config;
2016-01-24 06:55:01 +11:00
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;
2016-01-24 10:23:09 +11:00
char *name;
2016-01-24 06:55:01 +11:00
};
struct workspace {
int num;
char *name;
bool focused;
bool visible;
bool urgent;
};
/**
2016-01-24 12:34:20 +11:00
* Setup bar.
2016-01-24 06:55:01 +11:00
*/
2016-01-24 12:34:20 +11:00
void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id, int desired_output);
/**
2016-01-24 12:34:20 +11:00
* Bar mainloop.
*/
2016-01-24 12:34:20 +11:00
void bar_run(struct bar *bar);
2016-01-24 06:55:01 +11:00
/**
* free workspace list.
2016-01-24 06:55:01 +11:00
*/
void free_workspaces(list_t *workspaces);
/**
2016-01-24 12:34:20 +11:00
* Teardown bar.
*/
2016-01-24 12:34:20 +11:00
void bar_teardown(struct bar *bar);
2016-01-24 06:55:01 +11:00
2016-01-24 12:34:20 +11:00
#endif /* _SWAYBAR_BAR_H */