]> git.sur5r.net Git - i3/i3/blob - include/handlers.h
Merge branch 'release-4.16.1'
[i3/i3] / include / handlers.h
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  * handlers.c: Small handlers for various events (keypresses, focus changes,
8  *             …).
9  *
10  */
11 #pragma once
12
13 #include <config.h>
14
15 #include <xcb/randr.h>
16
17 extern int randr_base;
18 extern int xkb_base;
19
20 /**
21  * Adds the given sequence to the list of events which are ignored.
22  * If this ignore should only affect a specific response_type, pass
23  * response_type, otherwise, pass -1.
24  *
25  * Every ignored sequence number gets garbage collected after 5 seconds.
26  *
27  */
28 void add_ignore_event(const int sequence, const int response_type);
29
30 /**
31  * Checks if the given sequence is ignored and returns true if so.
32  *
33  */
34 bool event_is_ignored(const int sequence, const int response_type);
35
36 /**
37  * Takes an xcb_generic_event_t and calls the appropriate handler, based on the
38  * event type.
39  *
40  */
41 void handle_event(int type, xcb_generic_event_t *event);
42
43 /**
44  * Sets the appropriate atoms for the property handlers after the atoms were
45  * received from X11
46  *
47  */
48 void property_handlers_init(void);
49
50 #if 0
51 /**
52  * Configuration notifies are only handled because we need to set up ignore
53  * for the following enter notify events
54  *
55  */
56 int handle_configure_event(void *prophs, xcb_connection_t *conn, xcb_configure_notify_event_t *event);
57 #endif
58
59 #if 0
60 /**
61  * Handles _NET_WM_WINDOW_TYPE changes
62  *
63  */
64 int handle_window_type(void *data, xcb_connection_t *conn, uint8_t state,
65                        xcb_window_t window, xcb_atom_t atom,
66                        xcb_get_property_reply_t *property);
67 #endif