diff options
author | wm4 <wm4@nowhere> | 2018-05-01 03:19:50 +0200 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-05-03 01:20:01 +0300 |
commit | 9fa0e6bf6af287814d1d2e75634544df8eafafef (patch) | |
tree | cdc3882dbbce61c2debf1f836eb18d3ee537f870 /input/cmd_list.h | |
parent | e5f884e68cc58913a4d8f6409c474f917e2fd975 (diff) | |
download | mpv-9fa0e6bf6af287814d1d2e75634544df8eafafef.tar.bz2 mpv-9fa0e6bf6af287814d1d2e75634544df8eafafef.tar.xz |
input: merge cmd_list.c with cmd.c
It doesn't really make sense to keep a separate cmd_list.c file, which
does _not_ contain a command list, but only a few minor helper
functions.
Diffstat (limited to 'input/cmd_list.h')
-rw-r--r-- | input/cmd_list.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/input/cmd_list.h b/input/cmd_list.h deleted file mode 100644 index 5f44602907..0000000000 --- a/input/cmd_list.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of mpv. - * - * mpv is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * mpv is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with mpv. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef MP_COMMAND_LIST_H -#define MP_COMMAND_LIST_H - -#include <stdbool.h> -#include "options/m_option.h" - -#define MP_CMD_DEF_MAX_ARGS 9 - -#define MP_CMD_OPT_ARG 0x1000 - -struct mp_cmd_ctx; - -struct mp_cmd_def { - const char *name; // user-visible name (as used in input.conf) - void (*handler)(void *ctx); - const struct m_option args[MP_CMD_DEF_MAX_ARGS]; - const void *priv; // for free use by handler() - bool allow_auto_repeat; // react to repeated key events - bool on_updown; // always emit it on both up and down key events - bool vararg; // last argument can be given 0 to multiple times - bool scalable; - bool is_abort; - bool is_soft_abort; - bool is_ignore; -}; - -extern const struct mp_cmd_def mp_cmds[]; - -// Executing this command will maybe abort playback (play something else, or quit). -struct mp_cmd; -bool mp_input_is_maybe_abort_cmd(struct mp_cmd *cmd); -// This command will definitely abort playback. -bool mp_input_is_abort_cmd(struct mp_cmd *cmd); - -bool mp_input_is_repeatable_cmd(struct mp_cmd *cmd); - -bool mp_input_is_scalable_cmd(struct mp_cmd *cmd); - -struct mp_log; -void mp_print_cmd_list(struct mp_log *out); - -#endif |