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