X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3;a=blobdiff_plain;f=include%2Frender.h;h=2b2c8dad74b291347144e9dc9189da570cb9c695;hp=717459e98268dd8d743134e11820f62b33c78d5e;hb=HEAD;hpb=5dda3bc2aec30e453a69b2b871379533680cda60 diff --git a/include/render.h b/include/render.h index 717459e9..2b2c8dad 100644 --- a/include/render.h +++ b/include/render.h @@ -10,6 +10,28 @@ */ #pragma once +#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 * updated correctly. Note that this function does not call any xcb_* @@ -20,7 +42,8 @@ */ void render_con(Con *con, bool render_fullscreen); -/* +/** * Returns the height for the decorations + * */ int render_deco_height(void);