i3
commands_parser.h
Go to the documentation of this file.
1/*
2 * vim:ts=4:sw=4:expandtab
3 *
4 * i3 - an improved tiling window manager
5 * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
6 *
7 * commands.c: all command functions (see commands_parser.c)
8 *
9 */
10#pragma once
11
12#include <config.h>
13
14#include <yajl/yajl_gen.h>
15
22 /* The JSON generator to append a reply to (may be NULL). */
23 yajl_gen json_gen;
24
25 /* The IPC client connection which sent this command (may be NULL, e.g. for
26 key bindings). */
28
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. */
33
34 /* Whether the command requires calling tree_render. */
36};
37
39
48 /* the error_message is currently only set for parse errors */
51};
52
59char *parse_string(const char **walk, bool as_word);
60
68CommandResult *parse_command(const char *input, yajl_gen gen, ipc_client *client);
69
CommandResult * parse_command(const char *input, yajl_gen gen, ipc_client *client)
Parses and executes the given command.
char * parse_string(const char **walk, bool as_word)
Parses a string (or word, if as_word is true).
void command_result_free(CommandResult *result)
Frees a CommandResult.
Holds an intermediate representation of the result of a call to any command.
ipc_client * client
A struct that contains useful information about the result of a command as a whole (e....