summaryrefslogtreecommitdiff
path: root/src/til_settings.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-08-23 20:22:17 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-05-11 15:17:56 -0700
commitcf8c5c53a8831fa7c7e0c7d2fb929b76708d66e1 (patch)
tree8b400dee4a79344a4cfb133022f93a079c5c7f6e /src/til_settings.h
parente0e2ef79c1a44e241bc324abe242c397d1d0c6ac (diff)
til_settings: add til_setting_desc_t.as_nested_settings
When this is set, the setting is itself to be a settings instance that the frontend must create and place in the relevant til_setting_t.value_as_nested_settings. This commit implements that frontend portion in setup_interactively() for the rototiller frontend. No setup_func() yet attempts to make use of this stuff. There's probably more change needed before that can happen, specifically the setup_func() likely must always produce a til_settings_t* to indicate which settings instance is currently relevant to the frontend. Without setup_func() telling the frontend, the frontend has basically no other way of knowing when the backend setup_func() has moved up/down the heirarchy at the current iteration.
Diffstat (limited to 'src/til_settings.h')
-rw-r--r--src/til_settings.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/til_settings.h b/src/til_settings.h
index d4822be..8911e6c 100644
--- a/src/til_settings.h
+++ b/src/til_settings.h
@@ -16,6 +16,7 @@ typedef struct til_setting_desc_t {
const char **values; /* if a set of values is provided, listed here */
const char **annotations; /* if a set of values is provided, annotations for those values may be listed here */
char * (*random)(unsigned seed);/* if set, returns a valid random value for this setting */
+ unsigned as_nested_settings:1; /* if set, this setting expects a settings string for its value and wants a nested til_setting_t.settings instance created for it */
} til_setting_desc_t;
/* For conveniently representing setting description generators */
© All Rights Reserved