1 /************************************************************
3 Copyright 1989, 1998 The Open Group
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
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
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.
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.
25 Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
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.
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
45 ********************************************************/
50 #include <X11/Xproto.h>
53 /* make sure types have right sizes for protocol structures. */
61 /*********************************************************
63 * number of events, errors, and extension name.
67 #define MORE_EVENTS 0x80
68 #define DEVICE_BITS 0x7F
70 #define InputClassBits 0x3F /* bits in mode field for input classes */
71 #define ModeBitsShift 6 /* amount to shift the remaining bits */
73 #define numInputClasses 7
75 #define IEVENTS 17 /* does NOT include generic events */
81 typedef struct _XExtEventInfo
88 typedef unsigned char *Pointer;
96 /*********************************************************
98 * Event constants used by library.
102 #define XI_DeviceValuator 0
103 #define XI_DeviceKeyPress 1
104 #define XI_DeviceKeyRelease 2
105 #define XI_DeviceButtonPress 3
106 #define XI_DeviceButtonRelease 4
107 #define XI_DeviceMotionNotify 5
108 #define XI_DeviceFocusIn 6
109 #define XI_DeviceFocusOut 7
110 #define XI_ProximityIn 8
111 #define XI_ProximityOut 9
112 #define XI_DeviceStateNotify 10
113 #define XI_DeviceMappingNotify 11
114 #define XI_ChangeDeviceNotify 12
115 #define XI_DeviceKeystateNotify 13
116 #define XI_DeviceButtonstateNotify 14
117 #define XI_DevicePresenceNotify 15
118 #define XI_DevicePropertyNotify 16
120 /*********************************************************
122 * Protocol request constants
126 #define X_GetExtensionVersion 1
127 #define X_ListInputDevices 2
128 #define X_OpenDevice 3
129 #define X_CloseDevice 4
130 #define X_SetDeviceMode 5
131 #define X_SelectExtensionEvent 6
132 #define X_GetSelectedExtensionEvents 7
133 #define X_ChangeDeviceDontPropagateList 8
134 #define X_GetDeviceDontPropagateList 9
135 #define X_GetDeviceMotionEvents 10
136 #define X_ChangeKeyboardDevice 11
137 #define X_ChangePointerDevice 12
138 #define X_GrabDevice 13
139 #define X_UngrabDevice 14
140 #define X_GrabDeviceKey 15
141 #define X_UngrabDeviceKey 16
142 #define X_GrabDeviceButton 17
143 #define X_UngrabDeviceButton 18
144 #define X_AllowDeviceEvents 19
145 #define X_GetDeviceFocus 20
146 #define X_SetDeviceFocus 21
147 #define X_GetFeedbackControl 22
148 #define X_ChangeFeedbackControl 23
149 #define X_GetDeviceKeyMapping 24
150 #define X_ChangeDeviceKeyMapping 25
151 #define X_GetDeviceModifierMapping 26
152 #define X_SetDeviceModifierMapping 27
153 #define X_GetDeviceButtonMapping 28
154 #define X_SetDeviceButtonMapping 29
155 #define X_QueryDeviceState 30
156 #define X_SendExtensionEvent 31
157 #define X_DeviceBell 32
158 #define X_SetDeviceValuators 33
159 #define X_GetDeviceControl 34
160 #define X_ChangeDeviceControl 35
162 #define X_ListDeviceProperties 36
163 #define X_ChangeDeviceProperty 37
164 #define X_DeleteDeviceProperty 38
165 #define X_GetDeviceProperty 39
167 /*********************************************************
169 * Protocol request and reply structures.
171 * GetExtensionVersion.
176 CARD8 reqType; /* input extension major code */
177 CARD8 ReqType; /* always X_GetExtensionVersion */
181 } xGetExtensionVersionReq;
184 CARD8 repType; /* X_Reply */
185 CARD8 RepType; /* always X_GetExtensionVersion */
186 CARD16 sequenceNumber B16;
188 CARD16 major_version B16;
189 CARD16 minor_version B16;
191 CARD8 pad1, pad2, pad3;
196 } xGetExtensionVersionReply;
198 /*********************************************************
205 CARD8 reqType; /* input extension major code */
206 CARD8 ReqType; /* always X_ListInputDevices */
208 } xListInputDevicesReq;
211 CARD8 repType; /* X_Reply */
212 CARD8 RepType; /* always X_ListInputDevices */
213 CARD16 sequenceNumber B16;
216 CARD8 pad1, pad2, pad3;
222 } xListInputDevicesReply;
224 typedef struct _xDeviceInfo *xDeviceInfoPtr;
226 typedef struct _xAnyClassinfo *xAnyClassPtr;
228 typedef struct _xAnyClassinfo {
229 #if defined(__cplusplus) || defined(c_plusplus)
237 typedef struct _xDeviceInfo {
241 CARD8 use; /* IsXPointer | IsXKeyboard | IsXExtension... */
242 CARD8 attached; /* id of master dev (if IsXExtension..) */
245 typedef struct _xKeyInfo *xKeyInfoPtr;
247 typedef struct _xKeyInfo {
248 #if defined(__cplusplus) || defined(c_plusplus)
260 typedef struct _xButtonInfo *xButtonInfoPtr;
262 typedef struct _xButtonInfo {
263 #if defined(__cplusplus) || defined(c_plusplus)
269 CARD16 num_buttons B16;
272 typedef struct _xValuatorInfo *xValuatorInfoPtr;
274 typedef struct _xValuatorInfo {
275 #if defined(__cplusplus) || defined(c_plusplus)
283 CARD32 motion_buffer_size B32;
286 typedef struct _xAxisInfo *xAxisInfoPtr;
288 typedef struct _xAxisInfo {
289 CARD32 resolution B32;
290 CARD32 min_value B32;
291 CARD32 max_value B32;
294 /*********************************************************
301 CARD8 reqType; /* input extension major code */
302 CARD8 ReqType; /* always X_OpenDevice */
305 BYTE pad1, pad2, pad3;
309 CARD8 repType; /* X_Reply */
310 CARD8 RepType; /* always X_OpenDevice */
311 CARD16 sequenceNumber B16;
314 BYTE pad1, pad2, pad3;
323 #if defined(__cplusplus) || defined(c_plusplus)
328 CARD8 event_type_base;
331 /*********************************************************
338 CARD8 reqType; /* input extension major code */
339 CARD8 ReqType; /* always X_CloseDevice */
342 BYTE pad1, pad2, pad3;
345 /*********************************************************
352 CARD8 reqType; /* input extension major code */
353 CARD8 ReqType; /* always X_SetDeviceMode */
361 CARD8 repType; /* X_Reply */
362 CARD8 RepType; /* always X_SetDeviceMode */
363 CARD16 sequenceNumber B16;
366 BYTE pad1, pad2, pad3;
372 } xSetDeviceModeReply;
374 /*********************************************************
376 * SelectExtensionEvent.
381 CARD8 reqType; /* input extension major code */
382 CARD8 ReqType; /* always X_SelectExtensionEvent */
387 } xSelectExtensionEventReq;
389 /*********************************************************
391 * GetSelectedExtensionEvent.
396 CARD8 reqType; /* input extension major code */
397 CARD8 ReqType; /* X_GetSelectedExtensionEvents */
400 } xGetSelectedExtensionEventsReq;
403 CARD8 repType; /* X_Reply */
404 CARD8 RepType; /* GetSelectedExtensionEvents */
405 CARD16 sequenceNumber B16;
407 CARD16 this_client_count B16;
408 CARD16 all_clients_count B16;
414 } xGetSelectedExtensionEventsReply;
416 /*********************************************************
418 * ChangeDeviceDontPropagateList.
423 CARD8 reqType; /* input extension major code */
424 CARD8 ReqType; /* X_ChangeDeviceDontPropagateList */
430 } xChangeDeviceDontPropagateListReq;
432 /*********************************************************
434 * GetDeviceDontPropagateList.
439 CARD8 reqType; /* input extension major code */
440 CARD8 ReqType; /* X_GetDeviceDontPropagateList */
443 } xGetDeviceDontPropagateListReq;
446 CARD8 repType; /* X_Reply */
447 CARD8 RepType; /* GetDeviceDontPropagateList */
448 CARD16 sequenceNumber B16;
457 } xGetDeviceDontPropagateListReply;
459 /*********************************************************
461 * GetDeviceMotionEvents.
466 CARD8 reqType; /* input extension major code */
467 CARD8 ReqType; /* always X_GetDeviceMotionEvents*/
472 BYTE pad1, pad2, pad3;
473 } xGetDeviceMotionEventsReq;
476 CARD8 repType; /* X_Reply */
477 CARD8 RepType; /* always X_GetDeviceMotionEvents */
478 CARD16 sequenceNumber B16;
488 } xGetDeviceMotionEventsReply;
490 /*********************************************************
492 * ChangeKeyboardDevice.
497 CARD8 reqType; /* input extension major code */
498 CARD8 ReqType; /* X_ChangeKeyboardDevice */
501 BYTE pad1, pad2, pad3;
502 } xChangeKeyboardDeviceReq;
505 CARD8 repType; /* X_Reply */
506 CARD8 RepType; /* always X_ChangeKeyboardDevice*/
507 CARD16 sequenceNumber B16;
508 CARD32 length B32; /* 0 */
510 BYTE pad1, pad2, pad3;
516 } xChangeKeyboardDeviceReply;
518 /*********************************************************
520 * ChangePointerDevice.
525 CARD8 reqType; /* input extension major code */
526 CARD8 ReqType; /* X_ChangePointerDevice */
532 } xChangePointerDeviceReq;
535 CARD8 repType; /* X_Reply */
536 CARD8 RepType; /* always X_ChangePointerDevice */
537 CARD16 sequenceNumber B16;
538 CARD32 length B32; /* 0 */
540 BYTE pad1, pad2, pad3;
546 } xChangePointerDeviceReply;
548 /*********************************************************
555 CARD8 reqType; /* input extension major code */
556 CARD8 ReqType; /* always X_GrabDevice */
558 Window grabWindow B32;
560 CARD16 event_count B16;
561 CARD8 this_device_mode;
562 CARD8 other_devices_mode;
569 CARD8 repType; /* X_Reply */
570 CARD8 RepType; /* always X_GrabDevice */
571 CARD16 sequenceNumber B16;
572 CARD32 length B32; /* 0 */
574 BYTE pad1, pad2, pad3;
582 /*********************************************************
589 CARD8 reqType; /* input extension major code */
590 CARD8 ReqType; /* always X_UnGrabDevice */
594 BYTE pad1, pad2, pad3;
597 /*********************************************************
604 CARD8 reqType; /* input extension major code */
605 CARD8 ReqType; /* always X_GrabDeviceKey */
607 Window grabWindow B32;
608 CARD16 event_count B16;
609 CARD16 modifiers B16;
610 CARD8 modifier_device;
611 CARD8 grabbed_device;
613 BYTE this_device_mode;
614 BYTE other_devices_mode;
619 /*********************************************************
626 CARD8 reqType; /* input extension major code */
627 CARD8 ReqType; /* always X_UngrabDeviceKey */
629 Window grabWindow B32;
630 CARD16 modifiers B16;
631 CARD8 modifier_device;
633 CARD8 grabbed_device;
634 BYTE pad1, pad2, pad3;
635 } xUngrabDeviceKeyReq;
637 /*********************************************************
644 CARD8 reqType; /* input extension major code */
645 CARD8 ReqType; /* always X_GrabDeviceButton */
647 Window grabWindow B32;
648 CARD8 grabbed_device;
649 CARD8 modifier_device;
650 CARD16 event_count B16;
651 CARD16 modifiers B16;
652 BYTE this_device_mode;
653 BYTE other_devices_mode;
657 } xGrabDeviceButtonReq;
659 /*********************************************************
661 * UngrabDeviceButton.
666 CARD8 reqType; /* input extension major code */
667 CARD8 ReqType; /* always X_UngrabDeviceButton */
669 Window grabWindow B32;
670 CARD16 modifiers B16;
671 CARD8 modifier_device;
673 CARD8 grabbed_device;
674 BYTE pad1, pad2, pad3;
675 } xUngrabDeviceButtonReq;
677 /*********************************************************
684 CARD8 reqType; /* input extension major code */
685 CARD8 ReqType; /* always X_AllowDeviceEvents */
691 } xAllowDeviceEventsReq;
693 /*********************************************************
700 CARD8 reqType; /* input extension major code */
701 CARD8 ReqType; /* always X_GetDeviceFocus */
704 BYTE pad1, pad2, pad3;
705 } xGetDeviceFocusReq;
708 CARD8 repType; /* X_Reply */
709 CARD8 RepType; /* always X_GetDeviceFocus */
710 CARD16 sequenceNumber B16;
715 BYTE pad1, pad2, pad3;
719 } xGetDeviceFocusReply;
721 /*********************************************************
728 CARD8 reqType; /* input extension major code */
729 CARD8 ReqType; /* always X_SetDeviceFocus */
736 } xSetDeviceFocusReq;
738 /*********************************************************
740 * GetFeedbackControl.
745 CARD8 reqType; /* input extension major code */
746 CARD8 ReqType; /* X_GetFeedbackControl */
749 BYTE pad1, pad2, pad3;
750 } xGetFeedbackControlReq;
753 CARD8 repType; /* X_Reply */
754 CARD8 RepType; /* always X_GetFeedbackControl */
755 CARD16 sequenceNumber B16;
757 CARD16 num_feedbacks B16;
764 } xGetFeedbackControlReply;
767 #if defined(__cplusplus) || defined(c_plusplus)
768 CARD8 c_class; /* feedback class */
770 CARD8 class; /* feedback class */
772 CARD8 id; /* feedback id */
773 CARD16 length B16; /* feedback length */
777 #if defined(__cplusplus) || defined(c_plusplus)
787 CARD32 led_values B32;
788 BOOL global_auto_repeat;
792 BYTE auto_repeats[32];
796 #if defined(__cplusplus) || defined(c_plusplus)
805 CARD16 accelDenom B16;
806 CARD16 threshold B16;
810 #if defined(__cplusplus) || defined(c_plusplus)
811 CARD8 c_class; /* feedback class id */
813 CARD8 class; /* feedback class id */
816 CARD16 length B16; /* feedback length */
817 CARD32 resolution B32;
820 } xIntegerFeedbackState;
823 #if defined(__cplusplus) || defined(c_plusplus)
824 CARD8 c_class; /* feedback class id */
826 CARD8 class; /* feedback class id */
829 CARD16 length B16; /* feedback length */
830 CARD16 max_symbols B16;
831 CARD16 num_syms_supported B16;
832 } xStringFeedbackState;
835 #if defined(__cplusplus) || defined(c_plusplus)
836 CARD8 c_class; /* feedback class id */
838 CARD8 class; /* feedback class id */
841 CARD16 length B16; /* feedback length */
843 BYTE pad1, pad2, pad3;
846 } xBellFeedbackState;
849 #if defined(__cplusplus) || defined(c_plusplus)
850 CARD8 c_class; /* feedback class id */
852 CARD8 class; /* feedback class id */
855 CARD16 length B16; /* feedback length */
857 CARD32 led_values B32;
860 /*********************************************************
862 * ChangeFeedbackControl.
867 CARD8 reqType; /* input extension major code */
868 CARD8 ReqType; /* X_ChangeFeedbackControl */
874 } xChangeFeedbackControlReq;
877 #if defined(__cplusplus) || defined(c_plusplus)
878 CARD8 c_class; /* feedback class id */
880 CARD8 class; /* feedback class id */
882 CARD8 id; /* feedback id */
883 CARD16 length B16; /* feedback length */
887 #if defined(__cplusplus) || defined(c_plusplus)
888 CARD8 c_class; /* feedback class id */
890 CARD8 class; /* feedback class id */
892 CARD8 id; /* feedback length */
893 CARD16 length B16; /* feedback length */
895 CARD8 auto_repeat_mode;
901 CARD32 led_values B32;
905 #if defined(__cplusplus) || defined(c_plusplus)
906 CARD8 c_class; /* feedback class id */
908 CARD8 class; /* feedback class id */
910 CARD8 id; /* feedback id */
911 CARD16 length B16; /* feedback length */
919 #if defined(__cplusplus) || defined(c_plusplus)
920 CARD8 c_class; /* feedback class id */
922 CARD8 class; /* feedback class id */
924 CARD8 id; /* feedback id */
925 CARD16 length B16; /* feedback length */
926 INT32 int_to_display B32;
927 } xIntegerFeedbackCtl;
930 #if defined(__cplusplus) || defined(c_plusplus)
931 CARD8 c_class; /* feedback class id */
933 CARD8 class; /* feedback class id */
935 CARD8 id; /* feedback id */
936 CARD16 length B16; /* feedback length */
938 CARD16 num_keysyms B16;
939 } xStringFeedbackCtl;
942 #if defined(__cplusplus) || defined(c_plusplus)
943 CARD8 c_class; /* feedback class id */
945 CARD8 class; /* feedback class id */
947 CARD8 id; /* feedback id */
948 CARD16 length B16; /* feedback length */
950 BYTE pad1, pad2, pad3;
956 #if defined(__cplusplus) || defined(c_plusplus)
957 CARD8 c_class; /* feedback class id */
959 CARD8 class; /* feedback class id */
961 CARD8 id; /* feedback id */
962 CARD16 length B16; /* feedback length */
964 CARD32 led_values B32;
967 /*********************************************************
969 * GetDeviceKeyMapping.
974 CARD8 reqType; /* input extension major code */
975 CARD8 ReqType; /* always X_GetDeviceKeyMapping */
978 KeyCode firstKeyCode;
981 } xGetDeviceKeyMappingReq;
984 CARD8 repType; /* X_Reply */
985 CARD8 RepType; /* always X_GetDeviceKeyMapping */
986 CARD16 sequenceNumber B16;
988 CARD8 keySymsPerKeyCode;
996 } xGetDeviceKeyMappingReply;
998 /*********************************************************
1000 * ChangeDeviceKeyMapping.
1005 CARD8 reqType; /* input extension major code */
1006 CARD8 ReqType; /* always X_ChangeDeviceKeyMapping */
1009 KeyCode firstKeyCode;
1010 CARD8 keySymsPerKeyCode;
1012 } xChangeDeviceKeyMappingReq;
1014 /*********************************************************
1016 * GetDeviceModifierMapping.
1021 CARD8 reqType; /* input extension major code */
1022 CARD8 ReqType; /* always X_GetDeviceModifierMapping */
1025 BYTE pad1, pad2, pad3;
1026 } xGetDeviceModifierMappingReq;
1029 CARD8 repType; /* X_Reply */
1030 CARD8 RepType; /* always X_GetDeviceModifierMapping */
1031 CARD16 sequenceNumber B16;
1033 CARD8 numKeyPerModifier;
1041 } xGetDeviceModifierMappingReply;
1043 /*********************************************************
1045 * SetDeviceModifierMapping.
1050 CARD8 reqType; /* input extension major code */
1051 CARD8 ReqType; /* always X_SetDeviceModifierMapping */
1054 CARD8 numKeyPerModifier;
1056 } xSetDeviceModifierMappingReq;
1059 CARD8 repType; /* X_Reply */
1060 CARD8 RepType; /* always X_SetDeviceModifierMapping */
1061 CARD16 sequenceNumber B16;
1071 } xSetDeviceModifierMappingReply;
1073 /*********************************************************
1075 * GetDeviceButtonMapping.
1080 CARD8 reqType; /* input extension major code */
1081 CARD8 ReqType; /* X_GetDeviceButtonMapping */
1084 BYTE pad1, pad2, pad3;
1085 } xGetDeviceButtonMappingReq;
1088 CARD8 repType; /* X_Reply */
1089 CARD8 RepType; /* always X_GetDeviceButtonMapping */
1090 CARD16 sequenceNumber B16;
1093 BYTE pad1, pad2, pad3;
1099 } xGetDeviceButtonMappingReply;
1101 /*********************************************************
1103 * SetDeviceButtonMapping.
1108 CARD8 reqType; /* input extension major code */
1109 CARD8 ReqType; /* X_SetDeviceButtonMapping */
1114 } xSetDeviceButtonMappingReq;
1117 CARD8 repType; /* X_Reply */
1118 CARD8 RepType; /* always X_SetDeviceButtonMapping */
1119 CARD16 sequenceNumber B16;
1129 } xSetDeviceButtonMappingReply;
1131 /*********************************************************
1139 CARD8 ReqType; /* always X_QueryDeviceState */
1142 BYTE pad1, pad2, pad3;
1143 } xQueryDeviceStateReq;
1146 CARD8 repType; /* X_Reply */
1147 CARD8 RepType; /* always X_QueryDeviceState */
1148 CARD16 sequenceNumber B16;
1158 } xQueryDeviceStateReply;
1161 #if defined(__cplusplus) || defined(c_plusplus)
1173 #if defined(__cplusplus) || defined(c_plusplus)
1185 #if defined(__cplusplus) || defined(c_plusplus)
1191 CARD8 num_valuators;
1195 /*********************************************************
1197 * SendExtensionEvent.
1198 * THIS REQUEST MUST BE KEPT A MULTIPLE OF 8 BYTES IN LENGTH!
1199 * MORE EVENTS MAY FOLLOW AND THEY MUST BE QUAD-ALIGNED!
1205 CARD8 ReqType; /* always X_SendExtensionEvent */
1207 Window destination B32;
1212 BYTE pad1,pad2,pad3;
1213 } xSendExtensionEventReq;
1215 /*********************************************************
1223 CARD8 ReqType; /* always X_DeviceBell */
1227 CARD8 feedbackclass;
1231 /*********************************************************
1233 * SetDeviceValuators.
1238 CARD8 reqType; /* input extension major code */
1239 CARD8 ReqType; /* always X_SetDeviceValuators */
1242 CARD8 first_valuator;
1243 CARD8 num_valuators;
1245 } xSetDeviceValuatorsReq;
1248 CARD8 repType; /* X_Reply */
1249 CARD8 RepType; /* always X_SetDeviceValuators */
1250 CARD16 sequenceNumber B16;
1253 BYTE pad1, pad2, pad3;
1259 } xSetDeviceValuatorsReply;
1261 /*********************************************************
1268 CARD8 reqType; /* input extension major code */
1269 CARD8 ReqType; /* always X_GetDeviceControl */
1274 } xGetDeviceControlReq;
1277 CARD8 repType; /* X_Reply */
1278 CARD8 RepType; /* always X_GetDeviceControl */
1279 CARD16 sequenceNumber B16;
1282 BYTE pad1, pad2, pad3;
1288 } xGetDeviceControlReply;
1291 CARD16 control B16; /* control type */
1292 CARD16 length B16; /* control length */
1296 CARD16 control B16; /* control type */
1297 CARD16 length B16; /* control length */
1298 CARD32 num_valuators B32; /* number of valuators */
1299 } xDeviceResolutionState;
1310 CARD32 rotation B32;
1311 CARD32 button_threshold B32;
1312 } xDeviceAbsCalibState;
1317 CARD32 offset_x B32;
1318 CARD32 offset_y B32;
1322 CARD32 following B32;
1323 } xDeviceAbsAreaState;
1326 CARD16 control B16; /* control type */
1327 CARD16 length B16; /* control length */
1334 CARD16 control B16; /* control type */
1335 CARD16 length B16; /* control length */
1339 } xDeviceEnableState;
1341 /*********************************************************
1343 * ChangeDeviceControl.
1348 CARD8 reqType; /* input extension major code */
1349 CARD8 ReqType; /* always X_ChangeDeviceControl */
1354 } xChangeDeviceControlReq;
1357 CARD8 repType; /* X_Reply */
1358 CARD8 RepType; /* always X_ChangeDeviceControl */
1359 CARD16 sequenceNumber B16;
1362 BYTE pad1, pad2, pad3;
1368 } xChangeDeviceControlReply;
1371 CARD16 control B16; /* control type */
1372 CARD16 length B16; /* control length */
1376 CARD16 control B16; /* control type */
1377 CARD16 length B16; /* control length */
1378 CARD8 first_valuator; /* first valuator to change */
1379 CARD8 num_valuators; /* number of valuators to change*/
1381 } xDeviceResolutionCtl;
1393 CARD32 button_threshold;
1394 } xDeviceAbsCalibCtl;
1405 } xDeviceAbsAreaCtl;
1425 /*********************************************************
1427 * ListDeviceProperties.
1432 CARD8 reqType; /* input extension major opcode */
1433 CARD8 ReqType; /* always X_ListDeviceProperties */
1438 } xListDevicePropertiesReq;
1441 CARD8 repType; /* X_Reply */
1442 CARD8 RepType; /* always X_ListDeviceProperties */
1443 CARD16 sequenceNumber B16;
1452 } xListDevicePropertiesReply;
1454 /*********************************************************
1456 * ChangeDeviceProperty.
1461 CARD8 reqType; /* input extension major opcode */
1462 CARD8 ReqType; /* always X_ChangeDeviceProperty */
1471 } xChangeDevicePropertyReq;
1473 /*********************************************************
1475 * DeleteDeviceProperty.
1480 CARD8 reqType; /* input extension major opcode */
1481 CARD8 ReqType; /* always X_DeleteDeviceProperty */
1487 } xDeleteDevicePropertyReq;
1489 /*********************************************************
1491 * GetDeviceProperty.
1496 CARD8 reqType; /* input extension major opcode */
1497 CARD8 ReqType; /* always X_GetDeviceProperty */
1501 CARD32 longOffset B32;
1502 CARD32 longLength B32;
1504 #if defined(__cplusplus) || defined(c_plusplus)
1510 } xGetDevicePropertyReq;
1513 CARD8 repType; /* X_Reply */
1514 CARD8 RepType; /* always X_GetDeviceProperty */
1515 CARD16 sequenceNumber B16;
1517 Atom propertyType B32;
1518 CARD32 bytesAfter B32;
1525 } xGetDevicePropertyReply;
1528 /**********************************************************
1530 * Input extension events.
1540 CARD16 sequenceNumber B16;
1541 KeyButMask device_state B16;
1542 CARD8 num_valuators;
1543 CARD8 first_valuator;
1544 INT32 valuator0 B32;
1545 INT32 valuator1 B32;
1546 INT32 valuator2 B32;
1547 INT32 valuator3 B32;
1548 INT32 valuator4 B32;
1549 INT32 valuator5 B32;
1552 /**********************************************************
1554 * DeviceKeyButtonPointer.
1556 * Used for: DeviceKeyPress, DeviceKeyRelease,
1557 * DeviceButtonPress, DeviceButtonRelease,
1558 * ProximityIn, ProximityOut
1559 * DeviceMotionNotify,
1567 CARD16 sequenceNumber B16;
1576 KeyButMask state B16;
1579 } deviceKeyButtonPointer;
1581 /**********************************************************
1591 CARD16 sequenceNumber B16;
1603 /**********************************************************
1605 * DeviceStateNotify.
1607 * Note that the two high-order bits in the classes_reported
1608 * field are the proximity state (InProximity or OutOfProximity),
1609 * and the device mode (Absolute or Relative), respectively.
1617 CARD16 sequenceNumber B16;
1621 CARD8 num_valuators;
1622 CARD8 classes_reported;
1625 INT32 valuator0 B32;
1626 INT32 valuator1 B32;
1627 INT32 valuator2 B32;
1628 } deviceStateNotify;
1630 /**********************************************************
1632 * DeviceKeyStateNotify.
1640 CARD16 sequenceNumber B16;
1642 } deviceKeyStateNotify;
1644 /**********************************************************
1646 * DeviceButtonStateNotify.
1654 CARD16 sequenceNumber B16;
1656 } deviceButtonStateNotify;
1658 /**********************************************************
1660 * DeviceMappingNotify.
1661 * Fields must be kept in sync with core mappingnotify event.
1669 CARD16 sequenceNumber B16;
1671 KeyCode firstKeyCode;
1680 } deviceMappingNotify;
1682 /**********************************************************
1684 * ChangeDeviceNotify.
1692 CARD16 sequenceNumber B16;
1695 BYTE pad1, pad2, pad3;
1701 } changeDeviceNotify;
1703 /**********************************************************
1705 * devicePresenceNotify.
1713 CARD16 sequenceNumber B16;
1715 BYTE devchange; /* Device{Added|Removed|Enabled|Disabled|ControlChanged} */
1723 } devicePresenceNotify;
1726 /*********************************************************
1727 * DevicePropertyNotifyEvent
1729 * Sent whenever a device's property changes.
1736 BYTE state; /* NewValue or Deleted */
1737 CARD16 sequenceNumber B16;
1739 Atom atom B32; /* affected property */
1746 CARD8 deviceid; /* id of device */
1747 } devicePropertyNotify;