4 * i3 - an improved dynamic tiling window manager
6 * (c) 2009 Michael Stapelberg and contributors
8 * See file LICENSE for license information.
15 * Due to bindings like Mode_switch + <a>, we need to bind some keys in XCB_GRAB_MODE_SYNC.
16 * Therefore, we just replay all key presses.
19 int handle_key_release(void *ignored, xcb_connection_t *conn, xcb_key_release_event_t *event);
22 * There was a key press. We compare this key code with our bindings table and pass
23 * the bound action to parse_command().
26 int handle_key_press(void *ignored, xcb_connection_t *conn, xcb_key_press_event_t *event);
29 * When the user moves the mouse pointer onto a window, this callback gets called.
32 int handle_enter_notify(void *ignored, xcb_connection_t *conn, xcb_enter_notify_event_t *event);
35 * Checks if the button press was on a stack window, handles focus setting and returns true
36 * if so, or false otherwise.
39 int handle_button_press(void *ignored, xcb_connection_t *conn, xcb_button_press_event_t *event);
42 * A new window appeared on the screen (=was mapped), so let’s manage it.
45 int handle_map_request(void *prophs, xcb_connection_t *conn, xcb_map_request_event_t *event);
48 * Configuration notifies are only handled because we need to set up ignore for the following
52 int handle_configure_event(void *prophs, xcb_connection_t *conn, xcb_configure_notify_event_t *event);
55 * Configure requests are received when the application wants to resize windows on their own.
57 * We generate a synthethic configure notify event to signalize the client its "new" position.
60 int handle_configure_request(void *prophs, xcb_connection_t *conn, xcb_configure_request_event_t *event);
63 * Our window decorations were unmapped. That means, the window will be killed now,
64 * so we better clean up before.
67 int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_notify_event_t *event);
70 * Called when a window changes its title
73 int handle_windowname_change(void *data, xcb_connection_t *conn, uint8_t state,
74 xcb_window_t window, xcb_atom_t atom, xcb_get_property_reply_t *prop);
77 * We handle legacy window names (titles) which are in COMPOUND_TEXT encoding. However, we
78 * just pass them along, so when containing non-ASCII characters, those will be rendering
79 * incorrectly. In order to correctly render unicode window titles in i3, an application
80 * has to set _NET_WM_NAME, which is in UTF-8 encoding.
82 * On every update, a message is put out to the user, so he may improve the situation and
83 * update applications which display filenames in their title to correctly use
84 * _NET_WM_NAME and therefore support unicode.
87 int handle_windowname_change_legacy(void *data, xcb_connection_t *conn, uint8_t state,
88 xcb_window_t window, xcb_atom_t atom, xcb_get_property_reply_t *prop);
91 * Store the window classes for jumping to them later.
94 int handle_windowclass_change(void *data, xcb_connection_t *conn, uint8_t state,
95 xcb_window_t window, xcb_atom_t atom, xcb_get_property_reply_t *prop);
99 * Expose event means we should redraw our windows (= title bar)
102 int handle_expose_event(void *data, xcb_connection_t *conn, xcb_expose_event_t *event);
105 * Handle client messages (EWMH)
108 int handle_client_message(void *data, xcb_connection_t *conn, xcb_client_message_event_t *event);
111 * Handles _NET_WM_WINDOW_TYPE changes
114 int handle_window_type(void *data, xcb_connection_t *conn, uint8_t state, xcb_window_t window,
115 xcb_atom_t atom, xcb_get_property_reply_t *property);
118 * Handles the size hints set by a window, but currently only the part necessary for displaying
119 * clients proportionally inside their frames (mplayer for example)
121 * See ICCCM 4.1.2.3 for more details
124 int handle_normal_hints(void *data, xcb_connection_t *conn, uint8_t state, xcb_window_t window,
125 xcb_atom_t name, xcb_get_property_reply_t *reply);
128 * Handles the transient for hints set by a window, signalizing that this window is a popup window
129 * for some other window.
131 * See ICCCM 4.1.2.6 for more details
134 int handle_transient_for(void *data, xcb_connection_t *conn, uint8_t state, xcb_window_t window,
135 xcb_atom_t name, xcb_get_property_reply_t *reply);