summaryrefslogtreecommitdiff
path: root/openbox/config.h
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-22 21:53:41 +0000
committerDana Jansens <danakj@orodu.net>2003-03-22 21:53:41 +0000
commit94f2b4a7b8b62ed031fe96da4d24b2d5dbb4aded (patch)
tree0090bc5cf7135aa8b40c5fe7f71fb987dc3b3c57 /openbox/config.h
parentce7aa15dd72e7262914de2e66b98a4f89e379462 (diff)
config system fleshed out. many thanks to woodlbock for his code! yay!
Diffstat (limited to 'openbox/config.h')
-rw-r--r--openbox/config.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/openbox/config.h b/openbox/config.h
index 9797f9e4..45ef015d 100644
--- a/openbox/config.h
+++ b/openbox/config.h
@@ -19,11 +19,36 @@ typedef struct {
ConfigValue value;
} ConfigEntry;
+typedef struct {
+ char *name;
+ ConfigValueType type;
+ /* if it is a string type optionally provide a list of valid strings */
+ gboolean hasList;
+ GSList *values;
+} ConfigDefEntry;
+
void config_startup();
void config_shutdown();
+/* Set a config variable's value. The variable must have already been defined
+ with a call to config_def_set */
gboolean config_set(char *name, ConfigValueType type, ConfigValue value);
+/* Get a config variable's value. Returns FALSE if the value has not been
+ set. */
+gboolean config_get(char *name, ConfigValueType type, ConfigValue *value);
+
+/* Create a new config definition to add to the config system */
+ConfigDefEntry *config_def_new(char *name, ConfigValueType type);
+
+/* Add a value to a String type config definition */
+gboolean config_def_add_value(ConfigDefEntry *entry, char *value);
+
+/* Sets up the definition in the config system, Don't free or touch the entry
+ after setting it with this. It is invalidated even if the function returns
+ FALSE. */
+gboolean config_def_set(ConfigDefEntry *entry);
+
void config_parse();
#endif