1 | /*
|
---|
2 | * mipointer.h
|
---|
3 | *
|
---|
4 | */
|
---|
5 |
|
---|
6 |
|
---|
7 | /*
|
---|
8 |
|
---|
9 | Copyright 1989, 1998 The Open Group
|
---|
10 |
|
---|
11 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
12 | documentation for any purpose is hereby granted without fee, provided that
|
---|
13 | the above copyright notice appear in all copies and that both that
|
---|
14 | copyright notice and this permission notice appear in supporting
|
---|
15 | documentation.
|
---|
16 |
|
---|
17 | The above copyright notice and this permission notice shall be included in
|
---|
18 | all copies or substantial portions of the Software.
|
---|
19 |
|
---|
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
23 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
24 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
25 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
26 |
|
---|
27 | Except as contained in this notice, the name of The Open Group shall not be
|
---|
28 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
29 | in this Software without prior written authorization from The Open Group.
|
---|
30 | */
|
---|
31 |
|
---|
32 | #ifndef MIPOINTER_H
|
---|
33 | #define MIPOINTER_H
|
---|
34 |
|
---|
35 | #include "cursor.h"
|
---|
36 | #include "input.h"
|
---|
37 |
|
---|
38 | typedef struct _miPointerSpriteFuncRec {
|
---|
39 | Bool (*RealizeCursor)(
|
---|
40 | ScreenPtr /* pScr */,
|
---|
41 | CursorPtr /* pCurs */
|
---|
42 | );
|
---|
43 | Bool (*UnrealizeCursor)(
|
---|
44 | ScreenPtr /* pScr */,
|
---|
45 | CursorPtr /* pCurs */
|
---|
46 | );
|
---|
47 | void (*SetCursor)(
|
---|
48 | ScreenPtr /* pScr */,
|
---|
49 | CursorPtr /* pCurs */,
|
---|
50 | int /* x */,
|
---|
51 | int /* y */
|
---|
52 | );
|
---|
53 | void (*MoveCursor)(
|
---|
54 | ScreenPtr /* pScr */,
|
---|
55 | int /* x */,
|
---|
56 | int /* y */
|
---|
57 | );
|
---|
58 | } miPointerSpriteFuncRec, *miPointerSpriteFuncPtr;
|
---|
59 |
|
---|
60 | typedef struct _miPointerScreenFuncRec {
|
---|
61 | Bool (*CursorOffScreen)(
|
---|
62 | ScreenPtr* /* ppScr */,
|
---|
63 | int* /* px */,
|
---|
64 | int* /* py */
|
---|
65 | );
|
---|
66 | void (*CrossScreen)(
|
---|
67 | ScreenPtr /* pScr */,
|
---|
68 | int /* entering */
|
---|
69 | );
|
---|
70 | void (*WarpCursor)(
|
---|
71 | ScreenPtr /* pScr */,
|
---|
72 | int /* x */,
|
---|
73 | int /* y */
|
---|
74 | );
|
---|
75 | void (*EnqueueEvent)(
|
---|
76 | xEventPtr /* event */
|
---|
77 | );
|
---|
78 | void (*NewEventScreen)(
|
---|
79 | ScreenPtr /* pScr */,
|
---|
80 | Bool /* fromDIX */
|
---|
81 | );
|
---|
82 | } miPointerScreenFuncRec, *miPointerScreenFuncPtr;
|
---|
83 |
|
---|
84 | extern Bool miDCInitialize(
|
---|
85 | ScreenPtr /*pScreen*/,
|
---|
86 | miPointerScreenFuncPtr /*screenFuncs*/
|
---|
87 | );
|
---|
88 |
|
---|
89 | extern Bool miPointerInitialize(
|
---|
90 | ScreenPtr /*pScreen*/,
|
---|
91 | miPointerSpriteFuncPtr /*spriteFuncs*/,
|
---|
92 | miPointerScreenFuncPtr /*screenFuncs*/,
|
---|
93 | Bool /*waitForUpdate*/
|
---|
94 | );
|
---|
95 |
|
---|
96 | extern void miPointerWarpCursor(
|
---|
97 | ScreenPtr /*pScreen*/,
|
---|
98 | int /*x*/,
|
---|
99 | int /*y*/
|
---|
100 | );
|
---|
101 |
|
---|
102 | extern int miPointerGetMotionBufferSize(
|
---|
103 | void
|
---|
104 | );
|
---|
105 |
|
---|
106 | extern int miPointerGetMotionEvents(
|
---|
107 | DeviceIntPtr /*pPtr*/,
|
---|
108 | xTimecoord * /*coords*/,
|
---|
109 | unsigned long /*start*/,
|
---|
110 | unsigned long /*stop*/,
|
---|
111 | ScreenPtr /*pScreen*/
|
---|
112 | );
|
---|
113 |
|
---|
114 | extern void miPointerUpdate(
|
---|
115 | void
|
---|
116 | );
|
---|
117 |
|
---|
118 | extern void miPointerDeltaCursor(
|
---|
119 | int /*dx*/,
|
---|
120 | int /*dy*/,
|
---|
121 | unsigned long /*time*/
|
---|
122 | );
|
---|
123 |
|
---|
124 | extern void miPointerAbsoluteCursor(
|
---|
125 | int /*x*/,
|
---|
126 | int /*y*/,
|
---|
127 | unsigned long /*time*/
|
---|
128 | );
|
---|
129 |
|
---|
130 | extern void miPointerPosition(
|
---|
131 | int * /*x*/,
|
---|
132 | int * /*y*/
|
---|
133 | );
|
---|
134 |
|
---|
135 | extern void miPointerSetNewScreen(
|
---|
136 | int, /*screen_no*/
|
---|
137 | int, /*x*/
|
---|
138 | int /*y*/
|
---|
139 | );
|
---|
140 | extern ScreenPtr miPointerCurrentScreen(
|
---|
141 | void
|
---|
142 | );
|
---|
143 |
|
---|
144 | extern void miRegisterPointerDevice(
|
---|
145 | ScreenPtr /*pScreen*/,
|
---|
146 | DeviceIntPtr /*pDevice*/
|
---|
147 | );
|
---|
148 |
|
---|
149 | extern int miPointerScreenIndex;
|
---|
150 |
|
---|
151 | #endif /* MIPOINTER_H */
|
---|