X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=types.h;h=5698f9c717c6a7e97d6c066be4d54e21b277354f;hb=ce4761c1a2f2efb929dde026c81b9f0198b6d9ed;hp=d214a23ce44b60359620ddb64bc522eaa7b5406f;hpb=09f163beccce045905b7af6d142c18bb4ad7f5a4;p=bspwm.git diff --git a/types.h b/types.h index d214a23..5698f9c 100644 --- a/types.h +++ b/types.h @@ -1,12 +1,14 @@ #ifndef _TYPES_H #define _TYPES_H +#include #include #include #include "helpers.h" #define SPLIT_RATIO 0.5 #define DEFAULT_DESK_NAME "One" +#define MISSING_VALUE "N/A" typedef enum { TYPE_HORIZONTAL, @@ -36,12 +38,14 @@ 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 { @@ -57,15 +61,24 @@ typedef enum { 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; /* transient window are always floating */ bool fullscreen; bool locked; /* protects window from being closed */ bool urgent; - bool visible; - xcb_rectangle_t rectangle; + xcb_rectangle_t floating_rectangle; + xcb_rectangle_t tiled_rectangle; } client_t; typedef struct node_t node_t; @@ -73,12 +86,12 @@ struct node_t { split_type_t split_type; double split_ratio; xcb_rectangle_t rectangle; - bool vacant; /* vacant nodes only hold floating clients */ - split_mode_t born_as; /* container node property used to when removing leaves */ + 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; @@ -98,7 +111,6 @@ typedef struct { typedef struct { bool floating; - char desk_name[MAXLEN]; } rule_effect_t; typedef struct rule_t rule_t; @@ -113,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(const char *); client_t *make_client(xcb_window_t); rule_t *make_rule(void); +pointer_state_t *make_pointer_state(void); #endif