gri3-wm/i3bar/include/workspaces.h

45 lines
1.2 KiB
C
Raw Normal View History

2010-08-07 18:05:16 +02:00
/*
* vim:ts=4:sw=4:expandtab
2010-08-07 18:05:16 +02:00
*
* i3bar - an xcb-based status- and ws-bar for i3
* © 2010-2012 Axel Wagner and contributors (see also: LICENSE)
2010-08-07 18:05:16 +02:00
*
2015-03-23 20:56:49 +01:00
* workspaces.c: Maintaining the workspace lists
2010-08-07 18:05:16 +02:00
*
*/
#pragma once
2010-07-22 01:15:18 +02:00
2010-08-06 03:32:05 +02:00
#include <xcb/xproto.h>
2010-07-22 01:15:18 +02:00
#include "common.h"
2010-07-30 03:11:54 +02:00
typedef struct i3_ws i3_ws;
2010-07-22 01:15:18 +02:00
2010-07-30 03:11:54 +02:00
TAILQ_HEAD(ws_head, i3_ws);
2010-07-22 01:15:18 +02:00
2010-08-07 02:10:05 +02:00
/*
2015-03-23 20:56:49 +01:00
* Start parsing the received JSON string
2010-08-07 02:10:05 +02:00
*
*/
2011-08-10 23:54:27 +02:00
void parse_workspaces_json(char *json);
2010-08-07 02:10:05 +02:00
/*
2015-03-23 20:56:49 +01:00
* free() all workspace data structures
2010-08-07 02:10:05 +02:00
*
*/
void free_workspaces(void);
2010-07-22 01:15:18 +02:00
2010-07-30 03:11:54 +02:00
struct i3_ws {
int num; /* The internal number of the ws */
char *canonical_name; /* The true name of the ws according to the ipc */
i3String *name; /* The name of the ws that is displayed on the bar */
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 */
2015-03-23 20:56:49 +01:00
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-22 01:15:18 +02:00
};