summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-17 02:33:47 +0100
committerwm4 <wm4@nowhere>2014-02-17 02:52:58 +0100
commit75d3267b43093161f94db5199bd36f14c06b7457 (patch)
tree868d2b2c23da83921c6c1546b9d66de71e3d3a35 /input
parentfe586dbbdb129e00be6c2b5e6739341dc019ab1c (diff)
downloadmpv-75d3267b43093161f94db5199bd36f14c06b7457.tar.bz2
mpv-75d3267b43093161f94db5199bd36f14c06b7457.tar.xz
client API: add a client message event
This comes with a "script_message" input command, which sends these messages. Used by the following commits.
Diffstat (limited to 'input')
-rw-r--r--input/cmd_list.c2
-rw-r--r--input/cmd_list.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/input/cmd_list.c b/input/cmd_list.c
index 05dcb72d25..f89195ad56 100644
--- a/input/cmd_list.c
+++ b/input/cmd_list.c
@@ -167,6 +167,8 @@ const struct mp_cmd_def mp_cmds[] = {
{ MP_CMD_VO_CMDLINE, "vo_cmdline", { ARG_STRING } },
{ MP_CMD_SCRIPT_DISPATCH, "script_dispatch", { ARG_STRING, ARG_INT } },
+ { MP_CMD_SCRIPT_MESSAGE, "script_message", { ARG_STRING, ARG_STRING },
+ .vararg = true },
{ MP_CMD_OVERLAY_ADD, "overlay_add",
{ ARG_INT, ARG_INT, ARG_INT, ARG_STRING, ARG_INT, ARG_STRING, ARG_INT,
diff --git a/input/cmd_list.h b/input/cmd_list.h
index 211df2b0b0..bee981b309 100644
--- a/input/cmd_list.h
+++ b/input/cmd_list.h
@@ -98,6 +98,7 @@ enum mp_command_type {
/// Internal for Lua scripts
MP_CMD_SCRIPT_DISPATCH,
+ MP_CMD_SCRIPT_MESSAGE,
MP_CMD_OVERLAY_ADD,
MP_CMD_OVERLAY_REMOVE,