NeoMutt  2025-12-11-694-ga89709
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
module.c
Go to the documentation of this file.
1
22
28
29#include "config.h"
30#include <stdbool.h>
31#include <stddef.h>
32#include "mutt/lib.h"
33#include "config/lib.h"
34#include "core/lib.h"
35#include "module_data.h"
36
37extern struct ConfigDef HooksVars[];
38extern const struct Command HooksCommands[];
39
43static bool hooks_init(struct NeoMutt *n)
44{
45 // struct HooksModuleData *md = MUTT_MEM_CALLOC(1, struct HooksModuleData);
46 // neomutt_set_module_data(n, MODULE_ID_HOOKS, md);
47
48 return true;
49}
50
54static bool hooks_config_define_variables(struct NeoMutt *n, struct ConfigSet *cs)
55{
57}
58
62static bool hooks_commands_register(struct NeoMutt *n, struct CommandArray *ca)
63{
65}
66
70static bool hooks_cleanup(struct NeoMutt *n)
71{
72 // struct HooksModuleData *md = neomutt_get_module_data(n, MODULE_ID_HOOKS);
73 // ASSERT(md);
74
75 // FREE(&md);
76 return true;
77}
78
82const struct Module ModuleHooks = {
84 "hooks",
86 NULL, // config_define_types
89 NULL, // gui_init
90 NULL, // gui_cleanup
92};
Convenience wrapper for the config headers.
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[])
Register a set of config items.
Definition set.c:290
bool commands_register(struct CommandArray *ca, const struct Command *cmds)
Add commands to Commands array.
Definition command.c:51
Convenience wrapper for the core headers.
const struct Module ModuleHooks
Module for the Hooks library.
Definition module.c:82
const struct Command HooksCommands[]
Hook Commands.
Definition commands.c:40
struct ConfigDef HooksVars[]
Config definitions for the Hooks library.
Definition config.c:29
static bool hooks_commands_register(struct NeoMutt *n, struct CommandArray *ca)
Register NeoMutt Commands - Implements Module::commands_register()
Definition module.c:62
static bool hooks_init(struct NeoMutt *n)
Initialise a Module - Implements Module::init()
Definition module.c:43
static bool hooks_cleanup(struct NeoMutt *n)
Clean up a Module - Implements Module::cleanup()
Definition module.c:70
static bool hooks_config_define_variables(struct NeoMutt *n, struct ConfigSet *cs)
Define the Config Variables - Implements Module::config_define_variables()
Definition module.c:54
Hooks private Module data.
@ MODULE_ID_HOOKS
ModuleHooks, Hook Commands
Definition module_api.h:70
Convenience wrapper for the library headers.
Container for lots of config items.
Definition set.h:251
Container for Accounts, Notifications.
Definition neomutt.h:41