diff options
author | 2016-09-02 19:47:37 -0400 | |
---|---|---|
committer | 2016-09-02 19:47:37 -0400 | |
commit | 29820ff826013b595e8c15d9e933767b0c965beb (patch) | |
tree | e5bae8ecc19c438091478ad878a8297252c72a81 /include | |
parent | Merge pull request #878 from lukaslihotzki/master (diff) | |
parent | merge in latest commits (diff) | |
download | sway-29820ff826013b595e8c15d9e933767b0c965beb.tar.gz sway-29820ff826013b595e8c15d9e933767b0c965beb.tar.zst sway-29820ff826013b595e8c15d9e933767b0c965beb.zip |
Merge pull request #879 from zandrmartin/commands-refactor
refactor commands.c
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/commands.h | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index cd0610f4..f646c412 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h | |||
@@ -33,6 +33,21 @@ struct cmd_results { | |||
33 | char *error; | 33 | char *error; |
34 | }; | 34 | }; |
35 | 35 | ||
36 | enum expected_args { | ||
37 | EXPECTED_MORE_THAN, | ||
38 | EXPECTED_AT_LEAST, | ||
39 | EXPECTED_LESS_THAN, | ||
40 | EXPECTED_EQUAL_TO | ||
41 | }; | ||
42 | |||
43 | struct cmd_results *checkarg(int argc, const char *name, enum expected_args type, int val); | ||
44 | struct cmd_results *add_color(const char*, char*, const char*); | ||
45 | void input_cmd_apply(struct input_config *input); | ||
46 | void hide_view_in_scratchpad(swayc_t *sp_view); | ||
47 | |||
48 | swayc_t *sp_view; | ||
49 | int sp_index; | ||
50 | |||
36 | /** | 51 | /** |
37 | * Parse and handles a command. | 52 | * Parse and handles a command. |
38 | */ | 53 | */ |
@@ -61,4 +76,106 @@ const char *cmd_results_to_json(struct cmd_results *results); | |||
61 | 76 | ||
62 | void remove_view_from_scratchpad(swayc_t *); | 77 | void remove_view_from_scratchpad(swayc_t *); |
63 | 78 | ||
79 | /** | ||
80 | * Actual command function signatures for individual .c files in commands/ directory. | ||
81 | */ | ||
82 | |||
83 | typedef struct cmd_results *sway_cmd(int argc, char **argv); | ||
84 | |||
85 | sway_cmd cmd_assign; | ||
86 | sway_cmd cmd_bar; | ||
87 | sway_cmd cmd_bindcode; | ||
88 | sway_cmd cmd_bindsym; | ||
89 | sway_cmd cmd_border; | ||
90 | sway_cmd cmd_client_focused; | ||
91 | sway_cmd cmd_client_focused_inactive; | ||
92 | sway_cmd cmd_client_unfocused; | ||
93 | sway_cmd cmd_client_urgent; | ||
94 | sway_cmd cmd_client_placeholder; | ||
95 | sway_cmd cmd_client_background; | ||
96 | sway_cmd cmd_debuglog; | ||
97 | sway_cmd cmd_exec; | ||
98 | sway_cmd cmd_exec_always; | ||
99 | sway_cmd cmd_exit; | ||
100 | sway_cmd cmd_floating; | ||
101 | sway_cmd cmd_floating_maximum_size; | ||
102 | sway_cmd cmd_floating_minimum_size; | ||
103 | sway_cmd cmd_floating_mod; | ||
104 | sway_cmd cmd_floating_scroll; | ||
105 | sway_cmd cmd_focus; | ||
106 | sway_cmd cmd_focus_follows_mouse; | ||
107 | sway_cmd cmd_font; | ||
108 | sway_cmd cmd_for_window; | ||
109 | sway_cmd cmd_fullscreen; | ||
110 | sway_cmd cmd_gaps; | ||
111 | sway_cmd cmd_hide_edge_borders; | ||
112 | sway_cmd cmd_include; | ||
113 | sway_cmd cmd_input; | ||
114 | sway_cmd cmd_kill; | ||
115 | sway_cmd cmd_layout; | ||
116 | sway_cmd cmd_log_colors; | ||
117 | sway_cmd cmd_mode; | ||
118 | sway_cmd cmd_mouse_warping; | ||
119 | sway_cmd cmd_move; | ||
120 | sway_cmd cmd_new_float; | ||
121 | sway_cmd cmd_new_window; | ||
122 | sway_cmd cmd_orientation; | ||
123 | sway_cmd cmd_output; | ||
124 | sway_cmd cmd_reload; | ||
125 | sway_cmd cmd_resize; | ||
126 | sway_cmd cmd_scratchpad; | ||
127 | sway_cmd cmd_seamless_mouse; | ||
128 | sway_cmd cmd_set; | ||
129 | sway_cmd cmd_smart_gaps; | ||
130 | sway_cmd cmd_split; | ||
131 | sway_cmd cmd_splith; | ||
132 | sway_cmd cmd_splitt; | ||
133 | sway_cmd cmd_splitv; | ||
134 | sway_cmd cmd_sticky; | ||
135 | sway_cmd cmd_workspace; | ||
136 | sway_cmd cmd_ws_auto_back_and_forth; | ||
137 | sway_cmd cmd_workspace_layout; | ||
138 | |||
139 | sway_cmd bar_cmd_binding_mode_indicator; | ||
140 | sway_cmd bar_cmd_bindsym; | ||
141 | sway_cmd bar_cmd_colors; | ||
142 | sway_cmd bar_cmd_font; | ||
143 | sway_cmd bar_cmd_mode; | ||
144 | sway_cmd bar_cmd_modifier; | ||
145 | sway_cmd bar_cmd_output; | ||
146 | sway_cmd bar_cmd_height; | ||
147 | sway_cmd bar_cmd_hidden_state; | ||
148 | sway_cmd bar_cmd_id; | ||
149 | sway_cmd bar_cmd_position; | ||
150 | sway_cmd bar_cmd_separator_symbol; | ||
151 | sway_cmd bar_cmd_status_command; | ||
152 | sway_cmd bar_cmd_pango_markup; | ||
153 | sway_cmd bar_cmd_strip_workspace_numbers; | ||
154 | sway_cmd bar_cmd_swaybar_command; | ||
155 | sway_cmd bar_cmd_tray_output; | ||
156 | sway_cmd bar_cmd_tray_padding; | ||
157 | sway_cmd bar_cmd_wrap_scroll; | ||
158 | sway_cmd bar_cmd_workspace_buttons; | ||
159 | |||
160 | sway_cmd bar_colors_cmd_active_workspace; | ||
161 | sway_cmd bar_colors_cmd_background; | ||
162 | sway_cmd bar_colors_cmd_background; | ||
163 | sway_cmd bar_colors_cmd_binding_mode; | ||
164 | sway_cmd bar_colors_cmd_focused_workspace; | ||
165 | sway_cmd bar_colors_cmd_inactive_workspace; | ||
166 | sway_cmd bar_colors_cmd_separator; | ||
167 | sway_cmd bar_colors_cmd_statusline; | ||
168 | sway_cmd bar_colors_cmd_urgent_workspace; | ||
169 | |||
170 | sway_cmd input_cmd_accel_profile; | ||
171 | sway_cmd input_cmd_click_method; | ||
172 | sway_cmd input_cmd_drag_lock; | ||
173 | sway_cmd input_cmd_dwt; | ||
174 | sway_cmd input_cmd_events; | ||
175 | sway_cmd input_cmd_middle_emulation; | ||
176 | sway_cmd input_cmd_natural_scroll; | ||
177 | sway_cmd input_cmd_pointer_accel; | ||
178 | sway_cmd input_cmd_scroll_method; | ||
179 | sway_cmd input_cmd_tap; | ||
180 | |||
64 | #endif | 181 | #endif |