]> git.sur5r.net Git - i3/i3/blobdiff - include/con.h
Merge branch 'master' into next
[i3/i3] / include / con.h
index 1dd65a6eadcedce5ae52bb3bce10314943c21781..155bb7d8433989e5bafecf9ff6b85cd3d054dcc4 100644 (file)
@@ -7,7 +7,7 @@
  * X11 IDs using x_con_init().
  *
  */
-Con *con_new(Con *parent);
+Con *con_new(Con *parent, i3Window *window);
 
 /**
  * Sets input focus to the given container. Will be updated in X11 in the next
@@ -53,7 +53,7 @@ Con *con_parent_with_orientation(Con *con, orientation_t orientation);
  * Returns the first fullscreen node below this node.
  *
  */
-Con *con_get_fullscreen_con(Con *con);
+Con *con_get_fullscreen_con(Con *con, int fullscreen_mode);
 
 /**
  * Returns true if the node is floating.
@@ -68,6 +68,12 @@ bool con_is_floating(Con *con);
  */
 Con *con_inside_floating(Con *con);
 
+/**
+ * Checks if the given container is inside a focused container.
+ *
+ */
+bool con_inside_focused(Con *con);
+
 /**
  * Returns the container with the given client window ID or NULL if no such
  * container exists.
@@ -126,15 +132,26 @@ void con_fix_percent(Con *con);
  * entered when there already is a fullscreen container on this workspace.
  *
  */
-void con_toggle_fullscreen(Con *con);
+void con_toggle_fullscreen(Con *con, int fullscreen_mode);
 
 /**
  * Moves the given container to the currently focused container on the given
  * workspace.
+ *
+ * The fix_coordinates flag will translate the current coordinates (offset from
+ * the monitor position basically) to appropriate coordinates on the
+ * destination workspace.
+ * Not enabling this behaviour comes in handy when this function gets called by
+ * floating_maybe_reassign_ws, which will only "move" a floating window when it
+ * *already* changed its coordinates to a different output.
+ *
+ * The dont_warp flag disables pointer warping and will be set when this
+ * function is called while dragging a floating window.
+ *
  * TODO: is there a better place for this function?
  *
  */
-void con_move_to_workspace(Con *con, Con *workspace);
+void con_move_to_workspace(Con *con, Con *workspace, bool fix_coordinates, bool dont_warp);
 
 /**
  * Returns the orientation of the given container (for stacked containers,
@@ -177,6 +194,14 @@ Con *con_descend_focused(Con *con);
  */
 Con *con_descend_tiling_focused(Con *con);
 
+/*
+ * Returns the leftmost, rightmost, etc. container in sub-tree. For example, if
+ * direction is D_LEFT, then we return the rightmost container and if direction
+ * is D_RIGHT, we return the leftmost container.  This is because if we are
+ * moving D_LEFT, and thus want the rightmost container.
+ */
+Con *con_descend_direction(Con *con, direction_t direction);
+
 /**
  * Returns a "relative" Rect which contains the amount of pixels that need to
  * be added to the original Rect to get the final position (obviously the