]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/include/outputs.h
Add licensing information
[i3/i3] / i3bar / include / outputs.h
index 83364c2fa317c80f15f62f5c8060e0bcfb86daa4..837aa50b26fa38da92861f44abcf3bde78793939 100644 (file)
@@ -1,27 +1,53 @@
+/*
+ * i3bar - an xcb-based status- and ws-bar for i3
+ *
+ * © 2010 Axel Wagner and contributors
+ *
+ * See file LICNSE for license information
+ *
+ */
 #ifndef OUTPUTS_H_
 #define OUTPUTS_H_
 
-#include "common.h"
 #include <xcb/xcb.h>
 
-typedef struct i3_output_t i3_output;
+#include "common.h"
+
+typedef struct i3_output i3_output;
+
+SLIST_HEAD(outputs_head, i3_output);
+struct outputs_head *outputs;
+
+/*
+ * Start parsing the received json-string
+ *
+ */
+void        parse_outputs_json(char* json);
+
+/*
+ * Initiate the output-list
+ *
+ */
+void        init_outputs();
 
-i3_output* outputs;
+/*
+ * Returns the output with the given name
+ *
+ */
+i3_output*  get_output_by_name(char* name);
 
-void           refresh_outputs();
-void           free_outputs();
-i3_output*     get_output_by_name(char* name);
+struct i3_output {
+       char*           name;         /* Name of the output */
+       bool            active;       /* If the output is active */
+       int             ws;           /* The number of the currently visible ws */
+       rect            rect;         /* The rect (relative to the root-win) */
 
-struct i3_output_t {
-       char*           name;
-       bool            active;
-       int             ws;
-       rect            rect;
+       xcb_window_t    bar;          /* The id of the bar of the output */
+       xcb_gcontext_t  bargc;        /* The graphical context of the bar */
 
-       xcb_window_t    win;
-       xcb_gcontext_t  gctx;
+       struct ws_head  *workspaces;  /* The workspaces on this output */
 
-       i3_output*      next;
+       SLIST_ENTRY(i3_output) slist; /* Pointer for the SLIST-Macro */
 };
 
 #endif