diff options
Diffstat (limited to 'include/commands.h')
-rw-r--r-- | include/commands.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/commands.h b/include/commands.h index 5c87be51..69ab1380 100644 --- a/include/commands.h +++ b/include/commands.h | |||
@@ -3,19 +3,21 @@ | |||
3 | #include <stdbool.h> | 3 | #include <stdbool.h> |
4 | #include "config.h" | 4 | #include "config.h" |
5 | 5 | ||
6 | typedef enum cmd_status { | ||
7 | CMD_SUCCESS, | ||
8 | CMD_FAILURE, | ||
9 | CMD_DEFER, | ||
10 | } sway_cmd(char *criteria, int argc, char **argv); | ||
11 | |||
6 | struct cmd_handler { | 12 | struct cmd_handler { |
7 | char *command; | 13 | const char*command; |
8 | enum cmd_status { | 14 | sway_cmd *handle; |
9 | CMD_SUCCESS, | ||
10 | CMD_FAILURE, | ||
11 | CMD_DEFER, | ||
12 | } (*handle)(int argc, char **argv); | ||
13 | }; | 15 | }; |
14 | 16 | ||
15 | enum cmd_status handle_command(char *command); | 17 | enum cmd_status handle_command(char *command); |
16 | // Handles commands during config | 18 | // Handles commands during config |
17 | enum cmd_status config_command(char *command); | 19 | enum cmd_status config_command(char *command); |
18 | 20 | ||
19 | void remove_view_from_scratchpad(); | 21 | void remove_view_from_scratchpad(swayc_t *view); |
20 | 22 | ||
21 | #endif | 23 | #endif |