summaryrefslogtreecommitdiffstats
path: root/include/commands.h
diff options
context:
space:
mode:
authorLibravatar taiyu <taiyu.len@gmail.com>2015-09-12 02:38:03 -0700
committerLibravatar taiyu <taiyu.len@gmail.com>2015-09-12 02:38:03 -0700
commite1d18e42a8f3a597b9bf5f1bb2ab6c346e4e7983 (patch)
tree8a8ac30c539f4a63bb249b8c5e27e724a4241c9f /include/commands.h
parentMerge pull request #177 from taiyu-len/master (diff)
downloadsway-e1d18e42a8f3a597b9bf5f1bb2ab6c346e4e7983.tar.gz
sway-e1d18e42a8f3a597b9bf5f1bb2ab6c346e4e7983.tar.zst
sway-e1d18e42a8f3a597b9bf5f1bb2ab6c346e4e7983.zip
new_workspace null behavior + testmap functions + regex
Diffstat (limited to 'include/commands.h')
-rw-r--r--include/commands.h16
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
6typedef enum cmd_status {
7 CMD_SUCCESS,
8 CMD_FAILURE,
9 CMD_DEFER,
10} sway_cmd(char *criteria, int argc, char **argv);
11
6struct cmd_handler { 12struct 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
15enum cmd_status handle_command(char *command); 17enum cmd_status handle_command(char *command);
16// Handles commands during config 18// Handles commands during config
17enum cmd_status config_command(char *command); 19enum cmd_status config_command(char *command);
18 20
19void remove_view_from_scratchpad(); 21void remove_view_from_scratchpad(swayc_t *view);
20 22
21#endif 23#endif