diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-12 20:19:54 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-04-12 20:19:54 -0400 |
commit | cd1b32453a9296c18b28bff71607aeb22987b5cd (patch) | |
tree | c653c6d525b471914c01a9d7ae543f521b6138ed /include/sway/commands.h | |
parent | Merge pull request #1634 from aleksander/master (diff) | |
parent | Fix separator height calculation (diff) | |
download | sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.gz sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.zst sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.zip |
Merge branch 'wlroots'
Diffstat (limited to 'include/sway/commands.h')
-rw-r--r-- | include/sway/commands.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index 660da2c2..dbebaa49 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h | |||
@@ -1,12 +1,7 @@ | |||
1 | #ifndef _SWAY_COMMANDS_H | 1 | #ifndef _SWAY_COMMANDS_H |
2 | #define _SWAY_COMMANDS_H | 2 | #define _SWAY_COMMANDS_H |
3 | #include <stdbool.h> | ||
4 | #include <json-c/json.h> | ||
5 | #include <wlc/wlc.h> | ||
6 | #include "config.h" | ||
7 | 3 | ||
8 | // Container that a called command should act upon. Only valid in command functions. | 4 | #include "config.h" |
9 | extern swayc_t *current_container; | ||
10 | 5 | ||
11 | /** | 6 | /** |
12 | * Indicates the result of a command's execution. | 7 | * Indicates the result of a command's execution. |
@@ -22,6 +17,7 @@ enum cmd_status { | |||
22 | CMD_BLOCK_BAR, | 17 | CMD_BLOCK_BAR, |
23 | CMD_BLOCK_BAR_COLORS, | 18 | CMD_BLOCK_BAR_COLORS, |
24 | CMD_BLOCK_INPUT, | 19 | CMD_BLOCK_INPUT, |
20 | CMD_BLOCK_SEAT, | ||
25 | CMD_BLOCK_COMMANDS, | 21 | CMD_BLOCK_COMMANDS, |
26 | CMD_BLOCK_IPC, | 22 | CMD_BLOCK_IPC, |
27 | CMD_BLOCK_IPC_EVENTS, | 23 | CMD_BLOCK_IPC_EVENTS, |
@@ -46,18 +42,13 @@ enum expected_args { | |||
46 | EXPECTED_EQUAL_TO | 42 | EXPECTED_EQUAL_TO |
47 | }; | 43 | }; |
48 | 44 | ||
49 | struct cmd_results *checkarg(int argc, const char *name, enum expected_args type, int val); | 45 | struct cmd_results *checkarg(int argc, const char *name, |
50 | struct cmd_results *add_color(const char*, char*, const char*); | 46 | enum expected_args type, int val); |
51 | void input_cmd_apply(struct input_config *input); | ||
52 | void hide_view_in_scratchpad(swayc_t *sp_view); | ||
53 | |||
54 | swayc_t *sp_view; | ||
55 | int sp_index; | ||
56 | 47 | ||
57 | /** | 48 | /** |
58 | * Parse and handles a command. | 49 | * Parse and executes a command. |
59 | */ | 50 | */ |
60 | struct cmd_results *handle_command(char *command, enum command_context context); | 51 | struct cmd_results *execute_command(char *command, struct sway_seat *seat); |
61 | /** | 52 | /** |
62 | * Parse and handles a command during config file loading. | 53 | * Parse and handles a command during config file loading. |
63 | * | 54 | * |
@@ -68,7 +59,6 @@ struct cmd_results *config_command(char *command, enum cmd_status block); | |||
68 | * Parses a command policy rule. | 59 | * Parses a command policy rule. |
69 | */ | 60 | */ |
70 | struct cmd_results *config_commands_command(char *exec); | 61 | struct cmd_results *config_commands_command(char *exec); |
71 | |||
72 | /** | 62 | /** |
73 | * Allocates a cmd_results object. | 63 | * Allocates a cmd_results object. |
74 | */ | 64 | */ |
@@ -84,11 +74,8 @@ void free_cmd_results(struct cmd_results *results); | |||
84 | */ | 74 | */ |
85 | const char *cmd_results_to_json(struct cmd_results *results); | 75 | const char *cmd_results_to_json(struct cmd_results *results); |
86 | 76 | ||
87 | void remove_view_from_scratchpad(swayc_t *); | 77 | struct cmd_results *add_color(const char *name, |
88 | 78 | char *buffer, const char *color); | |
89 | /** | ||
90 | * Actual command function signatures for individual .c files in commands/ directory. | ||
91 | */ | ||
92 | 79 | ||
93 | typedef struct cmd_results *sway_cmd(int argc, char **argv); | 80 | typedef struct cmd_results *sway_cmd(int argc, char **argv); |
94 | 81 | ||
@@ -108,6 +95,7 @@ sway_cmd cmd_commands; | |||
108 | sway_cmd cmd_debuglog; | 95 | sway_cmd cmd_debuglog; |
109 | sway_cmd cmd_default_border; | 96 | sway_cmd cmd_default_border; |
110 | sway_cmd cmd_default_floating_border; | 97 | sway_cmd cmd_default_floating_border; |
98 | sway_cmd cmd_default_orientation; | ||
111 | sway_cmd cmd_exec; | 99 | sway_cmd cmd_exec; |
112 | sway_cmd cmd_exec_always; | 100 | sway_cmd cmd_exec_always; |
113 | sway_cmd cmd_exit; | 101 | sway_cmd cmd_exit; |
@@ -126,6 +114,7 @@ sway_cmd cmd_gaps; | |||
126 | sway_cmd cmd_hide_edge_borders; | 114 | sway_cmd cmd_hide_edge_borders; |
127 | sway_cmd cmd_include; | 115 | sway_cmd cmd_include; |
128 | sway_cmd cmd_input; | 116 | sway_cmd cmd_input; |
117 | sway_cmd cmd_seat; | ||
129 | sway_cmd cmd_ipc; | 118 | sway_cmd cmd_ipc; |
130 | sway_cmd cmd_kill; | 119 | sway_cmd cmd_kill; |
131 | sway_cmd cmd_layout; | 120 | sway_cmd cmd_layout; |
@@ -134,10 +123,10 @@ sway_cmd cmd_mark; | |||
134 | sway_cmd cmd_mode; | 123 | sway_cmd cmd_mode; |
135 | sway_cmd cmd_mouse_warping; | 124 | sway_cmd cmd_mouse_warping; |
136 | sway_cmd cmd_move; | 125 | sway_cmd cmd_move; |
126 | sway_cmd cmd_opacity; | ||
137 | sway_cmd cmd_new_float; | 127 | sway_cmd cmd_new_float; |
138 | sway_cmd cmd_new_window; | 128 | sway_cmd cmd_new_window; |
139 | sway_cmd cmd_no_focus; | 129 | sway_cmd cmd_no_focus; |
140 | sway_cmd cmd_orientation; | ||
141 | sway_cmd cmd_output; | 130 | sway_cmd cmd_output; |
142 | sway_cmd cmd_permit; | 131 | sway_cmd cmd_permit; |
143 | sway_cmd cmd_reject; | 132 | sway_cmd cmd_reject; |
@@ -153,6 +142,7 @@ sway_cmd cmd_splith; | |||
153 | sway_cmd cmd_splitt; | 142 | sway_cmd cmd_splitt; |
154 | sway_cmd cmd_splitv; | 143 | sway_cmd cmd_splitv; |
155 | sway_cmd cmd_sticky; | 144 | sway_cmd cmd_sticky; |
145 | sway_cmd cmd_swaybg_command; | ||
156 | sway_cmd cmd_unmark; | 146 | sway_cmd cmd_unmark; |
157 | sway_cmd cmd_workspace; | 147 | sway_cmd cmd_workspace; |
158 | sway_cmd cmd_ws_auto_back_and_forth; | 148 | sway_cmd cmd_ws_auto_back_and_forth; |
@@ -195,17 +185,28 @@ sway_cmd bar_colors_cmd_statusline; | |||
195 | sway_cmd bar_colors_cmd_focused_statusline; | 185 | sway_cmd bar_colors_cmd_focused_statusline; |
196 | sway_cmd bar_colors_cmd_urgent_workspace; | 186 | sway_cmd bar_colors_cmd_urgent_workspace; |
197 | 187 | ||
188 | sway_cmd input_cmd_seat; | ||
198 | sway_cmd input_cmd_accel_profile; | 189 | sway_cmd input_cmd_accel_profile; |
199 | sway_cmd input_cmd_click_method; | 190 | sway_cmd input_cmd_click_method; |
200 | sway_cmd input_cmd_drag_lock; | 191 | sway_cmd input_cmd_drag_lock; |
201 | sway_cmd input_cmd_dwt; | 192 | sway_cmd input_cmd_dwt; |
202 | sway_cmd input_cmd_events; | 193 | sway_cmd input_cmd_events; |
203 | sway_cmd input_cmd_left_handed; | 194 | sway_cmd input_cmd_left_handed; |
195 | sway_cmd input_cmd_map_to_output; | ||
204 | sway_cmd input_cmd_middle_emulation; | 196 | sway_cmd input_cmd_middle_emulation; |
205 | sway_cmd input_cmd_natural_scroll; | 197 | sway_cmd input_cmd_natural_scroll; |
206 | sway_cmd input_cmd_pointer_accel; | 198 | sway_cmd input_cmd_pointer_accel; |
207 | sway_cmd input_cmd_scroll_method; | 199 | sway_cmd input_cmd_scroll_method; |
208 | sway_cmd input_cmd_tap; | 200 | sway_cmd input_cmd_tap; |
201 | sway_cmd input_cmd_xkb_layout; | ||
202 | sway_cmd input_cmd_xkb_model; | ||
203 | sway_cmd input_cmd_xkb_options; | ||
204 | sway_cmd input_cmd_xkb_rules; | ||
205 | sway_cmd input_cmd_xkb_variant; | ||
206 | |||
207 | sway_cmd seat_cmd_attach; | ||
208 | sway_cmd seat_cmd_fallback; | ||
209 | sway_cmd seat_cmd_cursor; | ||
209 | 210 | ||
210 | sway_cmd cmd_ipc_cmd; | 211 | sway_cmd cmd_ipc_cmd; |
211 | sway_cmd cmd_ipc_events; | 212 | sway_cmd cmd_ipc_events; |