]> git.sur5r.net Git - i3/i3/blob - include/x.h
Merge branch 'tree' into next
[i3/i3] / include / x.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  */
4
5 #ifndef _X_H
6 #define _X_H
7
8 /** Stores the X11 window ID of the currently focused window */
9 extern xcb_window_t focused_id;
10
11 /**
12  * Initializes the X11 part for the given container. Called exactly once for
13  * every container from con_new().
14  *
15  */
16 void x_con_init(Con *con);
17
18 /**
19  * Moves a child window from Container src to Container dest.
20  *
21  */
22 void x_move_win(Con *src, Con *dest);
23
24 /**
25  * Reparents the child window of the given container (necessary for sticky
26  * containers). The reparenting happens in the next call of x_push_changes().
27  *
28  */
29 void x_reparent_child(Con *con, Con *old);
30
31 /**
32  * Re-initializes the associated X window state for this container. You have
33  * to call this when you assign a client to an empty container to ensure that
34  * its state gets updated correctly.
35  *
36  */
37 void x_reinit(Con *con);
38
39 /**
40  * Kills the window decoration associated with the given container.
41  *
42  */
43 void x_con_kill(Con *con);
44
45 /**
46  * Returns true if the client supports the given protocol atom (like WM_DELETE_WINDOW)
47  *
48  */
49 bool window_supports_protocol(xcb_window_t window, xcb_atom_t atom);
50
51 /**
52  * Kills the given X11 window using WM_DELETE_WINDOW (if supported).
53  *
54  */
55 void x_window_kill(xcb_window_t window, kill_window_t kill_window);
56
57 /**
58  * Draws the decoration of the given container onto its parent.
59  *
60  */
61 void x_draw_decoration(Con *con);
62
63 /**
64  * Recursively calls x_draw_decoration. This cannot be done in x_push_node
65  * because x_push_node uses focus order to recurse (see the comment above)
66  * while drawing the decoration needs to happen in the actual order.
67  *
68  */
69 void x_deco_recurse(Con *con);
70
71 /**
72  * This function pushes the properties of each node of the layout tree to
73  * X11 if they have changed (like the map state, position of the window, …).
74  * It recursively traverses all children of the given node.
75  *
76  */
77 void x_push_node(Con *con);
78
79 /**
80  * Pushes all changes (state of each node, see x_push_node() and the window
81  * stack) to X11.
82  *
83  */
84 void x_push_changes(Con *con);
85
86 /**
87  * Raises the specified container in the internal stack of X windows. The
88  * next call to x_push_changes() will make the change visible in X11.
89  *
90  */
91 void x_raise_con(Con *con);
92
93 /**
94  * Sets the WM_NAME property (so, no UTF8, but used only for debugging anyways)
95  * of the given name. Used for properly tagging the windows for easily spotting
96  * i3 windows in xwininfo -root -all.
97  *
98  */
99 void x_set_name(Con *con, const char *name);
100
101 /**
102  * Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
103  *
104  */
105 void x_set_i3_atoms();
106
107 #endif