NeoMutt  2021-10-29-225-gb9986f
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 
30 struct 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 
49 void mutt_commands_init (void);
50 void commands_register (const struct Command *cmdv, const size_t cmds);
51 void mutt_commands_free (void);
52 size_t mutt_commands_array (struct Command **first);
53 struct Command *mutt_command_get (const char *s);
54 #ifdef USE_LUA
55 void 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 *cmdv, const size_t cmds)
Add commands to Commands array.
struct Command * mutt_command_get(const char *s)
Get a Command by its name.
size_t mutt_commands_array(struct Command **first)
Get Commands array.
void mutt_commands_init(void)
Initialize commands array and register default commands.
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:63