From 4473f6d8b7bda3ecb6acaf16e8609a219f7ef6fc Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Sat, 13 Jul 2019 00:35:19 +0100 Subject: Implement scroll input --- src/window.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/window.h') diff --git a/src/window.h b/src/window.h index d6e317e..3e61043 100644 --- a/src/window.h +++ b/src/window.h @@ -11,6 +11,7 @@ enum imv_event_type { IMV_EVENT_KEYBOARD, IMV_EVENT_MOUSE_MOTION, IMV_EVENT_MOUSE_BUTTON, + IMV_EVENT_MOUSE_SCROLL, IMV_EVENT_CUSTOM }; @@ -34,6 +35,9 @@ struct imv_event { int button; bool pressed; } mouse_button; + struct { + double dx, dy; + } mouse_scroll; void *custom; } data; }; @@ -54,6 +58,8 @@ void imv_window_set_fullscreen(struct imv_window *window, bool fullscreen); bool imv_window_get_mouse_button(struct imv_window *window, int button); +void imv_window_get_mouse_position(struct imv_window *window, double *x, double *y); + void imv_window_present(struct imv_window *window); void imv_window_wait_for_event(struct imv_window *window, double timeout); -- cgit v1.2.3