-#ifndef WORKSPACES_H_
-#define WORKSPACES_H_
+/*
+ * vim:ts=4:sw=4:expandtab
+ *
+ * i3bar - an xcb-based status- and ws-bar for i3
+ * © 2010-2012 Axel Wagner and contributors (see also: LICENSE)
+ *
+ * workspaces.c: Maintaining the workspace-lists
+ *
+ */
+#pragma once
#include <xcb/xproto.h>
TAILQ_HEAD(ws_head, i3_ws);
-void parse_workspaces_json();
-void free_workspaces();
+/*
+ * Start parsing the received json-string
+ *
+ */
+void parse_workspaces_json(char *json);
+
+/*
+ * free() all workspace data-structures
+ *
+ */
+void free_workspaces(void);
struct i3_ws {
- int num;
- char *name;
- xcb_char2b_t *ucs2_name;
- int name_glyphs;
- int name_width;
- bool visible;
- bool focused;
- bool urgent;
- rect rect;
- struct i3_output *output;
-
- TAILQ_ENTRY(i3_ws) tailq;
+ int num; /* The internal number of the ws */
+ i3String *name; /* The name of the ws */
+ 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 */
};
-
-#endif