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