summaryrefslogtreecommitdiff
path: root/src/til_settings.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-03-28 13:57:45 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-03-28 13:57:45 -0700
commit9d4abba0d4f80b691cffea53322f0a4912653d25 (patch)
treede7e15b5814df12c08b761cd8c0900079cb7f619 /src/til_settings.h
parente867baeae24107f211bc13908f022fd2117214d1 (diff)
til_settings: provide a user_data pointer w/til_setting_t
Particularly in implementing a stateful/"retained" GUI it can be desirable to embed something like a widget pointer in a til_setting_t once described and shown to the user. Management of this pointer is largely nonexistant from the libtil perspective. It's simply initialized to NULL when a new setting is added, and never accessed again. 100% the caller's responsibility. This works fine since libtil/til_settings_t only accumulates til_setting_t entries and never removes them except when discarding an entire til_settings_t wholesale.
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 2896405..cbff2a7 100644
--- a/src/til_settings.h
+++ b/src/til_settings.h
@@ -29,6 +29,7 @@ struct til_setting_t {
const char *key;
const char *value;
const til_setting_desc_t *desc;
+ void *user_data;
};
til_settings_t * til_settings_new(const char *settings);
© All Rights Reserved