From 44fd8cde61e3e89e5f83c98900a403e922073727 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Tue, 21 Feb 2023 22:26:36 +0100 Subject: Implement support for settings Settings are a flat "dictionary" containing paths to settings on the format: ... --- src/minibuffer.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/minibuffer.h') diff --git a/src/minibuffer.h b/src/minibuffer.h index 71885ec..6845b07 100644 --- a/src/minibuffer.h +++ b/src/minibuffer.h @@ -15,6 +15,13 @@ struct command_ctx; */ void minibuffer_init(struct buffer *buffer); +/** + * Destroy the minibuffer + * + * Note that this does not release the buffer used. + */ +void minibuffer_destroy(); + /** * Echo a message to the minibuffer. * @@ -42,8 +49,10 @@ void minibuffer_echo_timeout(uint32_t timeout, const char *fmt, ...); * command (or other command) when the user confirms the input. * @param fmt Format string for the prompt. * @param ... Format arguments. + * @returns a return code suitable to return from a command to signal more input + * is needed. */ -void minibuffer_prompt(struct command_ctx command_ctx, const char *fmt, ...); +int32_t minibuffer_prompt(struct command_ctx command_ctx, const char *fmt, ...); /** * Abort the current minibuffer prompt. @@ -52,6 +61,14 @@ void minibuffer_prompt(struct command_ctx command_ctx, const char *fmt, ...); */ void minibuffer_abort_prompt(); +/** + * Minibuffer prompt args + */ +struct minibuffer_prompt_args { + int argc; + const char **argv; +}; + /** * Clear the current text in the minibuffer. */ -- cgit v1.2.3