]> git.sur5r.net Git - i3/i3/blobdiff - include/con.h
Give layout enum a name: layout_t
[i3/i3] / include / con.h
index 20e83df935bdf7501ec0da3a8c7918245d8f36a1..ec4ae3524d789f0546a7dc8dccc658dc7a0a0266 100644 (file)
@@ -9,13 +9,18 @@
  *        …).
  *
  */
-#ifndef _CON_H
-#define _CON_H
+#ifndef I3_CON_H
+#define I3_CON_H
 
 /**
  * Create a new container (and attach it to the given parent, if not NULL).
- * This function initializes the data structures and creates the appropriate
- * X11 IDs using x_con_init().
+ * This function only initializes the data structures.
+ *
+ */
+Con *con_new_skeleton(Con *parent, i3Window *window);
+
+
+/* A wrapper for con_new_skeleton, to retain the old con_new behaviour
  *
  */
 Con *con_new(Con *parent, i3Window *window);
@@ -33,6 +38,18 @@ void con_focus(Con *con);
  */
 bool con_is_leaf(Con *con);
 
+/*
+ * Returns true if a container should be considered split.
+ *
+ */
+bool con_is_split(Con *con);
+
+/**
+ * Returns true if this node has regular or floating children.
+ *
+ */
+bool con_has_children(Con *con);
+
 /**
  * Returns true if this node accepts a window (if the node swallows windows,
  * it might already have swallowed enough and cannot hold any more).
@@ -66,6 +83,12 @@ Con *con_parent_with_orientation(Con *con, orientation_t orientation);
  */
 Con *con_get_fullscreen_con(Con *con, int fullscreen_mode);
 
+/**
+ * Returns true if the container is internal, such as __i3_scratch
+ *
+ */
+bool con_is_internal(Con *con);
+
 /**
  * Returns true if the node is floating.
  *
@@ -244,7 +267,7 @@ int con_border_style(Con *con);
  * floating window.
  *
  */
-void con_set_border_style(Con *con, int border_style);
+void con_set_border_style(Con *con, int border_style, int border_width);
 
 /**
  * This function changes the layout of a given container. Use it to handle
@@ -252,7 +275,7 @@ void con_set_border_style(Con *con, int border_style);
  * new split container before).
  *
  */
-void con_set_layout(Con *con, int layout);
+void con_set_layout(Con *con, layout_t layout);
 
 /**
  * This function toggles the layout of a given container. toggle_mode can be
@@ -293,4 +316,29 @@ Rect con_minimum_size(Con *con);
  */
 bool con_fullscreen_permits_focusing(Con *con);
 
+/**
+ * Checks if the given container has an urgent child.
+ *
+ */
+bool con_has_urgent_child(Con *con);
+
+/**
+ * Make all parent containers urgent if con is urgent or clear the urgent flag
+ * of all parent containers if there are no more urgent children left.
+ *
+ */
+void con_update_parents_urgency(Con *con);
+
+/**
+ * Set urgency flag to the container, all the parent containers and the workspace.
+ *
+ */
+void con_set_urgency(Con *con, bool urgent);
+
+/**
+ * Create a string representing the subtree under con.
+ *
+ */
+char *con_get_tree_representation(Con *con);
+
 #endif