diff options
author | wm4 <wm4@nowhere> | 2013-07-02 14:00:24 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-02 14:00:24 +0200 |
commit | 70a8079c8e0109eb89db3f3278be2a75a710c95e (patch) | |
tree | b96d12490af3ca5e0ed95c1952ea89d0df5ac5e7 /core/input/input.h | |
parent | 451f6788cea2f7a90badcf2fb7e1e3679fa513cb (diff) | |
download | mpv-70a8079c8e0109eb89db3f3278be2a75a710c95e.tar.bz2 mpv-70a8079c8e0109eb89db3f3278be2a75a710c95e.tar.xz |
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.
Diffstat (limited to 'core/input/input.h')
-rw-r--r-- | core/input/input.h | 9 |
1 files changed, 7 insertions, 2 deletions
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); |