File: xconfig.h

package info (click to toggle)
evilwm 1.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid, stretch
  • size: 332 kB
  • ctags: 426
  • sloc: ansic: 2,997; makefile: 76; sh: 30
file content (37 lines) | stat: -rw-r--r-- 754 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* evilwm - Minimalist Window Manager for X
 * Copyright (C) 1999-2015 Ciaran Anscomb
 * see README for license and other details. */

#ifndef __XCONFIG_H__
#define __XCONFIG_H__

enum xconfig_result {
	XCONFIG_OK = 0,
	XCONFIG_BAD_OPTION,
	XCONFIG_MISSING_ARG,
	XCONFIG_FILE_ERROR
};

enum xconfig_option_type {
	XCONFIG_BOOL,
	XCONFIG_INT,
	XCONFIG_STRING,
	XCONFIG_STR_LIST,
	XCONFIG_CALL_0,
	XCONFIG_CALL_1,
	XCONFIG_END
};

struct xconfig_option {
	enum xconfig_option_type type;
	const char *name;
	void *dest;
};

enum xconfig_result xconfig_parse_file(struct xconfig_option *options,
		const char *filename);

enum xconfig_result xconfig_parse_cli(struct xconfig_option *options,
		int argc, char **argv, int *argn);

#endif  /* __XCONFIG_H__ */