Debian Codegraph @

nx-X11/include/extensions/XIproto.h

raw
1
2 /************************************************************
3
4 Copyright 1989, 1998 The Open Group
5
6 Permission to use, copy, modify, distribute, and sell this software and its
7 documentation for any purpose is hereby granted without fee, provided that
8 the above copyright notice appear in all copies and that both that
9 copyright notice and this permission notice appear in supporting
10 documentation.
11
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22 Except as contained in this notice, the name of The Open Group shall not be
23 used in advertising or otherwise to promote the sale, use or other dealings
24 in this Software without prior written authorization from The Open Group.
25
26 Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
27
28 All Rights Reserved
29
30 Permission to use, copy, modify, and distribute this software and its
31 documentation for any purpose and without fee is hereby granted,
32 provided that the above copyright notice appear in all copies and that
33 both that copyright notice and this permission notice appear in
34 supporting documentation, and that the name of Hewlett-Packard not be
35 used in advertising or publicity pertaining to distribution of the
36 software without specific, written prior permission.
37
38 HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40 HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44 SOFTWARE.
45
46 ********************************************************/
47
48 #ifndef _XIPROTO_H
49 #define _XIPROTO_H
50
51 #include <nx-X11/Xproto.h>
52 #include <nx-X11/X.h>
53
54 /* make sure types have right sizes for protocol structures. */
55 #define Window CARD32
56 #define Time CARD32
57 #define KeyCode CARD8
58
59 /*********************************************************
60 *
61 * number of events, errors, and extension name.
62 *
63 */
64
65 #define MORE_EVENTS 0x80
66 #define DEVICE_BITS 0x7F
67
68 #define InputClassBits 0x3F /* bits in mode field for input classes */
69 #define ModeBitsShift 6 /* amount to shift the remaining bits */
70
71 #define numInputClasses 7
72
73 #define IEVENTS 15
74 #define IERRORS 5
75
76 #define CLIENT_REQ 1
77
78 typedef struct _XExtEventInfo
79 {
80 Mask mask;
81 BYTE type;
82 BYTE word;
83 } XExtEventInfo;
84
85 typedef unsigned char *Pointer;
86
87 struct tmask
88 {
89 Mask mask;
90 Pointer dev;
91 };
92
93 /*********************************************************
94 *
95 * Event constants used by library.
96 *
97 */
98
99 #define XI_DeviceValuator 0
100 #define XI_DeviceKeyPress 1
101 #define XI_DeviceKeyRelease 2
102 #define XI_DeviceButtonPress 3
103 #define XI_DeviceButtonRelease 4
104 #define XI_DeviceMotionNotify 5
105 #define XI_DeviceFocusIn 6
106 #define XI_DeviceFocusOut 7
107 #define XI_ProximityIn 8
108 #define XI_ProximityOut 9
109 #define XI_DeviceStateNotify 10
110 #define XI_DeviceMappingNotify 11
111 #define XI_ChangeDeviceNotify 12
112 #define XI_DeviceKeystateNotify 13
113 #define XI_DeviceButtonstateNotify 14
114
115 /*********************************************************
116 *
117 * Protocol request constants
118 *
119 */
120
121 #define X_GetExtensionVersion 1
122 #define X_ListInputDevices 2
123 #define X_OpenDevice 3
124 #define X_CloseDevice 4
125 #define X_SetDeviceMode 5
126 #define X_SelectExtensionEvent 6
127 #define X_GetSelectedExtensionEvents 7
128 #define X_ChangeDeviceDontPropagateList 8
129 #define X_GetDeviceDontPropagateList 9
130 #define X_GetDeviceMotionEvents 10
131 #define X_ChangeKeyboardDevice 11
132 #define X_ChangePointerDevice 12
133 #define X_GrabDevice 13
134 #define X_UngrabDevice 14
135 #define X_GrabDeviceKey 15
136 #define X_UngrabDeviceKey 16
137 #define X_GrabDeviceButton 17
138 #define X_UngrabDeviceButton 18
139 #define X_AllowDeviceEvents 19
140 #define X_GetDeviceFocus 20
141 #define X_SetDeviceFocus 21
142 #define X_GetFeedbackControl 22
143 #define X_ChangeFeedbackControl 23
144 #define X_GetDeviceKeyMapping 24
145 #define X_ChangeDeviceKeyMapping 25
146 #define X_GetDeviceModifierMapping 26
147 #define X_SetDeviceModifierMapping 27
148 #define X_GetDeviceButtonMapping 28
149 #define X_SetDeviceButtonMapping 29
150 #define X_QueryDeviceState 30
151 #define X_SendExtensionEvent 31
152 #define X_DeviceBell 32
153 #define X_SetDeviceValuators 33
154 #define X_GetDeviceControl 34
155 #define X_ChangeDeviceControl 35
156
157 /*********************************************************
158 *
159 * Protocol request and reply structures.
160 *
161 * GetExtensionVersion.
162 *
163 */
164
165 typedef struct {
166 CARD8 reqType; /* input extension major code */
167 CARD8 ReqType; /* always X_GetExtensionVersion */
168 CARD16 length B16;
169 CARD16 nbytes B16;
170 CARD8 pad1, pad2;
171 } xGetExtensionVersionReq;
172
173 typedef struct {
174 CARD8 repType; /* X_Reply */
175 CARD8 RepType; /* always X_GetExtensionVersion */
176 CARD16 sequenceNumber B16;
177 CARD32 length B32;
178 CARD16 major_version B16;
179 CARD16 minor_version B16;
180 BOOL present;
181 CARD8 pad1, pad2, pad3;
182 CARD32 pad01 B32;
183 CARD32 pad02 B32;
184 CARD32 pad03 B32;
185 CARD32 pad04 B32;
186 } xGetExtensionVersionReply;
187
188 /*********************************************************
189 *
190 * ListInputDevices.
191 *
192 */
193
194 typedef struct {
195 CARD8 reqType; /* input extension major code */
196 CARD8 ReqType; /* always X_ListInputDevices */
197 CARD16 length B16;
198 } xListInputDevicesReq;
199
200 typedef struct {
201 CARD8 repType; /* X_Reply */
202 CARD8 RepType; /* always X_ListInputDevices */
203 CARD16 sequenceNumber B16;
204 CARD32 length B32;
205 CARD8 ndevices;
206 CARD8 pad1, pad2, pad3;
207 CARD32 pad01 B32;
208 CARD32 pad02 B32;
209 CARD32 pad03 B32;
210 CARD32 pad04 B32;
211 CARD32 pad05 B32;
212 } xListInputDevicesReply;
213
214 typedef struct _xDeviceInfo *xDeviceInfoPtr;
215
216 typedef struct _xAnyClassinfo *xAnyClassPtr;
217
218 typedef struct _xAnyClassinfo {
219 #if defined(__cplusplus) || defined(c_plusplus)
220 CARD8 c_class;
221 #else
222 CARD8 class;
223 #endif
224 CARD8 length;
225 } xAnyClassInfo;
226
227 typedef struct _xDeviceInfo {
228 CARD32 type B32;
229 CARD8 id;
230 CARD8 num_classes;
231 CARD8 use;
232 CARD8 pad1;
233 } xDeviceInfo;
234
235 typedef struct _xKeyInfo *xKeyInfoPtr;
236
237 typedef struct _xKeyInfo {
238 #if defined(__cplusplus) || defined(c_plusplus)
239 CARD8 c_class;
240 #else
241 CARD8 class;
242 #endif
243 CARD8 length;
244 KeyCode min_keycode;
245 KeyCode max_keycode;
246 CARD16 num_keys B16;
247 CARD8 pad1,pad2;
248 } xKeyInfo;
249
250 typedef struct _xButtonInfo *xButtonInfoPtr;
251
252 typedef struct _xButtonInfo {
253 #if defined(__cplusplus) || defined(c_plusplus)
254 CARD8 c_class;
255 #else
256 CARD8 class;
257 #endif
258 CARD8 length;
259 CARD16 num_buttons B16;
260 } xButtonInfo;
261
262 typedef struct _xValuatorInfo *xValuatorInfoPtr;
263
264 typedef struct _xValuatorInfo {
265 #if defined(__cplusplus) || defined(c_plusplus)
266 CARD8 c_class;
267 #else
268 CARD8 class;
269 #endif
270 CARD8 length;
271 CARD8 num_axes;
272 CARD8 mode;
273 CARD32 motion_buffer_size B32;
274 } xValuatorInfo;
275
276 typedef struct _xAxisInfo *xAxisInfoPtr;
277
278 typedef struct _xAxisInfo {
279 CARD32 resolution B32;
280 CARD32 min_value B32;
281 CARD32 max_value B32;
282 } xAxisInfo;
283
284 /*********************************************************
285 *
286 * OpenDevice.
287 *
288 */
289
290 typedef struct {
291 CARD8 reqType; /* input extension major code */
292 CARD8 ReqType; /* always X_OpenDevice */
293 CARD16 length B16;
294 CARD8 deviceid;
295 BYTE pad1, pad2, pad3;
296 } xOpenDeviceReq;
297
298 typedef struct {
299 CARD8 repType; /* X_Reply */
300 CARD8 RepType; /* always X_OpenDevice */
301 CARD16 sequenceNumber B16;
302 CARD32 length B32;
303 CARD8 num_classes;
304 BYTE pad1, pad2, pad3;
305 CARD32 pad00 B32;
306 CARD32 pad01 B32;
307 CARD32 pad02 B32;
308 CARD32 pad03 B32;
309 CARD32 pad04 B32;
310 } xOpenDeviceReply;
311
312 typedef struct {
313 #if defined(__cplusplus) || defined(c_plusplus)
314 CARD8 c_class;
315 #else
316 CARD8 class;
317 #endif
318 CARD8 event_type_base;
319 } xInputClassInfo;
320
321 /*********************************************************
322 *
323 * CloseDevice.
324 *
325 */
326
327 typedef struct {
328 CARD8 reqType; /* input extension major code */
329 CARD8 ReqType; /* always X_CloseDevice */
330 CARD16 length B16;
331 CARD8 deviceid;
332 BYTE pad1, pad2, pad3;
333 } xCloseDeviceReq;
334
335 /*********************************************************
336 *
337 * SetDeviceMode.
338 *
339 */
340
341 typedef struct {
342 CARD8 reqType; /* input extension major code */
343 CARD8 ReqType; /* always X_SetDeviceMode */
344 CARD16 length B16;
345 CARD8 deviceid;
346 CARD8 mode;
347 BYTE pad1, pad2;
348 } xSetDeviceModeReq;
349
350 typedef struct {
351 CARD8 repType; /* X_Reply */
352 CARD8 RepType; /* always X_SetDeviceMode */
353 CARD16 sequenceNumber B16;
354 CARD32 length B32;
355 CARD8 status;
356 BYTE pad1, pad2, pad3;
357 CARD32 pad01 B32;
358 CARD32 pad02 B32;
359 CARD32 pad03 B32;
360 CARD32 pad04 B32;
361 CARD32 pad05 B32;
362 } xSetDeviceModeReply;
363
364 /*********************************************************
365 *
366 * SelectExtensionEvent.
367 *
368 */
369
370 typedef struct {
371 CARD8 reqType; /* input extension major code */
372 CARD8 ReqType; /* always X_SelectExtensionEvent */
373 CARD16 length B16;
374 Window window B32;
375 CARD16 count B16;
376 CARD16 pad00 B16;
377 } xSelectExtensionEventReq;
378
379 /*********************************************************
380 *
381 * GetSelectedExtensionEvent.
382 *
383 */
384
385 typedef struct {
386 CARD8 reqType; /* input extension major code */
387 CARD8 ReqType; /* X_GetSelectedExtensionEvents */
388 CARD16 length B16;
389 Window window B32;
390 } xGetSelectedExtensionEventsReq;
391
392 typedef struct {
393 CARD8 repType; /* X_Reply */
394 CARD8 RepType; /* GetSelectedExtensionEvents */
395 CARD16 sequenceNumber B16;
396 CARD32 length B32;
397 CARD16 this_client_count B16;
398 CARD16 all_clients_count B16;
399 CARD32 pad01 B32;
400 CARD32 pad02 B32;
401 CARD32 pad03 B32;
402 CARD32 pad04 B32;
403 CARD32 pad05 B32;
404 } xGetSelectedExtensionEventsReply;
405
406 /*********************************************************
407 *
408 * ChangeDeviceDontPropagateList.
409 *
410 */
411
412 typedef struct {
413 CARD8 reqType; /* input extension major code */
414 CARD8 ReqType; /* X_ChangeDeviceDontPropagateList */
415 CARD16 length B16;
416 Window window B32;
417 CARD16 count B16;
418 CARD8 mode;
419 BYTE pad;
420 } xChangeDeviceDontPropagateListReq;
421
422 /*********************************************************
423 *
424 * GetDeviceDontPropagateList.
425 *
426 */
427
428 typedef struct {
429 CARD8 reqType; /* input extension major code */
430 CARD8 ReqType; /* X_GetDeviceDontPropagateList */
431 CARD16 length B16;
432 Window window B32;
433 } xGetDeviceDontPropagateListReq;
434
435 typedef struct {
436 CARD8 repType; /* X_Reply */
437 CARD8 RepType; /* GetDeviceDontPropagateList */
438 CARD16 sequenceNumber B16;
439 CARD32 length B32;
440 CARD16 count B16;
441 CARD16 pad00 B16;
442 CARD32 pad01 B32;
443 CARD32 pad02 B32;
444 CARD32 pad03 B32;
445 CARD32 pad04 B32;
446 CARD32 pad05 B32;
447 } xGetDeviceDontPropagateListReply;
448
449 /*********************************************************
450 *
451 * GetDeviceMotionEvents.
452 *
453 */
454
455 typedef struct {
456 CARD8 reqType; /* input extension major code */
457 CARD8 ReqType; /* always X_GetDeviceMotionEvents*/
458 CARD16 length B16;
459 Time start B32;
460 Time stop B32;
461 CARD8 deviceid;
462 BYTE pad1, pad2, pad3;
463 } xGetDeviceMotionEventsReq;
464
465 typedef struct {
466 CARD8 repType; /* X_Reply */
467 CARD8 RepType; /* always X_GetDeviceMotionEvents */
468 CARD16 sequenceNumber B16;
469 CARD32 length B32;
470 CARD32 nEvents B32;
471 CARD8 axes;
472 CARD8 mode;
473 BYTE pad1, pad2;
474 CARD32 pad01 B32;
475 CARD32 pad02 B32;
476 CARD32 pad03 B32;
477 CARD32 pad04 B32;
478 } xGetDeviceMotionEventsReply;
479
480 /*********************************************************
481 *
482 * ChangeKeyboardDevice.
483 *
484 */
485
486 typedef struct {
487 CARD8 reqType; /* input extension major code */
488 CARD8 ReqType; /* X_ChangeKeyboardDevice */
489 CARD16 length B16;
490 CARD8 deviceid;
491 BYTE pad1, pad2, pad3;
492 } xChangeKeyboardDeviceReq;
493
494 typedef struct {
495 CARD8 repType; /* X_Reply */
496 CARD8 RepType; /* always X_ChangeKeyboardDevice*/
497 CARD16 sequenceNumber B16;
498 CARD32 length B32; /* 0 */
499 CARD8 status;
500 BYTE pad1, pad2, pad3;
501 CARD32 pad01 B32;
502 CARD32 pad02 B32;
503 CARD32 pad03 B32;
504 CARD32 pad04 B32;
505 CARD32 pad05 B32;
506 } xChangeKeyboardDeviceReply;
507
508 /*********************************************************
509 *
510 * ChangePointerDevice.
511 *
512 */
513
514 typedef struct {
515 CARD8 reqType; /* input extension major code */
516 CARD8 ReqType; /* X_ChangePointerDevice */
517 CARD16 length B16;
518 CARD8 xaxis;
519 CARD8 yaxis;
520 CARD8 deviceid;
521 BYTE pad1;
522 } xChangePointerDeviceReq;
523
524 typedef struct {
525 CARD8 repType; /* X_Reply */
526 CARD8 RepType; /* always X_ChangePointerDevice */
527 CARD16 sequenceNumber B16;
528 CARD32 length B32; /* 0 */
529 CARD8 status;
530 BYTE pad1, pad2, pad3;
531 CARD32 pad01 B32;
532 CARD32 pad02 B32;
533 CARD32 pad03 B32;
534 CARD32 pad04 B32;
535 CARD32 pad05 B32;
536 } xChangePointerDeviceReply;
537
538 /*********************************************************
539 *
540 * GrabDevice.
541 *
542 */
543
544 typedef struct {
545 CARD8 reqType; /* input extension major code */
546 CARD8 ReqType; /* always X_GrabDevice */
547 CARD16 length B16;
548 Window grabWindow B32;
549 Time time B32;
550 CARD16 event_count B16;
551 CARD8 this_device_mode;
552 CARD8 other_devices_mode;
553 BOOL ownerEvents;
554 CARD8 deviceid;
555 CARD16 pad01 B16;
556 } xGrabDeviceReq;
557
558 typedef struct {
559 CARD8 repType; /* X_Reply */
560 CARD8 RepType; /* always X_GrabDevice */
561 CARD16 sequenceNumber B16;
562 CARD32 length B32; /* 0 */
563 CARD8 status;
564 BYTE pad1, pad2, pad3;
565 CARD32 pad01 B32;
566 CARD32 pad02 B32;
567 CARD32 pad03 B32;
568 CARD32 pad04 B32;
569 CARD32 pad05 B32;
570 } xGrabDeviceReply;
571
572 /*********************************************************
573 *
574 * UngrabDevice.
575 *
576 */
577
578 typedef struct {
579 CARD8 reqType; /* input extension major code */
580 CARD8 ReqType; /* always X_UnGrabDevice */
581 CARD16 length B16;
582 Time time B32;
583 CARD8 deviceid;
584 BYTE pad1, pad2, pad3;
585 } xUngrabDeviceReq;
586
587 /*********************************************************
588 *
589 * GrabDeviceKey.
590 *
591 */
592
593 typedef struct {
594 CARD8 reqType; /* input extension major code */
595 CARD8 ReqType; /* always X_GrabDeviceKey */
596 CARD16 length B16;
597 Window grabWindow B32;
598 CARD16 event_count B16;
599 CARD16 modifiers B16;
600 CARD8 modifier_device;
601 CARD8 grabbed_device;
602 CARD8 key;
603 BYTE this_device_mode;
604 BYTE other_devices_mode;
605 BOOL ownerEvents;
606 BYTE pad1, pad2;
607 } xGrabDeviceKeyReq;
608
609 /*********************************************************
610 *
611 * UngrabDeviceKey.
612 *
613 */
614
615 typedef struct {
616 CARD8 reqType; /* input extension major code */
617 CARD8 ReqType; /* always X_UngrabDeviceKey */
618 CARD16 length B16;
619 Window grabWindow B32;
620 CARD16 modifiers B16;
621 CARD8 modifier_device;
622 CARD8 key;
623 CARD8 grabbed_device;
624 BYTE pad1, pad2, pad3;
625 } xUngrabDeviceKeyReq;
626
627 /*********************************************************
628 *
629 * GrabDeviceButton.
630 *
631 */
632
633 typedef struct {
634 CARD8 reqType; /* input extension major code */
635 CARD8 ReqType; /* always X_GrabDeviceButton */
636 CARD16 length B16;
637 Window grabWindow B32;
638 CARD8 grabbed_device;
639 CARD8 modifier_device;
640 CARD16 event_count B16;
641 CARD16 modifiers B16;
642 BYTE this_device_mode;
643 BYTE other_devices_mode;
644 CARD8 button;
645 BOOL ownerEvents;
646 BYTE pad1, pad2;
647 } xGrabDeviceButtonReq;
648
649 /*********************************************************
650 *
651 * UngrabDeviceButton.
652 *
653 */
654
655 typedef struct {
656 CARD8 reqType; /* input extension major code */
657 CARD8 ReqType; /* always X_UngrabDeviceButton */
658 CARD16 length B16;
659 Window grabWindow B32;
660 CARD16 modifiers B16;
661 CARD8 modifier_device;
662 CARD8 button;
663 CARD8 grabbed_device;
664 BYTE pad1, pad2, pad3;
665 } xUngrabDeviceButtonReq;
666
667 /*********************************************************
668 *
669 * AllowDeviceEvents.
670 *
671 */
672
673 typedef struct {
674 CARD8 reqType; /* input extension major code */
675 CARD8 ReqType; /* always X_AllowDeviceEvents */
676 CARD16 length B16;
677 Time time B32;
678 CARD8 mode;
679 CARD8 deviceid;
680 BYTE pad1, pad2;
681 } xAllowDeviceEventsReq;
682
683 /*********************************************************
684 *
685 * GetDeviceFocus.
686 *
687 */
688
689 typedef struct {
690 CARD8 reqType; /* input extension major code */
691 CARD8 ReqType; /* always X_GetDeviceFocus */
692 CARD16 length B16;
693 CARD8 deviceid;
694 BYTE pad1, pad2, pad3;
695 } xGetDeviceFocusReq;
696
697 typedef struct {
698 CARD8 repType; /* X_Reply */
699 CARD8 RepType; /* always X_GetDeviceFocus */
700 CARD16 sequenceNumber B16;
701 CARD32 length B32;
702 CARD32 focus B32;
703 Time time B32;
704 CARD8 revertTo;
705 BYTE pad1, pad2, pad3;
706 CARD32 pad01 B32;
707 CARD32 pad02 B32;
708 CARD32 pad03 B32;
709 } xGetDeviceFocusReply;
710
711 /*********************************************************
712 *
713 * SetDeviceFocus.
714 *
715 */
716
717 typedef struct {
718 CARD8 reqType; /* input extension major code */
719 CARD8 ReqType; /* always X_SetDeviceFocus */
720 CARD16 length B16;
721 Window focus B32;
722 Time time B32;
723 CARD8 revertTo;
724 CARD8 device;
725 CARD16 pad01 B16;
726 } xSetDeviceFocusReq;
727
728 /*********************************************************
729 *
730 * GetFeedbackControl.
731 *
732 */
733
734 typedef struct {
735 CARD8 reqType; /* input extension major code */
736 CARD8 ReqType; /* X_GetFeedbackControl */
737 CARD16 length B16;
738 CARD8 deviceid;
739 BYTE pad1, pad2, pad3;
740 } xGetFeedbackControlReq;
741
742 typedef struct {
743 CARD8 repType; /* X_Reply */
744 CARD8 RepType; /* always X_GetFeedbackControl */
745 CARD16 sequenceNumber B16;
746 CARD32 length B32;
747 CARD16 num_feedbacks B16;
748 CARD16 pad01 B16;
749 CARD32 pad02 B32;
750 CARD32 pad03 B32;
751 CARD32 pad04 B32;
752 CARD32 pad05 B32;
753 CARD32 pad06 B32;
754 } xGetFeedbackControlReply;
755
756 typedef struct {
757 #if defined(__cplusplus) || defined(c_plusplus)
758 CARD8 c_class; /* feedback class */
759 #else
760 CARD8 class; /* feedback class */
761 #endif
762 CARD8 id; /* feedback id */
763 CARD16 length B16; /* feedback length */
764 } xFeedbackState;
765
766 typedef struct {
767 #if defined(__cplusplus) || defined(c_plusplus)
768 CARD8 c_class;
769 #else
770 CARD8 class;
771 #endif
772 CARD8 id;
773 CARD16 length B16;
774 CARD16 pitch B16;
775 CARD16 duration B16;
776 CARD32 led_mask B32;
777 CARD32 led_values B32;
778 BOOL global_auto_repeat;
779 CARD8 click;
780 CARD8 percent;
781 BYTE pad;
782 BYTE auto_repeats[32];
783 } xKbdFeedbackState;
784
785 typedef struct {
786 #if defined(__cplusplus) || defined(c_plusplus)
787 CARD8 c_class;
788 #else
789 CARD8 class;
790 #endif
791 CARD8 id;
792 CARD16 length B16;
793 CARD8 pad1,pad2;
794 CARD16 accelNum B16;
795 CARD16 accelDenom B16;
796 CARD16 threshold B16;
797 } xPtrFeedbackState;
798
799 typedef struct {
800 #if defined(__cplusplus) || defined(c_plusplus)
801 CARD8 c_class; /* feedback class id */
802 #else
803 CARD8 class; /* feedback class id */
804 #endif
805 CARD8 id;
806 CARD16 length B16; /* feedback length */
807 CARD32 resolution B32;
808 INT32 min_value B32;
809 INT32 max_value B32;
810 } xIntegerFeedbackState;
811
812 typedef struct {
813 #if defined(__cplusplus) || defined(c_plusplus)
814 CARD8 c_class; /* feedback class id */
815 #else
816 CARD8 class; /* feedback class id */
817 #endif
818 CARD8 id;
819 CARD16 length B16; /* feedback length */
820 CARD16 max_symbols B16;
821 CARD16 num_syms_supported B16;
822 } xStringFeedbackState;
823
824 typedef struct {
825 #if defined(__cplusplus) || defined(c_plusplus)
826 CARD8 c_class; /* feedback class id */
827 #else
828 CARD8 class; /* feedback class id */
829 #endif
830 CARD8 id;
831 CARD16 length B16; /* feedback length */
832 CARD8 percent;
833 BYTE pad1, pad2, pad3;
834 CARD16 pitch B16;
835 CARD16 duration B16;
836 } xBellFeedbackState;
837
838 typedef struct {
839 #if defined(__cplusplus) || defined(c_plusplus)
840 CARD8 c_class; /* feedback class id */
841 #else
842 CARD8 class; /* feedback class id */
843 #endif
844 CARD8 id;
845 CARD16 length B16; /* feedback length */
846 CARD32 led_mask B32;
847 CARD32 led_values B32;
848 } xLedFeedbackState;
849
850 /*********************************************************
851 *
852 * ChangeFeedbackControl.
853 *
854 */
855
856 typedef struct {
857 CARD8 reqType; /* input extension major code */
858 CARD8 ReqType; /* X_ChangeFeedbackControl */
859 CARD16 length B16;
860 CARD32 mask B32;
861 CARD8 deviceid;
862 CARD8 feedbackid;
863 BYTE pad1, pad2;
864 } xChangeFeedbackControlReq;
865
866 typedef struct {
867 #if defined(__cplusplus) || defined(c_plusplus)
868 CARD8 c_class; /* feedback class id */
869 #else
870 CARD8 class; /* feedback class id */
871 #endif
872 CARD8 id; /* feedback id */
873 CARD16 length B16; /* feedback length */
874 } xFeedbackCtl;
875
876 typedef struct {
877 #if defined(__cplusplus) || defined(c_plusplus)
878 CARD8 c_class; /* feedback class id */
879 #else
880 CARD8 class; /* feedback class id */
881 #endif
882 CARD8 id; /* feedback length */
883 CARD16 length B16; /* feedback length */
884 KeyCode key;
885 CARD8 auto_repeat_mode;
886 INT8 click;
887 INT8 percent;
888 INT16 pitch B16;
889 INT16 duration B16;
890 CARD32 led_mask B32;
891 CARD32 led_values B32;
892 } xKbdFeedbackCtl;
893
894 typedef struct {
895 #if defined(__cplusplus) || defined(c_plusplus)
896 CARD8 c_class; /* feedback class id */
897 #else
898 CARD8 class; /* feedback class id */
899 #endif
900 CARD8 id; /* feedback id */
901 CARD16 length B16; /* feedback length */
902 CARD8 pad1,pad2;
903 INT16 num B16;
904 INT16 denom B16;
905 INT16 thresh B16;
906 } xPtrFeedbackCtl;
907
908 typedef struct {
909 #if defined(__cplusplus) || defined(c_plusplus)
910 CARD8 c_class; /* feedback class id */
911 #else
912 CARD8 class; /* feedback class id */
913 #endif
914 CARD8 id; /* feedback id */
915 CARD16 length B16; /* feedback length */
916 INT32 int_to_display B32;
917 } xIntegerFeedbackCtl;
918
919 typedef struct {
920 #if defined(__cplusplus) || defined(c_plusplus)
921 CARD8 c_class; /* feedback class id */
922 #else
923 CARD8 class; /* feedback class id */
924 #endif
925 CARD8 id; /* feedback id */
926 CARD16 length B16; /* feedback length */
927 CARD8 pad1,pad2;
928 CARD16 num_keysyms B16;
929 } xStringFeedbackCtl;
930
931 typedef struct {
932 #if defined(__cplusplus) || defined(c_plusplus)
933 CARD8 c_class; /* feedback class id */
934 #else
935 CARD8 class; /* feedback class id */
936 #endif
937 CARD8 id; /* feedback id */
938 CARD16 length B16; /* feedback length */
939 INT8 percent;
940 BYTE pad1, pad2, pad3;
941 INT16 pitch B16;
942 INT16 duration B16;
943 } xBellFeedbackCtl;
944
945 typedef struct {
946 #if defined(__cplusplus) || defined(c_plusplus)
947 CARD8 c_class; /* feedback class id */
948 #else
949 CARD8 class; /* feedback class id */
950 #endif
951 CARD8 id; /* feedback id */
952 CARD16 length B16; /* feedback length */
953 CARD32 led_mask B32;
954 CARD32 led_values B32;
955 } xLedFeedbackCtl;
956
957 /*********************************************************
958 *
959 * GetDeviceKeyMapping.
960 *
961 */
962
963 typedef struct {
964 CARD8 reqType; /* input extension major code */
965 CARD8 ReqType; /* always X_GetDeviceKeyMapping */
966 CARD16 length B16;
967 CARD8 deviceid;
968 KeyCode firstKeyCode;
969 CARD8 count;
970 BYTE pad1;
971 } xGetDeviceKeyMappingReq;
972
973 typedef struct {
974 CARD8 repType; /* X_Reply */
975 CARD8 RepType; /* always X_GetDeviceKeyMapping */
976 CARD16 sequenceNumber B16;
977 CARD32 length B32;
978 CARD8 keySymsPerKeyCode;
979 CARD8 pad0;
980 CARD16 pad1 B16;
981 CARD32 pad2 B32;
982 CARD32 pad3 B32;
983 CARD32 pad4 B32;
984 CARD32 pad5 B32;
985 CARD32 pad6 B32;
986 } xGetDeviceKeyMappingReply;
987
988 /*********************************************************
989 *
990 * ChangeDeviceKeyMapping.
991 *
992 */
993
994 typedef struct {
995 CARD8 reqType; /* input extension major code */
996 CARD8 ReqType; /* always X_ChangeDeviceKeyMapping */
997 CARD16 length B16;
998 CARD8 deviceid;
999 KeyCode firstKeyCode;
1000 CARD8 keySymsPerKeyCode;
1001 CARD8 keyCodes;
1002 } xChangeDeviceKeyMappingReq;
1003
1004 /*********************************************************
1005 *
1006 * GetDeviceModifierMapping.
1007 *
1008 */
1009
1010 typedef struct {
1011 CARD8 reqType; /* input extension major code */
1012 CARD8 ReqType; /* always X_GetDeviceModifierMapping */
1013 CARD16 length B16;
1014 CARD8 deviceid;
1015 BYTE pad1, pad2, pad3;
1016 } xGetDeviceModifierMappingReq;
1017
1018 typedef struct {
1019 CARD8 repType; /* X_Reply */
1020 CARD8 RepType; /* always X_GetDeviceModifierMapping */
1021 CARD16 sequenceNumber B16;
1022 CARD32 length B32;
1023 CARD8 numKeyPerModifier;
1024 CARD8 pad0;
1025 CARD16 pad1 B16;
1026 CARD32 pad2 B32;
1027 CARD32 pad3 B32;
1028 CARD32 pad4 B32;
1029 CARD32 pad5 B32;
1030 CARD32 pad6 B32;
1031 } xGetDeviceModifierMappingReply;
1032
1033 /*********************************************************
1034 *
1035 * SetDeviceModifierMapping.
1036 *
1037 */
1038
1039 typedef struct {
1040 CARD8 reqType; /* input extension major code */
1041 CARD8 ReqType; /* always X_SetDeviceModifierMapping */
1042 CARD16 length B16;
1043 CARD8 deviceid;
1044 CARD8 numKeyPerModifier;
1045 CARD16 pad1 B16;
1046 } xSetDeviceModifierMappingReq;
1047
1048 typedef struct {
1049 CARD8 repType; /* X_Reply */
1050 CARD8 RepType; /* always X_SetDeviceModifierMapping */
1051 CARD16 sequenceNumber B16;
1052 CARD32 length B32;
1053 CARD8 success;
1054 CARD8 pad0;
1055 CARD16 pad1 B16;
1056 CARD32 pad2 B32;
1057 CARD32 pad3 B32;
1058 CARD32 pad4 B32;
1059 CARD32 pad5 B32;
1060 CARD32 pad6 B32;
1061 } xSetDeviceModifierMappingReply;
1062
1063 /*********************************************************
1064 *
1065 * GetDeviceButtonMapping.
1066 *
1067 */
1068
1069 typedef struct {
1070 CARD8 reqType; /* input extension major code */
1071 CARD8 ReqType; /* X_GetDeviceButtonMapping */
1072 CARD16 length B16;
1073 CARD8 deviceid;
1074 BYTE pad1, pad2, pad3;
1075 } xGetDeviceButtonMappingReq;
1076
1077 typedef struct {
1078 CARD8 repType; /* X_Reply */
1079 CARD8 RepType; /* always X_GetDeviceButtonMapping */
1080 CARD16 sequenceNumber B16;
1081 CARD32 length B32;
1082 CARD8 nElts;
1083 BYTE pad1, pad2, pad3;
1084 CARD32 pad01 B32;
1085 CARD32 pad02 B32;
1086 CARD32 pad03 B32;
1087 CARD32 pad04 B32;
1088 CARD32 pad05 B32;
1089 } xGetDeviceButtonMappingReply;
1090
1091 /*********************************************************
1092 *
1093 * SetDeviceButtonMapping.
1094 *
1095 */
1096
1097 typedef struct {
1098 CARD8 reqType; /* input extension major code */
1099 CARD8 ReqType; /* X_SetDeviceButtonMapping */
1100 CARD16 length B16;
1101 CARD8 deviceid;
1102 CARD8 map_length;
1103 BYTE pad1, pad2;
1104 } xSetDeviceButtonMappingReq;
1105
1106 typedef struct {
1107 CARD8 repType; /* X_Reply */
1108 CARD8 RepType; /* always X_SetDeviceButtonMapping */
1109 CARD16 sequenceNumber B16;
1110 CARD32 length B32;
1111 CARD8 status;
1112 BYTE pad0;
1113 CARD16 pad1 B16;
1114 CARD32 pad2 B32;
1115 CARD32 pad3 B32;
1116 CARD32 pad4 B32;
1117 CARD32 pad5 B32;
1118 CARD32 pad6 B32;
1119 } xSetDeviceButtonMappingReply;
1120
1121 /*********************************************************
1122 *
1123 * QueryDeviceState.
1124 *
1125 */
1126
1127 typedef struct {
1128 CARD8 reqType;
1129 CARD8 ReqType; /* always X_QueryDeviceState */
1130 CARD16 length B16;
1131 CARD8 deviceid;
1132 BYTE pad1, pad2, pad3;
1133 } xQueryDeviceStateReq;
1134
1135 typedef struct {
1136 CARD8 repType; /* X_Reply */
1137 CARD8 RepType; /* always X_QueryDeviceState */
1138 CARD16 sequenceNumber B16;
1139 CARD32 length B32;
1140 CARD8 num_classes;
1141 BYTE pad0;
1142 CARD16 pad1 B16;
1143 CARD32 pad2 B32;
1144 CARD32 pad3 B32;
1145 CARD32 pad4 B32;
1146 CARD32 pad5 B32;
1147 CARD32 pad6 B32;
1148 } xQueryDeviceStateReply;
1149
1150 typedef struct {
1151 #if defined(__cplusplus) || defined(c_plusplus)
1152 CARD8 c_class;
1153 #else
1154 CARD8 class;
1155 #endif
1156 CARD8 length;
1157 CARD8 num_keys;
1158 BYTE pad1;
1159 CARD8 keys[32];
1160 } xKeyState;
1161
1162 typedef struct {
1163 #if defined(__cplusplus) || defined(c_plusplus)
1164 CARD8 c_class;
1165 #else
1166 CARD8 class;
1167 #endif
1168 CARD8 length;
1169 CARD8 num_buttons;
1170 BYTE pad1;
1171 CARD8 buttons[32];
1172 } xButtonState;
1173
1174 typedef struct {
1175 #if defined(__cplusplus) || defined(c_plusplus)
1176 CARD8 c_class;
1177 #else
1178 CARD8 class;
1179 #endif
1180 CARD8 length;
1181 CARD8 num_valuators;
1182 CARD8 mode;
1183 } xValuatorState;
1184
1185 /*********************************************************
1186 *
1187 * SendExtensionEvent.
1188 * THIS REQUEST MUST BE KEPT A MULTIPLE OF 8 BYTES IN LENGTH!
1189 * MORE EVENTS MAY FOLLOW AND THEY MUST BE QUAD-ALIGNED!
1190 *
1191 */
1192
1193 typedef struct {
1194 CARD8 reqType;
1195 CARD8 ReqType; /* always X_SendExtensionEvent */
1196 CARD16 length B16;
1197 Window destination B32;
1198 CARD8 deviceid;
1199 BOOL propagate;
1200 CARD16 count B16;
1201 CARD8 num_events;
1202 BYTE pad1,pad2,pad3;
1203 } xSendExtensionEventReq;
1204
1205 /*********************************************************
1206 *
1207 * DeviceBell.
1208 *
1209 */
1210
1211 typedef struct {
1212 CARD8 reqType;
1213 CARD8 ReqType; /* always X_DeviceBell */
1214 CARD16 length B16;
1215 CARD8 deviceid;
1216 CARD8 feedbackid;
1217 CARD8 feedbackclass;
1218 INT8 percent;
1219 } xDeviceBellReq;
1220
1221 /*********************************************************
1222 *
1223 * SetDeviceValuators.
1224 *
1225 */
1226
1227 typedef struct {
1228 CARD8 reqType; /* input extension major code */
1229 CARD8 ReqType; /* always X_SetDeviceValuators */
1230 CARD16 length B16;
1231 CARD8 deviceid;
1232 CARD8 first_valuator;
1233 CARD8 num_valuators;
1234 BYTE pad1;
1235 } xSetDeviceValuatorsReq;
1236
1237 typedef struct {
1238 CARD8 repType; /* X_Reply */
1239 CARD8 RepType; /* always X_SetDeviceValuators */
1240 CARD16 sequenceNumber B16;
1241 CARD32 length B32;
1242 CARD8 status;
1243 BYTE pad1, pad2, pad3;
1244 CARD32 pad01 B32;
1245 CARD32 pad02 B32;
1246 CARD32 pad03 B32;
1247 CARD32 pad04 B32;
1248 CARD32 pad05 B32;
1249 } xSetDeviceValuatorsReply;
1250
1251 /*********************************************************
1252 *
1253 * GetDeviceControl.
1254 *
1255 */
1256
1257 typedef struct {
1258 CARD8 reqType; /* input extension major code */
1259 CARD8 ReqType; /* always X_GetDeviceControl */
1260 CARD16 length B16;
1261 CARD16 control B16;
1262 CARD8 deviceid;
1263 BYTE pad2;
1264 } xGetDeviceControlReq;
1265
1266 typedef struct {
1267 CARD8 repType; /* X_Reply */
1268 CARD8 RepType; /* always X_GetDeviceControl */
1269 CARD16 sequenceNumber B16;
1270 CARD32 length B32;
1271 CARD8 status;
1272 BYTE pad1, pad2, pad3;
1273 CARD32 pad01 B32;
1274 CARD32 pad02 B32;
1275 CARD32 pad03 B32;
1276 CARD32 pad04 B32;
1277 CARD32 pad05 B32;
1278 } xGetDeviceControlReply;
1279
1280 typedef struct {
1281 CARD16 control B16; /* control type */
1282 CARD16 length B16; /* control length */
1283 } xDeviceState;
1284
1285 typedef struct {
1286 CARD16 control B16; /* control type */
1287 CARD16 length B16; /* control length */
1288 CARD32 num_valuators B32; /* number of valuators */
1289 } xDeviceResolutionState;
1290
1291 /*********************************************************
1292 *
1293 * ChangeDeviceControl.
1294 *
1295 */
1296
1297 typedef struct {
1298 CARD8 reqType; /* input extension major code */
1299 CARD8 ReqType; /* always X_ChangeDeviceControl */
1300 CARD16 length B16;
1301 CARD16 control B16;
1302 CARD8 deviceid;
1303 BYTE pad0;
1304 } xChangeDeviceControlReq;
1305
1306 typedef struct {
1307 CARD8 repType; /* X_Reply */
1308 CARD8 RepType; /* always X_ChangeDeviceControl */
1309 CARD16 sequenceNumber B16;
1310 CARD32 length B32;
1311 CARD8 status;
1312 BYTE pad1, pad2, pad3;
1313 CARD32 pad01 B32;
1314 CARD32 pad02 B32;
1315 CARD32 pad03 B32;
1316 CARD32 pad04 B32;
1317 CARD32 pad05 B32;
1318 } xChangeDeviceControlReply;
1319
1320 typedef struct {
1321 CARD16 control B16; /* control type */
1322 CARD16 length B16; /* control length */
1323 } xDeviceCtl;
1324
1325 typedef struct {
1326 CARD16 control B16; /* control type */
1327 CARD16 length B16; /* control length */
1328 CARD8 first_valuator; /* first valuator to change */
1329 CARD8 num_valuators; /* number of valuators to change*/
1330 CARD8 pad1,pad2;
1331 } xDeviceResolutionCtl;
1332
1333
1334 /* Merged from Metrolink tree for XINPUT stuff */
1335
1336 typedef struct {
1337 CARD16 control;
1338 CARD16 length;
1339 CARD32 min_x;
1340 CARD32 max_x;
1341 CARD32 min_y;
1342 CARD32 max_y;
1343 CARD32 button_threshold;
1344 } xDeviceTSCalibrationCtl;
1345
1346 /* End of merged section */
1347
1348
1349 /**********************************************************
1350 *
1351 * Input extension events.
1352 *
1353 * DeviceValuator
1354 *
1355 */
1356
1357 typedef struct
1358 {
1359 BYTE type;
1360 CARD8 deviceid;
1361 CARD16 sequenceNumber B16;
1362 KeyButMask device_state B16;
1363 CARD8 num_valuators;
1364 CARD8 first_valuator;
1365 INT32 valuator0 B32;
1366 INT32 valuator1 B32;
1367 INT32 valuator2 B32;
1368 INT32 valuator3 B32;
1369 INT32 valuator4 B32;
1370 INT32 valuator5 B32;
1371 } deviceValuator;
1372
1373 /**********************************************************
1374 *
1375 * DeviceKeyButtonPointer.
1376 *
1377 * Used for: DeviceKeyPress, DeviceKeyRelease,
1378 * DeviceButtonPress, DeviceButtonRelease,
1379 * ProximityIn, ProximityOut
1380 * DeviceMotionNotify,
1381 *
1382 */
1383
1384 typedef struct
1385 {
1386 BYTE type;
1387 BYTE detail;
1388 CARD16 sequenceNumber B16;
1389 Time time B32;
1390 Window root B32;
1391 Window event B32;
1392 Window child B32;
1393 INT16 root_x B16;
1394 INT16 root_y B16;
1395 INT16 event_x B16;
1396 INT16 event_y B16;
1397 KeyButMask state B16;
1398 BOOL same_screen;
1399 CARD8 deviceid;
1400 } deviceKeyButtonPointer;
1401
1402 /**********************************************************
1403 *
1404 * DeviceFocus.
1405 *
1406 */
1407
1408 typedef struct
1409 {
1410 BYTE type;
1411 BYTE detail;
1412 CARD16 sequenceNumber B16;
1413 Time time B32;
1414 Window window B32;
1415 BYTE mode;
1416 CARD8 deviceid;
1417 BYTE pad1, pad2;
1418 CARD32 pad00 B32;
1419 CARD32 pad01 B32;
1420 CARD32 pad02 B32;
1421 CARD32 pad03 B32;
1422 } deviceFocus;
1423
1424 /**********************************************************
1425 *
1426 * DeviceStateNotify.
1427 *
1428 * Note that the two high-order bits in the classes_reported
1429 * field are the proximity state (InProximity or OutOfProximity),
1430 * and the device mode (Absolute or Relative), respectively.
1431 *
1432 */
1433
1434 typedef struct
1435 {
1436 BYTE type;
1437 BYTE deviceid;
1438 CARD16 sequenceNumber B16;
1439 Time time B32;
1440 CARD8 num_keys;
1441 CARD8 num_buttons;
1442 CARD8 num_valuators;
1443 CARD8 classes_reported;
1444 CARD8 buttons[4];
1445 CARD8 keys[4];
1446 INT32 valuator0 B32;
1447 INT32 valuator1 B32;
1448 INT32 valuator2 B32;
1449 } deviceStateNotify;
1450
1451 /**********************************************************
1452 *
1453 * DeviceKeyStateNotify.
1454 *
1455 */
1456
1457 typedef struct
1458 {
1459 BYTE type;
1460 BYTE deviceid;
1461 CARD16 sequenceNumber B16;
1462 CARD8 keys[28];
1463 } deviceKeyStateNotify;
1464
1465 /**********************************************************
1466 *
1467 * DeviceButtonStateNotify.
1468 *
1469 */
1470
1471 typedef struct
1472 {
1473 BYTE type;
1474 BYTE deviceid;
1475 CARD16 sequenceNumber B16;
1476 CARD8 buttons[28];
1477 } deviceButtonStateNotify;
1478
1479 /**********************************************************
1480 *
1481 * DeviceMappingNotify.
1482 * Fields must be kept in sync with core mappingnotify event.
1483 *
1484 */
1485
1486 typedef struct
1487 {
1488 BYTE type;
1489 BYTE deviceid;
1490 CARD16 sequenceNumber B16;
1491 CARD8 request;
1492 KeyCode firstKeyCode;
1493 CARD8 count;
1494 BYTE pad1;
1495 Time time B32;
1496 CARD32 pad00 B32;
1497 CARD32 pad01 B32;
1498 CARD32 pad02 B32;
1499 CARD32 pad03 B32;
1500 CARD32 pad04 B32;
1501 } deviceMappingNotify;
1502
1503 /**********************************************************
1504 *
1505 * ChangeDeviceNotify.
1506 *
1507 */
1508
1509 typedef struct
1510 {
1511 BYTE type;
1512 BYTE deviceid;
1513 CARD16 sequenceNumber B16;
1514 Time time B32;
1515 CARD8 request;
1516 BYTE pad1, pad2, pad3;
1517 CARD32 pad00 B32;
1518 CARD32 pad01 B32;
1519 CARD32 pad02 B32;
1520 CARD32 pad03 B32;
1521 CARD32 pad04 B32;
1522 } changeDeviceNotify;
1523
1524 #undef Window
1525 #undef Time
1526 #undef KeyCode
1527
1528 #endif