mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
input, player: new command for mouse event
New command `mouse <x> <y> [<button> [single|double]]` is introduced. This will update mouse position with given coordinate (`<x>`, `<y>`), and additionally, send single-click or double-click event if `<button>` is given.
This commit is contained in:
@@ -186,6 +186,13 @@ const struct mp_cmd_def mp_cmds[] = {
|
||||
{ MP_CMD_HOOK_ADD, "hook_add", { ARG_STRING, ARG_INT, ARG_INT } },
|
||||
{ MP_CMD_HOOK_ACK, "hook_ack", { ARG_STRING } },
|
||||
|
||||
{ MP_CMD_MOUSE, "mouse", {
|
||||
ARG_INT, ARG_INT, // coordinate (x, y)
|
||||
OARG_INT(-1), // button number
|
||||
OARG_CHOICE(0, ({"single", 0},
|
||||
{"double", 1})),
|
||||
}},
|
||||
|
||||
{0}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user