]> git.decadent.org.uk Git - ion3.git/blob - ioncore/cursor.c
6973a165b2b1898e677d93d0db9c265cf180dcbf
[ion3.git] / ioncore / cursor.c
1 /*
2  * ion/ioncore/cursor.c
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2007. 
5  *
6  * Ion is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  */
11
12 #include "common.h"
13 #include "event.h"
14 #include "cursor.h"
15 #include "global.h"
16
17
18 static Cursor cursors[IONCORE_N_CURSORS];
19
20 #define LCURS(TYPE) \
21     cursors[IONCORE_CURSOR_##TYPE]=XCreateFontCursor(ioncore_g.dpy, CF_CURSOR_##TYPE)
22
23 void ioncore_init_cursors()
24 {
25     LCURS(DEFAULT);
26     LCURS(RESIZE);
27     LCURS(MOVE);
28     LCURS(DRAG);
29     LCURS(WAITKEY);
30 }
31
32
33 Cursor ioncore_xcursor(int cursor)
34 {
35     return cursors[cursor];
36 }
37
38