]> git.sur5r.net Git - i3/i3/blob - i3bar/include/workspaces.h
Add comments
[i3/i3] / i3bar / include / workspaces.h
1 #ifndef WORKSPACES_H_
2 #define WORKSPACES_H_
3
4 #include <xcb/xproto.h>
5
6 #include "common.h"
7
8 typedef struct i3_ws i3_ws;
9
10 TAILQ_HEAD(ws_head, i3_ws);
11
12 /*
13  * Start parsing the received json-string
14  *
15  */
16 void parse_workspaces_json();
17
18 /*
19  * free() all workspace data-structures
20  *
21  */
22 void free_workspaces();
23
24 struct i3_ws {
25     int                num;         /* The internal number of the ws */
26     char               *name;       /* The name (in utf8) of the ws */
27     xcb_char2b_t       *ucs2_name;  /* The name (in ucs2) of the ws */
28     int                name_glyphs; /* The length (in glyphs) of the name */
29     int                name_width;  /* The rendered width of the name */
30     bool               visible;     /* If the ws is currently visible on an output */
31     bool               focused;     /* If the ws is currently focused */
32     bool               urgent;      /* If the urgent-hint of the ws is set */
33     rect               rect;        /* The rect of the ws (not used (yet)) */
34     struct i3_output   *output;     /* The current output of the ws */
35
36     TAILQ_ENTRY(i3_ws) tailq;       /* Pointer for the TAILQ-Macro */
37 };
38
39 #endif