summaryrefslogtreecommitdiff
path: root/src/minibuffer.h
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2023-02-21 22:26:36 +0100
committerAlbert Cervin <albert@acervin.com>2023-02-21 22:26:36 +0100
commit44fd8cde61e3e89e5f83c98900a403e922073727 (patch)
tree22ed65a8b3c766fa21c35fe4d567399e3810454a /src/minibuffer.h
parentd7bf8702bf32720d93c4e690937bc8b683926be1 (diff)
downloaddged-44fd8cde61e3e89e5f83c98900a403e922073727.tar.gz
dged-44fd8cde61e3e89e5f83c98900a403e922073727.tar.xz
dged-44fd8cde61e3e89e5f83c98900a403e922073727.zip
Implement support for settings
Settings are a flat "dictionary" containing paths to settings on the format: <category>.<sub-category>.<setting>.
Diffstat (limited to 'src/minibuffer.h')
-rw-r--r--src/minibuffer.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/minibuffer.h b/src/minibuffer.h
index 71885ec..6845b07 100644
--- a/src/minibuffer.h
+++ b/src/minibuffer.h
@@ -16,6 +16,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.
*
* @param fmt Format string for the message.
@@ -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.
@@ -53,6 +62,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.
*/
void minibuffer_clear();