diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-30 22:42:59 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-30 22:44:08 -0400 |
commit | 2a5108a2786383cf5c3bcefd653605c916193837 (patch) | |
tree | 10b69216bee8adb69fd81ebbeb05c8a7c36c51a3 /include/swaybar/bar.h | |
parent | Implement scroll wheel workspace switching (diff) | |
download | sway-2a5108a2786383cf5c3bcefd653605c916193837.tar.gz sway-2a5108a2786383cf5c3bcefd653605c916193837.tar.zst sway-2a5108a2786383cf5c3bcefd653605c916193837.zip |
Implement workspace switch on click
Diffstat (limited to 'include/swaybar/bar.h')
-rw-r--r-- | include/swaybar/bar.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h index 0768a683..74292519 100644 --- a/include/swaybar/bar.h +++ b/include/swaybar/bar.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _SWAYBAR_BAR_H | 2 | #define _SWAYBAR_BAR_H |
3 | #include <wayland-client.h> | 3 | #include <wayland-client.h> |
4 | #include "pool-buffer.h" | 4 | #include "pool-buffer.h" |
5 | #include "list.h" | ||
6 | 5 | ||
7 | struct swaybar_config; | 6 | struct swaybar_config; |
8 | struct swaybar_output; | 7 | struct swaybar_output; |
@@ -14,6 +13,16 @@ struct swaybar_pointer { | |||
14 | struct wl_cursor_image *cursor_image; | 13 | struct wl_cursor_image *cursor_image; |
15 | struct wl_surface *cursor_surface; | 14 | struct wl_surface *cursor_surface; |
16 | struct swaybar_output *current; | 15 | struct swaybar_output *current; |
16 | int x, y; | ||
17 | }; | ||
18 | |||
19 | struct swaybar_hotspot { | ||
20 | struct wl_list link; | ||
21 | int x, y, width, height; | ||
22 | void (*callback)(struct swaybar_output *output, | ||
23 | int x, int y, uint32_t button, void *data); | ||
24 | void (*destroy)(void *data); | ||
25 | void *data; | ||
17 | }; | 26 | }; |
18 | 27 | ||
19 | struct swaybar { | 28 | struct swaybar { |
@@ -42,6 +51,7 @@ struct swaybar_output { | |||
42 | struct zwlr_layer_surface_v1 *layer_surface; | 51 | struct zwlr_layer_surface_v1 *layer_surface; |
43 | 52 | ||
44 | struct wl_list workspaces; | 53 | struct wl_list workspaces; |
54 | struct wl_list hotspots; | ||
45 | 55 | ||
46 | char *name; | 56 | char *name; |
47 | size_t index; | 57 | size_t index; |
@@ -61,7 +71,6 @@ struct swaybar_workspace { | |||
61 | bool urgent; | 71 | bool urgent; |
62 | }; | 72 | }; |
63 | 73 | ||
64 | // TODO: Rename stuff to match wlroots conventions (init/create/etc) | ||
65 | void bar_setup(struct swaybar *bar, | 74 | void bar_setup(struct swaybar *bar, |
66 | const char *socket_path, | 75 | const char *socket_path, |
67 | const char *bar_id); | 76 | const char *bar_id); |