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