diff options
author | David Eklov <david.eklov@gmail.com> | 2016-07-11 23:15:23 -0500 |
---|---|---|
committer | David Eklov <david.eklov@gmail.com> | 2016-07-15 19:14:31 -0500 |
commit | c0b7610c264b36de46e12189cb622a597c5b000b (patch) | |
tree | cdd0bab3f262b850bc2431d941a2841c20b65dfc /include | |
parent | Rename pointer_input::notify to indicate that is called on button clicks (diff) | |
download | sway-c0b7610c264b36de46e12189cb622a597c5b000b.tar.gz sway-c0b7610c264b36de46e12189cb622a597c5b000b.tar.zst sway-c0b7610c264b36de46e12189cb622a597c5b000b.zip |
Enable windows to register to get notified when the mouse wheel is scrolled
Diffstat (limited to 'include')
-rw-r--r-- | include/client/window.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/client/window.h b/include/client/window.h index 98d19a2b..e07e3509 100644 --- a/include/client/window.h +++ b/include/client/window.h | |||
@@ -27,11 +27,20 @@ struct cursor { | |||
27 | struct wl_poitner *pointer; | 27 | struct wl_poitner *pointer; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | enum scroll_direction { | ||
31 | SCROLL_UP, | ||
32 | SCROLL_DOWN, | ||
33 | SCROLL_LEFT, | ||
34 | SCROLL_RIGHT, | ||
35 | }; | ||
36 | |||
30 | struct pointer_input { | 37 | struct pointer_input { |
31 | int last_x; | 38 | int last_x; |
32 | int last_y; | 39 | int last_y; |
33 | 40 | ||
34 | void (*notify_button)(struct window *window, int x, int y, uint32_t button); | 41 | void (*notify_button)(struct window *window, int x, int y, uint32_t button); |
42 | |||
43 | void (*notify_scroll)(struct window *window, enum scroll_direction direction); | ||
35 | }; | 44 | }; |
36 | 45 | ||
37 | struct window { | 46 | struct window { |