1706f2543Smrg/*
2706f2543Smrg
3706f2543SmrgCopyright 1993 by Davor Matic
4706f2543Smrg
5706f2543SmrgPermission to use, copy, modify, distribute, and sell this software
6706f2543Smrgand its documentation for any purpose is hereby granted without fee,
7706f2543Smrgprovided that the above copyright notice appear in all copies and that
8706f2543Smrgboth that copyright notice and this permission notice appear in
9706f2543Smrgsupporting documentation.  Davor Matic makes no representations about
10706f2543Smrgthe suitability of this software for any purpose.  It is provided "as
11706f2543Smrgis" without express or implied warranty.
12706f2543Smrg
13706f2543Smrg*/
14706f2543Smrg
15706f2543Smrg#ifndef XNESTCURSOR_H
16706f2543Smrg#define XNESTCURSOR_H
17706f2543Smrg
18706f2543Smrg#include "mipointrst.h"
19706f2543Smrg
20706f2543Smrgtypedef struct {
21706f2543Smrg    miPointerSpriteFuncPtr spriteFuncs;
22706f2543Smrg} xnestCursorFuncRec, *xnestCursorFuncPtr;
23706f2543Smrg
24706f2543Smrgextern DevPrivateKeyRec xnestCursorScreenKeyRec;
25706f2543Smrg#define xnestCursorScreenKey (&xnestCursorScreenKeyRec)
26706f2543Smrgextern xnestCursorFuncRec xnestCursorFuncs;
27706f2543Smrg
28706f2543Smrgtypedef struct {
29706f2543Smrg  Cursor cursor;
30706f2543Smrg} xnestPrivCursor;
31706f2543Smrg
32706f2543Smrg#define xnestGetCursorPriv(pCursor, pScreen) ((xnestPrivCursor *) \
33706f2543Smrg    dixLookupPrivate(&(pCursor)->devPrivates, CursorScreenKey(pScreen)))
34706f2543Smrg
35706f2543Smrg#define xnestSetCursorPriv(pCursor, pScreen, v) \
36706f2543Smrg    dixSetPrivate(&(pCursor)->devPrivates, CursorScreenKey(pScreen), v)
37706f2543Smrg
38706f2543Smrg#define xnestCursor(pCursor, pScreen) \
39706f2543Smrg  (xnestGetCursorPriv(pCursor, pScreen)->cursor)
40706f2543Smrg
41706f2543SmrgBool xnestRealizeCursor(DeviceIntPtr pDev,
42706f2543Smrg                        ScreenPtr pScreen,
43706f2543Smrg                        CursorPtr pCursor);
44706f2543SmrgBool xnestUnrealizeCursor(DeviceIntPtr pDev,
45706f2543Smrg                          ScreenPtr pScreen,
46706f2543Smrg                          CursorPtr pCursor);
47706f2543Smrgvoid xnestRecolorCursor(ScreenPtr pScreen,
48706f2543Smrg                        CursorPtr pCursor,
49706f2543Smrg                        Bool displayed);
50706f2543Smrgvoid xnestSetCursor (DeviceIntPtr pDev,
51706f2543Smrg                     ScreenPtr pScreen,
52706f2543Smrg                     CursorPtr pCursor,
53706f2543Smrg                     int x, int y);
54706f2543Smrgvoid xnestMoveCursor (DeviceIntPtr pDev,
55706f2543Smrg                      ScreenPtr pScreen,
56706f2543Smrg                      int x, int y);
57706f2543SmrgBool xnestDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen);
58706f2543Smrgvoid xnestDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen);
59706f2543Smrg#endif /* XNESTCURSOR_H */
60