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