]> git.sur5r.net Git - i3/i3/blobdiff - include/resize.h
Make cmd_resize_tiling_direction work with pixels
[i3/i3] / include / resize.h
index 99646ea087a857b07d6412e24ec72dd74f6cf4d3..758cb4a1a28376f5e4bdd4d9d8c1ccc305fc5742 100644 (file)
@@ -2,14 +2,31 @@
  * vim:ts=4:sw=4:expandtab
  *
  * i3 - an improved dynamic tiling window manager
- * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
+ * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
  *
  * resize.c: Interactive resizing.
  *
  */
-#ifndef _RESIZE_H
-#define _RESIZE_H
+#pragma once
 
-int resize_graphical_handler(Con *first, Con *second, orientation_t orientation, const xcb_button_press_event_t *event);
+#include <config.h>
 
-#endif
+bool resize_find_tiling_participants(Con **current, Con **other, direction_t direction, bool both_sides);
+
+void resize_graphical_handler(Con *first, Con *second, orientation_t orientation, const xcb_button_press_event_t *event);
+
+/**
+ * Resize the two given containers using the given amount of pixels or
+ * percentage points. One of the two needs to be 0. A positive amount means
+ * growing the first container while a negative means shrinking it.
+ * Returns false when the resize would result in one of the two containers
+ * having less than 1 pixel of size.
+ *
+ */
+bool resize_neighboring_cons(Con *first, Con *second, int px, int ppt);
+
+/**
+ * Calculate the given container's new percent given a change in pixels.
+ *
+ */
+double px_resize_to_percent(Con *con, int px_diff);