NeoMutt  2025-12-11-435-g4ac674
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 "core/lib.h"
33#include "set.h"
34
35extern const struct ConfigSetType CstBool;
36extern const struct ConfigSetType CstEnum;
37extern const struct ConfigSetType CstLong;
38extern const struct ConfigSetType CstMbtable;
39extern const struct ConfigSetType CstMyVar;
40extern const struct ConfigSetType CstNumber;
41extern const struct ConfigSetType CstPath;
42extern const struct ConfigSetType CstQuad;
43extern const struct ConfigSetType CstRegex;
44extern const struct ConfigSetType CstSlist;
45extern const struct ConfigSetType CstSort;
46extern const struct ConfigSetType CstString;
47
51static bool config_config_define_types(struct NeoMutt *n, struct ConfigSet *cs)
52{
53 bool rc = true;
54
55 rc &= cs_register_type(cs, &CstBool);
56 rc &= cs_register_type(cs, &CstEnum);
57 rc &= cs_register_type(cs, &CstLong);
58 rc &= cs_register_type(cs, &CstMbtable);
59 rc &= cs_register_type(cs, &CstMyVar);
60 rc &= cs_register_type(cs, &CstNumber);
61 rc &= cs_register_type(cs, &CstPath);
62 rc &= cs_register_type(cs, &CstQuad);
63 rc &= cs_register_type(cs, &CstRegex);
64 rc &= cs_register_type(cs, &CstSlist);
65 rc &= cs_register_type(cs, &CstSort);
66 rc &= cs_register_type(cs, &CstString);
67
68 return rc;
69}
70
74const struct Module ModuleConfig = {
76 "config",
77 NULL, // init
79 NULL, // config_define_variables
80 NULL, // commands_register
81 NULL, // gui_init
82 NULL, // gui_cleanup
83 NULL, // cleanup
84};
const struct ConfigSetType CstBool
Config type representing an boolean.
Definition bool.c:239
const struct ConfigSetType CstPath
Config type representing a path.
Definition path.c:273
const struct ConfigSetType CstString
Config type representing a string.
Definition string.c:282
const struct Module ModuleConfig
Module for the Config library.
Definition module.c:74
const struct ConfigSetType CstNumber
Config type representing a number.
Definition number.c:327
const struct ConfigSetType CstMyVar
Config type representing a MyVar.
Definition myvar.c:203
const struct ConfigSetType CstSlist
Config type representing a list of strings.
Definition slist.c:334
const struct ConfigSetType CstQuad
Config type representing a quad-option.
Definition quad.c:249
static bool config_config_define_types(struct NeoMutt *n, struct ConfigSet *cs)
Set up Config Types - Implements Module::config_define_types()
Definition module.c:51
const struct ConfigSetType CstRegex
Config type representing a regular expression.
Definition regex.c:345
const struct ConfigSetType CstSort
Config type representing a sort option.
Definition sort.c:231
bool cs_register_type(struct ConfigSet *cs, const struct ConfigSetType *cst)
Register a type of config item.
Definition set.c:220
A collection of config items.
Convenience wrapper for the core headers.
const struct ConfigSetType CstEnum
Config type representing an enumeration.
Definition enum.c:192
const struct ConfigSetType CstLong
Config type representing a long.
Definition long.c:258
const struct ConfigSetType CstMbtable
Config type representing a multi-byte table.
Definition mbtable.c:354
@ MODULE_ID_CONFIG
ModuleConfig, Config
Definition module_api.h:59
Container for lots of config items.
Definition set.h:250
Container for Accounts, Notifications.
Definition neomutt.h:41