summaryrefslogtreecommitdiff
path: root/include/commands.h
diff options
context:
space:
mode:
authortaiyu <[email protected]>2015-09-12 02:38:03 -0700
committertaiyu <[email protected]>2015-09-12 02:38:03 -0700
commite1d18e42a8f3a597b9bf5f1bb2ab6c346e4e7983 (patch)
tree8a8ac30c539f4a63bb249b8c5e27e724a4241c9f /include/commands.h
parentf5343adae4d631e4cdade7869b4d73fc97b4ac5f (diff)
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 @@
#include <stdbool.h>
#include "config.h"
+typedef enum cmd_status {
+ CMD_SUCCESS,
+ CMD_FAILURE,
+ CMD_DEFER,
+} sway_cmd(char *criteria, int argc, char **argv);
+
struct cmd_handler {
- char *command;
- enum cmd_status {
- CMD_SUCCESS,
- CMD_FAILURE,
- CMD_DEFER,
- } (*handle)(int argc, char **argv);
+ const char*command;
+ sway_cmd *handle;
};
enum cmd_status handle_command(char *command);
// Handles commands during config
enum cmd_status config_command(char *command);
-void remove_view_from_scratchpad();
+void remove_view_from_scratchpad(swayc_t *view);
#endif