]> git.sur5r.net Git - i3/i3/blobdiff - include/tree.h
Merge branch 'master' into next
[i3/i3] / include / tree.h
index 98358edd622bf5bb02d7014e23b1aeca33f4c0a6..8816b19a640a55d0fa84300bdd59295c56c24943 100644 (file)
@@ -1,7 +1,12 @@
 /*
  * vim:ts=4:sw=4:expandtab
+ *
+ * i3 - an improved dynamic tiling window manager
+ * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
+ *
+ * tree.c: Everything that primarily modifies the layout tree data structure.
+ *
  */
-
 #ifndef _TREE_H
 #define _TREE_H
 
@@ -18,13 +23,13 @@ extern struct all_cons_head all_cons;
  * assigning a workspace to each RandR output.
  *
  */
-void tree_init();
+void tree_init(xcb_get_geometry_reply_t *geometry);
 
 /**
  * Opens an empty container in the current container
  *
  */
-Con *tree_open_con(Con *con);
+Con *tree_open_con(Con *con, i3Window *window);
 
 /**
  * Splits (horizontally or vertically) the given container by creating a new
@@ -34,23 +39,23 @@ Con *tree_open_con(Con *con);
 void tree_split(Con *con, orientation_t orientation);
 
 /**
- * Moves focus one level up.
+ * Moves focus one level up. Returns true if focus changed.
  *
  */
-void level_up();
+bool level_up(void);
 
 /**
- * Moves focus one level down.
+ * Moves focus one level down. Returns true if focus changed.
  *
  */
-void level_down();
+bool level_down(void);
 
 /**
  * Renders the tree, that is rendering all outputs using render_con() and
  * pushing the changes to X11 using x_push_changes().
  *
  */
-void tree_render();
+void tree_render(void);
 
 /**
  * Closes the current container using tree_close().
@@ -70,14 +75,21 @@ void tree_next(char way, orientation_t orientation);
  * Returns true if the container was killed or false if just WM_DELETE was sent
  * and the window is expected to kill itself.
  *
+ * The dont_kill_parent flag is specified when the function calls itself
+ * recursively while deleting a containers children.
+ *
+ * The force_set_focus flag is specified in the case of killing a floating
+ * window: tree_close() will be invoked for the CT_FLOATINGCON (the parent
+ * container) and focus should be set there.
+ *
  */
-bool tree_close(Con *con, kill_window_t kill_window, bool dont_kill_parent);
+bool tree_close(Con *con, kill_window_t kill_window, bool dont_kill_parent, bool force_set_focus);
 
 /**
  * Loads tree from ~/.i3/_restart.json (used for in-place restarts).
  *
  */
-bool tree_restore(const char *path);
+bool tree_restore(const char *path, xcb_get_geometry_reply_t *geometry);
 
 /**
  * tree_flatten() removes pairs of redundant split containers, e.g.: