]> git.decadent.org.uk Git - ion3.git/blob - ioncore/cursor.c
ba045c4caaceedd4f82978ff8fbb314f534000eb
[ion3.git] / ioncore / cursor.c
1 /*
2  * ion/ioncore/cursor.c
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2008. 
5  *
6  * See the included file LICENSE for details.
7  */
8
9 #include "common.h"
10 #include "event.h"
11 #include "cursor.h"
12 #include "global.h"
13
14
15 static Cursor cursors[IONCORE_N_CURSORS];
16
17 #define LCURS(TYPE) \
18     cursors[IONCORE_CURSOR_##TYPE]=XCreateFontCursor(ioncore_g.dpy, CF_CURSOR_##TYPE)
19
20 void ioncore_init_cursors()
21 {
22     LCURS(DEFAULT);
23     LCURS(RESIZE);
24     LCURS(MOVE);
25     LCURS(DRAG);
26     LCURS(WAITKEY);
27 }
28
29
30 Cursor ioncore_xcursor(int cursor)
31 {
32     return cursors[cursor];
33 }
34
35