]> git.sur5r.net Git - i3/i3/blob - include/layout.h
Implement floating (please test and find bugs)
[i3/i3] / include / layout.h
1 /*
2  * vim:ts=8:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  *
6  * (c) 2009 Michael Stapelberg and contributors
7  *
8  * See file LICENSE for license information.
9  *
10  */
11 #include <xcb/xcb.h>
12
13 #ifndef _LAYOUT_H
14 #define _LAYOUT_H
15
16 /**
17  * Gets the unoccupied space (= space which is available for windows which were resized by the user)
18  * This is necessary to render both, customly resized windows and never touched
19  * windows correctly, meaning that the aspect ratio will be maintained when opening new windows.
20  *
21  */
22 int get_unoccupied_x(Workspace *workspace);
23
24 /**
25  * (Re-)draws window decorations for a given Client onto the given drawable/graphic context.
26  * When in stacking mode, the window decorations are drawn onto an own window.
27  *
28  */
29 void decorate_window(xcb_connection_t *conn, Client *client, xcb_drawable_t drawable, xcb_gcontext_t gc, int offset);
30
31 /**
32  * Redecorates the given client correctly by checking if it’s in a stacking container and
33  * re-rendering the stack window or just calling decorate_window if it’s not in a stacking
34  * container.
35  *
36  */
37 void redecorate_window(xcb_connection_t *conn, Client *client);
38
39 /**
40  * Pushes the client’s x and y coordinates to X11
41  *
42  */
43 void reposition_client(xcb_connection_t *conn, Client *client);
44
45 /**
46  * Pushes the client’s width/height to X11 and resizes the child window
47  *
48  */
49 void resize_client(xcb_connection_t *conn, Client *client);
50
51 /**
52  * Renders the given container. Is called by render_layout() or individually (for example
53  * when focus changes in a stacking container)
54  *
55  */
56 void render_container(xcb_connection_t *conn, Container *container);
57
58 /**
59  * Modifies the event mask of all clients on the given workspace to either ignore or to handle
60  * enter notifies. It is handy to ignore notifies because they will be sent when a window is mapped
61  * under the cursor, thus when the user didn’t enter the window actively at all.
62  *
63  */
64 void ignore_enter_notify_forall(xcb_connection_t *conn, Workspace *workspace, bool ignore_enter_notify);
65
66 /**
67  * Renders the given workspace on the given screen
68  *
69  */
70 void render_workspace(xcb_connection_t *conn, i3Screen *screen, Workspace *r_ws);
71
72 /**
73  * Renders the whole layout, that is: Go through each screen, each workspace, each container
74  * and render each client. This also renders the bars.
75  *
76  * If you don’t need to render *everything*, you should call render_container on the container
77  * you want to refresh.
78  *
79  */
80 void render_layout(xcb_connection_t *conn);
81
82 #endif