]> git.sur5r.net Git - i3/i3/blob - include/config_parser.h
Merge branch 'master' into next
[i3/i3] / include / config_parser.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * config_parser.h: config parser-related definitions
8  *
9  */
10 #pragma once
11
12 #include <yajl/yajl_gen.h>
13
14 extern pid_t config_error_nagbar_pid;
15
16 /*
17  * The result of a parse_config call. Currently unused, but the JSON output
18  * will be useful in the future when we implement a config parsing IPC command.
19  *
20  */
21 struct ConfigResult {
22     /* The JSON generator to append a reply to. */
23     yajl_gen json_gen;
24
25     /* The next state to transition to. Passed to the function so that we can
26      * determine the next state as a result of a function call, like
27      * cfg_criteria_pop_state() does. */
28     int next_state;
29 };
30
31 struct ConfigResult *parse_config(const char *input, struct context *context);
32
33 /**
34  * Parses the given file by first replacing the variables, then calling
35  * parse_config and possibly launching i3-nagbar.
36  *
37  */
38 void parse_file(const char *f);