]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/include/workspaces.h
Add licensing information
[i3/i3] / i3bar / include / workspaces.h
index ad6ac787775fac6cd3711379af3e33c115fbb573..64da21a7c0fdde98094ab186f6e43ca12138d831 100644 (file)
@@ -1,26 +1,47 @@
+/*
+ * i3bar - an xcb-based status- and ws-bar for i3
+ *
+ * © 2010 Axel Wagner and contributors
+ *
+ * See file LICNSE for license information
+ *
+ */
 #ifndef WORKSPACES_H_
 #define WORKSPACES_H_
 
+#include <xcb/xproto.h>
+
 #include "common.h"
-#include "outputs.h"
 
-typedef struct i3_ws_t i3_ws;
+typedef struct i3_ws i3_ws;
+
+TAILQ_HEAD(ws_head, i3_ws);
 
-i3_ws* workspaces;
+/*
+ * Start parsing the received json-string
+ *
+ */
+void parse_workspaces_json();
 
-void refresh_workspaces();
+/*
+ * free() all workspace data-structures
+ *
+ */
 void free_workspaces();
 
-struct i3_ws_t {
-       int             num;
-       char*           name;
-       bool            visible;
-       bool            focused;
-       bool            urgent;
-       rect            rect;
-       i3_output*      output;
+struct i3_ws {
+    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 */
 
-       i3_ws*          next;
+    TAILQ_ENTRY(i3_ws) tailq;       /* Pointer for the TAILQ-Macro */
 };
 
 #endif