xref: /OK3568_Linux_fs/external/xserver/hw/dmx/dmxcursor.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * All Rights Reserved.
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * Permission is hereby granted, free of charge, to any person obtaining
7*4882a593Smuzhiyun  * a copy of this software and associated documentation files (the
8*4882a593Smuzhiyun  * "Software"), to deal in the Software without restriction, including
9*4882a593Smuzhiyun  * without limitation on the rights to use, copy, modify, merge,
10*4882a593Smuzhiyun  * publish, distribute, sublicense, and/or sell copies of the Software,
11*4882a593Smuzhiyun  * and to permit persons to whom the Software is furnished to do so,
12*4882a593Smuzhiyun  * subject to the following conditions:
13*4882a593Smuzhiyun  *
14*4882a593Smuzhiyun  * The above copyright notice and this permission notice (including the
15*4882a593Smuzhiyun  * next paragraph) shall be included in all copies or substantial
16*4882a593Smuzhiyun  * portions of the Software.
17*4882a593Smuzhiyun  *
18*4882a593Smuzhiyun  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19*4882a593Smuzhiyun  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20*4882a593Smuzhiyun  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21*4882a593Smuzhiyun  * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
22*4882a593Smuzhiyun  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23*4882a593Smuzhiyun  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24*4882a593Smuzhiyun  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25*4882a593Smuzhiyun  * SOFTWARE.
26*4882a593Smuzhiyun  */
27*4882a593Smuzhiyun 
28*4882a593Smuzhiyun /*
29*4882a593Smuzhiyun  * Authors:
30*4882a593Smuzhiyun  *   David H. Dawes <dawes@xfree86.org>
31*4882a593Smuzhiyun  *   Kevin E. Martin <kem@redhat.com>
32*4882a593Smuzhiyun  *   Rickard E. (Rik) Faith <faith@redhat.com>
33*4882a593Smuzhiyun  *
34*4882a593Smuzhiyun  */
35*4882a593Smuzhiyun 
36*4882a593Smuzhiyun /** \file
37*4882a593Smuzhiyun  * Interface for cursor support.  \see dmxcursor.c. */
38*4882a593Smuzhiyun 
39*4882a593Smuzhiyun #ifndef DMXCURSOR_H
40*4882a593Smuzhiyun #define DMXCURSOR_H
41*4882a593Smuzhiyun 
42*4882a593Smuzhiyun #include "mipointer.h"
43*4882a593Smuzhiyun 
44*4882a593Smuzhiyun /** Cursor private area. */
45*4882a593Smuzhiyun typedef struct _dmxCursorPriv {
46*4882a593Smuzhiyun     Cursor cursor;
47*4882a593Smuzhiyun } dmxCursorPrivRec, *dmxCursorPrivPtr;
48*4882a593Smuzhiyun 
49*4882a593Smuzhiyun /** Cursor functions for mi layer. \see dmxcursor.c \see dmxscrinit.c */
50*4882a593Smuzhiyun extern miPointerScreenFuncRec dmxPointerCursorFuncs;
51*4882a593Smuzhiyun 
52*4882a593Smuzhiyun /** Sprite functions for mi layer. \see dmxcursor.c \see dmxscrinit.c */
53*4882a593Smuzhiyun extern miPointerSpriteFuncRec dmxPointerSpriteFuncs;
54*4882a593Smuzhiyun 
55*4882a593Smuzhiyun extern void dmxReInitOrigins(void);
56*4882a593Smuzhiyun extern void dmxInitOrigins(void);
57*4882a593Smuzhiyun extern void dmxInitOverlap(void);
58*4882a593Smuzhiyun extern void dmxCursorNoMulti(void);
59*4882a593Smuzhiyun extern void dmxMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y);
60*4882a593Smuzhiyun extern void dmxCheckCursor(void);
61*4882a593Smuzhiyun extern int dmxOnScreen(int x, int y, DMXScreenInfo * dmxScreen);
62*4882a593Smuzhiyun extern void dmxHideCursor(DMXScreenInfo * dmxScreen);
63*4882a593Smuzhiyun 
64*4882a593Smuzhiyun extern void dmxBECreateCursor(ScreenPtr pScreen, CursorPtr pCursor);
65*4882a593Smuzhiyun extern Bool dmxBEFreeCursor(ScreenPtr pScreen, CursorPtr pCursor);
66*4882a593Smuzhiyun 
67*4882a593Smuzhiyun #define DMX_GET_CURSOR_PRIV(_pCursor, _pScreen) ((dmxCursorPrivPtr) \
68*4882a593Smuzhiyun     dixLookupScreenPrivate(&(_pCursor)->devPrivates, CursorScreenKey, _pScreen))
69*4882a593Smuzhiyun 
70*4882a593Smuzhiyun #define DMX_SET_CURSOR_PRIV(_pCursor, _pScreen, v) \
71*4882a593Smuzhiyun     dixSetScreenPrivate(&(_pCursor)->devPrivates, CursorScreenKey, _pScreen, v)
72*4882a593Smuzhiyun 
73*4882a593Smuzhiyun #endif                          /* DMXCURSOR_H */
74