4 * i3 - an improved dynamic tiling window manager
6 * © 2009 Michael Stapelberg and contributors
8 * See file LICENSE for license information.
19 * Removes the given client from the container, either because it will be
20 * inserted into another one or because it was unmapped
23 void client_remove_from_container(xcb_connection_t *conn, Client *client,
25 bool remove_from_focusstack);
28 * Warps the pointer into the given client (in the middle of it, to be
29 * specific), therefore selecting it
32 void client_warp_pointer_into(xcb_connection_t *conn, Client *client);
35 * Kills the given window using WM_DELETE_WINDOW or xcb_kill_window
38 void client_kill(xcb_connection_t *conn, Client *window);
41 * Checks if the given window class and title match the given client Window
42 * title is passed as "normal" string and as UCS-2 converted string for
43 * matching _NET_WM_NAME capable clients as well as those using legacy hints.
46 bool client_matches_class_name(Client *client, char *to_class, char *to_title,
47 char *to_title_ucs, int to_title_ucs_len);
50 * Enters fullscreen mode for the given client. This is called by toggle_fullscreen
51 * and when moving a fullscreen client to another screen.
54 void client_enter_fullscreen(xcb_connection_t *conn, Client *client, bool global);
57 * Leaves fullscreen mode for the given client. This is called by toggle_fullscreen.
60 void client_leave_fullscreen(xcb_connection_t *conn, Client *client);
63 * Toggles fullscreen mode for the given client. It updates the data
64 * structures and reconfigures (= resizes/moves) the client and its frame to
65 * the full size of the screen. When leaving fullscreen, re-rendering the
69 void client_toggle_fullscreen(xcb_connection_t *conn, Client *client);
72 * Like client_toggle_fullscreen(), but putting it in global fullscreen-mode.
75 void client_toggle_fullscreen_global(xcb_connection_t *conn, Client *client);
78 * Sets the position of the given client in the X stack to the highest (tiling
79 * layer is always on the same position, so this doesn’t matter) below the
80 * first floating client, so that floating windows are always on top.
83 void client_set_below_floating(xcb_connection_t *conn, Client *client);
86 * Returns true if the client is floating. Makes the code more beatiful, as
87 * floating is not simply a boolean, but also saves whether the user selected
88 * the current state or whether it was automatically set.
91 bool client_is_floating(Client *client);
94 * Change the border type for the given client to normal (n), 1px border (p) or
95 * completely borderless (b).
98 void client_change_border(xcb_connection_t *conn, Client *client, char border_type);
101 * Change the border type for the given client to normal (n), 1px border (p) or
102 * completely borderless (b) without actually re-rendering the layout. Useful
103 * for calling it when initializing a new client.
106 bool client_init_border(xcb_connection_t *conn, Client *client, char border_type);
109 * Unmap the client, correctly setting any state which is needed.
112 void client_unmap(xcb_connection_t *conn, Client *client);
115 * Map the client, correctly restoring any state needed.
118 void client_map(xcb_connection_t *conn, Client *client);
121 * Set the given mark for this client. Used for jumping to the client
122 * afterwards (like m<mark> and '<mark> in vim).
125 void client_mark(xcb_connection_t *conn, Client *client, const char *mark);
128 * Returns the minimum height of a specific window. The height is calculated
129 * by using 2 pixels (for the client window itself), possibly padding this to
130 * comply with the client’s base_height and then adding the decoration height.
133 uint32_t client_min_height(Client *client);
136 * See client_min_height.
139 uint32_t client_min_width(Client *client);
142 * Pretty-prints the client’s information into the logfile.
145 #define CLIENT_LOG(client) do { \
146 DLOG("Window: frame 0x%08x, child 0x%08x\n", client->frame, client->child); \