aboutsummaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h
index e005dff..e56de55 100644
--- a/src/config.h
+++ b/src/config.h
@@ -30,6 +30,12 @@ typedef struct {
size_t offset;
} config_entry_t;
+typedef enum {
+ CONFIG_SUCCESS,
+ CONFIG_INVALID,
+ CONFIG_UNKNOWN,
+} config_status_t;
+
typedef struct {
size_t n_blocks;
block_t **blocks;
@@ -49,8 +55,23 @@ typedef struct {
int value;
} config_enum_t;
+extern config_enum_t text_align_enum[];
+
+extern const config_entry_t bar_entries[];
+
+extern const config_entry_t block_entries[];
+
+extern const config_entry_t block_group_entries[];
+
+extern const config_entry_t block_text_entries[];
+
+const char *config_type_to_string(config_type_t type);
+
void config_init(config_t *config);
+config_status_t config_read_entry(const config_entry_t *entries, void *result, size_t *index,
+ const char *section, const char *label, const char *key, const char *value);
+
int config_read(config_t *config, FILE *file);
int config_validate(config_t *config);