diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-31 00:10:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-31 00:10:20 -0400 |
commit | 0441d124799dca510b3bf6621267b7838730af1a (patch) | |
tree | d5301c12dec48b570cee5d0a6daa3333ff4f575d /include | |
parent | 212b5039927842f22295c95f4e0a4f914b243194 (diff) | |
parent | 2a5108a2786383cf5c3bcefd653605c916193837 (diff) |
Merge pull request #1676 from swaywm/swaybar-input
Swaybar input
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 @@ #define _SWAYBAR_BAR_H #include <wayland-client.h> #include "pool-buffer.h" -#include "list.h" struct swaybar_config; struct swaybar_output; struct swaybar_workspace; +struct swaybar_pointer { + struct wl_pointer *pointer; + struct wl_cursor_theme *cursor_theme; + struct wl_cursor_image *cursor_image; + struct wl_surface *cursor_surface; + struct swaybar_output *current; + int x, y; +}; + +struct swaybar_hotspot { + struct wl_list link; + int x, y, width, height; + void (*callback)(struct swaybar_output *output, + int x, int y, uint32_t button, void *data); + void (*destroy)(void *data); + void *data; +}; + struct swaybar { struct wl_display *display; struct wl_compositor *compositor; struct zwlr_layer_shell_v1 *layer_shell; struct wl_shm *shm; + struct wl_seat *seat; struct swaybar_config *config; struct swaybar_output *focused_output; + struct swaybar_pointer pointer; struct status_line *status; int ipc_event_socketfd; @@ -32,6 +51,7 @@ struct swaybar_output { struct zwlr_layer_surface_v1 *layer_surface; struct wl_list workspaces; + struct wl_list hotspots; char *name; size_t index; @@ -51,7 +71,6 @@ struct swaybar_workspace { bool urgent; }; -// TODO: Rename stuff to match wlroots conventions (init/create/etc) void bar_setup(struct swaybar *bar, const char *socket_path, 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 @@ void ipc_initialize(struct swaybar *bar, const char *bar_id); bool handle_ipc_event(struct swaybar *bar); void ipc_get_workspaces(struct swaybar *bar); +void ipc_send_workspace_command(struct swaybar *bar, const char *ws); #endif |