3 Copyright 1989, 1998 The Open Group
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 Except as contained in this notice, the name of The Open Group shall not be
22 used in advertising or otherwise to promote the sale, use or other dealings
23 in this Software without prior written authorization from The Open Group.
33 typedef struct _miPointerSpriteFuncRec
{
34 Bool (*RealizeCursor
) (DeviceIntPtr
/* pDev */ ,
35 ScreenPtr
/* pScr */ ,
38 Bool (*UnrealizeCursor
) (DeviceIntPtr
/* pDev */ ,
39 ScreenPtr
/* pScr */ ,
42 void (*SetCursor
) (DeviceIntPtr
/* pDev */ ,
43 ScreenPtr
/* pScr */ ,
44 CursorPtr
/* pCurs */ ,
48 void (*MoveCursor
) (DeviceIntPtr
/* pDev */ ,
49 ScreenPtr
/* pScr */ ,
53 Bool (*DeviceCursorInitialize
) (DeviceIntPtr
/* pDev */ ,
56 void (*DeviceCursorCleanup
) (DeviceIntPtr
/* pDev */ ,
59 } miPointerSpriteFuncRec
, *miPointerSpriteFuncPtr
;
61 typedef struct _miPointerScreenFuncRec
{
62 Bool (*CursorOffScreen
) (ScreenPtr
* /* ppScr */ ,
66 void (*CrossScreen
) (ScreenPtr
/* pScr */ ,
69 void (*WarpCursor
) (DeviceIntPtr
/*pDev */ ,
70 ScreenPtr
/* pScr */ ,
74 } miPointerScreenFuncRec
, *miPointerScreenFuncPtr
;
76 extern _X_EXPORT Bool
miDCInitialize(ScreenPtr
/*pScreen */ ,
77 miPointerScreenFuncPtr
/*screenFuncs */
80 extern _X_EXPORT Bool
miPointerInitialize(ScreenPtr
/*pScreen */ ,
81 miPointerSpriteFuncPtr
83 miPointerScreenFuncPtr
85 Bool
/*waitForUpdate */
88 extern _X_EXPORT
void miPointerWarpCursor(DeviceIntPtr
/*pDev */ ,
89 ScreenPtr
/*pScreen */ ,
94 extern _X_EXPORT ScreenPtr
95 miPointerGetScreen(DeviceIntPtr pDev
);
97 miPointerSetScreen(DeviceIntPtr pDev
, int screen_num
, int x
, int y
);
99 /* Returns the current cursor position. */
100 extern _X_EXPORT
void
101 miPointerGetPosition(DeviceIntPtr pDev
, int *x
, int *y
);
103 /* Moves the cursor to the specified position. May clip the co-ordinates:
104 * x and y are modified in-place. */
105 extern _X_EXPORT ScreenPtr
106 miPointerSetPosition(DeviceIntPtr pDev
, int mode
, double *x
, double *y
,
107 int *nevents
, InternalEvent
*events
);
109 extern _X_EXPORT
void
110 miPointerUpdateSprite(DeviceIntPtr pDev
);
112 /* Sets whether the sprite should be updated immediately on pointer moves */
113 extern _X_EXPORT Bool
114 miPointerSetWaitForUpdate(ScreenPtr pScreen
, Bool wait
);
116 extern _X_EXPORT DevPrivateKeyRec miPointerPrivKeyRec
;
118 #define miPointerPrivKey (&miPointerPrivKeyRec)
120 extern _X_EXPORT DevPrivateKeyRec miPointerScreenKeyRec
;
122 #define miPointerScreenKey (&miPointerScreenKeyRec)
124 #endif /* MIPOINTER_H */