2010-03-27 15:25:51 +01:00
|
|
|
/*
|
|
|
|
* vim:ts=4:sw=4:expandtab
|
2011-10-25 22:19:38 +02:00
|
|
|
*
|
|
|
|
* 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
|
|
|
*
|
|
|
|
* render.c: Renders (determines position/sizes) the layout tree, updating the
|
|
|
|
* various rects. Needs to be pushed to X11 (see x.c) to be visible.
|
|
|
|
*
|
2010-03-27 15:25:51 +01:00
|
|
|
*/
|
2013-12-29 03:11:50 +01:00
|
|
|
#pragma once
|
2010-03-27 15:25:51 +01:00
|
|
|
|
2016-10-11 09:13:35 +02:00
|
|
|
#include <config.h>
|
|
|
|
|
2015-09-09 18:27:34 +02:00
|
|
|
/* This is used to keep a state to pass around when rendering a con in render_con(). */
|
|
|
|
typedef struct render_params {
|
|
|
|
/* A copy of the coordinates of the container which is being rendered. */
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
|
|
|
|
/* The computed height for decorations. */
|
|
|
|
int deco_height;
|
|
|
|
/* Container rect, subtract container border. This is the actually usable space
|
|
|
|
* inside this container for clients. */
|
|
|
|
Rect rect;
|
|
|
|
/* The number of children of the container which is being rendered. */
|
|
|
|
int children;
|
|
|
|
/* A precalculated list of sizes of each child. */
|
|
|
|
int *sizes;
|
|
|
|
} render_params;
|
|
|
|
|
2010-07-13 11:35:05 +02:00
|
|
|
/**
|
|
|
|
* "Renders" the given container (and its children), meaning that all rects are
|
|
|
|
* updated correctly. Note that this function does not call any xcb_*
|
|
|
|
* functions, so the changes are completely done in memory only (and
|
|
|
|
* side-effect free). As soon as you call x_push_changes(), the changes will be
|
|
|
|
* updated in X11.
|
|
|
|
*
|
|
|
|
*/
|
2010-11-21 17:00:10 +01:00
|
|
|
void render_con(Con *con, bool render_fullscreen);
|
2010-03-27 15:25:51 +01:00
|
|
|
|
2013-02-08 14:23:50 +01:00
|
|
|
/*
|
|
|
|
* Returns the height for the decorations
|
|
|
|
*/
|
|
|
|
int render_deco_height(void);
|