X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=types.h;h=0b1a023fa5d49c8e9f6023a5298ba1fd2f423851;hb=0b68e16fc8f9eb2baf3c1b491f7f6e5e81a6a9a0;hp=99ea69d71c571266173ffcb2d6cd03e168259a08;hpb=fa73a124c96cd0acbca16430a8ad662bb010a6dd;p=bspwm.git diff --git a/types.h b/types.h index 99ea69d..0b1a023 100644 --- a/types.h +++ b/types.h @@ -6,7 +6,8 @@ #include "helpers.h" #define SPLIT_RATIO 0.5 -#define DESK_NAME "One" +#define DEFAULT_DESK_NAME "One" +#define MISSING_VALUE "N/A" typedef enum { TYPE_HORIZONTAL, @@ -36,33 +37,47 @@ typedef enum { typedef enum { SKIP_NONE, SKIP_FLOATING, - SKIP_TILED + SKIP_TILED, + SKIP_CLASS_EQUAL, + SKIP_CLASS_DIFFER } skip_client_t; typedef enum { - DIR_NEXT, - DIR_PREV + CYCLE_NEXT, + CYCLE_PREV } cycle_dir_t; typedef enum { - ROTATE_CLOCK_WISE, - ROTATE_COUNTER_CW, + ROTATE_CLOCKWISE, + ROTATE_COUNTER_CLOCKWISE, ROTATE_FULL_CYCLE } rotate_t; typedef enum { DIR_LEFT, - DIR_UP, DIR_RIGHT, + DIR_UP, DIR_DOWN } direction_t; +typedef enum { + TOP_LEFT, + TOP_RIGHT, + BOTTOM_LEFT, + BOTTOM_RIGHT +} corner_t; + typedef struct { xcb_window_t window; + char class_name[MAXLEN]; + unsigned int border_width; bool floating; - bool transient; + bool transient; /* transient window are always floating */ bool fullscreen; - bool locked; + bool locked; /* protects window from being closed */ + bool urgent; + xcb_rectangle_t floating_rectangle; + xcb_rectangle_t tiled_rectangle; } client_t; typedef struct node_t node_t; @@ -70,11 +85,12 @@ struct node_t { split_type_t split_type; double split_ratio; xcb_rectangle_t rectangle; - bool vacant; /* vacant nodes only hold floating clients */ + bool vacant; /* vacant nodes only hold floating clients */ + split_mode_t born_as; node_t *first_child; node_t *second_child; node_t *parent; - client_t *client; /* NULL except for leaves */ + client_t *client; /* NULL except for leaves */ }; typedef struct desktop_t desktop_t; @@ -89,15 +105,12 @@ struct desktop_t { }; typedef struct { - char *class_name; - char *instance_name; + char name[MAXLEN]; } rule_cause_t; typedef struct { bool floating; - bool fullscreen; - bool locked; - bool centered; + char desk_name[MAXLEN]; } rule_effect_t; typedef struct rule_t rule_t; @@ -112,9 +125,19 @@ typedef struct { desktop_t *desktop; } window_location_t; +typedef struct { + xcb_point_t position; + xcb_button_t button; + xcb_rectangle_t rectangle; + desktop_t *desktop; + node_t *node; + corner_t corner; +} pointer_state_t; + node_t *make_node(void); -desktop_t *make_desktop(void); +desktop_t *make_desktop(const char *); client_t *make_client(xcb_window_t); rule_t *make_rule(void); +pointer_state_t *make_pointer_state(void); #endif