git: initial import (.gitignore)
[evilwm.git] / xconfig.h
blob6e043b4c1786265655d04b11513971578014b10f
1 /* evilwm - Minimalist Window Manager for X
2 * Copyright (C) 1999-2009 Ciaran Anscomb
3 * see README for license and other details. */
5 #ifndef __XCONFIG_H__
6 #define __XCONFIG_H__
8 enum xconfig_result {
9 XCONFIG_OK = 0,
10 XCONFIG_BAD_OPTION,
11 XCONFIG_MISSING_ARG,
12 XCONFIG_FILE_ERROR
15 enum xconfig_option_type {
16 XCONFIG_BOOL,
17 XCONFIG_INT,
18 XCONFIG_STRING,
19 XCONFIG_CALL_0,
20 XCONFIG_CALL_1,
21 XCONFIG_END
24 struct xconfig_option {
25 enum xconfig_option_type type;
26 const char *name;
27 void *dest;
30 enum xconfig_result xconfig_parse_file(struct xconfig_option *options,
31 const char *filename);
33 enum xconfig_result xconfig_parse_cli(struct xconfig_option *options,
34 int argc, char **argv, int *argn);
36 #endif /* __XCONFIG_H__ */