aboutsummaryrefslogtreecommitdiff
path: root/src/window.h
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2019-07-13 00:35:19 +0100
committerHarry Jeffery <harry@exec64.co.uk>2019-07-13 00:35:19 +0100
commit4473f6d8b7bda3ecb6acaf16e8609a219f7ef6fc (patch)
treebeec9492b8a013ca7ad815ed1ea8a7691e5c7a2b /src/window.h
parent5a1571d00dd1e73f906b1c83b7abe13aa0908e9a (diff)
downloadimv-4473f6d8b7bda3ecb6acaf16e8609a219f7ef6fc.tar.gz
Implement scroll input
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h6
1 files changed, 6 insertions, 0 deletions
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);