summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar David Eklov <david.eklov@gmail.com>2016-07-11 23:15:23 -0500
committerLibravatar David Eklov <david.eklov@gmail.com>2016-07-15 19:14:31 -0500
commitc0b7610c264b36de46e12189cb622a597c5b000b (patch)
treecdd0bab3f262b850bc2431d941a2841c20b65dfc /include
parentRename pointer_input::notify to indicate that is called on button clicks (diff)
downloadsway-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.h9
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
30enum scroll_direction {
31 SCROLL_UP,
32 SCROLL_DOWN,
33 SCROLL_LEFT,
34 SCROLL_RIGHT,
35};
36
30struct pointer_input { 37struct 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
37struct window { 46struct window {