From 89391e7c949216d7edec461e9bb2cb6c787475c6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 27 Jul 2014 21:33:11 +0200 Subject: vo: different hack for VOs which need to mangle mouse input Follow up on commit 760548da. Mouse handling is a bit confusing, because there are at least 3 coordinate systems associated with it, and it should be cleaned up. But that is hard, so just apply a hack which gets the currently-annoying issue (VO backends needing access to the VO) out of the way. --- input/input.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'input/input.h') diff --git a/input/input.h b/input/input.h index 2dc7b4b366..2c572fa788 100644 --- a/input/input.h +++ b/input/input.h @@ -133,6 +133,13 @@ void mp_input_set_mouse_pos(struct input_ctx *ictx, int x, int y); void mp_input_get_mouse_pos(struct input_ctx *ictx, int *x, int *y); +/* Make mp_input_set_mouse_pos() mangle the mouse coordinates. Hack for certain + * VOs. dst=NULL, src=NULL reset it. src can be NULL. + */ +struct mp_rect; +void mp_input_set_mouse_transform(struct input_ctx *ictx, struct mp_rect *dst, + struct mp_rect *src); + // As for the cmd one you usually don't need this function. void mp_input_rm_key_fd(struct input_ctx *ictx, int fd); -- cgit v1.2.3