aboutsummaryrefslogtreecommitdiffstats
path: root/include/swaybar/bar.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/swaybar/bar.h')
-rw-r--r--include/swaybar/bar.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h
index 95b20510..2d9ba0d9 100644
--- a/include/swaybar/bar.h
+++ b/include/swaybar/bar.h
@@ -1,6 +1,7 @@
1#ifndef _SWAYBAR_BAR_H 1#ifndef _SWAYBAR_BAR_H
2#define _SWAYBAR_BAR_H 2#define _SWAYBAR_BAR_H
3#include <wayland-client.h> 3#include <wayland-client.h>
4#include "config.h"
4#include "input.h" 5#include "input.h"
5#include "pool-buffer.h" 6#include "pool-buffer.h"
6#include "wlr-layer-shell-unstable-v1-client-protocol.h" 7#include "wlr-layer-shell-unstable-v1-client-protocol.h"
@@ -8,6 +9,9 @@
8 9
9struct swaybar_config; 10struct swaybar_config;
10struct swaybar_output; 11struct swaybar_output;
12#if HAVE_TRAY
13struct swaybar_tray;
14#endif
11struct swaybar_workspace; 15struct swaybar_workspace;
12struct loop; 16struct loop;
13 17
@@ -38,6 +42,10 @@ struct swaybar {
38 int ipc_socketfd; 42 int ipc_socketfd;
39 43
40 struct wl_list outputs; // swaybar_output::link 44 struct wl_list outputs; // swaybar_output::link
45
46#if HAVE_TRAY
47 struct swaybar_tray *tray;
48#endif
41}; 49};
42 50
43struct swaybar_output { 51struct swaybar_output {
@@ -53,6 +61,7 @@ struct swaybar_output {
53 struct wl_list hotspots; // swaybar_hotspot::link 61 struct wl_list hotspots; // swaybar_hotspot::link
54 62
55 char *name; 63 char *name;
64 char *identifier;
56 bool focused; 65 bool focused;
57 66
58 uint32_t width, height; 67 uint32_t width, height;
@@ -62,12 +71,15 @@ struct swaybar_output {
62 struct pool_buffer *current_buffer; 71 struct pool_buffer *current_buffer;
63 bool dirty; 72 bool dirty;
64 bool frame_scheduled; 73 bool frame_scheduled;
74
75 uint32_t output_height, output_width, output_x, output_y;
65}; 76};
66 77
67struct swaybar_workspace { 78struct swaybar_workspace {
68 struct wl_list link; // swaybar_output::workspaces 79 struct wl_list link; // swaybar_output::workspaces
69 int num; 80 int num;
70 char *name; 81 char *name;
82 char *label;
71 bool focused; 83 bool focused;
72 bool visible; 84 bool visible;
73 bool urgent; 85 bool urgent;
@@ -77,6 +89,8 @@ bool bar_setup(struct swaybar *bar, const char *socket_path);
77void bar_run(struct swaybar *bar); 89void bar_run(struct swaybar *bar);
78void bar_teardown(struct swaybar *bar); 90void bar_teardown(struct swaybar *bar);
79 91
92void set_bar_dirty(struct swaybar *bar);
93
80/* 94/*
81 * Determines whether the bar should be visible and changes it to be so. 95 * Determines whether the bar should be visible and changes it to be so.
82 * If the current visibility of the bar is the different to what it should be, 96 * If the current visibility of the bar is the different to what it should be,