]> git.sur5r.net Git - i3/i3/blobdiff - include/con.h
Merge pull request #2953 from CyberShadow/focus_wrapping
[i3/i3] / include / con.h
index 0c532207ba021d78427691e290fa376ba278ad90..b88ea354cd7e0b28e754ed0ac3e97167026d1916 100644 (file)
@@ -25,6 +25,12 @@ Con *con_new_skeleton(Con *parent, i3Window *window);
  */
 Con *con_new(Con *parent, i3Window *window);
 
+/**
+ * Frees the specified container.
+ *
+ */
+void con_free(Con *con);
+
 /**
  * Sets input focus to the given container. Will be updated in X11 in the next
  * run of x_push_changes().
@@ -96,7 +102,7 @@ Con *con_get_output(Con *con);
 Con *con_get_workspace(Con *con);
 
 /**
- * Searches parenst of the given 'con' until it reaches one with the specified
+ * Searches parents of the given 'con' until it reaches one with the specified
  * 'orientation'. Aborts when it comes across a floating_con.
  *
  */
@@ -139,6 +145,12 @@ Con *con_inside_floating(Con *con);
  */
 bool con_inside_focused(Con *con);
 
+/**
+ * Checks if the container has the given parent as an actual parent.
+ *
+ */
+bool con_has_parent(Con *con, Con *parent);
+
 /**
  * Returns the container with the given client window ID or NULL if no such
  * container exists.
@@ -146,6 +158,20 @@ bool con_inside_focused(Con *con);
  */
 Con *con_by_window_id(xcb_window_t window);
 
+/**
+ * Returns the container with the given container ID or NULL if no such
+ * container exists.
+ *
+ */
+Con *con_by_con_id(long target);
+
+/**
+ * Returns true if the given container (still) exists.
+ * This can be used, e.g., to make sure a container hasn't been closed in the meantime.
+ *
+ */
+bool con_exists(Con *con);
+
 /**
  * Returns the container with the given frame ID or NULL if no such container
  * exists.
@@ -288,7 +314,16 @@ void con_move_to_workspace(Con *con, Con *workspace, bool fix_coordinates,
  * visible workspace on the given output.
  *
  */
-void con_move_to_output(Con *con, Output *output);
+void con_move_to_output(Con *con, Output *output, bool fix_coordinates);
+
+/**
+ * Moves the given container to the currently focused container on the
+ * visible workspace on the output specified by the given name.
+ * The current output for the container is used to resolve relative names
+ * such as left, right, up, down.
+ *
+ */
+bool con_move_to_output_name(Con *con, const char *name, bool fix_coordinates);
 
 /**
  * Moves the given container to the given mark.
@@ -461,3 +496,9 @@ void con_force_split_parents_redraw(Con *con);
  *
  */
 i3String *con_parse_title_format(Con *con);
+
+/**
+ * Swaps the two containers.
+ *
+ */
+bool con_swap(Con *first, Con *second);