summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-08-06 00:31:47 +0200
committerwm4 <wm4@nowhere>2015-08-06 00:31:47 +0200
commitd6c99bcda2b4e2791c6b147f5ba9d9cd95c7be7f (patch)
treecc31efc6ab85fef7e30c3a560c2d691b60ff4528 /input
parentcaebbded67195d7f234e620cadc25ec276f4abcc (diff)
downloadmpv-d6c99bcda2b4e2791c6b147f5ba9d9cd95c7be7f.tar.bz2
mpv-d6c99bcda2b4e2791c6b147f5ba9d9cd95c7be7f.tar.xz
lua: implement input_enable_section/input_disable_section via commands
Removes some more internal API calls from the Lua scripting backend. Which is good, because ideally the scripting backend would use libmpv functions only. One awkwardness is that mouse sections are still not supported by the public commands (and probably will never), so flags like allow-hide- cursor make no sense to an outside user. Also, the way flags are passed to the Lua function changes. But that's ok, because they're only undocumented internal functions, and not supposed to be used by script users. osc.lua only does due to historical reasons.
Diffstat (limited to 'input')
-rw-r--r--input/cmd_list.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/input/cmd_list.c b/input/cmd_list.c
index 250f451955..3640cce460 100644
--- a/input/cmd_list.c
+++ b/input/cmd_list.c
@@ -162,8 +162,10 @@ const struct mp_cmd_def mp_cmds[] = {
{ MP_CMD_ENABLE_INPUT_SECTION, "enable-section", {
ARG_STRING,
- OARG_CHOICE(0, ({"default", 0},
- {"exclusive", 1})),
+ OARG_FLAGS(0, ({"default", 0},
+ {"exclusive", MP_INPUT_EXCLUSIVE},
+ {"allow-hide-cursor", MP_INPUT_ALLOW_HIDE_CURSOR},
+ {"allow-vo-dragging", MP_INPUT_ALLOW_VO_DRAGGING})),
}},
{ MP_CMD_DISABLE_INPUT_SECTION, "disable-section", { ARG_STRING } },
{ MP_CMD_DEFINE_INPUT_SECTION, "define-section", {