diff options
author | 2018-12-31 15:43:23 -0500 | |
---|---|---|
committer | 2018-12-31 15:43:23 -0500 | |
commit | 3d7c20f062bebe39199d3872e5b64d5e8d61d100 (patch) | |
tree | 93b8ddb51873cae14db8d5f07db74ca96236f184 /include/swaybar/bar.h | |
parent | Apply implicit fallback seat config (diff) | |
parent | swaybar: use KDE's SNI IconThemePath property (diff) | |
download | sway-3d7c20f062bebe39199d3872e5b64d5e8d61d100.tar.gz sway-3d7c20f062bebe39199d3872e5b64d5e8d61d100.tar.zst sway-3d7c20f062bebe39199d3872e5b64d5e8d61d100.zip |
Merge pull request #3249 from ianyfan/tray
Swaybar tray
Diffstat (limited to 'include/swaybar/bar.h')
-rw-r--r-- | include/swaybar/bar.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h index 57c5114e..e377b8de 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 { |
@@ -62,6 +70,8 @@ struct swaybar_output { | |||
62 | struct pool_buffer *current_buffer; | 70 | struct pool_buffer *current_buffer; |
63 | bool dirty; | 71 | bool dirty; |
64 | bool frame_scheduled; | 72 | bool frame_scheduled; |
73 | |||
74 | uint32_t output_height, output_width, output_x, output_y; | ||
65 | }; | 75 | }; |
66 | 76 | ||
67 | struct swaybar_workspace { | 77 | struct swaybar_workspace { |
@@ -78,6 +88,8 @@ bool bar_setup(struct swaybar *bar, const char *socket_path); | |||
78 | void bar_run(struct swaybar *bar); | 88 | void bar_run(struct swaybar *bar); |
79 | void bar_teardown(struct swaybar *bar); | 89 | void bar_teardown(struct swaybar *bar); |
80 | 90 | ||
91 | void set_bar_dirty(struct swaybar *bar); | ||
92 | |||
81 | /* | 93 | /* |
82 | * Determines whether the bar should be visible and changes it to be so. | 94 | * Determines whether the bar should be visible and changes it to be so. |
83 | * If the current visibility of the bar is the different to what it should be, | 95 | * If the current visibility of the bar is the different to what it should be, |