]> git.sur5r.net Git - i3/i3/blob - include/resize.h
Merge branch 'release-4.16.1'
[i3/i3] / include / resize.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * resize.c: Interactive resizing.
8  *
9  */
10 #pragma once
11
12 #include <config.h>
13
14 bool resize_find_tiling_participants(Con **current, Con **other, direction_t direction, bool both_sides);
15
16 void resize_graphical_handler(Con *first, Con *second, orientation_t orientation, const xcb_button_press_event_t *event);
17
18 /**
19  * Resize the two given containers using the given amount of pixels or
20  * percentage points. One of the two needs to be 0. A positive amount means
21  * growing the first container while a negative means shrinking it.
22  * Returns false when the resize would result in one of the two containers
23  * having less than 1 pixel of size.
24  *
25  */
26 bool resize_neighboring_cons(Con *first, Con *second, int px, int ppt);
27
28 /**
29  * Calculate the minimum percent needed for the given container to be at least 1
30  * pixel.
31  *
32  */
33 double percent_for_1px(Con *con);
34
35 /**
36  * Calculate the given container's new percent given a change in pixels.
37  *
38  */
39 double px_resize_to_percent(Con *con, int px_diff);