i3
Main Page
Data Structures
Files
File List
Globals
include
commands_parser.h
Go to the documentation of this file.
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
* commands.c: all command functions (see commands_parser.c)
8
*
9
*/
10
#ifndef I3_COMMANDS_PARSER_H
11
#define I3_COMMANDS_PARSER_H
12
13
#include <yajl/yajl_gen.h>
14
15
/*
16
* Holds the result of a call to any command. When calling
17
* parse_command("floating enable, border none"), the parser will internally
18
* use a struct CommandResult when calling cmd_floating and cmd_border.
19
* parse_command will also return another struct CommandResult, whose
20
* json_output is set to a map of individual json_outputs and whose
21
* needs_tree_trender is true if any individual needs_tree_render was true.
22
*
23
*/
24
struct
CommandResult
{
25
/* The JSON generator to append a reply to. */
26
yajl_gen
json_gen
;
27
28
/* The next state to transition to. Passed to the function so that we can
29
* determine the next state as a result of a function call, like
30
* cfg_criteria_pop_state() does. */
31
int
next_state
;
32
33
/* Whether the command requires calling tree_render. */
34
bool
needs_tree_render
;
35
};
36
37
struct
CommandResult
*
parse_command
(
const
char
*input);
38
39
#endif
Generated by
1.8.4