From d32bee5f019f2c51839df16b7c7955dc33651cbe Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 1 Sep 2016 20:00:43 +0200 Subject: command: add options to property list Now options are accessible through the property list as well, which unifies them to a degree. Not all options support runtime changes (meaning affected components need to be restarted for the options to take effects). Remove from the manpage those properties which are cleanly mapped to options anyway. From the user-perspective they're just options available through the property interface. --- options/m_config.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'options/m_config.c') diff --git a/options/m_config.c b/options/m_config.c index 352965ea47..d4c19808b0 100644 --- a/options/m_config.c +++ b/options/m_config.c @@ -447,6 +447,16 @@ struct m_config_option *m_config_get_co(const struct m_config *config, return NULL; } +int m_config_get_co_count(struct m_config *config) +{ + return config->num_opts; +} + +struct m_config_option *m_config_get_co_index(struct m_config *config, int index) +{ + return &config->opts[index]; +} + const char *m_config_get_positional_option(const struct m_config *config, int p) { int pos = 0; @@ -509,7 +519,7 @@ static void handle_on_set(struct m_config *config, struct m_config_option *co, mp_msg_update_msglevels(config->global); } -// The type data points to is as in: m_config_get_co(config, name)->opt +// The type data points to is as in: co->opt int m_config_set_option_raw(struct m_config *config, struct m_config_option *co, void *data, int flags) { -- cgit v1.2.3