diff options
Diffstat (limited to 'include/swaybar/bar.h')
-rw-r--r-- | include/swaybar/bar.h | 14 |
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 | ||
9 | struct swaybar_config; | 10 | struct swaybar_config; |
10 | struct swaybar_output; | 11 | struct swaybar_output; |
12 | #if HAVE_TRAY | ||
13 | struct swaybar_tray; | ||
14 | #endif | ||
11 | struct swaybar_workspace; | 15 | struct swaybar_workspace; |
12 | struct loop; | 16 | struct 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 | ||
43 | struct swaybar_output { | 51 | struct 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 | ||
67 | struct swaybar_workspace { | 78 | struct 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); | |||
77 | void bar_run(struct swaybar *bar); | 89 | void bar_run(struct swaybar *bar); |
78 | void bar_teardown(struct swaybar *bar); | 90 | void bar_teardown(struct swaybar *bar); |
79 | 91 | ||
92 | void 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, |