diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/swaybar/bar.h | 23 | ||||
-rw-r--r-- | include/swaybar/ipc.h | 1 |
2 files changed, 22 insertions, 2 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h index 1bf2ea2d..74292519 100644 --- a/include/swaybar/bar.h +++ b/include/swaybar/bar.h | |||
@@ -2,20 +2,39 @@ | |||
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; |
9 | struct swaybar_workspace; | 8 | struct swaybar_workspace; |
10 | 9 | ||
10 | struct swaybar_pointer { | ||
11 | struct wl_pointer *pointer; | ||
12 | struct wl_cursor_theme *cursor_theme; | ||
13 | struct wl_cursor_image *cursor_image; | ||
14 | struct wl_surface *cursor_surface; | ||
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; | ||
26 | }; | ||
27 | |||
11 | struct swaybar { | 28 | struct swaybar { |
12 | struct wl_display *display; | 29 | struct wl_display *display; |
13 | struct wl_compositor *compositor; | 30 | struct wl_compositor *compositor; |
14 | struct zwlr_layer_shell_v1 *layer_shell; | 31 | struct zwlr_layer_shell_v1 *layer_shell; |
15 | struct wl_shm *shm; | 32 | struct wl_shm *shm; |
33 | struct wl_seat *seat; | ||
16 | 34 | ||
17 | struct swaybar_config *config; | 35 | struct swaybar_config *config; |
18 | struct swaybar_output *focused_output; | 36 | struct swaybar_output *focused_output; |
37 | struct swaybar_pointer pointer; | ||
19 | struct status_line *status; | 38 | struct status_line *status; |
20 | 39 | ||
21 | int ipc_event_socketfd; | 40 | int ipc_event_socketfd; |
@@ -32,6 +51,7 @@ struct swaybar_output { | |||
32 | struct zwlr_layer_surface_v1 *layer_surface; | 51 | struct zwlr_layer_surface_v1 *layer_surface; |
33 | 52 | ||
34 | struct wl_list workspaces; | 53 | struct wl_list workspaces; |
54 | struct wl_list hotspots; | ||
35 | 55 | ||
36 | char *name; | 56 | char *name; |
37 | size_t index; | 57 | size_t index; |
@@ -51,7 +71,6 @@ struct swaybar_workspace { | |||
51 | bool urgent; | 71 | bool urgent; |
52 | }; | 72 | }; |
53 | 73 | ||
54 | // TODO: Rename stuff to match wlroots conventions (init/create/etc) | ||
55 | void bar_setup(struct swaybar *bar, | 74 | void bar_setup(struct swaybar *bar, |
56 | const char *socket_path, | 75 | const char *socket_path, |
57 | const char *bar_id); | 76 | const char *bar_id); |
diff --git a/include/swaybar/ipc.h b/include/swaybar/ipc.h index 278baef0..6ea7c4d6 100644 --- a/include/swaybar/ipc.h +++ b/include/swaybar/ipc.h | |||
@@ -6,5 +6,6 @@ | |||
6 | void ipc_initialize(struct swaybar *bar, const char *bar_id); | 6 | void ipc_initialize(struct swaybar *bar, const char *bar_id); |
7 | bool handle_ipc_event(struct swaybar *bar); | 7 | bool handle_ipc_event(struct swaybar *bar); |
8 | void ipc_get_workspaces(struct swaybar *bar); | 8 | void ipc_get_workspaces(struct swaybar *bar); |
9 | void ipc_send_workspace_command(struct swaybar *bar, const char *ws); | ||
9 | 10 | ||
10 | #endif | 11 | #endif |