diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/commands.h | 13 | ||||
-rw-r--r-- | sway/config.h | 44 | ||||
-rw-r--r-- | sway/container.h | 71 | ||||
-rw-r--r-- | sway/handlers.h | 12 | ||||
-rw-r--r-- | sway/layout.h | 25 | ||||
-rw-r--r-- | sway/list.h | 17 | ||||
-rw-r--r-- | sway/log.h | 16 | ||||
-rw-r--r-- | sway/movement.h | 17 | ||||
-rw-r--r-- | sway/readline.h | 8 | ||||
-rw-r--r-- | sway/stringop.h | 14 | ||||
-rw-r--r-- | sway/workspace.h | 16 |
11 files changed, 0 insertions, 253 deletions
diff --git a/sway/commands.h b/sway/commands.h deleted file mode 100644 index c2046e13..00000000 --- a/sway/commands.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _SWAY_COMMANDS_H -#define _SWAY_COMMANDS_H -#include <stdbool.h> -#include "config.h" - -struct cmd_handler { - char *command; - bool (*handle)(struct sway_config *config, int argc, char **argv); -}; - -bool handle_command(struct sway_config *config, char *command); - -#endif diff --git a/sway/config.h b/sway/config.h deleted file mode 100644 index c9fd374c..00000000 --- a/sway/config.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _SWAY_CONFIG_H -#define _SWAY_CONFIG_H - -#include <stdint.h> -#include <wlc/wlc.h> -#include "list.h" - -struct sway_variable { - char *name; - char *value; -}; - -struct sway_binding { - list_t *keys; - uint32_t modifiers; - char *command; -}; - -struct sway_mode { - char *name; - list_t *bindings; -}; - -struct sway_config { - list_t *symbols; - list_t *modes; - list_t *cmd_queue; - struct sway_mode *current_mode; - - // Flags - bool focus_follows_mouse; - bool mouse_warping; - bool active; - bool failed; - bool reloading; -}; - -bool load_config(); -bool read_config(FILE *file, bool is_active); -char *do_var_replacement(struct sway_config *config, char *str); - -extern struct sway_config *config; - -#endif diff --git a/sway/container.h b/sway/container.h deleted file mode 100644 index a54e016a..00000000 --- a/sway/container.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef _SWAY_CONTAINER_H -#define _SWAY_CONTAINER_H -#include <wlc/wlc.h> -typedef struct sway_container swayc_t; - -#include "layout.h" - -enum swayc_types{ - C_ROOT, - C_OUTPUT, - C_WORKSPACE, - C_CONTAINER, - C_VIEW, - //Keep last - C_TYPES, -}; - -enum swayc_layouts{ - L_NONE, - L_HORIZ, - L_VERT, - L_STACKED, - L_TABBED, - L_FLOATING, - //Keep last - L_LAYOUTS, -}; - -struct sway_container { - wlc_handle handle; - - enum swayc_types type; - - enum swayc_layouts layout; - - // Not including borders or margins - int width, height; - - int x, y; - - bool visible; - - int weight; - - char *name; - - list_t *children; - - struct sway_container *parent; - struct sway_container *focused; -}; - - -swayc_t *new_output(wlc_handle handle); -swayc_t *new_workspace(swayc_t * output, const char *name); -//Creates container Around child (parent child) -> (parent (container child)) -swayc_t *new_container(swayc_t *child, enum swayc_layouts layout); -//Creates view as a sibling of current focused container, or as child of a workspace -swayc_t *new_view(swayc_t *sibling, wlc_handle handle); - - -swayc_t *destroy_output(swayc_t *output); -//destroys workspace if empty and returns parent pointer, else returns NULL -swayc_t *destroy_workspace(swayc_t *workspace); -swayc_t *destroy_container(swayc_t *container); -swayc_t *destroy_view(swayc_t *view); - -swayc_t *find_container(swayc_t *container, bool (*test)(swayc_t *view, void *data), void *data); -void container_map(swayc_t *, void (*f)(swayc_t *, void *), void *); - -#endif diff --git a/sway/handlers.h b/sway/handlers.h deleted file mode 100644 index d1742cce..00000000 --- a/sway/handlers.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _SWAY_HANDLERS_H -#define _SWAY_HANDLERS_H - -#include <stdbool.h> -#include <wlc/wlc.h> - -extern struct wlc_interface interface; - -//set focus to current pointer location and return focused container -swayc_t *focus_pointer(void); - -#endif diff --git a/sway/layout.h b/sway/layout.h deleted file mode 100644 index a136f917..00000000 --- a/sway/layout.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _SWAY_LAYOUT_H -#define _SWAY_LAYOUT_H - -#include <wlc/wlc.h> -#include "list.h" -#include "container.h" - -extern swayc_t root_container; - -void init_layout(void); - -void add_child(swayc_t *parent, swayc_t *child); -//Returns parent container wihch needs to be rearranged. -swayc_t *add_sibling(swayc_t *sibling, swayc_t *child); -swayc_t *replace_child(swayc_t *child, swayc_t *new_child); -swayc_t *remove_child(swayc_t *parent, swayc_t *child); - -void unfocus_all(swayc_t *container); -void focus_view(swayc_t *view); -void arrange_windows(swayc_t *container, int width, int height); -swayc_t *get_focused_container(swayc_t *parent); - -swayc_t *get_swayc_for_handle(wlc_handle handle, swayc_t *parent); - -#endif diff --git a/sway/list.h b/sway/list.h deleted file mode 100644 index 29b988aa..00000000 --- a/sway/list.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _SWAY_LIST_H -#define _SWAY_LIST_H - -typedef struct { - int capacity; - int length; - void **items; -} list_t; - -list_t *create_list(void); -void list_free(list_t *list); -void list_add(list_t *list, void *item); -void list_insert(list_t *list, int index, void *item); -void list_del(list_t *list, int index); -void list_cat(list_t *list, list_t *source); - -#endif diff --git a/sway/log.h b/sway/log.h deleted file mode 100644 index e5075a39..00000000 --- a/sway/log.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _SWAY_LOG_H -#define _SWAY_LOG_H - -typedef enum { - L_SILENT = 0, - L_ERROR = 1, - L_INFO = 2, - L_DEBUG = 3, -} log_importance_t; - -void init_log(int verbosity); -void sway_log_colors(int mode); -void sway_log(int verbosity, char* format, ...); -void sway_abort(char* format, ...); - -#endif diff --git a/sway/movement.h b/sway/movement.h deleted file mode 100644 index dd701877..00000000 --- a/sway/movement.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _SWAY_MOVEMENT_H -#define _SWAY_MOVEMENT_H - -#include <wlc/wlc.h> -#include "list.h" - -enum movement_direction { - MOVE_LEFT, - MOVE_RIGHT, - MOVE_UP, - MOVE_DOWN, - MOVE_PARENT -}; - -bool move_focus(enum movement_direction direction); - -#endif diff --git a/sway/readline.h b/sway/readline.h deleted file mode 100644 index dbe937c1..00000000 --- a/sway/readline.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _SWAY_READLINE_H -#define _SWAY_READLINE_H - -#include <stdio.h> - -char *read_line(FILE *file); - -#endif diff --git a/sway/stringop.h b/sway/stringop.h deleted file mode 100644 index a5346829..00000000 --- a/sway/stringop.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _SWAY_STRINGOP_H -#define _SWAY_STRINGOP_H -#include "list.h" - -char *strip_whitespace(char *str, int *trimmed_start); -char *strip_comments(char *str); -list_t *split_string(const char *str, const char *delims); -void free_flat_list(list_t *list); -char *code_strchr(const char *string, char delimiter); -char *code_strstr(const char *haystack, const char *needle); -int unescape_string(char *string); -char *join_args(char **argv, int argc); - -#endif diff --git a/sway/workspace.h b/sway/workspace.h deleted file mode 100644 index 59a6d526..00000000 --- a/sway/workspace.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _SWAY_WORKSPACE_H -#define _SWAY_WORKSPACE_H - -#include <wlc/wlc.h> -#include "list.h" -#include "layout.h" - -extern swayc_t *active_workspace; - -char *workspace_next_name(void); -swayc_t *workspace_create(const char*); -swayc_t *workspace_find_by_name(const char*); -void workspace_switch(swayc_t*); -void layout_log(const swayc_t *c, int depth); - -#endif |