*/
#pragma once
+#include <config.h>
+
/**
* Create a new container (and attach it to the given parent, if not NULL).
* This function only initializes the data structures.
*/
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().
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.
*
*/
*/
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.
*/
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 the container with the given frame ID or NULL if no such container
* exists.
*/
int con_num_children(Con *con);
+/**
+ * Returns the number of visible non-floating children of this container.
+ * For example, if the container contains a hsplit which has two children,
+ * this will return 2 instead of 1.
+ */
+int con_num_visible_children(Con *con);
+
/**
* Count the number of windows (i.e., leaf containers).
*
*
*/
i3String *con_parse_title_format(Con *con);
+
+/**
+ * Swaps the two containers.
+ *
+ */
+bool con_swap(Con *first, Con *second);