]> git.sur5r.net Git - i3/i3/blob - include/layout.h
Implement tabbing
[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
18  * were resized by the user) This is necessary to render both, customly
19  * resized windows and never touched windows correctly, meaning that the
20  * aspect ratio will be maintained when opening new windows.
21  *
22  */
23 int get_unoccupied_x(Workspace *workspace);
24
25 /**
26  * (Re-)draws window decorations for a given Client onto the given
27  * drawable/graphic context.  When in stacking mode, the window decorations
28  * are drawn onto an own window.
29  *
30  */
31 void decorate_window(xcb_connection_t *conn, Client *client,
32                      xcb_drawable_t drawable, xcb_gcontext_t gc,
33                      int offset_x, int offset_y);
34
35 /**
36  * Redecorates the given client correctly by checking if it’s in a stacking
37  * container and re-rendering the stack window or just calling decorate_window
38  * if it’s not in a stacking container.
39  *
40  */
41 void redecorate_window(xcb_connection_t *conn, Client *client);
42
43 /**
44  * Pushes the client’s x and y coordinates to X11
45  *
46  */
47 void reposition_client(xcb_connection_t *conn, Client *client);
48
49 /**
50  * Pushes the client’s width/height to X11 and resizes the child window. This
51  * function also updates the client’s position, so if you work on tiling clients
52  * only, you can use this function instead of separate calls to reposition_client
53  * and resize_client to reduce flickering.
54  *
55  */
56 void resize_client(xcb_connection_t *conn, Client *client);
57
58 /**
59  * Renders the given container. Is called by render_layout() or individually
60  * (for example when focus changes in a stacking container)
61  *
62  */
63 void render_container(xcb_connection_t *conn, Container *container);
64
65 /**
66  * Modifies the event mask of all clients on the given workspace to either
67  * ignore or to handle enter notifies. It is handy to ignore notifies because
68  * they will be sent when a window is mapped under the cursor, thus when the
69  * user didn’t enter the window actively at all.
70  *
71  */
72 void ignore_enter_notify_forall(xcb_connection_t *conn, Workspace *workspace,
73                                 bool ignore_enter_notify);
74
75 /**
76  * Renders the given workspace on the given screen
77  *
78  */
79 void render_workspace(xcb_connection_t *conn, i3Screen *screen, Workspace *r_ws);
80
81 /**
82  * Renders the whole layout, that is: Go through each screen, each workspace,
83  * each container and render each client. This also renders the bars.
84  *
85  * If you don’t need to render *everything*, you should call render_container
86  * on the container you want to refresh.
87  *
88  */
89 void render_layout(xcb_connection_t *conn);
90
91 #endif