]> git.sur5r.net Git - i3/i3/blob - include/xcursor.h
Merge branch 'startup-notification' into next
[i3/i3] / include / xcursor.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  */
4 #ifndef _XCURSOR_CURSOR_H
5 #define _XCURSOR_CURSOR_H
6
7 #include <X11/Xlib.h>
8
9 enum xcursor_cursor_t {
10     XCURSOR_CURSOR_POINTER = 0,
11     XCURSOR_CURSOR_RESIZE_HORIZONTAL,
12     XCURSOR_CURSOR_RESIZE_VERTICAL,
13     XCURSOR_CURSOR_WATCH,
14     XCURSOR_CURSOR_MAX
15 };
16
17 void xcursor_load_cursors();
18 Cursor xcursor_get_cursor(enum xcursor_cursor_t c);
19 int xcursor_get_xcb_cursor(enum xcursor_cursor_t c);
20
21 /**
22  * Sets the cursor of the root window to the 'pointer' cursor.
23  *
24  * This function is called when i3 is initialized, because with some login
25  * managers, the root window will not have a cursor otherwise.
26  *
27  * We have a separate xcursor function to use the same X11 connection as the
28  * xcursor_load_cursors() function. If we mix the Xlib and the XCB connection,
29  * races might occur (even though we flush the Xlib connection).
30  *
31  */
32 void xcursor_set_root_cursor();
33
34 #endif