aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-09-02 19:47:37 -0400
committerGitHub <noreply@github.com>2016-09-02 19:47:37 -0400
commit29820ff826013b595e8c15d9e933767b0c965beb (patch)
treee5bae8ecc19c438091478ad878a8297252c72a81 /include/sway
parent4e6d7b125895955e3a84583c6d61f3eb2f8a4fe9 (diff)
parent65ace5dec5c24695501056376e227fb9b1f84a3a (diff)
Merge pull request #879 from zandrmartin/commands-refactor
refactor commands.c
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/commands.h117
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 {
char *error;
};
+enum expected_args {
+ EXPECTED_MORE_THAN,
+ EXPECTED_AT_LEAST,
+ EXPECTED_LESS_THAN,
+ EXPECTED_EQUAL_TO
+};
+
+struct cmd_results *checkarg(int argc, const char *name, enum expected_args type, int val);
+struct cmd_results *add_color(const char*, char*, const char*);
+void input_cmd_apply(struct input_config *input);
+void hide_view_in_scratchpad(swayc_t *sp_view);
+
+swayc_t *sp_view;
+int sp_index;
+
/**
* Parse and handles a command.
*/
@@ -61,4 +76,106 @@ const char *cmd_results_to_json(struct cmd_results *results);
void remove_view_from_scratchpad(swayc_t *);
+/**
+ * Actual command function signatures for individual .c files in commands/ directory.
+ */
+
+typedef struct cmd_results *sway_cmd(int argc, char **argv);
+
+sway_cmd cmd_assign;
+sway_cmd cmd_bar;
+sway_cmd cmd_bindcode;
+sway_cmd cmd_bindsym;
+sway_cmd cmd_border;
+sway_cmd cmd_client_focused;
+sway_cmd cmd_client_focused_inactive;
+sway_cmd cmd_client_unfocused;
+sway_cmd cmd_client_urgent;
+sway_cmd cmd_client_placeholder;
+sway_cmd cmd_client_background;
+sway_cmd cmd_debuglog;
+sway_cmd cmd_exec;
+sway_cmd cmd_exec_always;
+sway_cmd cmd_exit;
+sway_cmd cmd_floating;
+sway_cmd cmd_floating_maximum_size;
+sway_cmd cmd_floating_minimum_size;
+sway_cmd cmd_floating_mod;
+sway_cmd cmd_floating_scroll;
+sway_cmd cmd_focus;
+sway_cmd cmd_focus_follows_mouse;
+sway_cmd cmd_font;
+sway_cmd cmd_for_window;
+sway_cmd cmd_fullscreen;
+sway_cmd cmd_gaps;
+sway_cmd cmd_hide_edge_borders;
+sway_cmd cmd_include;
+sway_cmd cmd_input;
+sway_cmd cmd_kill;
+sway_cmd cmd_layout;
+sway_cmd cmd_log_colors;
+sway_cmd cmd_mode;
+sway_cmd cmd_mouse_warping;
+sway_cmd cmd_move;
+sway_cmd cmd_new_float;
+sway_cmd cmd_new_window;
+sway_cmd cmd_orientation;
+sway_cmd cmd_output;
+sway_cmd cmd_reload;
+sway_cmd cmd_resize;
+sway_cmd cmd_scratchpad;
+sway_cmd cmd_seamless_mouse;
+sway_cmd cmd_set;
+sway_cmd cmd_smart_gaps;
+sway_cmd cmd_split;
+sway_cmd cmd_splith;
+sway_cmd cmd_splitt;
+sway_cmd cmd_splitv;
+sway_cmd cmd_sticky;
+sway_cmd cmd_workspace;
+sway_cmd cmd_ws_auto_back_and_forth;
+sway_cmd cmd_workspace_layout;
+
+sway_cmd bar_cmd_binding_mode_indicator;
+sway_cmd bar_cmd_bindsym;
+sway_cmd bar_cmd_colors;
+sway_cmd bar_cmd_font;
+sway_cmd bar_cmd_mode;
+sway_cmd bar_cmd_modifier;
+sway_cmd bar_cmd_output;
+sway_cmd bar_cmd_height;
+sway_cmd bar_cmd_hidden_state;
+sway_cmd bar_cmd_id;
+sway_cmd bar_cmd_position;
+sway_cmd bar_cmd_separator_symbol;
+sway_cmd bar_cmd_status_command;
+sway_cmd bar_cmd_pango_markup;
+sway_cmd bar_cmd_strip_workspace_numbers;
+sway_cmd bar_cmd_swaybar_command;
+sway_cmd bar_cmd_tray_output;
+sway_cmd bar_cmd_tray_padding;
+sway_cmd bar_cmd_wrap_scroll;
+sway_cmd bar_cmd_workspace_buttons;
+
+sway_cmd bar_colors_cmd_active_workspace;
+sway_cmd bar_colors_cmd_background;
+sway_cmd bar_colors_cmd_background;
+sway_cmd bar_colors_cmd_binding_mode;
+sway_cmd bar_colors_cmd_focused_workspace;
+sway_cmd bar_colors_cmd_inactive_workspace;
+sway_cmd bar_colors_cmd_separator;
+sway_cmd bar_colors_cmd_statusline;
+sway_cmd bar_colors_cmd_urgent_workspace;
+
+sway_cmd input_cmd_accel_profile;
+sway_cmd input_cmd_click_method;
+sway_cmd input_cmd_drag_lock;
+sway_cmd input_cmd_dwt;
+sway_cmd input_cmd_events;
+sway_cmd input_cmd_middle_emulation;
+sway_cmd input_cmd_natural_scroll;
+sway_cmd input_cmd_pointer_accel;
+sway_cmd input_cmd_scroll_method;
+sway_cmd input_cmd_tap;
+
#endif