]> git.sur5r.net Git - i3/i3/blobdiff - include/commands_parser.h
Merge branch 'master' into next
[i3/i3] / include / commands_parser.h
index 5a4472d8acd2b4d090642d5a85a56c919f91e6ca..fcc14ff58881f3ffbfb1096d9ff7b02afa673061 100644 (file)
@@ -7,8 +7,10 @@
  * commands.c: all command functions (see commands_parser.c)
  *
  */
-#ifndef _COMMANDS_PARSER_H
-#define _COMMANDS_PARSER_H
+#ifndef I3_COMMANDS_PARSER_H
+#define I3_COMMANDS_PARSER_H
+
+#include <yajl/yajl_gen.h>
 
 /*
  * Holds the result of a call to any command. When calling
  *
  */
 struct CommandResult {
-    /* The JSON-serialized output of this command. */
-    char *json_output;
+    /* The JSON generator to append a reply to. */
+    yajl_gen json_gen;
 
     /* Whether the command requires calling tree_render. */
     bool needs_tree_render;
+
+    /* The next state to transition to. Passed to the function so that we can
+     * determine the next state as a result of a function call, like
+     * cfg_criteria_pop_state() does. */
+    int next_state;
 };
 
 struct CommandResult *parse_command(const char *input);