summaryrefslogtreecommitdiffstats
path: root/include/swaybar/input.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/swaybar/input.h')
-rw-r--r--include/swaybar/input.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/swaybar/input.h b/include/swaybar/input.h
index a552e7ac..4b46b0de 100644
--- a/include/swaybar/input.h
+++ b/include/swaybar/input.h
@@ -4,6 +4,12 @@
4#include <wayland-client.h> 4#include <wayland-client.h>
5#include "list.h" 5#include "list.h"
6 6
7#define SWAY_SCROLL_UP KEY_MAX + 1
8#define SWAY_SCROLL_DOWN KEY_MAX + 2
9#define SWAY_SCROLL_LEFT KEY_MAX + 3
10#define SWAY_SCROLL_RIGHT KEY_MAX + 4
11
12struct swaybar;
7struct swaybar_output; 13struct swaybar_output;
8 14
9struct swaybar_pointer { 15struct swaybar_pointer {
@@ -13,6 +19,7 @@ struct swaybar_pointer {
13 struct wl_surface *cursor_surface; 19 struct wl_surface *cursor_surface;
14 struct swaybar_output *current; 20 struct swaybar_output *current;
15 int x, y; 21 int x, y;
22 uint32_t serial;
16}; 23};
17 24
18enum x11_button { 25enum x11_button {
@@ -37,13 +44,16 @@ struct swaybar_hotspot {
37 struct wl_list link; // swaybar_output::hotspots 44 struct wl_list link; // swaybar_output::hotspots
38 int x, y, width, height; 45 int x, y, width, height;
39 enum hotspot_event_handling (*callback)(struct swaybar_output *output, 46 enum hotspot_event_handling (*callback)(struct swaybar_output *output,
40 int x, int y, enum x11_button button, void *data); 47 struct swaybar_hotspot *hotspot, int x, int y, uint32_t button,
48 void *data);
41 void (*destroy)(void *data); 49 void (*destroy)(void *data);
42 void *data; 50 void *data;
43}; 51};
44 52
45extern const struct wl_seat_listener seat_listener; 53extern const struct wl_seat_listener seat_listener;
46 54
55void update_cursor(struct swaybar *bar);
56
47void free_hotspots(struct wl_list *list); 57void free_hotspots(struct wl_list *list);
48 58
49#endif 59#endif