i3
|
#include "all.h"
Go to the source code of this file.
Data Structures | |
struct | callback_params |
Functions | |
DRAGGING_CB (resize_callback) | |
bool | resize_find_tiling_participants (Con **current, Con **other, direction_t direction, bool both_sides) |
double | percent_for_1px (Con *con) |
Calculate the minimum percent needed for the given container to be at least 1 pixel. | |
bool | resize_neighboring_cons (Con *first, Con *second, int px, int ppt) |
Resize the two given containers using the given amount of pixels or percentage points. | |
void | resize_graphical_handler (Con *first, Con *second, orientation_t orientation, const xcb_button_press_event_t *event, bool use_threshold) |
DRAGGING_CB | ( | resize_callback | ) |
Definition at line 27 of file resize.c.
References conn, DLOG, Rect::height, callback_params::helpwin, HORIZ, callback_params::new_position, callback_params::orientation, callback_params::output, Con::rect, callback_params::threshold_exceeded, Rect::width, Rect::x, and Rect::y.
double percent_for_1px | ( | Con * | con | ) |
Calculate the minimum percent needed for the given container to be at least 1 pixel.
Definition at line 131 of file resize.c.
References con_orientation(), con_rect_size_in_orientation(), Con::deco_rect, Rect::height, HORIZ, and Con::parent.
Referenced by cmd_resize_tiling_width_height(), and resize_neighboring_cons().
bool resize_find_tiling_participants | ( | Con ** | current, |
Con ** | other, | ||
direction_t | direction, | ||
bool | both_sides ) |
Definition at line 72 of file resize.c.
References con_orientation(), D_LEFT, D_UP, callback_params::direction, DLOG, L_STACKED, L_TABBED, Con::layout, orientation_from_direction(), Con::parent, TAILQ_NEXT, TAILQ_PREV, and Con::type.
Referenced by cmd_resize_tiling_direction(), cmd_resize_tiling_width_height(), gaps_has_adjacent_container(), resize_set_tiling(), and tiling_resize_for_border().
void resize_graphical_handler | ( | Con * | first, |
Con * | second, | ||
orientation_t | orientation, | ||
const xcb_button_press_event_t * | event, | ||
bool | use_threshold ) |
Definition at line 173 of file resize.c.
References Colortriple::border, Config::client, color_t::colorpixel, con_descend_focused(), con_get_output(), config, conn, create_window(), DLOG, drag_pointer(), DRAG_REVERT, Config::config_client::focused, Rect::height, callback_params::helpwin, HORIZ, logical_px(), Con::name, callback_params::new_position, callback_params::orientation, callback_params::output, Con::percent, Con::rect, resize_neighboring_cons(), threshold_exceeded(), tree_render(), Rect::width, Rect::x, x_mask_event_mask(), XCURSOR_CURSOR_POINTER, XCURSOR_CURSOR_RESIZE_HORIZONTAL, XCURSOR_CURSOR_RESIZE_VERTICAL, and Rect::y.
Referenced by tiling_resize_for_border().
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.
Definition at line 146 of file resize.c.
References con_fix_percent(), con_rect_size_in_orientation(), Con::parent, Con::percent, and percent_for_1px().
Referenced by cmd_resize_tiling_direction(), and resize_graphical_handler().