2 * vim:ts=4:sw=4:expandtab
4 * i3 - an improved dynamic tiling window manager
5 * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
7 * config_parser.h: config parser-related definitions
14 #include <yajl/yajl_gen.h>
16 SLIST_HEAD(variables_head, Variable);
17 extern pid_t config_error_nagbar_pid;
20 * An intermediate reprsentation of the result of a parse_config call.
21 * Currently unused, but the JSON output will be useful in the future when we
22 * implement a config parsing IPC command.
25 struct ConfigResultIR {
26 /* The JSON generator to append a reply to. */
29 /* The next state to transition to. Passed to the function so that we can
30 * determine the next state as a result of a function call, like
31 * cfg_criteria_pop_state() does. */
35 struct ConfigResultIR *parse_config(const char *input, struct context *context);
38 * launch nagbar to indicate errors in the configuration file.
40 void start_config_error_nagbar(const char *configpath, bool has_errors);
43 * Parses the given file by first replacing the variables, then calling
44 * parse_config and launching i3-nagbar if use_nagbar is true.
46 * The return value is a boolean indicating whether there were errors during
50 bool parse_file(const char *f, bool use_nagbar);