diff --git a/src/core/plan.h b/src/core/plan.h index e53d0ea..6780b07 100644 --- a/src/core/plan.h +++ b/src/core/plan.h @@ -17,18 +17,56 @@ typedef enum effect_type_t { ZDWM_EFFECT_MAP_WINDOW, ZDWM_EFFECT_UNMAP_WINDOW, ZDWM_EFFECT_FOCUS_WINDOW, + ZDWM_EFFECT_MOVE_WINDOW, + ZDWM_EFFECT_RESIZE_WINDOW, + ZDWM_EFFECT_CHANGE_BORDER_COLOR, + ZDWM_EFFECT_CHANGE_BORDER_WIDTH, + ZDWM_EFFECT_CHANGE_WINDOW_LIST, + ZDWM_EFFECT_RESTACK_WINDOWS, } effect_type_t; typedef struct effect_only_window_id_t { window_id_t window; } effect_only_window_id_t; +typedef struct effect_move_window_t { + window_id_t window; + point_t left_top_point; +} effect_move_window_t; + +typedef struct effect_resize_window_t { + window_id_t window; + int32_t width; + int32_t height; +} effect_resize_window_t; + +typedef struct effect_change_border_color_t { + window_id_t window; + const color_t *color; +} effect_change_border_color_t; + +typedef struct effect_change_border_width_t { + window_id_t window; + uint32_t border_width; +} effect_change_border_width_t; + +typedef struct effect_window_list_t { + const window_id_t *windows; + size_t count; +} effect_window_list_t; + typedef struct effect_t { effect_type_t type; union { effect_only_window_id_t map; effect_only_window_id_t unmap; effect_only_window_id_t focus; + effect_move_window_t move; + effect_resize_window_t resize; + effect_change_border_color_t change_border_color; + effect_change_border_width_t change_border_width; + effect_window_list_t change_window_list; + effect_window_list_t restack_windows; } as; } effect_t; diff --git a/src/core/types.h b/src/core/types.h index b360e65..40f9a15 100644 --- a/src/core/types.h +++ b/src/core/types.h @@ -24,6 +24,14 @@ typedef struct point_t { int32_t y; } point_t; +typedef struct color_t { + uint32_t rgba; + uint32_t argb; + + /* RGBA color channels for Cairo, each channel in the range [0, 1] */ + double red, green, blue, alpha; +} color_t; + typedef enum window_geometry_mode_t { ZDWM_GEOMETRY_NORMAL, ZDWM_GEOMETRY_MAXIMIZED,