2010-07-21 19:15:18 -04:00
|
|
|
#ifndef WORKSPACES_H_
|
|
|
|
#define WORKSPACES_H_
|
|
|
|
|
2010-08-05 21:32:05 -04:00
|
|
|
#include <xcb/xproto.h>
|
|
|
|
|
2010-07-21 19:15:18 -04:00
|
|
|
#include "common.h"
|
|
|
|
|
2010-07-29 21:11:54 -04:00
|
|
|
typedef struct i3_ws i3_ws;
|
2010-07-21 19:15:18 -04:00
|
|
|
|
2010-07-29 21:11:54 -04:00
|
|
|
TAILQ_HEAD(ws_head, i3_ws);
|
2010-07-21 19:15:18 -04:00
|
|
|
|
2010-08-06 20:10:05 -04:00
|
|
|
/*
|
|
|
|
* Start parsing the received json-string
|
|
|
|
*
|
|
|
|
*/
|
2010-07-22 22:43:43 -04:00
|
|
|
void parse_workspaces_json();
|
2010-08-06 20:10:05 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* free() all workspace data-structures
|
|
|
|
*
|
|
|
|
*/
|
2010-07-21 19:15:18 -04:00
|
|
|
void free_workspaces();
|
|
|
|
|
2010-07-29 21:11:54 -04:00
|
|
|
struct i3_ws {
|
2010-08-06 20:10:05 -04:00
|
|
|
int num; /* The internal number of the ws */
|
|
|
|
char *name; /* The name (in utf8) of the ws */
|
|
|
|
xcb_char2b_t *ucs2_name; /* The name (in ucs2) of the ws */
|
|
|
|
int name_glyphs; /* The length (in glyphs) of the name */
|
|
|
|
int name_width; /* The rendered width of the name */
|
|
|
|
bool visible; /* If the ws is currently visible on an output */
|
|
|
|
bool focused; /* If the ws is currently focused */
|
|
|
|
bool urgent; /* If the urgent-hint of the ws is set */
|
|
|
|
rect rect; /* The rect of the ws (not used (yet)) */
|
|
|
|
struct i3_output *output; /* The current output of the ws */
|
|
|
|
|
|
|
|
TAILQ_ENTRY(i3_ws) tailq; /* Pointer for the TAILQ-Macro */
|
2010-07-21 19:15:18 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|