Imported Upstream version 1.15.1
[deb_xorg-server.git] / hw / xnest / XNCursor.h
1 /*
2
3 Copyright 1993 by Davor Matic
4
5 Permission to use, copy, modify, distribute, and sell this software
6 and its documentation for any purpose is hereby granted without fee,
7 provided that the above copyright notice appear in all copies and that
8 both that copyright notice and this permission notice appear in
9 supporting documentation. Davor Matic makes no representations about
10 the suitability of this software for any purpose. It is provided "as
11 is" without express or implied warranty.
12
13 */
14
15 #ifndef XNESTCURSOR_H
16 #define XNESTCURSOR_H
17
18 #include "mipointrst.h"
19
20 typedef struct {
21 miPointerSpriteFuncPtr spriteFuncs;
22 } xnestCursorFuncRec, *xnestCursorFuncPtr;
23
24 extern DevPrivateKeyRec xnestCursorScreenKeyRec;
25
26 #define xnestCursorScreenKey (&xnestCursorScreenKeyRec)
27 extern xnestCursorFuncRec xnestCursorFuncs;
28
29 typedef struct {
30 Cursor cursor;
31 } xnestPrivCursor;
32
33 #define xnestGetCursorPriv(pCursor, pScreen) ((xnestPrivCursor *) \
34 dixLookupScreenPrivate(&(pCursor)->devPrivates, CursorScreenKey, pScreen))
35
36 #define xnestSetCursorPriv(pCursor, pScreen, v) \
37 dixSetScreenPrivate(&(pCursor)->devPrivates, CursorScreenKey, pScreen, v)
38
39 #define xnestCursor(pCursor, pScreen) \
40 (xnestGetCursorPriv(pCursor, pScreen)->cursor)
41
42 Bool xnestRealizeCursor(DeviceIntPtr pDev,
43 ScreenPtr pScreen, CursorPtr pCursor);
44 Bool xnestUnrealizeCursor(DeviceIntPtr pDev,
45 ScreenPtr pScreen, CursorPtr pCursor);
46 void xnestRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor, Bool displayed);
47 void xnestSetCursor(DeviceIntPtr pDev,
48 ScreenPtr pScreen, CursorPtr pCursor, int x, int y);
49 void xnestMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y);
50 Bool xnestDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen);
51 void xnestDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen);
52 #endif /* XNESTCURSOR_H */