1 | /*
|
---|
2 |
|
---|
3 | Copyright 1989, 1998 The Open Group
|
---|
4 |
|
---|
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.
|
---|
10 |
|
---|
11 | The above copyright notice and this permission notice shall be included in
|
---|
12 | all copies or substantial portions of the Software.
|
---|
13 |
|
---|
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.
|
---|
20 |
|
---|
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.
|
---|
24 | */
|
---|
25 |
|
---|
26 | #ifndef MIPOINTER_H
|
---|
27 | #define MIPOINTER_H
|
---|
28 |
|
---|
29 | #include "cursor.h"
|
---|
30 | #include "input.h"
|
---|
31 |
|
---|
32 | typedef struct _miPointerSpriteFuncRec {
|
---|
33 | Bool (*RealizeCursor)(
|
---|
34 | ScreenPtr /* pScr */,
|
---|
35 | CursorPtr /* pCurs */
|
---|
36 | );
|
---|
37 | Bool (*UnrealizeCursor)(
|
---|
38 | ScreenPtr /* pScr */,
|
---|
39 | CursorPtr /* pCurs */
|
---|
40 | );
|
---|
41 | void (*SetCursor)(
|
---|
42 | ScreenPtr /* pScr */,
|
---|
43 | CursorPtr /* pCurs */,
|
---|
44 | int /* x */,
|
---|
45 | int /* y */
|
---|
46 | );
|
---|
47 | void (*MoveCursor)(
|
---|
48 | ScreenPtr /* pScr */,
|
---|
49 | int /* x */,
|
---|
50 | int /* y */
|
---|
51 | );
|
---|
52 | } miPointerSpriteFuncRec, *miPointerSpriteFuncPtr;
|
---|
53 |
|
---|
54 | typedef struct _miPointerScreenFuncRec {
|
---|
55 | Bool (*CursorOffScreen)(
|
---|
56 | ScreenPtr* /* ppScr */,
|
---|
57 | int* /* px */,
|
---|
58 | int* /* py */
|
---|
59 | );
|
---|
60 | void (*CrossScreen)(
|
---|
61 | ScreenPtr /* pScr */,
|
---|
62 | int /* entering */
|
---|
63 | );
|
---|
64 | void (*WarpCursor)(
|
---|
65 | ScreenPtr /* pScr */,
|
---|
66 | int /* x */,
|
---|
67 | int /* y */
|
---|
68 | );
|
---|
69 | void (*EnqueueEvent)(
|
---|
70 | DeviceIntPtr /* pDev */,
|
---|
71 | xEventPtr /* event */
|
---|
72 | );
|
---|
73 | void (*NewEventScreen)(
|
---|
74 | ScreenPtr /* pScr */,
|
---|
75 | Bool /* fromDIX */
|
---|
76 | );
|
---|
77 | } miPointerScreenFuncRec, *miPointerScreenFuncPtr;
|
---|
78 |
|
---|
79 | extern Bool miDCInitialize(
|
---|
80 | ScreenPtr /*pScreen*/,
|
---|
81 | miPointerScreenFuncPtr /*screenFuncs*/
|
---|
82 | );
|
---|
83 |
|
---|
84 | extern Bool miPointerInitialize(
|
---|
85 | ScreenPtr /*pScreen*/,
|
---|
86 | miPointerSpriteFuncPtr /*spriteFuncs*/,
|
---|
87 | miPointerScreenFuncPtr /*screenFuncs*/,
|
---|
88 | Bool /*waitForUpdate*/
|
---|
89 | );
|
---|
90 |
|
---|
91 | extern void miPointerWarpCursor(
|
---|
92 | ScreenPtr /*pScreen*/,
|
---|
93 | int /*x*/,
|
---|
94 | int /*y*/
|
---|
95 | ) _X_DEPRECATED;
|
---|
96 |
|
---|
97 | extern int miPointerGetMotionBufferSize(
|
---|
98 | void
|
---|
99 | ) _X_DEPRECATED;
|
---|
100 |
|
---|
101 | extern int miPointerGetMotionEvents(
|
---|
102 | DeviceIntPtr /*pPtr*/,
|
---|
103 | xTimecoord * /*coords*/,
|
---|
104 | unsigned long /*start*/,
|
---|
105 | unsigned long /*stop*/,
|
---|
106 | ScreenPtr /*pScreen*/
|
---|
107 | );
|
---|
108 |
|
---|
109 | /* Deprecated in favour of miPointerUpdateSprite. */
|
---|
110 | extern void miPointerUpdate(
|
---|
111 | void
|
---|
112 | ) _X_DEPRECATED;
|
---|
113 |
|
---|
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;
|
---|
125 |
|
---|
126 | /* Deprecated in favour of miGetPointerPosition. */
|
---|
127 | extern void miPointerPosition(
|
---|
128 | int * /*x*/,
|
---|
129 | int * /*y*/
|
---|
130 | ) _X_DEPRECATED;
|
---|
131 |
|
---|
132 | /* Deprecated in favour of miPointerSetScreen. */
|
---|
133 | extern void miPointerSetNewScreen(
|
---|
134 | int, /*screen_no*/
|
---|
135 | int, /*x*/
|
---|
136 | int /*y*/
|
---|
137 | ) _X_DEPRECATED;
|
---|
138 |
|
---|
139 | /* Deprecated in favour of miPointerGetScreen. */
|
---|
140 | extern ScreenPtr miPointerCurrentScreen(
|
---|
141 | void
|
---|
142 | ) _X_DEPRECATED;
|
---|
143 |
|
---|
144 | extern ScreenPtr miPointerGetScreen(
|
---|
145 | DeviceIntPtr pDev);
|
---|
146 | extern void miPointerSetScreen(
|
---|
147 | DeviceIntPtr pDev,
|
---|
148 | int screen_num,
|
---|
149 | int x,
|
---|
150 | int y);
|
---|
151 |
|
---|
152 | /* Returns the current cursor position. */
|
---|
153 | extern void miPointerGetPosition(
|
---|
154 | DeviceIntPtr pDev,
|
---|
155 | int *x,
|
---|
156 | int *y);
|
---|
157 |
|
---|
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);
|
---|
165 |
|
---|
166 | extern void miPointerUpdateSprite(
|
---|
167 | DeviceIntPtr pDev);
|
---|
168 |
|
---|
169 | extern int miPointerScreenIndex;
|
---|
170 |
|
---|
171 | #endif /* MIPOINTER_H */
|
---|