summaryrefslogtreecommitdiffstats
path: root/input/input.h
diff options
context:
space:
mode:
Diffstat (limited to 'input/input.h')
-rw-r--r--input/input.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/input/input.h b/input/input.h
index df51cb7ed4..7f6707eeca 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,7 @@ 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);
// Return whether we want/accept mouse input.
bool mp_input_mouse_enabled(struct input_ctx *ictx);
@@ -177,8 +178,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);
@@ -207,16 +212,24 @@ void mp_input_set_repeat_info(struct input_ctx *ictx, int rate, int delay);
struct mpv_node mp_input_get_bindings(struct input_ctx *ictx);
-void mp_input_pipe_add(struct input_ctx *ictx, const char *filename);
-
void mp_input_sdl_gamepad_add(struct input_ctx *ictx);
struct mp_ipc_ctx;
struct mp_client_api;
+struct mpv_handle;
// Platform specific implementation, provided by ipc-*.c.
struct mp_ipc_ctx *mp_init_ipc(struct mp_client_api *client_api,
struct mpv_global *global);
+// Start a thread for the given handle and return a socket in out_fd[0] that
+// is served by this thread. If the FD is not full-duplex, then out_fd[0] is
+// the user's read-end, and out_fd[1] the write-end, otherwise out_fd[1] is set
+// to -1.
+// returns:
+// true: out_fd[0] and out_fd[1] are set, ownership of h is transferred
+// false: out_fd are not touched, caller retains ownership of h
+bool mp_ipc_start_anon_client(struct mp_ipc_ctx *ctx, struct mpv_handle *h,
+ int out_fd[2]);
void mp_uninit_ipc(struct mp_ipc_ctx *ctx);
// Serialize the given mpv_event structure to JSON. Returns an allocated string.