diff options
author | Peter Rice <peter@peterrice.xyz> | 2018-07-15 20:16:37 -0400 |
---|---|---|
committer | Peter Rice <peter@peterrice.xyz> | 2018-07-16 18:55:04 -0400 |
commit | 79a998849b8cedc9fccddfb31e4d1c99d1c17ff7 (patch) | |
tree | 1e2c2a54f588c4931cbf8b0cf2820029aee82bb4 /include/swaybar/bar.h | |
parent | Merge pull request #2280 from ianyfan/leaks (diff) | |
download | sway-79a998849b8cedc9fccddfb31e4d1c99d1c17ff7.tar.gz sway-79a998849b8cedc9fccddfb31e4d1c99d1c17ff7.tar.zst sway-79a998849b8cedc9fccddfb31e4d1c99d1c17ff7.zip |
make hotspot callback take an x11 button id
Diffstat (limited to 'include/swaybar/bar.h')
-rw-r--r-- | include/swaybar/bar.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h index af478f33..f1ff25b2 100644 --- a/include/swaybar/bar.h +++ b/include/swaybar/bar.h | |||
@@ -16,11 +16,24 @@ struct swaybar_pointer { | |||
16 | int x, y; | 16 | int x, y; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | enum x11_button { | ||
20 | NONE, | ||
21 | LEFT, | ||
22 | MIDDLE, | ||
23 | RIGHT, | ||
24 | SCROLL_UP, | ||
25 | SCROLL_DOWN, | ||
26 | SCROLL_LEFT, | ||
27 | SCROLL_RIGHT, | ||
28 | BACK, | ||
29 | FORWARD, | ||
30 | }; | ||
31 | |||
19 | struct swaybar_hotspot { | 32 | struct swaybar_hotspot { |
20 | struct wl_list link; | 33 | struct wl_list link; |
21 | int x, y, width, height; | 34 | int x, y, width, height; |
22 | void (*callback)(struct swaybar_output *output, | 35 | void (*callback)(struct swaybar_output *output, |
23 | int x, int y, uint32_t button, void *data); | 36 | int x, int y, enum x11_button button, void *data); |
24 | void (*destroy)(void *data); | 37 | void (*destroy)(void *data); |
25 | void *data; | 38 | void *data; |
26 | }; | 39 | }; |