i3
|
00001 /* 00002 * vim:ts=4:sw=4:expandtab 00003 * 00004 * i3 - an improved dynamic tiling window manager 00005 * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE) 00006 * 00007 * commands.c: all command functions (see commands_parser.c) 00008 * 00009 */ 00010 #ifndef _COMMANDS_PARSER_H 00011 #define _COMMANDS_PARSER_H 00012 00013 /* 00014 * Holds the result of a call to any command. When calling 00015 * parse_command("floating enable, border none"), the parser will internally 00016 * use a struct CommandResult when calling cmd_floating and cmd_border. 00017 * parse_command will also return another struct CommandResult, whose 00018 * json_output is set to a map of individual json_outputs and whose 00019 * needs_tree_trender is true if any individual needs_tree_render was true. 00020 * 00021 */ 00022 struct CommandResult { 00023 /* The JSON-serialized output of this command. */ 00024 char *json_output; 00025 00026 /* Whether the command requires calling tree_render. */ 00027 bool needs_tree_render; 00028 }; 00029 00030 struct CommandResult *parse_command(const char *input); 00031 00032 #endif