First import
[xorg_rtime.git] / xorg-server-1.4 / mi / mipointer.h
blob1bce42c26c65093e3386115e882ac0ad8c2afc06
1 /*
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
9 documentation.
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.
26 #ifndef MIPOINTER_H
27 #define MIPOINTER_H
29 #include "cursor.h"
30 #include "input.h"
32 typedef struct _miPointerSpriteFuncRec {
33 Bool (*RealizeCursor)(
34 ScreenPtr /* pScr */,
35 CursorPtr /* pCurs */
37 Bool (*UnrealizeCursor)(
38 ScreenPtr /* pScr */,
39 CursorPtr /* pCurs */
41 void (*SetCursor)(
42 ScreenPtr /* pScr */,
43 CursorPtr /* pCurs */,
44 int /* x */,
45 int /* y */
47 void (*MoveCursor)(
48 ScreenPtr /* pScr */,
49 int /* x */,
50 int /* y */
52 } miPointerSpriteFuncRec, *miPointerSpriteFuncPtr;
54 typedef struct _miPointerScreenFuncRec {
55 Bool (*CursorOffScreen)(
56 ScreenPtr* /* ppScr */,
57 int* /* px */,
58 int* /* py */
60 void (*CrossScreen)(
61 ScreenPtr /* pScr */,
62 int /* entering */
64 void (*WarpCursor)(
65 ScreenPtr /* pScr */,
66 int /* x */,
67 int /* y */
69 void (*EnqueueEvent)(
70 DeviceIntPtr /* pDev */,
71 xEventPtr /* event */
73 void (*NewEventScreen)(
74 ScreenPtr /* pScr */,
75 Bool /* fromDIX */
77 } miPointerScreenFuncRec, *miPointerScreenFuncPtr;
79 extern Bool miDCInitialize(
80 ScreenPtr /*pScreen*/,
81 miPointerScreenFuncPtr /*screenFuncs*/
84 extern Bool miPointerInitialize(
85 ScreenPtr /*pScreen*/,
86 miPointerSpriteFuncPtr /*spriteFuncs*/,
87 miPointerScreenFuncPtr /*screenFuncs*/,
88 Bool /*waitForUpdate*/
91 extern void miPointerWarpCursor(
92 ScreenPtr /*pScreen*/,
93 int /*x*/,
94 int /*y*/
95 ) _X_DEPRECATED;
97 extern int miPointerGetMotionBufferSize(
98 void
99 ) _X_DEPRECATED;
101 extern int miPointerGetMotionEvents(
102 DeviceIntPtr /*pPtr*/,
103 xTimecoord * /*coords*/,
104 unsigned long /*start*/,
105 unsigned long /*stop*/,
106 ScreenPtr /*pScreen*/
109 /* Deprecated in favour of miPointerUpdateSprite. */
110 extern void miPointerUpdate(
111 void
112 ) _X_DEPRECATED;
114 /* Deprecated in favour of miSetPointerPosition. */
115 extern void miPointerDeltaCursor(
116 int /*dx*/,
117 int /*dy*/,
118 unsigned long /*time*/
119 ) _X_DEPRECATED;
120 extern void miPointerAbsoluteCursor(
121 int /*x*/,
122 int /*y*/,
123 unsigned long /*time*/
124 ) _X_DEPRECATED;
126 /* Deprecated in favour of miGetPointerPosition. */
127 extern void miPointerPosition(
128 int * /*x*/,
129 int * /*y*/
130 ) _X_DEPRECATED;
132 /* Deprecated in favour of miPointerSetScreen. */
133 extern void miPointerSetNewScreen(
134 int, /*screen_no*/
135 int, /*x*/
136 int /*y*/
137 ) _X_DEPRECATED;
139 /* Deprecated in favour of miPointerGetScreen. */
140 extern ScreenPtr miPointerCurrentScreen(
141 void
142 ) _X_DEPRECATED;
144 extern ScreenPtr miPointerGetScreen(
145 DeviceIntPtr pDev);
146 extern void miPointerSetScreen(
147 DeviceIntPtr pDev,
148 int screen_num,
149 int x,
150 int y);
152 /* Returns the current cursor position. */
153 extern void miPointerGetPosition(
154 DeviceIntPtr pDev,
155 int *x,
156 int *y);
158 /* Moves the cursor to the specified position. May clip the co-ordinates:
159 * x and y are modified in-place. */
160 extern void miPointerSetPosition(
161 DeviceIntPtr pDev,
162 int *x,
163 int *y,
164 unsigned long time);
166 extern void miPointerUpdateSprite(
167 DeviceIntPtr pDev);
169 extern int miPointerScreenIndex;
171 #endif /* MIPOINTER_H */