summaryrefslogtreecommitdiff
path: root/src/til_settings.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-07-02 16:00:38 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-07-04 21:09:16 -0700
commitfde7b0b847aeb4f0c62abcc4bc7206ac858902eb (patch)
tree464e2aeb7769cbc864c351cbb2b831081dfa58a6 /src/til_settings.h
parent5ce8f8184acdf5813a7e7c265d5fa814137ce677 (diff)
til_settings: add way to change the settings label
In rkt_scener it's desirable to fully construct a new settings instance *before* wiring it into the parent rkt/scenes settings. But the way these positional settings labels get constructed depends on the parent's settings entries. So it becomes a chicken-egg problem to require the proper label @ creation before its containing setting is even added in the parent's entries. With this change a temporary WIP label can be used while constructing the settings instance, then amend it once we know the settings instance is complete and ready to join the party.
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 8339b63..6d14d20 100644
--- a/src/til_settings.h
+++ b/src/til_settings.h
@@ -49,6 +49,7 @@ til_settings_t * til_settings_new(const char *prefix, const til_settings_t *pare
til_settings_t * til_settings_free(til_settings_t *settings);
unsigned til_settings_get_count(const til_settings_t *settings);
const til_settings_t * til_settings_get_parent(const til_settings_t *settings);
+int til_settings_set_label(til_settings_t *settings, const char *label);
const char * til_settings_get_value_by_key(const til_settings_t *settings, const char *key, til_setting_t **res_setting);
const char * til_settings_get_value_by_idx(const til_settings_t *settings, unsigned idx, til_setting_t **res_setting);
til_setting_t * til_settings_add_value(til_settings_t *settings, const char *key, const char *value);
© All Rights Reserved