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