/*
* vim:ts=4:sw=4:expandtab
+ *
+ * i3 - an improved dynamic tiling window manager
+ * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
+ *
+ * tree.c: Everything that primarily modifies the layout tree data structure.
+ *
*/
+#pragma once
-#ifndef _TREE_H
-#define _TREE_H
+#include <config.h>
extern Con *croot;
/* TODO: i am not sure yet how much access to the focused container should
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();
-
-/**
- * Closes the current container using tree_close().
- *
- */
-void tree_close_con(kill_window_t kill_window);
+void tree_render(void);
/**
* Changes focus in the given way (next/previous) and given orientation
* 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
+ * window: tree_close_internal() 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 force_set_focus);
+bool tree_close_internal(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).
*
*/
void tree_flatten(Con *child);
-
-#endif