]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/include/outputs.h
i3bar: free output data structures
[i3/i3] / i3bar / include / outputs.h
index ec09e764725d84b756543842ce67d04d2aea26cb..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 */
@@ -60,5 +73,6 @@ struct i3_output {
     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 */
 };