mirror of
https://github.com/vale981/bspwm
synced 2025-03-06 02:01:42 -05:00
107 lines
1.8 KiB
C
107 lines
1.8 KiB
C
#ifndef _TYPES_H
|
|
#define _TYPES_H
|
|
|
|
#include <xcb/xcb.h>
|
|
#include <xcb/xcb_event.h>
|
|
#include "helpers.h"
|
|
|
|
typedef enum {
|
|
TYPE_HORIZONTAL,
|
|
TYPE_VERTICAL
|
|
} split_type_t;
|
|
|
|
typedef enum {
|
|
MODE_AUTOMATIC,
|
|
MODE_MANUAL
|
|
} split_mode_t;
|
|
|
|
typedef enum {
|
|
LAYOUT_TILED,
|
|
LAYOUT_MONOCLE
|
|
} layout_t;
|
|
|
|
typedef enum {
|
|
MOVE_PULL,
|
|
MOVE_PUSH
|
|
} fence_move_t;
|
|
|
|
typedef enum {
|
|
CHANGE_INCREASE,
|
|
CHANGE_DECREASE
|
|
} value_change_t;
|
|
|
|
typedef enum {
|
|
SKIP_NONE,
|
|
SKIP_FLOATING,
|
|
SKIP_TILED
|
|
} skip_client_t;
|
|
|
|
typedef enum {
|
|
DIR_NEXT,
|
|
DIR_PREV
|
|
} cycle_dir_t;
|
|
|
|
typedef enum {
|
|
ROTATE_CLOCK_WISE,
|
|
ROTATE_COUNTER_CW,
|
|
ROTATE_FULL_CYCLE
|
|
} rotate_t;
|
|
|
|
typedef enum {
|
|
DIR_LEFT,
|
|
DIR_UP,
|
|
DIR_RIGHT,
|
|
DIR_DOWN
|
|
} direction_t;
|
|
|
|
typedef struct {
|
|
xcb_window_t window;
|
|
bool floating;
|
|
bool fullscreen;
|
|
bool locked;
|
|
} Client;
|
|
|
|
typedef struct Node Node;
|
|
struct Node {
|
|
split_type_t split_type;
|
|
double split_ratio;
|
|
xcb_rectangle_t rectangle;
|
|
bool vacant; /* vacant nodes only hold floating clients */
|
|
Node *first_child;
|
|
Node *second_child;
|
|
Node *parent;
|
|
/* the value of the following properties is NULL except for leaves: */
|
|
Client *client;
|
|
Node *prev_leaf;
|
|
Node *next_leaf;
|
|
};
|
|
|
|
typedef struct Rule Rule;
|
|
struct Rule {
|
|
char *class_name;
|
|
char *desk_name;
|
|
bool floating;
|
|
bool fullscreen;
|
|
bool locked;
|
|
Rule *next;
|
|
};
|
|
|
|
typedef struct Desktop Desktop;
|
|
struct Desktop {
|
|
char *name;
|
|
layout_t layout;
|
|
Node *root;
|
|
Node *view; /* initially view = root, can be changed by zooming */
|
|
Node *focus;
|
|
Node *last_focus;
|
|
Node *head; /* first element in the list of leaves */
|
|
Node *tail;
|
|
Desktop *prev;
|
|
Desktop *next;
|
|
};
|
|
|
|
Node *make_node(void);
|
|
Desktop *make_desktop(void);
|
|
Client *make_client(void);
|
|
|
|
#endif
|