aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/input.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-11-18 11:22:02 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2017-11-18 11:22:02 -0500
commit733993a651c71f7e2198d505960d6bbd31e0e107 (patch)
treee51732c5872b624e73355f9e5b3f762101f3cd0d /sway/commands/input.c
parentInitial (awful) pass on xdg shell support (diff)
downloadsway-733993a651c71f7e2198d505960d6bbd31e0e107.tar.gz
sway-733993a651c71f7e2198d505960d6bbd31e0e107.tar.zst
sway-733993a651c71f7e2198d505960d6bbd31e0e107.zip
Move everything to sway/old/
Diffstat (limited to 'sway/commands/input.c')
-rw-r--r--sway/commands/input.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/sway/commands/input.c b/sway/commands/input.c
deleted file mode 100644
index ad53d272..00000000
--- a/sway/commands/input.c
+++ /dev/null
@@ -1,55 +0,0 @@
1#include <string.h>
2#include <strings.h>
3#include "sway/commands.h"
4#include "sway/input.h"
5#include "log.h"
6
7struct cmd_results *cmd_input(int argc, char **argv) {
8 struct cmd_results *error = NULL;
9 if ((error = checkarg(argc, "input", EXPECTED_AT_LEAST, 2))) {
10 return error;
11 }
12
13 if (config->reading && strcmp("{", argv[1]) == 0) {
14 current_input_config = new_input_config(argv[0]);
15 sway_log(L_DEBUG, "entering input block: %s", current_input_config->identifier);
16 return cmd_results_new(CMD_BLOCK_INPUT, NULL, NULL);
17 }
18
19 if (argc > 2) {
20 int argc_new = argc-2;
21 char **argv_new = argv+2;
22
23 struct cmd_results *res;
24 current_input_config = new_input_config(argv[0]);
25 if (strcasecmp("accel_profile", argv[1]) == 0) {
26 res = input_cmd_accel_profile(argc_new, argv_new);
27 } else if (strcasecmp("click_method", argv[1]) == 0) {
28 res = input_cmd_click_method(argc_new, argv_new);
29 } else if (strcasecmp("drag_lock", argv[1]) == 0) {
30 res = input_cmd_drag_lock(argc_new, argv_new);
31 } else if (strcasecmp("dwt", argv[1]) == 0) {
32 res = input_cmd_dwt(argc_new, argv_new);
33 } else if (strcasecmp("events", argv[1]) == 0) {
34 res = input_cmd_events(argc_new, argv_new);
35 } else if (strcasecmp("left_handed", argv[1]) == 0) {
36 res = input_cmd_left_handed(argc_new, argv_new);
37 } else if (strcasecmp("middle_emulation", argv[1]) == 0) {
38 res = input_cmd_middle_emulation(argc_new, argv_new);
39 } else if (strcasecmp("natural_scroll", argv[1]) == 0) {
40 res = input_cmd_natural_scroll(argc_new, argv_new);
41 } else if (strcasecmp("pointer_accel", argv[1]) == 0) {
42 res = input_cmd_pointer_accel(argc_new, argv_new);
43 } else if (strcasecmp("scroll_method", argv[1]) == 0) {
44 res = input_cmd_scroll_method(argc_new, argv_new);
45 } else if (strcasecmp("tap", argv[1]) == 0) {
46 res = input_cmd_tap(argc_new, argv_new);
47 } else {
48 res = cmd_results_new(CMD_INVALID, "input <device>", "Unknown command %s", argv[1]);
49 }
50 current_input_config = NULL;
51 return res;
52 }
53
54 return cmd_results_new(CMD_BLOCK_INPUT, NULL, NULL);
55}