2011-10-25 22:19:38 +02:00
|
|
|
/*
|
|
|
|
* vim:ts=4:sw=4:expandtab
|
|
|
|
*
|
|
|
|
* i3 - an improved dynamic tiling window manager
|
2015-04-04 02:17:56 +02:00
|
|
|
* © 2009 Michael Stapelberg and contributors (see also: LICENSE)
|
2011-10-25 22:19:38 +02:00
|
|
|
*
|
|
|
|
* resize.c: Interactive resizing.
|
|
|
|
*
|
|
|
|
*/
|
2013-12-29 03:11:50 +01:00
|
|
|
#pragma once
|
2010-11-29 10:56:16 +01:00
|
|
|
|
2016-10-11 09:13:35 +02:00
|
|
|
#include <config.h>
|
|
|
|
|
2018-01-06 17:59:27 +01:00
|
|
|
bool resize_find_tiling_participants(Con **current, Con **other, direction_t direction, bool both_sides);
|
2013-09-24 15:46:58 +02:00
|
|
|
|
2018-12-12 14:53:53 +01:00
|
|
|
void resize_graphical_handler(Con *first, Con *second, orientation_t orientation,
|
|
|
|
const xcb_button_press_event_t *event,
|
|
|
|
bool use_threshold);
|
2018-08-23 21:09:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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);
|
|
|
|
|
2018-09-06 03:56:31 +02:00
|
|
|
/**
|
|
|
|
* Calculate the minimum percent needed for the given container to be at least 1
|
|
|
|
* pixel.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
double percent_for_1px(Con *con);
|