diff options
author | emersion <contact@emersion.fr> | 2018-11-28 09:26:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 09:26:47 +0100 |
commit | 048b96a56d3d3a817c7c63bce2f8226fffc88aa4 (patch) | |
tree | 13d0886bd0887aeaaa8d10b8c67ac63685544a8d /include | |
parent | Merge pull request #3209 from RedSoxFan/fix-3146 (diff) | |
parent | Change execute_command to return a list of results (diff) | |
download | sway-048b96a56d3d3a817c7c63bce2f8226fffc88aa4.tar.gz sway-048b96a56d3d3a817c7c63bce2f8226fffc88aa4.tar.zst sway-048b96a56d3d3a817c7c63bce2f8226fffc88aa4.zip |
Merge pull request #3204 from RedSoxFan/cmd-res-list
Change execute_command to return a list of results
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/commands.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index eb446eae..c3913c79 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h | |||
@@ -56,7 +56,7 @@ struct cmd_handler *find_handler(char *line, struct cmd_handler *cmd_handlers, | |||
56 | * all matching containers. Otherwise, it'll run on the `con` container. If | 56 | * all matching containers. Otherwise, it'll run on the `con` container. If |
57 | * `con` is NULL then it'll run on the currently focused container. | 57 | * `con` is NULL then it'll run on the currently focused container. |
58 | */ | 58 | */ |
59 | struct cmd_results *execute_command(char *command, struct sway_seat *seat, | 59 | list_t *execute_command(char *command, struct sway_seat *seat, |
60 | struct sway_container *con); | 60 | struct sway_container *con); |
61 | /** | 61 | /** |
62 | * Parse and handles a command during config file loading. | 62 | * Parse and handles a command during config file loading. |
@@ -82,11 +82,11 @@ struct cmd_results *cmd_results_new(enum cmd_status status, const char* input, c | |||
82 | */ | 82 | */ |
83 | void free_cmd_results(struct cmd_results *results); | 83 | void free_cmd_results(struct cmd_results *results); |
84 | /** | 84 | /** |
85 | * Serializes cmd_results to a JSON string. | 85 | * Serializes a list of cmd_results to a JSON string. |
86 | * | 86 | * |
87 | * Free the JSON string later on. | 87 | * Free the JSON string later on. |
88 | */ | 88 | */ |
89 | char *cmd_results_to_json(struct cmd_results *results); | 89 | char *cmd_results_to_json(list_t *res_list); |
90 | 90 | ||
91 | struct cmd_results *add_color(const char *name, | 91 | struct cmd_results *add_color(const char *name, |
92 | char *buffer, const char *color); | 92 | char *buffer, const char *color); |