History

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.

wm4 committed 11 years ago

Commit d6c99bc1 parent caebbde6 files · +31 −44Browse files

Showing the changes to input (1 of 6 files). Show all

Unified · Split

input/cmd_list.c+4−2
@@ -162,8 +162,10 @@ const struct mp_cmd_def mp_cmds[] = { · 161 unmodified lines
162 162
163 { MP_CMD_ENABLE_INPUT_SECTION, "enable-section", {163 { MP_CMD_ENABLE_INPUT_SECTION, "enable-section", {
164 ARG_STRING,164 ARG_STRING,
165 OARG_CHOICE(0, ({"default", 0},165 OARG_FLAGS(0, ({"default", 0},
166 {"exclusive", 1})),166 {"exclusive", MP_INPUT_EXCLUSIVE},
167 {"allow-hide-cursor", MP_INPUT_ALLOW_HIDE_CURSOR},
168 {"allow-vo-dragging", MP_INPUT_ALLOW_VO_DRAGGING})),
167 }},169 }},
168 { MP_CMD_DISABLE_INPUT_SECTION, "disable-section", { ARG_STRING } },170 { MP_CMD_DISABLE_INPUT_SECTION, "disable-section", { ARG_STRING } },
169 { MP_CMD_DEFINE_INPUT_SECTION, "define-section", {171 { MP_CMD_DEFINE_INPUT_SECTION, "define-section", {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t