]> git.sur5r.net Git - i3/i3/blob - i3bar/include/workspaces.h
Merge branch 'master' into next
[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-2012 Axel Wagner and contributors (see also: LICENSE)
6  *
7  * workspaces.c: Maintaining the workspace-lists
8  *
9  */
10 #pragma once
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(void);
31
32 struct i3_ws {
33     int                num;         /* The internal number of the ws */
34     i3String           *name;       /* The name of the ws */
35     int                name_width;  /* The rendered width of the name */
36     bool               visible;     /* If the ws is currently visible on an output */
37     bool               focused;     /* If the ws is currently focused */
38     bool               urgent;      /* If the urgent-hint of the ws is set */
39     rect               rect;        /* The rect of the ws (not used (yet)) */
40     struct i3_output   *output;     /* The current output of the ws */
41
42     TAILQ_ENTRY(i3_ws) tailq;       /* Pointer for the TAILQ-Macro */
43 };