VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/1.6/X11/extensions/XIproto.h@ 19276

Last change on this file since 19276 was 19276, checked in by vboxsync, 16 years ago

x11include: missing header (otherwise the one from the host is used)

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette