]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/include/outputs.h
Merge branch 'next' into master
[i3/i3] / i3bar / include / outputs.h
index 87cc023e8b8fdbc1b61964eaee7fbbdcc0c40d56..29a7bcd3825e0b62fb354f233326dde25ea695b7 100644 (file)
@@ -9,11 +9,12 @@
  */
 #pragma once
 
+#include <config.h>
+
 #include <xcb/xcb.h>
 #include <cairo/cairo-xcb.h>
 
 #include "common.h"
-#include "draw_util.h"
 
 typedef struct i3_output i3_output;
 
@@ -32,12 +33,24 @@ void parse_outputs_json(char* json);
  */
 void init_outputs(void);
 
+/*
+ * free() all outputs data structures.
+ *
+ */
+void free_outputs(void);
+
 /*
  * Returns the output with the given name
  *
  */
 i3_output* get_output_by_name(char* name);
 
+/*
+ * Returns true if the output has the currently focused workspace
+ *
+ */
+bool output_has_focus(i3_output* output);
+
 struct i3_output {
     char* name;   /* Name of the output */
     bool active;  /* If the output is active */
@@ -46,13 +59,20 @@ struct i3_output {
     int ws;       /* The number of the currently visible ws */
     rect rect;    /* The rect (relative to the root window) */
 
-    /* Off-screen buffer for preliminary rendering. */
+    /* Off-screen buffer for preliminary rendering of the bar. */
     surface_t buffer;
+    /* Off-screen buffer for pre-rendering the statusline, separated to make clipping easier. */
+    surface_t statusline_buffer;
+    /* How much of statusline_buffer's horizontal space was used on last statusline render. */
+    int statusline_width;
+    /* Whether statusline block short texts where used on last statusline render. */
+    bool statusline_short_text;
     /* The actual window on which we draw. */
     surface_t bar;
 
     struct ws_head* workspaces;  /* The workspaces on this output */
     struct tc_head* trayclients; /* The tray clients on this output */
 
-    SLIST_ENTRY(i3_output) slist; /* Pointer for the SLIST-Macro */
+    SLIST_ENTRY(i3_output)
+    slist; /* Pointer for the SLIST-Macro */
 };