]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/include/outputs.h
Merge pull request #2507 from stapelberg/autotools
[i3/i3] / i3bar / include / outputs.h
index 7ad3ed5052a290823cc6ecb57d089ebf85ede406..3067581da0ab4dbd0db9b86d74fdac2c848707f0 100644 (file)
@@ -9,11 +9,12 @@
  */
 #pragma once
 
+#include <config.h>
+
 #include <xcb/xcb.h>
 #include <cairo/cairo-xcb.h>
 
 #include "common.h"
-#include "cairo_util.h"
 
 typedef struct i3_output i3_output;
 
@@ -38,6 +39,12 @@ void init_outputs(void);
  */
 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,8 +53,14 @@ 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;