summaryrefslogtreecommitdiffstats
path: root/input/input.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-09-09 02:08:08 +0200
committerwm4 <wm4@nowhere>2012-10-12 10:10:30 +0200
commita668ae0ff90c43ebcdea4f581aef0c98aeebd382 (patch)
treee1de875829472b0d6230372f02d7a81c9bcbeef0 /input/input.h
parent6096966dee420179b65f4d2d3b93207419e58471 (diff)
downloadmpv-a668ae0ff90c43ebcdea4f581aef0c98aeebd382.tar.bz2
mpv-a668ae0ff90c43ebcdea4f581aef0c98aeebd382.tar.xz
commands: change input commands to make OSD usage explicit
Most input commands had their own policy whether to display an OSD message for user feedback or not. Some commands had two variants, one that showed an OSD message and one that didn't (e.g. step_property_osd and step_property). Change it such that all commands show a message on the OSD. Add a "no-osd" modifier that disables OSD for that command. Rename the "step_property" and "step_property_osd" command to "switch", and rename "set_property" and "set_property_osd" to "set". Note that commands which haven't used OSD before still don't use OSD. That will possibly be fixed later. (E.g. "screenshot" could display an OSD message instead of just printing a message on the terminal.) The chapter and edition properties still produce OSD messages even with "no-osd", because they don't map so well to the property_osd_display[] mechanism.
Diffstat (limited to 'input/input.h')
-rw-r--r--input/input.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/input/input.h b/input/input.h
index 719fdf840a..af9d1a8db0 100644
--- a/input/input.h
+++ b/input/input.h
@@ -51,8 +51,7 @@ enum mp_command_type {
MP_CMD_RUN,
MP_CMD_SUB_LOAD,
MP_CMD_KEYDOWN_EVENTS,
- MP_CMD_SET_PROPERTY,
- MP_CMD_SET_PROPERTY_OSD,
+ MP_CMD_SET,
MP_CMD_GET_PROPERTY,
MP_CMD_OSD_SHOW_PROPERTY_TEXT,
MP_CMD_OSD_SHOW_PROGRESSION,
@@ -60,8 +59,7 @@ enum mp_command_type {
MP_CMD_RADIO_SET_CHANNEL,
MP_CMD_RADIO_SET_FREQ,
MP_CMD_SET_MOUSE_POS,
- MP_CMD_STEP_PROPERTY,
- MP_CMD_STEP_PROPERTY_OSD,
+ MP_CMD_SWITCH,
MP_CMD_RADIO_STEP_FREQ,
MP_CMD_TV_STEP_FREQ,
MP_CMD_TV_START_SCAN,
@@ -104,6 +102,11 @@ enum mp_command_type {
// Key FIFO was full - release events may be lost, zero button-down status
#define MP_INPUT_RELEASE_ALL -5
+enum mp_on_osd {
+ MP_ON_OSD_NO = 0,
+ MP_ON_OSD_AUTO,
+};
+
enum mp_input_section_flags {
// If a key binding is not defined in the current section, search the
// default section for it ("default" refers to bindings with no section
@@ -129,6 +132,7 @@ typedef struct mp_cmd {
struct mp_cmd_arg args[MP_CMD_MAX_ARGS];
int nargs;
int pausing;
+ enum mp_on_osd on_osd;
struct mp_cmd *queue_next;
} mp_cmd_t;