]> git.sesse.net Git - rdpsrv/blob - Xserver/programs/Xserver/mi/mipointer.h
Import X server from vnc-3.3.7.
[rdpsrv] / Xserver / programs / Xserver / mi / mipointer.h
1 /*
2  * mipointer.h
3  *
4  */
5
6 /* $XConsortium: mipointer.h,v 5.7 94/04/17 20:27:40 dpw Exp $ */
7 /* $XFree86: xc/programs/Xserver/mi/mipointer.h,v 3.2 1996/03/10 12:12:45 dawes Exp $ */
8
9 /*
10
11 Copyright (c) 1989  X Consortium
12
13 Permission is hereby granted, free of charge, to any person obtaining a copy
14 of this software and associated documentation files (the "Software"), to deal
15 in the Software without restriction, including without limitation the rights
16 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17 copies of the Software, and to permit persons to whom the Software is
18 furnished to do so, subject to the following conditions:
19
20 The above copyright notice and this permission notice shall be included in
21 all copies or substantial portions of the Software.
22
23 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
26 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
27 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30 Except as contained in this notice, the name of the X Consortium shall not be
31 used in advertising or otherwise to promote the sale, use or other dealings
32 in this Software without prior written authorization from the X Consortium.
33 */
34
35 #ifndef MIPOINTER_H
36 #define MIPOINTER_H
37
38 typedef struct _miPointerSpriteFuncRec {
39     Bool        (*RealizeCursor)(
40 #if NeedFunctionPrototypes
41                     ScreenPtr /* pScr */,
42                     CursorPtr /* pCurs */
43 #endif
44                     );
45     Bool        (*UnrealizeCursor)(
46 #if NeedFunctionPrototypes
47                     ScreenPtr /* pScr */,
48                     CursorPtr /* pCurs */
49 #endif
50                     );
51     void        (*SetCursor)(
52 #if NeedFunctionPrototypes
53                     ScreenPtr /* pScr */,
54                     CursorPtr /* pCurs */,
55                     int  /* x */,
56                     int  /* y */
57 #endif
58                     );
59     void        (*MoveCursor)(
60 #if NeedFunctionPrototypes
61                     ScreenPtr /* pScr */,
62                     int  /* x */,
63                     int  /* y */
64 #endif
65                     );
66 } miPointerSpriteFuncRec, *miPointerSpriteFuncPtr;
67
68 typedef struct _miPointerScreenFuncRec {
69     Bool        (*CursorOffScreen)(
70 #if NeedFunctionPrototypes
71                     ScreenPtr* /* ppScr */,
72                     int*  /* px */,
73                     int*  /* py */
74 #endif
75                     );
76     void        (*CrossScreen)(
77 #if NeedFunctionPrototypes
78                     ScreenPtr /* pScr */,
79                     int  /* entering */
80 #endif
81                     );
82     void        (*WarpCursor)(
83 #if NeedFunctionPrototypes
84                     ScreenPtr /* pScr */,
85                     int  /* x */,
86                     int  /* y */
87 #endif
88                     );
89     void        (*EnqueueEvent)(
90 #if NeedFunctionPrototypes
91                     xEventPtr /* event */
92 #endif
93                     );
94     void        (*NewEventScreen)(
95 #if NeedFunctionPrototypes
96                     ScreenPtr /* pScr */,
97                     Bool /* fromDIX */
98 #endif
99                     );
100 } miPointerScreenFuncRec, *miPointerScreenFuncPtr;
101
102 extern Bool miDCInitialize(
103 #if NeedFunctionPrototypes
104     ScreenPtr /*pScreen*/,
105     miPointerScreenFuncPtr /*screenFuncs*/
106 #endif
107 );
108
109 extern Bool miPointerInitialize(
110 #if NeedFunctionPrototypes
111     ScreenPtr /*pScreen*/,
112     miPointerSpriteFuncPtr /*spriteFuncs*/,
113     miPointerScreenFuncPtr /*screenFuncs*/,
114     Bool /*waitForUpdate*/
115 #endif
116 );
117
118 extern void miPointerWarpCursor(
119 #if NeedFunctionPrototypes
120     ScreenPtr /*pScreen*/,
121     int /*x*/,
122     int /*y*/
123 #endif
124 );
125
126 extern int miPointerGetMotionBufferSize(
127 #if NeedFunctionPrototypes
128     void
129 #endif
130 );
131
132 extern int miPointerGetMotionEvents(
133 #if NeedFunctionPrototypes
134     DeviceIntPtr /*pPtr*/,
135     xTimecoord * /*coords*/,
136     unsigned long /*start*/,
137     unsigned long /*stop*/,
138     ScreenPtr /*pScreen*/
139 #endif
140 );
141
142 extern void miPointerUpdate(
143 #if NeedFunctionPrototypes
144     void
145 #endif
146 );
147
148 extern void miPointerDeltaCursor(
149 #if NeedFunctionPrototypes
150     int /*dx*/,
151     int /*dy*/,
152     unsigned long /*time*/
153 #endif
154 );
155
156 extern void miPointerAbsoluteCursor(
157 #if NeedFunctionPrototypes
158     int /*x*/,
159     int /*y*/,
160     unsigned long /*time*/
161 #endif
162 );
163
164 extern void miPointerPosition(
165 #if NeedFunctionPrototypes
166     int * /*x*/,
167     int * /*y*/
168 #endif
169 );
170
171 #undef miRegisterPointerDevice
172 extern void miRegisterPointerDevice(
173 #if NeedFunctionPrototypes
174     ScreenPtr /*pScreen*/,
175     DevicePtr /*pDevice*/
176 #endif
177 );
178
179 #define miRegisterPointerDevice(pScreen,pDevice) \
180        _miRegisterPointerDevice(pScreen,pDevice)
181
182 extern void _miRegisterPointerDevice(
183 #if NeedFunctionPrototypes
184     ScreenPtr /*pScreen*/,
185     DeviceIntPtr /*pDevice*/
186 #endif
187 );
188
189 #endif /* MIPOINTER_H */