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 | Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. |
26 | |
27 | All Rights Reserved |
28 | |
29 | Permission to use, copy, modify, and distribute this software and its |
30 | documentation for any purpose and without fee is hereby granted, |
31 | provided that the above copyright notice appear in all copies and that |
32 | both that copyright notice and this permission notice appear in |
33 | supporting documentation, and that the name of Hewlett-Packard not be |
34 | used in advertising or publicity pertaining to distribution of the |
35 | software without specific, written prior permission. |
36 | |
37 | HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING |
38 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL |
39 | HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR |
40 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, |
41 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, |
42 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS |
43 | SOFTWARE. |
44 | |
45 | ********************************************************/ |
46 | |
47 | /* Definitions used by the server, library and client */ |
48 | |
49 | #ifndef _XI_H_ |
50 | #define _XI_H_ |
51 | |
52 | #define sz_xGetExtensionVersionReq 8 |
53 | #define sz_xGetExtensionVersionReply 32 |
54 | #define sz_xListInputDevicesReq 4 |
55 | #define sz_xListInputDevicesReply 32 |
56 | #define sz_xOpenDeviceReq 8 |
57 | #define sz_xOpenDeviceReply 32 |
58 | #define sz_xCloseDeviceReq 8 |
59 | #define sz_xSetDeviceModeReq 8 |
60 | #define sz_xSetDeviceModeReply 32 |
61 | #define sz_xSelectExtensionEventReq 12 |
62 | #define sz_xGetSelectedExtensionEventsReq 8 |
63 | #define sz_xGetSelectedExtensionEventsReply 32 |
64 | #define sz_xChangeDeviceDontPropagateListReq 12 |
65 | #define sz_xGetDeviceDontPropagateListReq 8 |
66 | #define sz_xGetDeviceDontPropagateListReply 32 |
67 | #define sz_xGetDeviceMotionEventsReq 16 |
68 | #define sz_xGetDeviceMotionEventsReply 32 |
69 | #define sz_xChangeKeyboardDeviceReq 8 |
70 | #define sz_xChangeKeyboardDeviceReply 32 |
71 | #define sz_xChangePointerDeviceReq 8 |
72 | #define sz_xChangePointerDeviceReply 32 |
73 | #define sz_xGrabDeviceReq 20 |
74 | #define sz_xGrabDeviceReply 32 |
75 | #define sz_xUngrabDeviceReq 12 |
76 | #define sz_xGrabDeviceKeyReq 20 |
77 | #define sz_xGrabDeviceKeyReply 32 |
78 | #define sz_xUngrabDeviceKeyReq 16 |
79 | #define sz_xGrabDeviceButtonReq 20 |
80 | #define sz_xGrabDeviceButtonReply 32 |
81 | #define sz_xUngrabDeviceButtonReq 16 |
82 | #define sz_xAllowDeviceEventsReq 12 |
83 | #define sz_xGetDeviceFocusReq 8 |
84 | #define sz_xGetDeviceFocusReply 32 |
85 | #define sz_xSetDeviceFocusReq 16 |
86 | #define sz_xGetFeedbackControlReq 8 |
87 | #define sz_xGetFeedbackControlReply 32 |
88 | #define sz_xChangeFeedbackControlReq 12 |
89 | #define sz_xGetDeviceKeyMappingReq 8 |
90 | #define sz_xGetDeviceKeyMappingReply 32 |
91 | #define sz_xChangeDeviceKeyMappingReq 8 |
92 | #define sz_xGetDeviceModifierMappingReq 8 |
93 | #define sz_xSetDeviceModifierMappingReq 8 |
94 | #define sz_xSetDeviceModifierMappingReply 32 |
95 | #define sz_xGetDeviceButtonMappingReq 8 |
96 | #define sz_xGetDeviceButtonMappingReply 32 |
97 | #define sz_xSetDeviceButtonMappingReq 8 |
98 | #define sz_xSetDeviceButtonMappingReply 32 |
99 | #define sz_xQueryDeviceStateReq 8 |
100 | #define sz_xQueryDeviceStateReply 32 |
101 | #define sz_xSendExtensionEventReq 16 |
102 | #define sz_xDeviceBellReq 8 |
103 | #define sz_xSetDeviceValuatorsReq 8 |
104 | #define sz_xSetDeviceValuatorsReply 32 |
105 | #define sz_xGetDeviceControlReq 8 |
106 | #define sz_xGetDeviceControlReply 32 |
107 | #define sz_xChangeDeviceControlReq 8 |
108 | #define sz_xChangeDeviceControlReply 32 |
109 | #define sz_xListDevicePropertiesReq 8 |
110 | #define sz_xListDevicePropertiesReply 32 |
111 | #define sz_xChangeDevicePropertyReq 20 |
112 | #define sz_xDeleteDevicePropertyReq 12 |
113 | #define sz_xGetDevicePropertyReq 24 |
114 | #define sz_xGetDevicePropertyReply 32 |
115 | |
116 | #define INAME "XInputExtension" |
117 | |
118 | #define XI_KEYBOARD "KEYBOARD" |
119 | #define XI_MOUSE "MOUSE" |
120 | #define XI_TABLET "TABLET" |
121 | #define XI_TOUCHSCREEN "TOUCHSCREEN" |
122 | #define XI_TOUCHPAD "TOUCHPAD" |
123 | #define XI_BARCODE "BARCODE" |
124 | #define XI_BUTTONBOX "BUTTONBOX" |
125 | #define XI_KNOB_BOX "KNOB_BOX" |
126 | #define XI_ONE_KNOB "ONE_KNOB" |
127 | #define XI_NINE_KNOB "NINE_KNOB" |
128 | #define XI_TRACKBALL "TRACKBALL" |
129 | #define XI_QUADRATURE "QUADRATURE" |
130 | #define XI_ID_MODULE "ID_MODULE" |
131 | #define XI_SPACEBALL "SPACEBALL" |
132 | #define XI_DATAGLOVE "DATAGLOVE" |
133 | #define XI_EYETRACKER "EYETRACKER" |
134 | #define XI_CURSORKEYS "CURSORKEYS" |
135 | #define "FOOTMOUSE" |
136 | #define XI_JOYSTICK "JOYSTICK" |
137 | |
138 | /* Indices into the versions[] array (XExtInt.c). Used as a index to |
139 | * retrieve the minimum version of XI from _XiCheckExtInit */ |
140 | #define Dont_Check 0 |
141 | #define XInput_Initial_Release 1 |
142 | #define XInput_Add_XDeviceBell 2 |
143 | #define XInput_Add_XSetDeviceValuators 3 |
144 | #define XInput_Add_XChangeDeviceControl 4 |
145 | #define XInput_Add_DevicePresenceNotify 5 |
146 | #define XInput_Add_DeviceProperties 6 |
147 | /* DO NOT ADD TO HERE -> XI2 */ |
148 | |
149 | #define XI_Absent 0 |
150 | #define XI_Present 1 |
151 | |
152 | #define XI_Initial_Release_Major 1 |
153 | #define XI_Initial_Release_Minor 0 |
154 | |
155 | #define XI_Add_XDeviceBell_Major 1 |
156 | #define XI_Add_XDeviceBell_Minor 1 |
157 | |
158 | #define XI_Add_XSetDeviceValuators_Major 1 |
159 | #define XI_Add_XSetDeviceValuators_Minor 2 |
160 | |
161 | #define XI_Add_XChangeDeviceControl_Major 1 |
162 | #define XI_Add_XChangeDeviceControl_Minor 3 |
163 | |
164 | #define XI_Add_DevicePresenceNotify_Major 1 |
165 | #define XI_Add_DevicePresenceNotify_Minor 4 |
166 | |
167 | #define XI_Add_DeviceProperties_Major 1 |
168 | #define XI_Add_DeviceProperties_Minor 5 |
169 | |
170 | #define DEVICE_RESOLUTION 1 |
171 | #define DEVICE_ABS_CALIB 2 |
172 | #define DEVICE_CORE 3 |
173 | #define DEVICE_ENABLE 4 |
174 | #define DEVICE_ABS_AREA 5 |
175 | |
176 | #define NoSuchExtension 1 |
177 | |
178 | #define COUNT 0 |
179 | #define CREATE 1 |
180 | |
181 | #define NewPointer 0 |
182 | #define NewKeyboard 1 |
183 | |
184 | #define XPOINTER 0 |
185 | #define XKEYBOARD 1 |
186 | |
187 | #define UseXKeyboard 0xFF |
188 | |
189 | #define IsXPointer 0 |
190 | #define IsXKeyboard 1 |
191 | #define IsXExtensionDevice 2 |
192 | #define IsXExtensionKeyboard 3 |
193 | #define IsXExtensionPointer 4 |
194 | |
195 | #define AsyncThisDevice 0 |
196 | #define SyncThisDevice 1 |
197 | #define ReplayThisDevice 2 |
198 | #define AsyncOtherDevices 3 |
199 | #define AsyncAll 4 |
200 | #define SyncAll 5 |
201 | |
202 | #define FollowKeyboard 3 |
203 | #ifndef RevertToFollowKeyboard |
204 | #define RevertToFollowKeyboard 3 |
205 | #endif |
206 | |
207 | #define DvAccelNum (1L << 0) |
208 | #define DvAccelDenom (1L << 1) |
209 | #define DvThreshold (1L << 2) |
210 | |
211 | #define DvKeyClickPercent (1L<<0) |
212 | #define DvPercent (1L<<1) |
213 | #define DvPitch (1L<<2) |
214 | #define DvDuration (1L<<3) |
215 | #define DvLed (1L<<4) |
216 | #define DvLedMode (1L<<5) |
217 | #define DvKey (1L<<6) |
218 | #define DvAutoRepeatMode (1L<<7) |
219 | |
220 | #define DvString (1L << 0) |
221 | |
222 | #define DvInteger (1L << 0) |
223 | |
224 | #define DeviceMode (1L << 0) |
225 | #define Relative 0 |
226 | #define Absolute 1 |
227 | |
228 | #define ProximityState (1L << 1) |
229 | #define InProximity (0L << 1) |
230 | #define OutOfProximity (1L << 1) |
231 | |
232 | #define AddToList 0 |
233 | #define DeleteFromList 1 |
234 | |
235 | #define KeyClass 0 |
236 | #define ButtonClass 1 |
237 | #define ValuatorClass 2 |
238 | #define FeedbackClass 3 |
239 | #define ProximityClass 4 |
240 | #define FocusClass 5 |
241 | #define OtherClass 6 |
242 | #define AttachClass 7 |
243 | |
244 | #define KbdFeedbackClass 0 |
245 | #define PtrFeedbackClass 1 |
246 | #define StringFeedbackClass 2 |
247 | #define IntegerFeedbackClass 3 |
248 | #define LedFeedbackClass 4 |
249 | #define BellFeedbackClass 5 |
250 | |
251 | #define _devicePointerMotionHint 0 |
252 | #define _deviceButton1Motion 1 |
253 | #define _deviceButton2Motion 2 |
254 | #define _deviceButton3Motion 3 |
255 | #define _deviceButton4Motion 4 |
256 | #define _deviceButton5Motion 5 |
257 | #define _deviceButtonMotion 6 |
258 | #define _deviceButtonGrab 7 |
259 | #define _deviceOwnerGrabButton 8 |
260 | #define _noExtensionEvent 9 |
261 | |
262 | #define _devicePresence 0 |
263 | |
264 | #define _deviceEnter 0 |
265 | #define _deviceLeave 1 |
266 | |
267 | /* Device presence notify states */ |
268 | #define DeviceAdded 0 |
269 | #define DeviceRemoved 1 |
270 | #define DeviceEnabled 2 |
271 | #define DeviceDisabled 3 |
272 | #define DeviceUnrecoverable 4 |
273 | #define DeviceControlChanged 5 |
274 | |
275 | /* XI Errors */ |
276 | #define XI_BadDevice 0 |
277 | #define XI_BadEvent 1 |
278 | #define XI_BadMode 2 |
279 | #define XI_DeviceBusy 3 |
280 | #define XI_BadClass 4 |
281 | |
282 | /* |
283 | * Make XEventClass be a CARD32 for 64 bit servers. Don't affect client |
284 | * definition of XEventClass since that would be a library interface change. |
285 | * See the top of X.h for more _XSERVER64 magic. |
286 | * |
287 | * But, don't actually use the CARD32 type. We can't get it defined here |
288 | * without polluting the namespace. |
289 | */ |
290 | #ifdef _XSERVER64 |
291 | typedef unsigned int XEventClass; |
292 | #else |
293 | typedef unsigned long XEventClass; |
294 | #endif |
295 | |
296 | /******************************************************************* |
297 | * |
298 | * Extension version structure. |
299 | * |
300 | */ |
301 | |
302 | typedef struct { |
303 | int present; |
304 | short major_version; |
305 | short minor_version; |
306 | } XExtensionVersion; |
307 | |
308 | #endif /* _XI_H_ */ |
309 | |