aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-30 22:42:59 -0400
committerDrew DeVault <sir@cmpwn.com>2018-03-30 22:44:08 -0400
commit2a5108a2786383cf5c3bcefd653605c916193837 (patch)
tree10b69216bee8adb69fd81ebbeb05c8a7c36c51a3 /include
parentae14dfc7ae70f16a31a10f4ff2395d4ac432308d (diff)
downloadsway-2a5108a2786383cf5c3bcefd653605c916193837.tar.xz
Implement workspace switch on click
Diffstat (limited to 'include')
-rw-r--r--include/swaybar/bar.h13
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 @@
#define _SWAYBAR_BAR_H
#include <wayland-client.h>
#include "pool-buffer.h"
-#include "list.h"
struct swaybar_config;
struct swaybar_output;
@@ -14,6 +13,16 @@ struct swaybar_pointer {
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 {
@@ -42,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;
@@ -61,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);