2010-11-28 07:02:29 -05:00
|
|
|
/*
|
|
|
|
* vim:ts=4:sw=4:expandtab
|
2011-10-25 16:19:38 -04:00
|
|
|
*
|
|
|
|
* i3 - an improved dynamic tiling window manager
|
2015-04-03 20:17:56 -04:00
|
|
|
* © 2009 Michael Stapelberg and contributors (see also: LICENSE)
|
2011-10-25 16:19:38 -04:00
|
|
|
*
|
|
|
|
* xcursor.c: libXcursor support for themed cursors.
|
|
|
|
*
|
2010-11-28 07:02:29 -05:00
|
|
|
*/
|
2013-12-28 21:11:50 -05:00
|
|
|
#pragma once
|
2010-11-26 18:26:51 -05:00
|
|
|
|
2013-07-13 04:58:06 -04:00
|
|
|
#include <xcb/xcb_cursor.h>
|
2010-11-26 18:26:51 -05:00
|
|
|
|
|
|
|
enum xcursor_cursor_t {
|
|
|
|
XCURSOR_CURSOR_POINTER = 0,
|
|
|
|
XCURSOR_CURSOR_RESIZE_HORIZONTAL,
|
|
|
|
XCURSOR_CURSOR_RESIZE_VERTICAL,
|
2012-09-23 15:43:43 -04:00
|
|
|
XCURSOR_CURSOR_TOP_LEFT_CORNER,
|
|
|
|
XCURSOR_CURSOR_TOP_RIGHT_CORNER,
|
|
|
|
XCURSOR_CURSOR_BOTTOM_LEFT_CORNER,
|
|
|
|
XCURSOR_CURSOR_BOTTOM_RIGHT_CORNER,
|
2011-10-10 10:53:57 -04:00
|
|
|
XCURSOR_CURSOR_WATCH,
|
2012-09-23 15:43:43 -04:00
|
|
|
XCURSOR_CURSOR_MOVE,
|
2010-11-26 18:26:51 -05:00
|
|
|
XCURSOR_CURSOR_MAX
|
|
|
|
};
|
|
|
|
|
2012-03-31 04:53:04 -04:00
|
|
|
void xcursor_load_cursors(void);
|
2013-07-13 04:58:06 -04:00
|
|
|
xcb_cursor_t xcursor_get_cursor(enum xcursor_cursor_t c);
|
2011-07-29 07:16:26 -04:00
|
|
|
int xcursor_get_xcb_cursor(enum xcursor_cursor_t c);
|
2010-11-26 18:26:51 -05:00
|
|
|
|
2011-07-29 07:12:28 -04:00
|
|
|
/**
|
|
|
|
* Sets the cursor of the root window to the 'pointer' cursor.
|
|
|
|
*
|
|
|
|
* This function is called when i3 is initialized, because with some login
|
|
|
|
* managers, the root window will not have a cursor otherwise.
|
|
|
|
*
|
|
|
|
* We have a separate xcursor function to use the same X11 connection as the
|
|
|
|
* xcursor_load_cursors() function. If we mix the Xlib and the XCB connection,
|
|
|
|
* races might occur (even though we flush the Xlib connection).
|
|
|
|
*
|
|
|
|
*/
|
2011-11-22 17:08:22 -05:00
|
|
|
void xcursor_set_root_cursor(int cursor_id);
|