6 * This file defines all data structures used by i3
11 /* Forward definitions */
12 typedef struct Cell Cell;
13 typedef struct Font i3Font;
14 typedef struct Container Container;
15 typedef struct Client Client;
18 typedef enum { D_LEFT, D_RIGHT, D_UP, D_DOWN } direction_t;
19 struct table_dimensions_t {
25 * Defines a position in the table
34 * We need to save the height of a font because it is required for each drawing of
35 * text but relatively hard to get. As soon as a new font needs to be loaded, a
36 * Font-entry will be filled for later use.
40 /* The name of the font, that is what the pattern resolves to */
42 /* A copy of the pattern to build a cache */
44 /* The height of the font, built from font_ascent + font_descent */
46 /* The xcb-id for the font */
51 * A client is X11-speak for a window.
55 /* TODO: this is NOT final */
56 Cell old_position; /* if you set a client to floating and set it back to managed,
57 it does remember its old position and *tries* to get back there */
59 /* Backpointer. A client is inside a container */
65 xcb_window_t frame; /* Our window: The frame around the client */
66 xcb_gcontext_t titlegc; /* The titlebar’s graphic context inside the frame */
67 xcb_window_t child; /* The client’s window */
69 /* The following entry provides the necessary list pointers to use Client with LIST_* macros */
70 CIRCLEQ_ENTRY(Client) clients;
74 * A container is either in default or stacking mode. It sits inside the table.
78 /* Those are speaking for themselves: */
79 Client *currently_focused;
83 /* Position of the container inside our table */
86 /* Width/Height of the container. Changeable by the user */
90 /* Ensure MODE_DEFAULT maps to 0 because we use calloc for initialization later */
91 enum { MODE_DEFAULT = 0, MODE_STACK = 1 } mode;
92 CIRCLEQ_HEAD(client_head, Client) clients;