From 250ddc66c672f62a3c7f44db73b5c4d0661093ba Mon Sep 17 00:00:00 2001 From: David Eklov Date: Mon, 11 Jul 2016 22:51:50 -0500 Subject: Rename pointer_input::notify to indicate that is called on button clicks --- include/client/window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/client') diff --git a/include/client/window.h b/include/client/window.h index 55a12225..98d19a2b 100644 --- a/include/client/window.h +++ b/include/client/window.h @@ -31,7 +31,7 @@ struct pointer_input { int last_x; int last_y; - void (*notify)(struct window *window, int x, int y, uint32_t button); + void (*notify_button)(struct window *window, int x, int y, uint32_t button); }; struct window { -- cgit v1.2.3 From c0b7610c264b36de46e12189cb622a597c5b000b Mon Sep 17 00:00:00 2001 From: David Eklov Date: Mon, 11 Jul 2016 23:15:23 -0500 Subject: Enable windows to register to get notified when the mouse wheel is scrolled --- include/client/window.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/client') 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 { struct wl_poitner *pointer; }; +enum scroll_direction { + SCROLL_UP, + SCROLL_DOWN, + SCROLL_LEFT, + SCROLL_RIGHT, +}; + struct pointer_input { int last_x; int last_y; void (*notify_button)(struct window *window, int x, int y, uint32_t button); + + void (*notify_scroll)(struct window *window, enum scroll_direction direction); }; struct window { -- cgit v1.2.3