NeoMutt  2022-04-29-249-gaae397
Teaching an old dog new tricks
DOXYGEN
mutt_commands.h
Go to the documentation of this file.
1
23#ifndef MUTT_MUTT_COMMANDS_H
24#define MUTT_MUTT_COMMANDS_H
25
26#include "config.h"
27#include <stddef.h>
28#include "mutt/lib.h"
29
30struct Command;
31
36{
41};
42
43/* parameter to parse_mailboxes */
44#define MUTT_NAMED (1 << 0)
45
46/* command registry functions */
47#define COMMANDS_REGISTER(cmds) commands_register(cmds, mutt_array_size(cmds))
48
49void mutt_commands_init (void);
50void commands_register (const struct Command *cmds, const size_t num_cmds);
51void mutt_commands_free (void);
52size_t mutt_commands_array (struct Command **first);
53struct Command *mutt_command_get (const char *s);
54#ifdef USE_LUA
55void mutt_commands_apply (void *data, void (*application)(void *, const struct Command *));
56#endif
57
58#endif /* MUTT_MUTT_COMMANDS_H */
Convenience wrapper for the library headers.
void mutt_commands_free(void)
Free Commands array.
void mutt_commands_apply(void *data, void(*application)(void *, const struct Command *))
Run a callback function on every Command.
void commands_register(const struct Command *cmds, const size_t num_cmds)
Add commands to Commands array.
size_t mutt_commands_array(struct Command **first)
Get Commands array.
void mutt_commands_init(void)
Initialize commands array and register default commands.
struct Command * mutt_command_get(const char *s)
Get a Command by its name.
MuttSetCommand
Flags for parse_set()
Definition: mutt_commands.h:36
@ MUTT_SET_INV
default is to invert all vars
Definition: mutt_commands.h:38
@ MUTT_SET_SET
default is to set all vars
Definition: mutt_commands.h:37
@ MUTT_SET_RESET
default is to reset all vars to default
Definition: mutt_commands.h:40
@ MUTT_SET_UNSET
default is to unset all vars
Definition: mutt_commands.h:39
intptr_t data
Data or flags to pass to the command.
Definition: command.h:65