2012-07-31 14:32:13 +02:00
|
|
|
#ifndef _TYPES_H
|
|
|
|
#define _TYPES_H
|
|
|
|
|
2012-07-30 10:29:21 +02:00
|
|
|
typedef enum {
|
|
|
|
LAYOUT_TILED,
|
|
|
|
LAYOUT_MAX
|
|
|
|
} layout_t;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
LAYER_TILING,
|
|
|
|
LAYER_FLOATING
|
|
|
|
} layer_t;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
TYPE_HORIZONTAL,
|
|
|
|
TYPE_VERTICAL
|
2012-08-02 09:54:32 +02:00
|
|
|
} split_type_t;
|
2012-07-30 10:29:21 +02:00
|
|
|
|
|
|
|
typedef enum {
|
2012-08-17 22:18:26 +02:00
|
|
|
ROTATE_CLOCK_WISE,
|
|
|
|
ROTATE_COUNTER_CW,
|
|
|
|
ROTATE_FULL_CYCLE
|
|
|
|
} rotate_t;
|
2012-08-04 21:24:47 +02:00
|
|
|
|
2012-08-03 19:40:26 +02:00
|
|
|
typedef enum {
|
|
|
|
DIR_LEFT,
|
|
|
|
DIR_UP,
|
|
|
|
DIR_RIGHT,
|
|
|
|
DIR_DOWN
|
2012-08-17 22:18:26 +02:00
|
|
|
} direction_t;
|
2012-07-30 10:29:21 +02:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
xcb_window_t win;
|
|
|
|
bool floating;
|
|
|
|
bool fullscreen;
|
|
|
|
bool urgent;
|
|
|
|
bool locked;
|
|
|
|
} Client;
|
|
|
|
|
2012-08-17 22:18:26 +02:00
|
|
|
typedef struct Node Node;
|
|
|
|
struct Node {
|
2012-08-02 09:54:32 +02:00
|
|
|
split_type_t split_type;
|
2012-07-30 10:29:21 +02:00
|
|
|
double split_ratio;
|
|
|
|
xcb_rectangle_t rectangle;
|
2012-08-17 22:18:26 +02:00
|
|
|
Node *first_child;
|
|
|
|
Node *second_child;
|
|
|
|
Node *parent;
|
2012-07-30 10:29:21 +02:00
|
|
|
Client *client; /* equals NULL except for leaves */
|
2012-08-17 22:18:26 +02:00
|
|
|
};
|
2012-07-30 10:29:21 +02:00
|
|
|
|
2012-08-17 22:18:26 +02:00
|
|
|
typedef struct NodeFocusHistory NodeFocusHistory;
|
|
|
|
struct NodeFocusHistory {
|
2012-08-07 12:17:47 +02:00
|
|
|
Node *node;
|
2012-08-17 22:18:26 +02:00
|
|
|
NodeFocusHistory *prev;
|
|
|
|
};
|
2012-07-30 10:29:21 +02:00
|
|
|
|
|
|
|
typedef struct {
|
2012-08-07 12:17:47 +02:00
|
|
|
Node *head;
|
2012-07-30 10:29:21 +02:00
|
|
|
Node *focus;
|
|
|
|
NodeFocusHistory *focus_history;
|
2012-08-03 19:40:26 +02:00
|
|
|
} Layer;
|
2012-07-30 10:29:21 +02:00
|
|
|
|
2012-08-03 19:40:26 +02:00
|
|
|
typedef Layer TilingLayer;
|
|
|
|
typedef Layer FloatingLayer;
|
2012-07-30 10:29:21 +02:00
|
|
|
|
2012-08-17 22:18:26 +02:00
|
|
|
typedef struct Desktop Desktop;
|
|
|
|
struct Desktop {
|
2012-07-30 10:29:21 +02:00
|
|
|
char *name;
|
2012-08-04 21:24:47 +02:00
|
|
|
Layer tiling_layer;
|
|
|
|
Layer floating_layer;
|
|
|
|
layer_t selected_layer;
|
|
|
|
layout_t tiling_layout;
|
2012-08-17 22:18:26 +02:00
|
|
|
Desktop *previous;
|
|
|
|
Desktop *next;
|
|
|
|
};
|
2012-07-31 14:32:13 +02:00
|
|
|
|
|
|
|
#endif
|