diff options
Diffstat (limited to 'input/input.h')
-rw-r--r-- | input/input.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/input/input.h b/input/input.h index a5710b6065..5b5edd580d 100644 --- a/input/input.h +++ b/input/input.h @@ -196,9 +196,13 @@ void mp_input_disable_all_sections(struct input_ctx *ictx); // builtin: create as builtin section; this means if the user defines bindings // using "{name}", they won't be ignored or overwritten - instead, // they are preferred to the bindings defined with this call +// owner: string ID of the client which defined this, or NULL // If the section already exists, its bindings are removed and replaced. void mp_input_define_section(struct input_ctx *ictx, char *name, char *location, - char *contents, bool builtin); + char *contents, bool builtin, char *owner); + +// Remove all sections that have been defined by the given owner. +void mp_input_remove_sections_by_owner(struct input_ctx *ictx, char *owner); // Define where on the screen the named input section should receive. // Setting a rectangle of size 0 unsets the mouse area. @@ -219,22 +223,23 @@ bool mp_input_test_dragging(struct input_ctx *ictx, int x, int y); // Initialize the input system struct mpv_global; -struct input_ctx *mp_input_init(struct mpv_global *global); +struct input_ctx *mp_input_init(struct mpv_global *global, + void (*wakeup_cb)(void *ctx), + void *wakeup_ctx); + +void mp_input_load_config(struct input_ctx *ictx); -// Load config, options, and devices. -void mp_input_load(struct input_ctx *ictx); +void mp_input_update_opts(struct input_ctx *ictx); void mp_input_uninit(struct input_ctx *ictx); -// Sleep for the given amount of seconds, until mp_input_wakeup() is called, -// or new input arrives. seconds<=0 returns immediately. -void mp_input_wait(struct input_ctx *ictx, double seconds); +// Return number of seconds until the next autorepeat event will be generated. +// Returns INFINITY if no autorepeated key is active. +double mp_input_get_delay(struct input_ctx *ictx); // Wake up sleeping input loop from another thread. void mp_input_wakeup(struct input_ctx *ictx); -void mp_input_wakeup_nolock(struct input_ctx *ictx); - // Used to asynchronously abort playback. Needed because the core still can // block on network in some situations. struct mp_cancel; |