i3
x.h
Go to the documentation of this file.
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * x.c: Interface to X11, transfers our in-memory state to X11 (see also
8  * render.c). Basically a big state machine.
9  *
10  */
11 #pragma once
12 
13 #include <config.h>
14 
16 extern xcb_window_t focused_id;
17 
23 void x_con_init(Con *con);
24 
29 void x_move_win(Con *src, Con *dest);
30 
36 void x_reparent_child(Con *con, Con *old);
37 
44 void x_reinit(Con *con);
45 
50 void x_con_kill(Con *con);
51 
52 /*
53  * Completely reinitializes the container's frame, without destroying the old window.
54  *
55  */
56 void x_con_reframe(Con *con);
57 
62 bool window_supports_protocol(xcb_window_t window, xcb_atom_t atom);
63 
68 void x_window_kill(xcb_window_t window, kill_window_t kill_window);
69 
74 void x_draw_decoration(Con *con);
75 
82 void x_deco_recurse(Con *con);
83 
90 void x_push_node(Con *con);
91 
97 void x_push_changes(Con *con);
98 
104 void x_raise_con(Con *con);
105 
112 void x_set_name(Con *con, const char *name);
113 
118 void update_shmlog_atom(void);
119 
124 void x_set_i3_atoms(void);
125 
131 void x_set_warp_to(Rect *rect);
132 
139 void x_mask_event_mask(uint32_t mask);
140 
144 void x_set_shape(Con *con, xcb_shape_sk_t kind, bool enable);
kill_window_t
parameter to specify whether tree_close_internal() and x_window_kill() should kill only this specific...
Definition: data.h:68
void x_con_init(Con *con)
Initializes the X11 part for the given container.
Definition: x.c:127
void x_move_win(Con *src, Con *dest)
Moves a child window from Container src to Container dest.
Definition: x.c:232
void x_deco_recurse(Con *con)
Recursively calls x_draw_decoration.
Definition: x.c:752
xcb_window_t focused_id
Stores the X11 window ID of the currently focused window.
Definition: x.c:20
void update_shmlog_atom(void)
Set up the SHMLOG_PATH atom.
Definition: x.c:1433
void x_reparent_child(Con *con, Con *old)
Reparents the child window of the given container (necessary for sticky containers).
Definition: x.c:217
void x_con_reframe(Con *con)
Definition: x.c:294
void x_set_warp_to(Rect *rect)
Set warp_to coordinates.
Definition: x.c:1465
void x_reinit(Con *con)
Re-initializes the associated X window state for this container.
Definition: x.c:197
void x_window_kill(xcb_window_t window, kill_window_t kill_window)
Kills the given X11 window using WM_DELETE_WINDOW (if supported).
Definition: x.c:326
void x_raise_con(Con *con)
Raises the specified container in the internal stack of X windows.
Definition: x.c:1402
void x_set_name(Con *con, const char *name)
Sets the WM_NAME property (so, no UTF8, but used only for debugging anyways) of the given name.
Definition: x.c:1417
void x_draw_decoration(Con *con)
Draws the decoration of the given container onto its parent.
Definition: x.c:459
void x_push_node(Con *con)
This function pushes the properties of each node of the layout tree to X11 if they have changed (like...
Definition: x.c:873
void x_set_i3_atoms(void)
Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
Definition: x.c:1447
void x_mask_event_mask(uint32_t mask)
Applies the given mask to the event mask of every i3 window decoration X11 window.
Definition: x.c:1476
void x_push_changes(Con *con)
Pushes all changes (state of each node, see x_push_node() and the window stack) to X11.
Definition: x.c:1189
void x_con_kill(Con *con)
Kills the window decoration associated with the given container.
Definition: x.c:285
bool window_supports_protocol(xcb_window_t window, xcb_atom_t atom)
Returns true if the client supports the given protocol atom (like WM_DELETE_WINDOW)
Definition: x.c:303
void x_set_shape(Con *con, xcb_shape_sk_t kind, bool enable)
Enables or disables nonrectangular shape of the container frame.
Definition: x.c:1489
Stores a rectangle, for example the size of a window, the child window etc.
Definition: data.h:156
A 'Con' represents everything from the X11 root window down to a single X11 window.
Definition: data.h:613