NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
config.c
Go to the documentation of this file.
1 
29 #include "config.h"
30 #include <stddef.h>
31 #include <config/lib.h>
32 #include <stdbool.h>
33 
34 static struct ConfigDef MenuVars[] = {
35  // clang-format off
36  { "menu_context", DT_NUMBER|DT_NOT_NEGATIVE, 0, 0, NULL,
37  "Number of lines of overlap when changing pages in the index"
38  },
39  { "menu_move_off", DT_BOOL, true, 0, NULL,
40  "Allow the last menu item to move off the bottom of the screen"
41  },
42  { "menu_scroll", DT_BOOL, false, 0, NULL,
43  "Scroll the menu/index by one line, rather than a page"
44  },
45  { NULL },
46  // clang-format on
47 };
48 
52 bool config_init_menu(struct ConfigSet *cs)
53 {
54  return cs_register_variables(cs, MenuVars, 0);
55 }
Container for lots of config items.
Definition: set.h:259
#define DT_NOT_NEGATIVE
Negative numbers are not allowed.
Definition: types.h:47
Definition: set.h:63
Convenience wrapper for the config headers.
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[], uint32_t flags)
Register a set of config items.
Definition: set.c:276
bool config_init_menu(struct ConfigSet *cs)
Register menu config variables - Implements module_init_config_t -.
Definition: config.c:52
#define DT_NUMBER
a number
Definition: types.h:35
#define DT_BOOL
boolean option
Definition: types.h:30