X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Frender.h;h=2b2c8dad74b291347144e9dc9189da570cb9c695;hb=e4d2b385529847b926a716731be4a8c22ed79007;hp=849f214e5f1ef379b57b20fa86642ba1dbcd7bed;hpb=7415f1444894805d39b3f5400e887302a0fdf69f;p=i3%2Fi3 diff --git a/include/render.h b/include/render.h index 849f214e..2b2c8dad 100644 --- a/include/render.h +++ b/include/render.h @@ -1,9 +1,36 @@ /* * vim:ts=4:sw=4:expandtab + * + * i3 - an improved dynamic tiling window manager + * © 2009 Michael Stapelberg and contributors (see also: LICENSE) + * + * 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. + * */ +#pragma once -#ifndef _RENDER_H -#define _RENDER_H +#include + +/** + * 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; /** * "Renders" the given container (and its children), meaning that all rects are @@ -13,6 +40,10 @@ * updated in X11. * */ -void render_con(Con *con); +void render_con(Con *con, bool render_fullscreen); -#endif +/** + * Returns the height for the decorations + * + */ +int render_deco_height(void);