mirror of
https://github.com/swaywm/sway.git
synced 2025-11-01 22:58:41 -04:00
Enable windows to register to get notified when the mouse wheel is scrolled
This commit is contained in:
parent
250ddc66c6
commit
c0b7610c26
2 changed files with 29 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue