From 70a8079c8e0109eb89db3f3278be2a75a710c95e Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 2 Jul 2013 14:00:24 +0200 Subject: core: remove mp_fifo indirection For some reason mp_fifo specifically handled double clicks, and other than that was a pointless wrapper around input.c functionality. Move the double click handling into input.c, and get rid of mp_fifo. Add some compatibility wrappers, because so much VO code uses these functions. Where struct mp_fifo is still used it's just a casted struct input_ctx. --- core/input/input.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'core/input/input.h') diff --git a/core/input/input.h b/core/input/input.h index 5b6170c7ae..2a9b3832c1 100644 --- a/core/input/input.h +++ b/core/input/input.h @@ -175,8 +175,13 @@ int mp_input_add_key_fd(struct input_ctx *ictx, int fd, int select, int read_func(void *ctx, int fd), int close_func(int fd), void *ctx); -// Feed a keypress (alternative to being returned from read_func above) -void mp_input_feed_key(struct input_ctx *ictx, int code); +// Process keyboard input. code is a key code from keycodes.h, possibly +// with modifiers applied. MP_INPUT_RELEASE_ALL is also a valid value. +void mp_input_put_key(struct input_ctx *ictx, int code); + +// Like mp_input_put_key(), but process all UTF-8 characters in the given +// string as key events. +void mp_input_put_key_utf8(struct input_ctx *ictx, int mods, struct bstr t); // Update mouse position (in window coordinates). void mp_input_set_mouse_pos(struct input_ctx *ictx, int x, int y); -- cgit v1.2.3