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