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