diff options
Diffstat (limited to 'input/input.h')
-rw-r--r-- | input/input.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/input/input.h b/input/input.h index 82e7adc503..aafabdb9cb 100644 --- a/input/input.h +++ b/input/input.h @@ -83,7 +83,8 @@ void mp_input_src_feed_cmd_text(struct mp_input_src *src, char *buf, size_t len) void mp_input_put_key(struct input_ctx *ictx, int code); // Like mp_input_put_key(), but ignore mouse disable option for mouse buttons. -void mp_input_put_key_artificial(struct input_ctx *ictx, int code); +// value can be used like with mp_input_put_wheel(), use 1 if not applicable. +void mp_input_put_key_artificial(struct input_ctx *ictx, int code, double value); // Like mp_input_put_key(), but process all UTF-8 characters in the given // string as key events. @@ -99,7 +100,17 @@ void mp_input_set_mouse_pos(struct input_ctx *ictx, int x, int y); // Like mp_input_set_mouse_pos(), but ignore mouse disable option. void mp_input_set_mouse_pos_artificial(struct input_ctx *ictx, int x, int y); -void mp_input_get_mouse_pos(struct input_ctx *ictx, int *x, int *y); +void mp_input_get_mouse_pos(struct input_ctx *ictx, int *x, int *y, int *hover); + +// Add/Update/Remove a touch point (in window coordinates). +void mp_input_add_touch_point(struct input_ctx *ictx, int id, int x, int y); +void mp_input_update_touch_point(struct input_ctx *ictx, int id, int x, int y); +void mp_input_remove_touch_point(struct input_ctx *ictx, int id); + +// Get the positions of the touch points. xs and ys are arrays of at least +// count elements. ids is an array of at least count elements to uniquely +// identify touch points. Return the current number of touch points. +int mp_input_get_touch_pos(struct input_ctx *ictx, int count, int *xs, int *ys, int *ids); // Return whether we want/accept mouse input. bool mp_input_mouse_enabled(struct input_ctx *ictx); @@ -177,8 +188,12 @@ struct input_ctx *mp_input_init(struct mpv_global *global, void (*wakeup_cb)(void *ctx), void *wakeup_ctx); +// Load the configured input.conf files. void mp_input_load_config(struct input_ctx *ictx); +// Load a specific input.conf file. +bool mp_input_load_config_file(struct input_ctx *ictx, char *file); + void mp_input_update_opts(struct input_ctx *ictx); void mp_input_uninit(struct input_ctx *ictx); |