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