1 /*
2  * mipointrst.h
3  *
4  */
5 
6 /* $XConsortium: mipointrst.h,v 5.7 94/04/17 20:27:41 dpw Exp $ */
7 
8 /*
9 
10 Copyright (c) 1989  X Consortium
11 
12 Permission is hereby granted, free of charge, to any person obtaining a copy
13 of this software and associated documentation files (the "Software"), to deal
14 in the Software without restriction, including without limitation the rights
15 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16 copies of the Software, and to permit persons to whom the Software is
17 furnished to do so, subject to the following conditions:
18 
19 The above copyright notice and this permission notice shall be included in
20 all copies or substantial portions of the Software.
21 
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
25 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 
29 Except as contained in this notice, the name of the X Consortium shall not be
30 used in advertising or otherwise to promote the sale, use or other dealings
31 in this Software without prior written authorization from the X Consortium.
32 */
33 
34 # include   <mipointer.h>
35 # include   <input.h>
36 
37 #define MOTION_SIZE	256
38 
39 typedef struct {
40     xTimecoord	    event;
41     ScreenPtr	    pScreen;
42 } miHistoryRec, *miHistoryPtr;
43 
44 typedef struct {
45     ScreenPtr		    pScreen;    /* current screen */
46     ScreenPtr		    pSpriteScreen;/* screen containing current sprite */
47     CursorPtr		    pCursor;    /* current cursor */
48     CursorPtr		    pSpriteCursor;/* cursor on screen */
49     BoxRec		    limits;	/* current constraints */
50     Bool		    confined;	/* pointer can't change screens */
51     int			    x, y;	/* hot spot location */
52     int			    devx, devy;	/* sprite position */
53     DevicePtr		    pPointer;   /* pointer device structure */
54     miHistoryRec	    history[MOTION_SIZE];
55     int			    history_start, history_end;
56 } miPointerRec, *miPointerPtr;
57 
58 typedef struct {
59     miPointerSpriteFuncPtr  spriteFuncs;	/* sprite-specific methods */
60     miPointerScreenFuncPtr  screenFuncs;	/* screen-specific methods */
61     CloseScreenProcPtr	    CloseScreen;
62     Bool		    waitForUpdate;	/* don't move cursor in SIGIO */
63 } miPointerScreenRec, *miPointerScreenPtr;
64