117ca54c3Smrg/************************************************************
217ca54c3Smrg
317ca54c3SmrgCopyright 1989, 1998  The Open Group
417ca54c3Smrg
517ca54c3SmrgPermission to use, copy, modify, distribute, and sell this software and its
617ca54c3Smrgdocumentation for any purpose is hereby granted without fee, provided that
717ca54c3Smrgthe above copyright notice appear in all copies and that both that
817ca54c3Smrgcopyright notice and this permission notice appear in supporting
917ca54c3Smrgdocumentation.
1017ca54c3Smrg
1117ca54c3SmrgThe above copyright notice and this permission notice shall be included in
1217ca54c3Smrgall copies or substantial portions of the Software.
1317ca54c3Smrg
1417ca54c3SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1517ca54c3SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1617ca54c3SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
1717ca54c3SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
1817ca54c3SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1917ca54c3SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2017ca54c3Smrg
2117ca54c3SmrgExcept as contained in this notice, the name of The Open Group shall not be
2217ca54c3Smrgused in advertising or otherwise to promote the sale, use or other dealings
2317ca54c3Smrgin this Software without prior written authorization from The Open Group.
2417ca54c3Smrg
2517ca54c3SmrgCopyright 1989 by Hewlett-Packard Company, Palo Alto, California.
2617ca54c3Smrg
2717ca54c3Smrg			All Rights Reserved
2817ca54c3Smrg
2917ca54c3SmrgPermission to use, copy, modify, and distribute this software and its
3017ca54c3Smrgdocumentation for any purpose and without fee is hereby granted,
3117ca54c3Smrgprovided that the above copyright notice appear in all copies and that
3217ca54c3Smrgboth that copyright notice and this permission notice appear in
3317ca54c3Smrgsupporting documentation, and that the name of Hewlett-Packard not be
3417ca54c3Smrgused in advertising or publicity pertaining to distribution of the
3517ca54c3Smrgsoftware without specific, written prior permission.
3617ca54c3Smrg
3717ca54c3SmrgHEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
3817ca54c3SmrgALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
3917ca54c3SmrgHEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
4017ca54c3SmrgANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
4117ca54c3SmrgWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
4217ca54c3SmrgARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
4317ca54c3SmrgSOFTWARE.
4417ca54c3Smrg
4517ca54c3Smrg********************************************************/
4617ca54c3Smrg
4717ca54c3Smrg#ifndef _XIPROTO_H
4817ca54c3Smrg#define _XIPROTO_H
4917ca54c3Smrg
5017ca54c3Smrg#include <X11/Xproto.h>
5117ca54c3Smrg#include <X11/X.h>
5217ca54c3Smrg
5317ca54c3Smrg/* make sure types have right sizes for protocol structures. */
5417ca54c3Smrg#define Window CARD32
5517ca54c3Smrg#define Time CARD32
5617ca54c3Smrg#define KeyCode CARD8
5717ca54c3Smrg#define Mask CARD32
5817ca54c3Smrg#define Atom CARD32
5917ca54c3Smrg#define Cursor CARD32
6017ca54c3Smrg
6117ca54c3Smrg/*********************************************************
6217ca54c3Smrg *
6317ca54c3Smrg * number of events, errors, and extension name.
6417ca54c3Smrg *
6517ca54c3Smrg */
6617ca54c3Smrg
6717ca54c3Smrg#define MORE_EVENTS	0x80
6817ca54c3Smrg#define DEVICE_BITS	0x7F
6917ca54c3Smrg
7017ca54c3Smrg#define InputClassBits	0x3F	/* bits in mode field for input classes */
7117ca54c3Smrg#define ModeBitsShift	6	/* amount to shift the remaining bits   */
7217ca54c3Smrg
7317ca54c3Smrg#define numInputClasses 7
7417ca54c3Smrg
7517ca54c3Smrg#define IEVENTS         17       /* does NOT include generic events */
7617ca54c3Smrg#define IERRORS         5
7717ca54c3Smrg#define IREQUESTS       39
7817ca54c3Smrg
7917ca54c3Smrg#define CLIENT_REQ      1
8017ca54c3Smrg
8117ca54c3Smrgtypedef struct  _XExtEventInfo
8217ca54c3Smrg    {
8317ca54c3Smrg    Mask	mask;
8417ca54c3Smrg    BYTE	type;
8517ca54c3Smrg    BYTE	word;
8617ca54c3Smrg    } XExtEventInfo;
8717ca54c3Smrg
8817ca54c3Smrg#ifndef _XITYPEDEF_POINTER
8917ca54c3Smrgtypedef void *Pointer;
9017ca54c3Smrg#endif
9117ca54c3Smrg
9217ca54c3Smrgstruct tmask
9317ca54c3Smrg    {
9417ca54c3Smrg    Mask	mask;
9517ca54c3Smrg    void        *dev;
9617ca54c3Smrg    };
9717ca54c3Smrg
9817ca54c3Smrg/*********************************************************
9917ca54c3Smrg *
10017ca54c3Smrg * Event constants used by library.
10117ca54c3Smrg *
10217ca54c3Smrg */
10317ca54c3Smrg
10417ca54c3Smrg#define XI_DeviceValuator		0
10517ca54c3Smrg#define XI_DeviceKeyPress		1
10617ca54c3Smrg#define XI_DeviceKeyRelease		2
10717ca54c3Smrg#define XI_DeviceButtonPress		3
10817ca54c3Smrg#define XI_DeviceButtonRelease		4
10917ca54c3Smrg#define XI_DeviceMotionNotify		5
11017ca54c3Smrg#define XI_DeviceFocusIn		6
11117ca54c3Smrg#define XI_DeviceFocusOut		7
11217ca54c3Smrg#define XI_ProximityIn			8
11317ca54c3Smrg#define XI_ProximityOut			9
11417ca54c3Smrg#define XI_DeviceStateNotify		10
11517ca54c3Smrg#define XI_DeviceMappingNotify		11
11617ca54c3Smrg#define XI_ChangeDeviceNotify		12
11717ca54c3Smrg#define XI_DeviceKeystateNotify		13
11817ca54c3Smrg#define XI_DeviceButtonstateNotify	14
11917ca54c3Smrg#define XI_DevicePresenceNotify		15
12017ca54c3Smrg#define XI_DevicePropertyNotify         16
12117ca54c3Smrg
12217ca54c3Smrg/*********************************************************
12317ca54c3Smrg *
12417ca54c3Smrg * Protocol request constants
12517ca54c3Smrg *
12617ca54c3Smrg */
12717ca54c3Smrg
12817ca54c3Smrg#define X_GetExtensionVersion		1
12917ca54c3Smrg#define X_ListInputDevices		2
13017ca54c3Smrg#define X_OpenDevice			3
13117ca54c3Smrg#define X_CloseDevice			4
13217ca54c3Smrg#define X_SetDeviceMode			5
13317ca54c3Smrg#define X_SelectExtensionEvent		6
13417ca54c3Smrg#define X_GetSelectedExtensionEvents	7
13517ca54c3Smrg#define X_ChangeDeviceDontPropagateList 8
13617ca54c3Smrg#define X_GetDeviceDontPropagateList	9
13717ca54c3Smrg#define X_GetDeviceMotionEvents		10
13817ca54c3Smrg#define X_ChangeKeyboardDevice		11
13917ca54c3Smrg#define X_ChangePointerDevice		12
14017ca54c3Smrg#define X_GrabDevice			13
14117ca54c3Smrg#define X_UngrabDevice			14
14217ca54c3Smrg#define X_GrabDeviceKey			15
14317ca54c3Smrg#define X_UngrabDeviceKey		16
14417ca54c3Smrg#define X_GrabDeviceButton		17
14517ca54c3Smrg#define X_UngrabDeviceButton		18
14617ca54c3Smrg#define X_AllowDeviceEvents		19
14717ca54c3Smrg#define X_GetDeviceFocus		20
14817ca54c3Smrg#define X_SetDeviceFocus		21
14917ca54c3Smrg#define X_GetFeedbackControl		22
15017ca54c3Smrg#define X_ChangeFeedbackControl		23
15117ca54c3Smrg#define X_GetDeviceKeyMapping		24
15217ca54c3Smrg#define X_ChangeDeviceKeyMapping	25
15317ca54c3Smrg#define X_GetDeviceModifierMapping	26
15417ca54c3Smrg#define X_SetDeviceModifierMapping	27
15517ca54c3Smrg#define X_GetDeviceButtonMapping	28
15617ca54c3Smrg#define X_SetDeviceButtonMapping	29
15717ca54c3Smrg#define X_QueryDeviceState		30
15817ca54c3Smrg#define X_SendExtensionEvent		31
15917ca54c3Smrg#define X_DeviceBell			32
16017ca54c3Smrg#define X_SetDeviceValuators		33
16117ca54c3Smrg#define X_GetDeviceControl		34
16217ca54c3Smrg#define X_ChangeDeviceControl		35
16317ca54c3Smrg/* XI 1.5 */
16417ca54c3Smrg#define X_ListDeviceProperties          36
16517ca54c3Smrg#define X_ChangeDeviceProperty          37
16617ca54c3Smrg#define X_DeleteDeviceProperty          38
16717ca54c3Smrg#define X_GetDeviceProperty             39
16817ca54c3Smrg
16917ca54c3Smrg/*********************************************************
17017ca54c3Smrg *
17117ca54c3Smrg * Protocol request and reply structures.
17217ca54c3Smrg *
17317ca54c3Smrg * GetExtensionVersion.
17417ca54c3Smrg *
17517ca54c3Smrg */
17617ca54c3Smrg
17717ca54c3Smrgtypedef struct {
17817ca54c3Smrg    CARD8	reqType;       /* input extension major code   */
17917ca54c3Smrg    CARD8	ReqType;       /* always X_GetExtensionVersion */
180ea1d6981Smrg    CARD16	length;
181ea1d6981Smrg    CARD16	nbytes;
18217ca54c3Smrg    CARD8	pad1, pad2;
18317ca54c3Smrg} xGetExtensionVersionReq;
18417ca54c3Smrg
18517ca54c3Smrgtypedef struct {
18617ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
18717ca54c3Smrg    CARD8	RepType;	/* always X_GetExtensionVersion */
188ea1d6981Smrg    CARD16	sequenceNumber;
189ea1d6981Smrg    CARD32	length;
190ea1d6981Smrg    CARD16	major_version;
191ea1d6981Smrg    CARD16	minor_version;
19217ca54c3Smrg    BOOL	present;
19317ca54c3Smrg    CARD8	pad1, pad2, pad3;
194ea1d6981Smrg    CARD32	pad01;
195ea1d6981Smrg    CARD32	pad02;
196ea1d6981Smrg    CARD32	pad03;
197ea1d6981Smrg    CARD32	pad04;
19817ca54c3Smrg} xGetExtensionVersionReply;
19917ca54c3Smrg
20017ca54c3Smrg/*********************************************************
20117ca54c3Smrg *
20217ca54c3Smrg * ListInputDevices.
20317ca54c3Smrg *
20417ca54c3Smrg */
20517ca54c3Smrg
20617ca54c3Smrgtypedef struct {
20717ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
20817ca54c3Smrg    CARD8	ReqType;	/* always X_ListInputDevices	*/
209ea1d6981Smrg    CARD16	length;
21017ca54c3Smrg} xListInputDevicesReq;
21117ca54c3Smrg
21217ca54c3Smrgtypedef struct {
21317ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
21417ca54c3Smrg    CARD8	RepType;        /* always X_ListInputDevices	*/
215ea1d6981Smrg    CARD16	sequenceNumber;
216ea1d6981Smrg    CARD32	length;
21717ca54c3Smrg    CARD8	ndevices;
21817ca54c3Smrg    CARD8	pad1, pad2, pad3;
219ea1d6981Smrg    CARD32	pad01;
220ea1d6981Smrg    CARD32	pad02;
221ea1d6981Smrg    CARD32	pad03;
222ea1d6981Smrg    CARD32	pad04;
223ea1d6981Smrg    CARD32	pad05;
22417ca54c3Smrg} xListInputDevicesReply;
22517ca54c3Smrg
22617ca54c3Smrgtypedef struct _xDeviceInfo *xDeviceInfoPtr;
22717ca54c3Smrg
22817ca54c3Smrgtypedef struct _xAnyClassinfo *xAnyClassPtr;
22917ca54c3Smrg
23017ca54c3Smrgtypedef struct _xAnyClassinfo {
23117ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
23217ca54c3Smrg    CARD8	c_class;
23317ca54c3Smrg#else
23417ca54c3Smrg    CARD8	class;
23517ca54c3Smrg#endif
23617ca54c3Smrg    CARD8	length;
23717ca54c3Smrg    } xAnyClassInfo;
23817ca54c3Smrg
23917ca54c3Smrgtypedef struct _xDeviceInfo {
240ea1d6981Smrg    CARD32	type;
24117ca54c3Smrg    CARD8	id;
24217ca54c3Smrg    CARD8	num_classes;
24317ca54c3Smrg    CARD8	use;      /* IsXPointer | IsXKeyboard | IsXExtension... */
24417ca54c3Smrg    CARD8	attached; /* id of master dev (if IsXExtension..) */
24517ca54c3Smrg    } xDeviceInfo;
24617ca54c3Smrg
24717ca54c3Smrgtypedef struct _xKeyInfo *xKeyInfoPtr;
24817ca54c3Smrg
24917ca54c3Smrgtypedef struct _xKeyInfo {
25017ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
25117ca54c3Smrg    CARD8	c_class;
25217ca54c3Smrg#else
25317ca54c3Smrg    CARD8	class;
25417ca54c3Smrg#endif
25517ca54c3Smrg    CARD8	length;
25617ca54c3Smrg    KeyCode	min_keycode;
25717ca54c3Smrg    KeyCode	max_keycode;
258ea1d6981Smrg    CARD16	num_keys;
25917ca54c3Smrg    CARD8	pad1,pad2;
26017ca54c3Smrg    } xKeyInfo;
26117ca54c3Smrg
26217ca54c3Smrgtypedef struct _xButtonInfo *xButtonInfoPtr;
26317ca54c3Smrg
26417ca54c3Smrgtypedef struct _xButtonInfo {
26517ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
26617ca54c3Smrg    CARD8	c_class;
26717ca54c3Smrg#else
26817ca54c3Smrg    CARD8	class;
26917ca54c3Smrg#endif
27017ca54c3Smrg    CARD8	length;
271ea1d6981Smrg    CARD16	num_buttons;
27217ca54c3Smrg    } xButtonInfo;
27317ca54c3Smrg
27417ca54c3Smrgtypedef struct _xValuatorInfo *xValuatorInfoPtr;
27517ca54c3Smrg
27617ca54c3Smrgtypedef struct _xValuatorInfo {
27717ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
27817ca54c3Smrg    CARD8	c_class;
27917ca54c3Smrg#else
28017ca54c3Smrg    CARD8	class;
28117ca54c3Smrg#endif
28217ca54c3Smrg    CARD8	length;
28317ca54c3Smrg    CARD8	num_axes;
28417ca54c3Smrg    CARD8	mode;
285ea1d6981Smrg    CARD32	motion_buffer_size;
28617ca54c3Smrg    } xValuatorInfo;
28717ca54c3Smrg
28817ca54c3Smrgtypedef struct _xAxisInfo *xAxisInfoPtr;
28917ca54c3Smrg
29017ca54c3Smrgtypedef struct _xAxisInfo {
291ea1d6981Smrg    CARD32	resolution;
292ea1d6981Smrg    CARD32	min_value;
293ea1d6981Smrg    CARD32	max_value;
29417ca54c3Smrg    } xAxisInfo;
29517ca54c3Smrg
29617ca54c3Smrg/*********************************************************
29717ca54c3Smrg *
29817ca54c3Smrg * OpenDevice.
29917ca54c3Smrg *
30017ca54c3Smrg */
30117ca54c3Smrg
30217ca54c3Smrgtypedef struct {
30317ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
30417ca54c3Smrg    CARD8	ReqType;        /* always X_OpenDevice		*/
305ea1d6981Smrg    CARD16	length;
30617ca54c3Smrg    CARD8       deviceid;
30717ca54c3Smrg    BYTE	pad1, pad2, pad3;
30817ca54c3Smrg} xOpenDeviceReq;
30917ca54c3Smrg
31017ca54c3Smrgtypedef struct {
31117ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
31217ca54c3Smrg    CARD8	RepType;	/* always X_OpenDevice		*/
313ea1d6981Smrg    CARD16	sequenceNumber;
314ea1d6981Smrg    CARD32	length;
31517ca54c3Smrg    CARD8	num_classes;
31617ca54c3Smrg    BYTE	pad1, pad2, pad3;
317ea1d6981Smrg    CARD32	pad00;
318ea1d6981Smrg    CARD32	pad01;
319ea1d6981Smrg    CARD32	pad02;
320ea1d6981Smrg    CARD32	pad03;
321ea1d6981Smrg    CARD32	pad04;
32217ca54c3Smrg    } xOpenDeviceReply;
32317ca54c3Smrg
32417ca54c3Smrgtypedef struct {
32517ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
32617ca54c3Smrg    CARD8	c_class;
32717ca54c3Smrg#else
32817ca54c3Smrg    CARD8	class;
32917ca54c3Smrg#endif
33017ca54c3Smrg    CARD8	event_type_base;
33117ca54c3Smrg    } xInputClassInfo;
33217ca54c3Smrg
33317ca54c3Smrg/*********************************************************
33417ca54c3Smrg *
33517ca54c3Smrg * CloseDevice.
33617ca54c3Smrg *
33717ca54c3Smrg */
33817ca54c3Smrg
33917ca54c3Smrgtypedef struct {
34017ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
34117ca54c3Smrg    CARD8	ReqType;        /* always X_CloseDevice	*/
342ea1d6981Smrg    CARD16	length;
34317ca54c3Smrg    CARD8       deviceid;
34417ca54c3Smrg    BYTE	pad1, pad2, pad3;
34517ca54c3Smrg} xCloseDeviceReq;
34617ca54c3Smrg
34717ca54c3Smrg/*********************************************************
34817ca54c3Smrg *
34917ca54c3Smrg * SetDeviceMode.
35017ca54c3Smrg *
35117ca54c3Smrg */
35217ca54c3Smrg
35317ca54c3Smrgtypedef struct {
35417ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
35517ca54c3Smrg    CARD8	ReqType;	/* always X_SetDeviceMode	*/
356ea1d6981Smrg    CARD16	length;
35717ca54c3Smrg    CARD8       deviceid;
35817ca54c3Smrg    CARD8       mode;
35917ca54c3Smrg    BYTE	pad1, pad2;
36017ca54c3Smrg} xSetDeviceModeReq;
36117ca54c3Smrg
36217ca54c3Smrgtypedef struct {
36317ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
36417ca54c3Smrg    CARD8	RepType;	/* always X_SetDeviceMode	*/
365ea1d6981Smrg    CARD16	sequenceNumber;
366ea1d6981Smrg    CARD32	length;
36717ca54c3Smrg    CARD8	status;
36817ca54c3Smrg    BYTE	pad1, pad2, pad3;
369ea1d6981Smrg    CARD32	pad01;
370ea1d6981Smrg    CARD32	pad02;
371ea1d6981Smrg    CARD32	pad03;
372ea1d6981Smrg    CARD32	pad04;
373ea1d6981Smrg    CARD32	pad05;
37417ca54c3Smrg} xSetDeviceModeReply;
37517ca54c3Smrg
37617ca54c3Smrg/*********************************************************
37717ca54c3Smrg *
37817ca54c3Smrg * SelectExtensionEvent.
37917ca54c3Smrg *
38017ca54c3Smrg */
38117ca54c3Smrg
38217ca54c3Smrgtypedef struct {
38317ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
38417ca54c3Smrg    CARD8	ReqType;        /* always X_SelectExtensionEvent */
385ea1d6981Smrg    CARD16	length;
386ea1d6981Smrg    Window	window;
387ea1d6981Smrg    CARD16	count;
388ea1d6981Smrg    CARD16	pad00;
38917ca54c3Smrg} xSelectExtensionEventReq;
39017ca54c3Smrg
39117ca54c3Smrg/*********************************************************
39217ca54c3Smrg *
39317ca54c3Smrg * GetSelectedExtensionEvent.
39417ca54c3Smrg *
39517ca54c3Smrg */
39617ca54c3Smrg
39717ca54c3Smrgtypedef struct {
39817ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
39917ca54c3Smrg    CARD8	ReqType;        /* X_GetSelectedExtensionEvents */
400ea1d6981Smrg    CARD16	length;
401ea1d6981Smrg    Window	window;
40217ca54c3Smrg} xGetSelectedExtensionEventsReq;
40317ca54c3Smrg
40417ca54c3Smrgtypedef struct {
40517ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
40617ca54c3Smrg    CARD8	RepType;	/* GetSelectedExtensionEvents	*/
407ea1d6981Smrg    CARD16	sequenceNumber;
408ea1d6981Smrg    CARD32	length;
409ea1d6981Smrg    CARD16	this_client_count;
410ea1d6981Smrg    CARD16	all_clients_count;
411ea1d6981Smrg    CARD32	pad01;
412ea1d6981Smrg    CARD32	pad02;
413ea1d6981Smrg    CARD32	pad03;
414ea1d6981Smrg    CARD32	pad04;
415ea1d6981Smrg    CARD32	pad05;
41617ca54c3Smrg} xGetSelectedExtensionEventsReply;
41717ca54c3Smrg
41817ca54c3Smrg/*********************************************************
41917ca54c3Smrg *
42017ca54c3Smrg * ChangeDeviceDontPropagateList.
42117ca54c3Smrg *
42217ca54c3Smrg */
42317ca54c3Smrg
42417ca54c3Smrgtypedef struct {
42517ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
42617ca54c3Smrg    CARD8	ReqType;        /* X_ChangeDeviceDontPropagateList */
427ea1d6981Smrg    CARD16	length;
428ea1d6981Smrg    Window	window;
429ea1d6981Smrg    CARD16	count;
43017ca54c3Smrg    CARD8	mode;
43117ca54c3Smrg    BYTE	pad;
43217ca54c3Smrg} xChangeDeviceDontPropagateListReq;
43317ca54c3Smrg
43417ca54c3Smrg/*********************************************************
43517ca54c3Smrg *
43617ca54c3Smrg * GetDeviceDontPropagateList.
43717ca54c3Smrg *
43817ca54c3Smrg */
43917ca54c3Smrg
44017ca54c3Smrgtypedef struct {
44117ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
44217ca54c3Smrg    CARD8	ReqType;        /* X_GetDeviceDontPropagateList */
443ea1d6981Smrg    CARD16	length;
444ea1d6981Smrg    Window	window;
44517ca54c3Smrg} xGetDeviceDontPropagateListReq;
44617ca54c3Smrg
44717ca54c3Smrgtypedef struct {
44817ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
44917ca54c3Smrg    CARD8	RepType;        /* GetDeviceDontPropagateList   */
450ea1d6981Smrg    CARD16	sequenceNumber;
451ea1d6981Smrg    CARD32	length;
452ea1d6981Smrg    CARD16	count;
453ea1d6981Smrg    CARD16	pad00;
454ea1d6981Smrg    CARD32	pad01;
455ea1d6981Smrg    CARD32	pad02;
456ea1d6981Smrg    CARD32	pad03;
457ea1d6981Smrg    CARD32	pad04;
458ea1d6981Smrg    CARD32	pad05;
45917ca54c3Smrg    } xGetDeviceDontPropagateListReply;
46017ca54c3Smrg
46117ca54c3Smrg/*********************************************************
46217ca54c3Smrg *
46317ca54c3Smrg * GetDeviceMotionEvents.
46417ca54c3Smrg *
46517ca54c3Smrg */
46617ca54c3Smrg
46717ca54c3Smrgtypedef struct {
46817ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
46917ca54c3Smrg    CARD8	ReqType;        /* always X_GetDeviceMotionEvents*/
470ea1d6981Smrg    CARD16	length;
471ea1d6981Smrg    Time	start;
472ea1d6981Smrg    Time	stop;
47317ca54c3Smrg    CARD8	deviceid;
47417ca54c3Smrg    BYTE	pad1, pad2, pad3;
47517ca54c3Smrg} xGetDeviceMotionEventsReq;
47617ca54c3Smrg
47717ca54c3Smrgtypedef struct {
47817ca54c3Smrg    CARD8	repType;	/* X_Reply */
47917ca54c3Smrg    CARD8	RepType;        /* always X_GetDeviceMotionEvents  */
480ea1d6981Smrg    CARD16	sequenceNumber;
481ea1d6981Smrg    CARD32	length;
482ea1d6981Smrg    CARD32	nEvents;
48317ca54c3Smrg    CARD8	axes;
48417ca54c3Smrg    CARD8	mode;
48517ca54c3Smrg    BYTE	pad1, pad2;
486ea1d6981Smrg    CARD32	pad01;
487ea1d6981Smrg    CARD32	pad02;
488ea1d6981Smrg    CARD32	pad03;
489ea1d6981Smrg    CARD32	pad04;
49017ca54c3Smrg} xGetDeviceMotionEventsReply;
49117ca54c3Smrg
49217ca54c3Smrg/*********************************************************
49317ca54c3Smrg *
49417ca54c3Smrg * ChangeKeyboardDevice.
49517ca54c3Smrg *
49617ca54c3Smrg */
49717ca54c3Smrg
49817ca54c3Smrgtypedef struct {
49917ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
50017ca54c3Smrg    CARD8	ReqType;        /* X_ChangeKeyboardDevice	*/
501ea1d6981Smrg    CARD16	length;
50217ca54c3Smrg    CARD8	deviceid;
50317ca54c3Smrg    BYTE	pad1, pad2, pad3;
50417ca54c3Smrg} xChangeKeyboardDeviceReq;
50517ca54c3Smrg
50617ca54c3Smrgtypedef struct {
50717ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
50817ca54c3Smrg    CARD8	RepType;        /* always X_ChangeKeyboardDevice*/
509ea1d6981Smrg    CARD16	sequenceNumber;
510ea1d6981Smrg    CARD32	length;		/* 0 */
51117ca54c3Smrg    CARD8	status;
51217ca54c3Smrg    BYTE	pad1, pad2, pad3;
513ea1d6981Smrg    CARD32	pad01;
514ea1d6981Smrg    CARD32	pad02;
515ea1d6981Smrg    CARD32	pad03;
516ea1d6981Smrg    CARD32	pad04;
517ea1d6981Smrg    CARD32	pad05;
51817ca54c3Smrg    } xChangeKeyboardDeviceReply;
51917ca54c3Smrg
52017ca54c3Smrg/*********************************************************
52117ca54c3Smrg *
52217ca54c3Smrg * ChangePointerDevice.
52317ca54c3Smrg *
52417ca54c3Smrg */
52517ca54c3Smrg
52617ca54c3Smrgtypedef struct {
52717ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
52817ca54c3Smrg    CARD8	ReqType;        /* X_ChangePointerDevice	*/
529ea1d6981Smrg    CARD16	length;
53017ca54c3Smrg    CARD8	xaxis;
53117ca54c3Smrg    CARD8	yaxis;
53217ca54c3Smrg    CARD8	deviceid;
53317ca54c3Smrg    BYTE	pad1;
53417ca54c3Smrg} xChangePointerDeviceReq;
53517ca54c3Smrg
53617ca54c3Smrgtypedef struct {
53717ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
53817ca54c3Smrg    CARD8	RepType;        /* always X_ChangePointerDevice */
539ea1d6981Smrg    CARD16	sequenceNumber;
540ea1d6981Smrg    CARD32	length;		/* 0 */
54117ca54c3Smrg    CARD8	status;
54217ca54c3Smrg    BYTE	pad1, pad2, pad3;
543ea1d6981Smrg    CARD32	pad01;
544ea1d6981Smrg    CARD32	pad02;
545ea1d6981Smrg    CARD32	pad03;
546ea1d6981Smrg    CARD32	pad04;
547ea1d6981Smrg    CARD32	pad05;
54817ca54c3Smrg    } xChangePointerDeviceReply;
54917ca54c3Smrg
55017ca54c3Smrg/*********************************************************
55117ca54c3Smrg *
55217ca54c3Smrg * GrabDevice.
55317ca54c3Smrg *
55417ca54c3Smrg */
55517ca54c3Smrg
55617ca54c3Smrgtypedef struct {
55717ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
55817ca54c3Smrg    CARD8	ReqType;        /* always X_GrabDevice */
559ea1d6981Smrg    CARD16	length;
560ea1d6981Smrg    Window	grabWindow;
561ea1d6981Smrg    Time	time;
562ea1d6981Smrg    CARD16	event_count;
56317ca54c3Smrg    CARD8	this_device_mode;
56417ca54c3Smrg    CARD8	other_devices_mode;
56517ca54c3Smrg    BOOL	ownerEvents;
56617ca54c3Smrg    CARD8	deviceid;
567ea1d6981Smrg    CARD16	pad01;
56817ca54c3Smrg} xGrabDeviceReq;
56917ca54c3Smrg
57017ca54c3Smrgtypedef struct {
57117ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
57217ca54c3Smrg    CARD8	RepType;        /* always X_GrabDevice	*/
573ea1d6981Smrg    CARD16	sequenceNumber;
574ea1d6981Smrg    CARD32	length;		/* 0 */
57517ca54c3Smrg    CARD8	status;
57617ca54c3Smrg    BYTE	pad1, pad2, pad3;
577ea1d6981Smrg    CARD32	pad01;
578ea1d6981Smrg    CARD32	pad02;
579ea1d6981Smrg    CARD32	pad03;
580ea1d6981Smrg    CARD32	pad04;
581ea1d6981Smrg    CARD32	pad05;
58217ca54c3Smrg    } xGrabDeviceReply;
58317ca54c3Smrg
58417ca54c3Smrg/*********************************************************
58517ca54c3Smrg *
58617ca54c3Smrg * UngrabDevice.
58717ca54c3Smrg *
58817ca54c3Smrg */
58917ca54c3Smrg
59017ca54c3Smrgtypedef struct {
59117ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
59217ca54c3Smrg    CARD8	ReqType;        /* always X_UnGrabDevice	*/
593ea1d6981Smrg    CARD16	length;
594ea1d6981Smrg    Time	time;
59517ca54c3Smrg    CARD8	deviceid;
59617ca54c3Smrg    BYTE	pad1, pad2, pad3;
59717ca54c3Smrg} xUngrabDeviceReq;
59817ca54c3Smrg
59917ca54c3Smrg/*********************************************************
60017ca54c3Smrg *
60117ca54c3Smrg * GrabDeviceKey.
60217ca54c3Smrg *
60317ca54c3Smrg */
60417ca54c3Smrg
60517ca54c3Smrgtypedef struct {
60617ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
60717ca54c3Smrg    CARD8	ReqType;        /* always X_GrabDeviceKey	*/
608ea1d6981Smrg    CARD16	length;
609ea1d6981Smrg    Window	grabWindow;
610ea1d6981Smrg    CARD16	event_count;
611ea1d6981Smrg    CARD16	modifiers;
61217ca54c3Smrg    CARD8	modifier_device;
61317ca54c3Smrg    CARD8	grabbed_device;
61417ca54c3Smrg    CARD8	key;
61517ca54c3Smrg    BYTE	this_device_mode;
61617ca54c3Smrg    BYTE	other_devices_mode;
61717ca54c3Smrg    BOOL	ownerEvents;
61817ca54c3Smrg    BYTE	pad1, pad2;
61917ca54c3Smrg} xGrabDeviceKeyReq;
62017ca54c3Smrg
62117ca54c3Smrg/*********************************************************
62217ca54c3Smrg *
62317ca54c3Smrg * UngrabDeviceKey.
62417ca54c3Smrg *
62517ca54c3Smrg */
62617ca54c3Smrg
62717ca54c3Smrgtypedef struct {
62817ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
62917ca54c3Smrg    CARD8	ReqType;        /* always X_UngrabDeviceKey	*/
630ea1d6981Smrg    CARD16	length;
631ea1d6981Smrg    Window	grabWindow;
632ea1d6981Smrg    CARD16	modifiers;
63317ca54c3Smrg    CARD8	modifier_device;
63417ca54c3Smrg    CARD8	key;
63517ca54c3Smrg    CARD8	grabbed_device;
63617ca54c3Smrg    BYTE	pad1, pad2, pad3;
63717ca54c3Smrg} xUngrabDeviceKeyReq;
63817ca54c3Smrg
63917ca54c3Smrg/*********************************************************
64017ca54c3Smrg *
64117ca54c3Smrg * GrabDeviceButton.
64217ca54c3Smrg *
64317ca54c3Smrg */
64417ca54c3Smrg
64517ca54c3Smrgtypedef struct {
64617ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
64717ca54c3Smrg    CARD8	ReqType;        /* always X_GrabDeviceButton	*/
648ea1d6981Smrg    CARD16	length;
649ea1d6981Smrg    Window	grabWindow;
65017ca54c3Smrg    CARD8	grabbed_device;
65117ca54c3Smrg    CARD8	modifier_device;
652ea1d6981Smrg    CARD16	event_count;
653ea1d6981Smrg    CARD16	modifiers;
65417ca54c3Smrg    BYTE	this_device_mode;
65517ca54c3Smrg    BYTE	other_devices_mode;
65617ca54c3Smrg    CARD8	button;
65717ca54c3Smrg    BOOL	ownerEvents;
65817ca54c3Smrg    BYTE	pad1, pad2;
65917ca54c3Smrg} xGrabDeviceButtonReq;
66017ca54c3Smrg
66117ca54c3Smrg/*********************************************************
66217ca54c3Smrg *
66317ca54c3Smrg * UngrabDeviceButton.
66417ca54c3Smrg *
66517ca54c3Smrg */
66617ca54c3Smrg
66717ca54c3Smrgtypedef struct {
66817ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
66917ca54c3Smrg    CARD8	ReqType;        /* always X_UngrabDeviceButton	*/
670ea1d6981Smrg    CARD16	length;
671ea1d6981Smrg    Window	grabWindow;
672ea1d6981Smrg    CARD16	modifiers;
67317ca54c3Smrg    CARD8	modifier_device;
67417ca54c3Smrg    CARD8	button;
67517ca54c3Smrg    CARD8	grabbed_device;
67617ca54c3Smrg    BYTE	pad1, pad2, pad3;
67717ca54c3Smrg} xUngrabDeviceButtonReq;
67817ca54c3Smrg
67917ca54c3Smrg/*********************************************************
68017ca54c3Smrg *
68117ca54c3Smrg * AllowDeviceEvents.
68217ca54c3Smrg *
68317ca54c3Smrg */
68417ca54c3Smrg
68517ca54c3Smrgtypedef struct {
68617ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
68717ca54c3Smrg    CARD8	ReqType;        /* always X_AllowDeviceEvents	*/
688ea1d6981Smrg    CARD16	length;
689ea1d6981Smrg    Time	time;
69017ca54c3Smrg    CARD8	mode;
69117ca54c3Smrg    CARD8	deviceid;
69217ca54c3Smrg    BYTE	pad1, pad2;
69317ca54c3Smrg} xAllowDeviceEventsReq;
69417ca54c3Smrg
69517ca54c3Smrg/*********************************************************
69617ca54c3Smrg *
69717ca54c3Smrg * GetDeviceFocus.
69817ca54c3Smrg *
69917ca54c3Smrg */
70017ca54c3Smrg
70117ca54c3Smrgtypedef struct {
70217ca54c3Smrg    CARD8	reqType;        /* input extension major code   */
70317ca54c3Smrg    CARD8	ReqType;        /* always X_GetDeviceFocus	*/
704ea1d6981Smrg    CARD16	length;
70517ca54c3Smrg    CARD8	deviceid;
70617ca54c3Smrg    BYTE	pad1, pad2, pad3;
70717ca54c3Smrg} xGetDeviceFocusReq;
70817ca54c3Smrg
70917ca54c3Smrgtypedef struct {
71017ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
71117ca54c3Smrg    CARD8	RepType;        /* always X_GetDeviceFocus	*/
712ea1d6981Smrg    CARD16	sequenceNumber;
713ea1d6981Smrg    CARD32	length;
714ea1d6981Smrg    CARD32	focus;
715ea1d6981Smrg    Time	time;
71617ca54c3Smrg    CARD8	revertTo;
71717ca54c3Smrg    BYTE	pad1, pad2, pad3;
718ea1d6981Smrg    CARD32	pad01;
719ea1d6981Smrg    CARD32	pad02;
720ea1d6981Smrg    CARD32	pad03;
72117ca54c3Smrg    } xGetDeviceFocusReply;
72217ca54c3Smrg
72317ca54c3Smrg/*********************************************************
72417ca54c3Smrg *
72517ca54c3Smrg * SetDeviceFocus.
72617ca54c3Smrg *
72717ca54c3Smrg */
72817ca54c3Smrg
72917ca54c3Smrgtypedef struct {
73017ca54c3Smrg    CARD8	reqType;        /* input extension major code   */
73117ca54c3Smrg    CARD8	ReqType;        /* always X_SetDeviceFocus	*/
732ea1d6981Smrg    CARD16	length;
733ea1d6981Smrg    Window	focus;
734ea1d6981Smrg    Time	time;
73517ca54c3Smrg    CARD8	revertTo;
73617ca54c3Smrg    CARD8	device;
737ea1d6981Smrg    CARD16	pad01;
73817ca54c3Smrg} xSetDeviceFocusReq;
73917ca54c3Smrg
74017ca54c3Smrg/*********************************************************
74117ca54c3Smrg *
74217ca54c3Smrg * GetFeedbackControl.
74317ca54c3Smrg *
74417ca54c3Smrg */
74517ca54c3Smrg
74617ca54c3Smrgtypedef struct {
74717ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
74817ca54c3Smrg    CARD8	ReqType;        /* X_GetFeedbackControl	*/
749ea1d6981Smrg    CARD16	length;
75017ca54c3Smrg    CARD8	deviceid;
75117ca54c3Smrg    BYTE	pad1, pad2, pad3;
75217ca54c3Smrg} xGetFeedbackControlReq;
75317ca54c3Smrg
75417ca54c3Smrgtypedef struct {
75517ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
75617ca54c3Smrg    CARD8	RepType;        /* always X_GetFeedbackControl	*/
757ea1d6981Smrg    CARD16	sequenceNumber;
758ea1d6981Smrg    CARD32	length;
759ea1d6981Smrg    CARD16	num_feedbacks;
760ea1d6981Smrg    CARD16	pad01;
761ea1d6981Smrg    CARD32	pad02;
762ea1d6981Smrg    CARD32	pad03;
763ea1d6981Smrg    CARD32	pad04;
764ea1d6981Smrg    CARD32	pad05;
765ea1d6981Smrg    CARD32	pad06;
76617ca54c3Smrg} xGetFeedbackControlReply;
76717ca54c3Smrg
76817ca54c3Smrgtypedef struct {
76917ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
77017ca54c3Smrg    CARD8	c_class;	/* feedback class		*/
77117ca54c3Smrg#else
77217ca54c3Smrg    CARD8	class;		/* feedback class		*/
77317ca54c3Smrg#endif
77417ca54c3Smrg    CARD8	id;		/* feedback id		*/
775ea1d6981Smrg    CARD16	length;		/* feedback length		*/
77617ca54c3Smrg} xFeedbackState;
77717ca54c3Smrg
77817ca54c3Smrgtypedef struct {
77917ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
78017ca54c3Smrg    CARD8   c_class;
78117ca54c3Smrg#else
78217ca54c3Smrg    CARD8   class;
78317ca54c3Smrg#endif
78417ca54c3Smrg    CARD8   id;
785ea1d6981Smrg    CARD16  length;
786ea1d6981Smrg    CARD16  pitch;
787ea1d6981Smrg    CARD16  duration;
788ea1d6981Smrg    CARD32  led_mask;
789ea1d6981Smrg    CARD32  led_values;
79017ca54c3Smrg    BOOL    global_auto_repeat;
79117ca54c3Smrg    CARD8   click;
79217ca54c3Smrg    CARD8   percent;
79317ca54c3Smrg    BYTE    pad;
79417ca54c3Smrg    BYTE    auto_repeats[32];
79517ca54c3Smrg} xKbdFeedbackState;
79617ca54c3Smrg
79717ca54c3Smrgtypedef struct {
79817ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
79917ca54c3Smrg    CARD8   c_class;
80017ca54c3Smrg#else
80117ca54c3Smrg    CARD8   class;
80217ca54c3Smrg#endif
80317ca54c3Smrg    CARD8   id;
804ea1d6981Smrg    CARD16  length;
80517ca54c3Smrg    CARD8   pad1,pad2;
806ea1d6981Smrg    CARD16  accelNum;
807ea1d6981Smrg    CARD16  accelDenom;
808ea1d6981Smrg    CARD16  threshold;
80917ca54c3Smrg} xPtrFeedbackState;
81017ca54c3Smrg
81117ca54c3Smrgtypedef struct {
81217ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
81317ca54c3Smrg    CARD8	c_class;	/* feedback class id		*/
81417ca54c3Smrg#else
81517ca54c3Smrg    CARD8	class;		/* feedback class id		*/
81617ca54c3Smrg#endif
81717ca54c3Smrg    CARD8	id;
818ea1d6981Smrg    CARD16	length;		/* feedback length		*/
819ea1d6981Smrg    CARD32	resolution;
820ea1d6981Smrg    INT32	min_value;
821ea1d6981Smrg    INT32	max_value;
82217ca54c3Smrg} xIntegerFeedbackState;
82317ca54c3Smrg
82417ca54c3Smrgtypedef struct {
82517ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
82617ca54c3Smrg    CARD8	c_class;	/* feedback class id		*/
82717ca54c3Smrg#else
82817ca54c3Smrg    CARD8	class;		/* feedback class id		*/
82917ca54c3Smrg#endif
83017ca54c3Smrg    CARD8	id;
831ea1d6981Smrg    CARD16	length;		/* feedback length		*/
832ea1d6981Smrg    CARD16	max_symbols;
833ea1d6981Smrg    CARD16	num_syms_supported;
83417ca54c3Smrg} xStringFeedbackState;
83517ca54c3Smrg
83617ca54c3Smrgtypedef struct {
83717ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
83817ca54c3Smrg    CARD8	c_class;	/* feedback class id		*/
83917ca54c3Smrg#else
84017ca54c3Smrg    CARD8	class;		/* feedback class id		*/
84117ca54c3Smrg#endif
84217ca54c3Smrg    CARD8	id;
843ea1d6981Smrg    CARD16	length;		/* feedback length		*/
84417ca54c3Smrg    CARD8	percent;
84517ca54c3Smrg    BYTE	pad1, pad2, pad3;
846ea1d6981Smrg    CARD16	pitch;
847ea1d6981Smrg    CARD16	duration;
84817ca54c3Smrg} xBellFeedbackState;
84917ca54c3Smrg
85017ca54c3Smrgtypedef struct {
85117ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
85217ca54c3Smrg    CARD8	c_class;	/* feedback class id		*/
85317ca54c3Smrg#else
85417ca54c3Smrg    CARD8	class;		/* feedback class id		*/
85517ca54c3Smrg#endif
85617ca54c3Smrg    CARD8	id;
857ea1d6981Smrg    CARD16	length;		/* feedback length		*/
858ea1d6981Smrg    CARD32	led_mask;
859ea1d6981Smrg    CARD32	led_values;
86017ca54c3Smrg} xLedFeedbackState;
86117ca54c3Smrg
86217ca54c3Smrg/*********************************************************
86317ca54c3Smrg *
86417ca54c3Smrg * ChangeFeedbackControl.
86517ca54c3Smrg *
86617ca54c3Smrg */
86717ca54c3Smrg
86817ca54c3Smrgtypedef struct {
86917ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
87017ca54c3Smrg    CARD8	ReqType;        /* X_ChangeFeedbackControl	*/
871ea1d6981Smrg    CARD16	length;
872ea1d6981Smrg    CARD32	mask;
87317ca54c3Smrg    CARD8	deviceid;
87417ca54c3Smrg    CARD8	feedbackid;
87517ca54c3Smrg    BYTE	pad1, pad2;
87617ca54c3Smrg} xChangeFeedbackControlReq;
87717ca54c3Smrg
87817ca54c3Smrgtypedef struct {
87917ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
88017ca54c3Smrg    CARD8	c_class;	/* feedback class id		*/
88117ca54c3Smrg#else
88217ca54c3Smrg    CARD8	class;		/* feedback class id		*/
88317ca54c3Smrg#endif
88417ca54c3Smrg    CARD8	id;		/* feedback id		*/
885ea1d6981Smrg    CARD16	length;		/* feedback length		*/
88617ca54c3Smrg} xFeedbackCtl;
88717ca54c3Smrg
88817ca54c3Smrgtypedef struct {
88917ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
89017ca54c3Smrg    CARD8	c_class;	/* feedback class id		*/
89117ca54c3Smrg#else
89217ca54c3Smrg    CARD8	class;		/* feedback class id		*/
89317ca54c3Smrg#endif
89417ca54c3Smrg    CARD8	id;		/* feedback length		*/
895ea1d6981Smrg    CARD16	length;		/* feedback length		*/
89617ca54c3Smrg    KeyCode	key;
89717ca54c3Smrg    CARD8	auto_repeat_mode;
89817ca54c3Smrg    INT8	click;
89917ca54c3Smrg    INT8	percent;
900ea1d6981Smrg    INT16	pitch;
901ea1d6981Smrg    INT16	duration;
902ea1d6981Smrg    CARD32	led_mask;
903ea1d6981Smrg    CARD32	led_values;
90417ca54c3Smrg} xKbdFeedbackCtl;
90517ca54c3Smrg
90617ca54c3Smrgtypedef struct {
90717ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
90817ca54c3Smrg    CARD8	c_class;	/* feedback class id		*/
90917ca54c3Smrg#else
91017ca54c3Smrg    CARD8	class;		/* feedback class id		*/
91117ca54c3Smrg#endif
91217ca54c3Smrg    CARD8	id;		/* feedback id		*/
913ea1d6981Smrg    CARD16	length;		/* feedback length		*/
91417ca54c3Smrg    CARD8	pad1,pad2;
915ea1d6981Smrg    INT16	num;
916ea1d6981Smrg    INT16	denom;
917ea1d6981Smrg    INT16	thresh;
91817ca54c3Smrg} xPtrFeedbackCtl;
91917ca54c3Smrg
92017ca54c3Smrgtypedef struct {
92117ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
92217ca54c3Smrg    CARD8	c_class;	/* feedback class id		*/
92317ca54c3Smrg#else
92417ca54c3Smrg    CARD8	class;		/* feedback class id		*/
92517ca54c3Smrg#endif
92617ca54c3Smrg    CARD8	id;		/* feedback id		*/
927ea1d6981Smrg    CARD16	length;		/* feedback length		*/
928ea1d6981Smrg    INT32	int_to_display;
92917ca54c3Smrg} xIntegerFeedbackCtl;
93017ca54c3Smrg
93117ca54c3Smrgtypedef struct {
93217ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
93317ca54c3Smrg    CARD8	c_class;	/* feedback class id		*/
93417ca54c3Smrg#else
93517ca54c3Smrg    CARD8	class;		/* feedback class id		*/
93617ca54c3Smrg#endif
93717ca54c3Smrg    CARD8	id;		/* feedback id		*/
938ea1d6981Smrg    CARD16	length;		/* feedback length		*/
93917ca54c3Smrg    CARD8	pad1,pad2;
940ea1d6981Smrg    CARD16	num_keysyms;
94117ca54c3Smrg} xStringFeedbackCtl;
94217ca54c3Smrg
94317ca54c3Smrgtypedef struct {
94417ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
94517ca54c3Smrg    CARD8	c_class;	/* feedback class id		*/
94617ca54c3Smrg#else
94717ca54c3Smrg    CARD8	class;		/* feedback class id		*/
94817ca54c3Smrg#endif
94917ca54c3Smrg    CARD8	id;		/* feedback id		*/
950ea1d6981Smrg    CARD16	length;		/* feedback length		*/
95117ca54c3Smrg    INT8	percent;
95217ca54c3Smrg    BYTE	pad1, pad2, pad3;
953ea1d6981Smrg    INT16	pitch;
954ea1d6981Smrg    INT16	duration;
95517ca54c3Smrg} xBellFeedbackCtl;
95617ca54c3Smrg
95717ca54c3Smrgtypedef struct {
95817ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
95917ca54c3Smrg    CARD8	c_class;	/* feedback class id		*/
96017ca54c3Smrg#else
96117ca54c3Smrg    CARD8	class;		/* feedback class id		*/
96217ca54c3Smrg#endif
96317ca54c3Smrg    CARD8	id;		/* feedback id		*/
964ea1d6981Smrg    CARD16	length;		/* feedback length		*/
965ea1d6981Smrg    CARD32	led_mask;
966ea1d6981Smrg    CARD32	led_values;
96717ca54c3Smrg} xLedFeedbackCtl;
96817ca54c3Smrg
96917ca54c3Smrg/*********************************************************
97017ca54c3Smrg *
97117ca54c3Smrg * GetDeviceKeyMapping.
97217ca54c3Smrg *
97317ca54c3Smrg */
97417ca54c3Smrg
97517ca54c3Smrgtypedef struct {
97617ca54c3Smrg    CARD8	reqType;        /* input extension major code   */
97717ca54c3Smrg    CARD8	ReqType;	/* always X_GetDeviceKeyMapping */
978ea1d6981Smrg    CARD16	length;
97917ca54c3Smrg    CARD8	deviceid;
98017ca54c3Smrg    KeyCode	firstKeyCode;
98117ca54c3Smrg    CARD8	count;
98217ca54c3Smrg    BYTE	pad1;
98317ca54c3Smrg} xGetDeviceKeyMappingReq;
98417ca54c3Smrg
98517ca54c3Smrgtypedef struct {
98617ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
98717ca54c3Smrg    CARD8	RepType;	/* always X_GetDeviceKeyMapping */
988ea1d6981Smrg    CARD16	sequenceNumber;
989ea1d6981Smrg    CARD32	length;
99017ca54c3Smrg    CARD8	keySymsPerKeyCode;
99117ca54c3Smrg    CARD8	pad0;
992ea1d6981Smrg    CARD16	pad1;
993ea1d6981Smrg    CARD32	pad2;
994ea1d6981Smrg    CARD32	pad3;
995ea1d6981Smrg    CARD32	pad4;
996ea1d6981Smrg    CARD32	pad5;
997ea1d6981Smrg    CARD32	pad6;
99817ca54c3Smrg} xGetDeviceKeyMappingReply;
99917ca54c3Smrg
100017ca54c3Smrg/*********************************************************
100117ca54c3Smrg *
100217ca54c3Smrg * ChangeDeviceKeyMapping.
100317ca54c3Smrg *
100417ca54c3Smrg */
100517ca54c3Smrg
100617ca54c3Smrgtypedef struct {
100717ca54c3Smrg    CARD8	reqType;        /* input extension major code   */
100817ca54c3Smrg    CARD8	ReqType;        /* always X_ChangeDeviceKeyMapping */
1009ea1d6981Smrg    CARD16	length;
101017ca54c3Smrg    CARD8	deviceid;
101117ca54c3Smrg    KeyCode	firstKeyCode;
101217ca54c3Smrg    CARD8	keySymsPerKeyCode;
101317ca54c3Smrg    CARD8	keyCodes;
101417ca54c3Smrg} xChangeDeviceKeyMappingReq;
101517ca54c3Smrg
101617ca54c3Smrg/*********************************************************
101717ca54c3Smrg *
101817ca54c3Smrg * GetDeviceModifierMapping.
101917ca54c3Smrg *
102017ca54c3Smrg */
102117ca54c3Smrg
102217ca54c3Smrgtypedef struct {
102317ca54c3Smrg    CARD8	reqType;        /* input extension major code   */
102417ca54c3Smrg    CARD8	ReqType;        /* always X_GetDeviceModifierMapping */
1025ea1d6981Smrg    CARD16	length;
102617ca54c3Smrg    CARD8	deviceid;
102717ca54c3Smrg    BYTE	pad1, pad2, pad3;
102817ca54c3Smrg} xGetDeviceModifierMappingReq;
102917ca54c3Smrg
103017ca54c3Smrgtypedef struct {
103117ca54c3Smrg    CARD8	repType;	/* X_Reply */
103217ca54c3Smrg    CARD8	RepType;        /* always X_GetDeviceModifierMapping */
1033ea1d6981Smrg    CARD16	sequenceNumber;
1034ea1d6981Smrg    CARD32	length;
103517ca54c3Smrg    CARD8	numKeyPerModifier;
103617ca54c3Smrg    CARD8	pad0;
1037ea1d6981Smrg    CARD16	pad1;
1038ea1d6981Smrg    CARD32	pad2;
1039ea1d6981Smrg    CARD32	pad3;
1040ea1d6981Smrg    CARD32	pad4;
1041ea1d6981Smrg    CARD32	pad5;
1042ea1d6981Smrg    CARD32	pad6;
104317ca54c3Smrg} xGetDeviceModifierMappingReply;
104417ca54c3Smrg
104517ca54c3Smrg/*********************************************************
104617ca54c3Smrg *
104717ca54c3Smrg * SetDeviceModifierMapping.
104817ca54c3Smrg *
104917ca54c3Smrg */
105017ca54c3Smrg
105117ca54c3Smrgtypedef struct {
105217ca54c3Smrg    CARD8	reqType;        /* input extension major code   */
105317ca54c3Smrg    CARD8	ReqType;        /* always X_SetDeviceModifierMapping */
1054ea1d6981Smrg    CARD16	length;
105517ca54c3Smrg    CARD8	deviceid;
105617ca54c3Smrg    CARD8	numKeyPerModifier;
1057ea1d6981Smrg    CARD16	pad1;
105817ca54c3Smrg} xSetDeviceModifierMappingReq;
105917ca54c3Smrg
106017ca54c3Smrgtypedef struct {
106117ca54c3Smrg    CARD8	repType;	/* X_Reply */
106217ca54c3Smrg    CARD8	RepType;        /* always X_SetDeviceModifierMapping */
1063ea1d6981Smrg    CARD16	sequenceNumber;
1064ea1d6981Smrg    CARD32	length;
106517ca54c3Smrg    CARD8	success;
106617ca54c3Smrg    CARD8	pad0;
1067ea1d6981Smrg    CARD16	pad1;
1068ea1d6981Smrg    CARD32	pad2;
1069ea1d6981Smrg    CARD32	pad3;
1070ea1d6981Smrg    CARD32	pad4;
1071ea1d6981Smrg    CARD32	pad5;
1072ea1d6981Smrg    CARD32	pad6;
107317ca54c3Smrg} xSetDeviceModifierMappingReply;
107417ca54c3Smrg
107517ca54c3Smrg/*********************************************************
107617ca54c3Smrg *
107717ca54c3Smrg * GetDeviceButtonMapping.
107817ca54c3Smrg *
107917ca54c3Smrg */
108017ca54c3Smrg
108117ca54c3Smrgtypedef struct {
108217ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
108317ca54c3Smrg    CARD8	ReqType;        /* X_GetDeviceButtonMapping     */
1084ea1d6981Smrg    CARD16	length;
108517ca54c3Smrg    CARD8	deviceid;
108617ca54c3Smrg    BYTE	pad1, pad2, pad3;
108717ca54c3Smrg} xGetDeviceButtonMappingReq;
108817ca54c3Smrg
108917ca54c3Smrgtypedef struct {
109017ca54c3Smrg    CARD8	repType;	/* X_Reply */
109117ca54c3Smrg    CARD8	RepType;        /* always X_GetDeviceButtonMapping */
1092ea1d6981Smrg    CARD16	sequenceNumber;
1093ea1d6981Smrg    CARD32	length;
109417ca54c3Smrg    CARD8	nElts;
109517ca54c3Smrg    BYTE	pad1, pad2, pad3;
1096ea1d6981Smrg    CARD32	pad01;
1097ea1d6981Smrg    CARD32	pad02;
1098ea1d6981Smrg    CARD32	pad03;
1099ea1d6981Smrg    CARD32	pad04;
1100ea1d6981Smrg    CARD32	pad05;
110117ca54c3Smrg} xGetDeviceButtonMappingReply;
110217ca54c3Smrg
110317ca54c3Smrg/*********************************************************
110417ca54c3Smrg *
110517ca54c3Smrg * SetDeviceButtonMapping.
110617ca54c3Smrg *
110717ca54c3Smrg */
110817ca54c3Smrg
110917ca54c3Smrgtypedef struct {
111017ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
111117ca54c3Smrg    CARD8	ReqType;        /* X_SetDeviceButtonMapping     */
1112ea1d6981Smrg    CARD16	length;
111317ca54c3Smrg    CARD8	deviceid;
111417ca54c3Smrg    CARD8	map_length;
111517ca54c3Smrg    BYTE	pad1, pad2;
111617ca54c3Smrg} xSetDeviceButtonMappingReq;
111717ca54c3Smrg
111817ca54c3Smrgtypedef struct {
111917ca54c3Smrg    CARD8	repType;		/* X_Reply */
112017ca54c3Smrg    CARD8	RepType;	/* always X_SetDeviceButtonMapping */
1121ea1d6981Smrg    CARD16	sequenceNumber;
1122ea1d6981Smrg    CARD32	length;
112317ca54c3Smrg    CARD8	status;
112417ca54c3Smrg    BYTE	pad0;
1125ea1d6981Smrg    CARD16	pad1;
1126ea1d6981Smrg    CARD32	pad2;
1127ea1d6981Smrg    CARD32	pad3;
1128ea1d6981Smrg    CARD32	pad4;
1129ea1d6981Smrg    CARD32	pad5;
1130ea1d6981Smrg    CARD32	pad6;
113117ca54c3Smrg} xSetDeviceButtonMappingReply;
113217ca54c3Smrg
113317ca54c3Smrg/*********************************************************
113417ca54c3Smrg *
113517ca54c3Smrg * QueryDeviceState.
113617ca54c3Smrg *
113717ca54c3Smrg */
113817ca54c3Smrg
113917ca54c3Smrgtypedef struct {
114017ca54c3Smrg    CARD8	reqType;
114117ca54c3Smrg    CARD8	ReqType;        /* always X_QueryDeviceState */
1142ea1d6981Smrg    CARD16	length;
114317ca54c3Smrg    CARD8	deviceid;
114417ca54c3Smrg    BYTE	pad1, pad2, pad3;
114517ca54c3Smrg} xQueryDeviceStateReq;
114617ca54c3Smrg
114717ca54c3Smrgtypedef struct {
114817ca54c3Smrg    CARD8	repType;		/* X_Reply */
114917ca54c3Smrg    CARD8	RepType;	/* always X_QueryDeviceState	*/
1150ea1d6981Smrg    CARD16	sequenceNumber;
1151ea1d6981Smrg    CARD32	length;
115217ca54c3Smrg    CARD8	num_classes;
115317ca54c3Smrg    BYTE	pad0;
1154ea1d6981Smrg    CARD16	pad1;
1155ea1d6981Smrg    CARD32	pad2;
1156ea1d6981Smrg    CARD32	pad3;
1157ea1d6981Smrg    CARD32	pad4;
1158ea1d6981Smrg    CARD32	pad5;
1159ea1d6981Smrg    CARD32	pad6;
116017ca54c3Smrg} xQueryDeviceStateReply;
116117ca54c3Smrg
116217ca54c3Smrgtypedef struct {
116317ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
116417ca54c3Smrg    CARD8	c_class;
116517ca54c3Smrg#else
116617ca54c3Smrg    CARD8	class;
116717ca54c3Smrg#endif
116817ca54c3Smrg    CARD8	length;
116917ca54c3Smrg    CARD8	num_keys;
117017ca54c3Smrg    BYTE	pad1;
117117ca54c3Smrg    CARD8	keys[32];
117217ca54c3Smrg} xKeyState;
117317ca54c3Smrg
117417ca54c3Smrgtypedef struct {
117517ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
117617ca54c3Smrg    CARD8	c_class;
117717ca54c3Smrg#else
117817ca54c3Smrg    CARD8	class;
117917ca54c3Smrg#endif
118017ca54c3Smrg    CARD8	length;
118117ca54c3Smrg    CARD8	num_buttons;
118217ca54c3Smrg    BYTE	pad1;
118317ca54c3Smrg    CARD8	buttons[32];
118417ca54c3Smrg} xButtonState;
118517ca54c3Smrg
118617ca54c3Smrgtypedef struct {
118717ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
118817ca54c3Smrg    CARD8	c_class;
118917ca54c3Smrg#else
119017ca54c3Smrg    CARD8	class;
119117ca54c3Smrg#endif
119217ca54c3Smrg    CARD8	length;
119317ca54c3Smrg    CARD8	num_valuators;
119417ca54c3Smrg    CARD8	mode;
119517ca54c3Smrg} xValuatorState;
119617ca54c3Smrg
119717ca54c3Smrg/*********************************************************
119817ca54c3Smrg *
119917ca54c3Smrg * SendExtensionEvent.
120017ca54c3Smrg * THIS REQUEST MUST BE KEPT A MULTIPLE OF 8 BYTES IN LENGTH!
120117ca54c3Smrg * MORE EVENTS MAY FOLLOW AND THEY MUST BE QUAD-ALIGNED!
120217ca54c3Smrg *
120317ca54c3Smrg */
120417ca54c3Smrg
120517ca54c3Smrgtypedef struct {
120617ca54c3Smrg    CARD8	reqType;
120717ca54c3Smrg    CARD8	ReqType;        /* always X_SendExtensionEvent */
1208ea1d6981Smrg    CARD16	length;
1209ea1d6981Smrg    Window	destination;
121017ca54c3Smrg    CARD8	deviceid;
121117ca54c3Smrg    BOOL	propagate;
1212ea1d6981Smrg    CARD16	count;
121317ca54c3Smrg    CARD8	num_events;
121417ca54c3Smrg    BYTE	pad1,pad2,pad3;
121517ca54c3Smrg} xSendExtensionEventReq;
121617ca54c3Smrg
121717ca54c3Smrg/*********************************************************
121817ca54c3Smrg *
121917ca54c3Smrg * DeviceBell.
122017ca54c3Smrg *
122117ca54c3Smrg */
122217ca54c3Smrg
122317ca54c3Smrgtypedef struct {
122417ca54c3Smrg    CARD8	reqType;
122517ca54c3Smrg    CARD8	ReqType;        /* always X_DeviceBell */
1226ea1d6981Smrg    CARD16	length;
122717ca54c3Smrg    CARD8	deviceid;
122817ca54c3Smrg    CARD8	feedbackid;
122917ca54c3Smrg    CARD8	feedbackclass;
123017ca54c3Smrg    INT8	percent;
123117ca54c3Smrg} xDeviceBellReq;
123217ca54c3Smrg
123317ca54c3Smrg/*********************************************************
123417ca54c3Smrg *
123517ca54c3Smrg * SetDeviceValuators.
123617ca54c3Smrg *
123717ca54c3Smrg */
123817ca54c3Smrg
123917ca54c3Smrgtypedef struct {
124017ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
124117ca54c3Smrg    CARD8	ReqType;	/* always X_SetDeviceValuators	*/
1242ea1d6981Smrg    CARD16	length;
124317ca54c3Smrg    CARD8       deviceid;
124417ca54c3Smrg    CARD8       first_valuator;
124517ca54c3Smrg    CARD8       num_valuators;
124617ca54c3Smrg    BYTE	pad1;
124717ca54c3Smrg} xSetDeviceValuatorsReq;
124817ca54c3Smrg
124917ca54c3Smrgtypedef struct {
125017ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
125117ca54c3Smrg    CARD8	RepType;	/* always X_SetDeviceValuators	*/
1252ea1d6981Smrg    CARD16	sequenceNumber;
1253ea1d6981Smrg    CARD32	length;
125417ca54c3Smrg    CARD8	status;
125517ca54c3Smrg    BYTE	pad1, pad2, pad3;
1256ea1d6981Smrg    CARD32	pad01;
1257ea1d6981Smrg    CARD32	pad02;
1258ea1d6981Smrg    CARD32	pad03;
1259ea1d6981Smrg    CARD32	pad04;
1260ea1d6981Smrg    CARD32	pad05;
126117ca54c3Smrg} xSetDeviceValuatorsReply;
126217ca54c3Smrg
126317ca54c3Smrg/*********************************************************
126417ca54c3Smrg *
126517ca54c3Smrg * GetDeviceControl.
126617ca54c3Smrg *
126717ca54c3Smrg */
126817ca54c3Smrg
126917ca54c3Smrgtypedef struct {
127017ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
127117ca54c3Smrg    CARD8	ReqType;	/* always X_GetDeviceControl	*/
1272ea1d6981Smrg    CARD16	length;
1273ea1d6981Smrg    CARD16	control;
127417ca54c3Smrg    CARD8       deviceid;
127517ca54c3Smrg    BYTE	pad2;
127617ca54c3Smrg} xGetDeviceControlReq;
127717ca54c3Smrg
127817ca54c3Smrgtypedef struct {
127917ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
128017ca54c3Smrg    CARD8	RepType;	/* always X_GetDeviceControl	*/
1281ea1d6981Smrg    CARD16	sequenceNumber;
1282ea1d6981Smrg    CARD32	length;
128317ca54c3Smrg    CARD8	status;
128417ca54c3Smrg    BYTE	pad1, pad2, pad3;
1285ea1d6981Smrg    CARD32	pad01;
1286ea1d6981Smrg    CARD32	pad02;
1287ea1d6981Smrg    CARD32	pad03;
1288ea1d6981Smrg    CARD32	pad04;
1289ea1d6981Smrg    CARD32	pad05;
129017ca54c3Smrg} xGetDeviceControlReply;
129117ca54c3Smrg
129217ca54c3Smrgtypedef struct {
1293ea1d6981Smrg    CARD16	control;	/* control type			*/
1294ea1d6981Smrg    CARD16	length;		/* control length		*/
129517ca54c3Smrg} xDeviceState;
129617ca54c3Smrg
129717ca54c3Smrgtypedef struct {
1298ea1d6981Smrg    CARD16	control;	/* control type			*/
1299ea1d6981Smrg    CARD16	length;		/* control length		*/
1300ea1d6981Smrg    CARD32	num_valuators;	/* number of valuators		*/
130117ca54c3Smrg} xDeviceResolutionState;
130217ca54c3Smrg
130317ca54c3Smrgtypedef struct {
1304ea1d6981Smrg     CARD16         control;
1305ea1d6981Smrg     CARD16         length;
1306ea1d6981Smrg     INT32          min_x;
1307ea1d6981Smrg     INT32          max_x;
1308ea1d6981Smrg     INT32          min_y;
1309ea1d6981Smrg     INT32          max_y;
1310ea1d6981Smrg     CARD32         flip_x;
1311ea1d6981Smrg     CARD32         flip_y;
1312ea1d6981Smrg     CARD32         rotation;
1313ea1d6981Smrg     CARD32         button_threshold;
131417ca54c3Smrg} xDeviceAbsCalibState;
131517ca54c3Smrg
131617ca54c3Smrgtypedef struct {
1317ea1d6981Smrg     CARD16         control;
1318ea1d6981Smrg     CARD16         length;
1319ea1d6981Smrg     CARD32         offset_x;
1320ea1d6981Smrg     CARD32         offset_y;
1321ea1d6981Smrg     CARD32         width;
1322ea1d6981Smrg     CARD32         height;
1323ea1d6981Smrg     CARD32         screen;
1324ea1d6981Smrg     CARD32         following;
132517ca54c3Smrg} xDeviceAbsAreaState;
132617ca54c3Smrg
132717ca54c3Smrgtypedef struct {
1328ea1d6981Smrg    CARD16      control;	/* control type                 */
1329ea1d6981Smrg    CARD16      length; 	/* control length               */
133017ca54c3Smrg    CARD8       status;
133117ca54c3Smrg    CARD8       iscore;
1332ea1d6981Smrg    CARD16      pad1;
133317ca54c3Smrg} xDeviceCoreState;
133417ca54c3Smrg
133517ca54c3Smrgtypedef struct {
1336ea1d6981Smrg    CARD16      control;	/* control type                 */
1337ea1d6981Smrg    CARD16      length; 	/* control length               */
133817ca54c3Smrg    CARD8       enable;
133917ca54c3Smrg    CARD8       pad0;
1340ea1d6981Smrg    CARD16      pad1;
134117ca54c3Smrg} xDeviceEnableState;
134217ca54c3Smrg
134317ca54c3Smrg/*********************************************************
134417ca54c3Smrg *
134517ca54c3Smrg * ChangeDeviceControl.
134617ca54c3Smrg *
134717ca54c3Smrg */
134817ca54c3Smrg
134917ca54c3Smrgtypedef struct {
135017ca54c3Smrg    CARD8	reqType;	/* input extension major code	*/
135117ca54c3Smrg    CARD8	ReqType;	/* always X_ChangeDeviceControl */
1352ea1d6981Smrg    CARD16	length;
1353ea1d6981Smrg    CARD16      control;
135417ca54c3Smrg    CARD8       deviceid;
135517ca54c3Smrg    BYTE        pad0;
135617ca54c3Smrg} xChangeDeviceControlReq;
135717ca54c3Smrg
135817ca54c3Smrgtypedef struct {
135917ca54c3Smrg    CARD8	repType;	/* X_Reply			*/
136017ca54c3Smrg    CARD8	RepType;	/* always X_ChangeDeviceControl	*/
1361ea1d6981Smrg    CARD16	sequenceNumber;
1362ea1d6981Smrg    CARD32	length;
136317ca54c3Smrg    CARD8	status;
136417ca54c3Smrg    BYTE	pad1, pad2, pad3;
1365ea1d6981Smrg    CARD32	pad01;
1366ea1d6981Smrg    CARD32	pad02;
1367ea1d6981Smrg    CARD32	pad03;
1368ea1d6981Smrg    CARD32	pad04;
1369ea1d6981Smrg    CARD32	pad05;
137017ca54c3Smrg} xChangeDeviceControlReply;
137117ca54c3Smrg
137217ca54c3Smrgtypedef struct {
1373ea1d6981Smrg    CARD16	control;		/* control type			*/
1374ea1d6981Smrg    CARD16	length;			/* control length		*/
137517ca54c3Smrg} xDeviceCtl;
137617ca54c3Smrg
137717ca54c3Smrgtypedef struct {
1378ea1d6981Smrg    CARD16	control;		/* control type			*/
1379ea1d6981Smrg    CARD16	length;			/* control length		*/
138017ca54c3Smrg    CARD8	first_valuator;		/* first valuator to change     */
138117ca54c3Smrg    CARD8	num_valuators;		/* number of valuators to change*/
138217ca54c3Smrg    CARD8	pad1,pad2;
138317ca54c3Smrg} xDeviceResolutionCtl;
138417ca54c3Smrg
138517ca54c3Smrgtypedef struct {
1386ea1d6981Smrg     CARD16         control;
1387ea1d6981Smrg     CARD16         length;
138817ca54c3Smrg     INT32          min_x;
138917ca54c3Smrg     INT32          max_x;
139017ca54c3Smrg     INT32          min_y;
139117ca54c3Smrg     INT32          max_y;
139217ca54c3Smrg     CARD32         flip_x;
139317ca54c3Smrg     CARD32         flip_y;
139417ca54c3Smrg     CARD32         rotation;
139517ca54c3Smrg     CARD32         button_threshold;
139617ca54c3Smrg} xDeviceAbsCalibCtl;
139717ca54c3Smrg
139817ca54c3Smrgtypedef struct {
1399ea1d6981Smrg     CARD16         control;
1400ea1d6981Smrg     CARD16         length;
140117ca54c3Smrg     CARD32         offset_x;
140217ca54c3Smrg     CARD32         offset_y;
140317ca54c3Smrg     INT32          width;
140417ca54c3Smrg     INT32          height;
140517ca54c3Smrg     INT32          screen;
140617ca54c3Smrg     CARD32         following;
140717ca54c3Smrg} xDeviceAbsAreaCtl;
140817ca54c3Smrg
140917ca54c3Smrgtypedef struct {
1410ea1d6981Smrg    CARD16          control;
1411ea1d6981Smrg    CARD16          length;
141217ca54c3Smrg    CARD8           status;
141317ca54c3Smrg    CARD8           pad0;
1414ea1d6981Smrg    CARD16          pad1;
141517ca54c3Smrg} xDeviceCoreCtl;
141617ca54c3Smrg
141717ca54c3Smrgtypedef struct {
1418ea1d6981Smrg    CARD16          control;
1419ea1d6981Smrg    CARD16          length;
142017ca54c3Smrg    CARD8           enable;
142117ca54c3Smrg    CARD8           pad0;
1422ea1d6981Smrg    CARD16          pad1;
142317ca54c3Smrg} xDeviceEnableCtl;
142417ca54c3Smrg
142517ca54c3Smrg/* XI 1.5 */
142617ca54c3Smrg
142717ca54c3Smrg/*********************************************************
142817ca54c3Smrg *
142917ca54c3Smrg * ListDeviceProperties.
143017ca54c3Smrg *
143117ca54c3Smrg */
143217ca54c3Smrg
143317ca54c3Smrgtypedef struct {
143417ca54c3Smrg    CARD8       reqType;        /* input extension major opcode */
143517ca54c3Smrg    CARD8       ReqType;        /* always X_ListDeviceProperties */
1436ea1d6981Smrg    CARD16      length;
143717ca54c3Smrg    CARD8       deviceid;
143817ca54c3Smrg    CARD8       pad0;
1439ea1d6981Smrg    CARD16      pad1;
144017ca54c3Smrg} xListDevicePropertiesReq;
144117ca54c3Smrg
144217ca54c3Smrgtypedef struct {
144317ca54c3Smrg    CARD8       repType;        /* X_Reply                       */
144417ca54c3Smrg    CARD8       RepType;        /* always X_ListDeviceProperties */
1445ea1d6981Smrg    CARD16      sequenceNumber;
1446ea1d6981Smrg    CARD32      length;
1447ea1d6981Smrg    CARD16      nAtoms;
1448ea1d6981Smrg    CARD16      pad1;
1449ea1d6981Smrg    CARD32      pad2;
1450ea1d6981Smrg    CARD32      pad3;
1451ea1d6981Smrg    CARD32      pad4;
1452ea1d6981Smrg    CARD32      pad5;
1453ea1d6981Smrg    CARD32      pad6;
145417ca54c3Smrg} xListDevicePropertiesReply;
145517ca54c3Smrg
145617ca54c3Smrg/*********************************************************
145717ca54c3Smrg *
145817ca54c3Smrg * ChangeDeviceProperty.
145917ca54c3Smrg *
146017ca54c3Smrg */
146117ca54c3Smrg
146217ca54c3Smrgtypedef struct {
146317ca54c3Smrg    CARD8       reqType;        /* input extension major opcode */
146417ca54c3Smrg    CARD8       ReqType;        /* always X_ChangeDeviceProperty */
1465ea1d6981Smrg    CARD16      length;
1466ea1d6981Smrg    Atom        property;
1467ea1d6981Smrg    Atom        type;
146817ca54c3Smrg    CARD8       deviceid;
146917ca54c3Smrg    CARD8       format;
147017ca54c3Smrg    CARD8       mode;
147117ca54c3Smrg    CARD8       pad;
1472ea1d6981Smrg    CARD32      nUnits;
147317ca54c3Smrg} xChangeDevicePropertyReq;
147417ca54c3Smrg
147517ca54c3Smrg/*********************************************************
147617ca54c3Smrg *
147717ca54c3Smrg * DeleteDeviceProperty.
147817ca54c3Smrg *
147917ca54c3Smrg */
148017ca54c3Smrg
148117ca54c3Smrgtypedef struct {
148217ca54c3Smrg    CARD8       reqType;        /* input extension major opcode */
148317ca54c3Smrg    CARD8       ReqType;        /* always X_DeleteDeviceProperty */
1484ea1d6981Smrg    CARD16      length;
1485ea1d6981Smrg    Atom        property;
148617ca54c3Smrg    CARD8       deviceid;
148717ca54c3Smrg    CARD8       pad0;
1488ea1d6981Smrg    CARD16      pad1;
148917ca54c3Smrg} xDeleteDevicePropertyReq;
149017ca54c3Smrg
149117ca54c3Smrg/*********************************************************
149217ca54c3Smrg *
149317ca54c3Smrg * GetDeviceProperty.
149417ca54c3Smrg *
149517ca54c3Smrg */
149617ca54c3Smrg
149717ca54c3Smrgtypedef struct {
149817ca54c3Smrg    CARD8       reqType;        /* input extension major opcode */
149917ca54c3Smrg    CARD8       ReqType;        /* always X_GetDeviceProperty */
1500ea1d6981Smrg    CARD16      length;
1501ea1d6981Smrg    Atom        property;
1502ea1d6981Smrg    Atom        type;
1503ea1d6981Smrg    CARD32      longOffset;
1504ea1d6981Smrg    CARD32      longLength;
150517ca54c3Smrg    CARD8       deviceid;
150617ca54c3Smrg#if defined(__cplusplus) || defined(c_plusplus)
150717ca54c3Smrg    BOOL        c_delete;
150817ca54c3Smrg#else
150917ca54c3Smrg    BOOL        delete;
151017ca54c3Smrg#endif
151117ca54c3Smrg    CARD16      pad;
151217ca54c3Smrg} xGetDevicePropertyReq;
151317ca54c3Smrg
151417ca54c3Smrgtypedef struct {
151517ca54c3Smrg    CARD8       repType;        /* X_Reply                        */
151617ca54c3Smrg    CARD8       RepType;        /* always X_GetDeviceProperty   */
1517ea1d6981Smrg    CARD16      sequenceNumber;
1518ea1d6981Smrg    CARD32      length;
1519ea1d6981Smrg    Atom        propertyType;
1520ea1d6981Smrg    CARD32      bytesAfter;
1521ea1d6981Smrg    CARD32      nItems;
152217ca54c3Smrg    CARD8       format;
152317ca54c3Smrg    CARD8       deviceid;
1524ea1d6981Smrg    CARD16      pad1;
1525ea1d6981Smrg    CARD32      pad2;
1526ea1d6981Smrg    CARD32      pad3;
152717ca54c3Smrg} xGetDevicePropertyReply;
152817ca54c3Smrg
152917ca54c3Smrg
153017ca54c3Smrg/**********************************************************
153117ca54c3Smrg *
153217ca54c3Smrg * Input extension events.
153317ca54c3Smrg *
153417ca54c3Smrg * DeviceValuator
153517ca54c3Smrg *
153617ca54c3Smrg */
153717ca54c3Smrg
153817ca54c3Smrgtypedef struct
153917ca54c3Smrg    {
154017ca54c3Smrg    BYTE	type;
154117ca54c3Smrg    CARD8       deviceid;
1542ea1d6981Smrg    CARD16	sequenceNumber;
1543ea1d6981Smrg    KeyButMask	device_state;
154417ca54c3Smrg    CARD8	num_valuators;
154517ca54c3Smrg    CARD8       first_valuator;
1546ea1d6981Smrg    INT32	valuator0;
1547ea1d6981Smrg    INT32	valuator1;
1548ea1d6981Smrg    INT32	valuator2;
1549ea1d6981Smrg    INT32	valuator3;
1550ea1d6981Smrg    INT32	valuator4;
1551ea1d6981Smrg    INT32	valuator5;
155217ca54c3Smrg    }  deviceValuator;
155317ca54c3Smrg
155417ca54c3Smrg/**********************************************************
155517ca54c3Smrg *
155617ca54c3Smrg * DeviceKeyButtonPointer.
155717ca54c3Smrg *
155817ca54c3Smrg * Used for: DeviceKeyPress, DeviceKeyRelease,
155917ca54c3Smrg *	     DeviceButtonPress, DeviceButtonRelease,
156017ca54c3Smrg *	     ProximityIn, ProximityOut
156117ca54c3Smrg *	     DeviceMotionNotify,
156217ca54c3Smrg *
156317ca54c3Smrg */
156417ca54c3Smrg
156517ca54c3Smrgtypedef struct
156617ca54c3Smrg    {
156717ca54c3Smrg    BYTE	type;
156817ca54c3Smrg    BYTE        detail;
1569ea1d6981Smrg    CARD16      sequenceNumber;
1570ea1d6981Smrg    Time        time;
1571ea1d6981Smrg    Window      root;
1572ea1d6981Smrg    Window      event;
1573ea1d6981Smrg    Window      child;
1574ea1d6981Smrg    INT16       root_x;
1575ea1d6981Smrg    INT16       root_y;
1576ea1d6981Smrg    INT16       event_x;
1577ea1d6981Smrg    INT16       event_y;
1578ea1d6981Smrg    KeyButMask  state;
157917ca54c3Smrg    BOOL        same_screen;
158017ca54c3Smrg    CARD8       deviceid;
158117ca54c3Smrg    }  deviceKeyButtonPointer;
158217ca54c3Smrg
158317ca54c3Smrg/**********************************************************
158417ca54c3Smrg *
158517ca54c3Smrg * DeviceFocus.
158617ca54c3Smrg *
158717ca54c3Smrg */
158817ca54c3Smrg
158917ca54c3Smrgtypedef struct
159017ca54c3Smrg    {
159117ca54c3Smrg    BYTE	type;
159217ca54c3Smrg    BYTE        detail;
1593ea1d6981Smrg    CARD16	sequenceNumber;
1594ea1d6981Smrg    Time	time;
1595ea1d6981Smrg    Window	window;
159617ca54c3Smrg    BYTE	mode;
159717ca54c3Smrg    CARD8       deviceid;
159817ca54c3Smrg    BYTE	pad1, pad2;
1599ea1d6981Smrg    CARD32	pad00;
1600ea1d6981Smrg    CARD32	pad01;
1601ea1d6981Smrg    CARD32	pad02;
1602ea1d6981Smrg    CARD32	pad03;
160317ca54c3Smrg    }  deviceFocus;
160417ca54c3Smrg
160517ca54c3Smrg/**********************************************************
160617ca54c3Smrg *
160717ca54c3Smrg * DeviceStateNotify.
160817ca54c3Smrg *
160917ca54c3Smrg * Note that the two high-order bits in the classes_reported
161017ca54c3Smrg * field are the proximity state (InProximity or OutOfProximity),
161117ca54c3Smrg * and the device mode (Absolute or Relative), respectively.
161217ca54c3Smrg *
161317ca54c3Smrg */
161417ca54c3Smrg
161517ca54c3Smrgtypedef struct
161617ca54c3Smrg    {
161717ca54c3Smrg    BYTE	type;
161817ca54c3Smrg    BYTE        deviceid;
1619ea1d6981Smrg    CARD16	sequenceNumber;
1620ea1d6981Smrg    Time	time;
162117ca54c3Smrg    CARD8	num_keys;
162217ca54c3Smrg    CARD8	num_buttons;
162317ca54c3Smrg    CARD8	num_valuators;
162417ca54c3Smrg    CARD8       classes_reported;
162517ca54c3Smrg    CARD8       buttons[4];
162617ca54c3Smrg    CARD8       keys[4];
1627ea1d6981Smrg    INT32	valuator0;
1628ea1d6981Smrg    INT32	valuator1;
1629ea1d6981Smrg    INT32	valuator2;
163017ca54c3Smrg    }  deviceStateNotify;
163117ca54c3Smrg
163217ca54c3Smrg/**********************************************************
163317ca54c3Smrg *
163417ca54c3Smrg * DeviceKeyStateNotify.
163517ca54c3Smrg *
163617ca54c3Smrg */
163717ca54c3Smrg
163817ca54c3Smrgtypedef struct
163917ca54c3Smrg    {
164017ca54c3Smrg    BYTE	type;
164117ca54c3Smrg    BYTE        deviceid;
1642ea1d6981Smrg    CARD16	sequenceNumber;
164317ca54c3Smrg    CARD8       keys[28];
164417ca54c3Smrg    }  deviceKeyStateNotify;
164517ca54c3Smrg
164617ca54c3Smrg/**********************************************************
164717ca54c3Smrg *
164817ca54c3Smrg * DeviceButtonStateNotify.
164917ca54c3Smrg *
165017ca54c3Smrg */
165117ca54c3Smrg
165217ca54c3Smrgtypedef struct
165317ca54c3Smrg    {
165417ca54c3Smrg    BYTE	type;
165517ca54c3Smrg    BYTE        deviceid;
1656ea1d6981Smrg    CARD16	sequenceNumber;
165717ca54c3Smrg    CARD8       buttons[28];
165817ca54c3Smrg    }  deviceButtonStateNotify;
165917ca54c3Smrg
166017ca54c3Smrg/**********************************************************
166117ca54c3Smrg *
166217ca54c3Smrg * DeviceMappingNotify.
166317ca54c3Smrg * Fields must be kept in sync with core mappingnotify event.
166417ca54c3Smrg *
166517ca54c3Smrg */
166617ca54c3Smrg
166717ca54c3Smrgtypedef struct
166817ca54c3Smrg    {
166917ca54c3Smrg    BYTE	type;
167017ca54c3Smrg    BYTE        deviceid;
1671ea1d6981Smrg    CARD16      sequenceNumber;
167217ca54c3Smrg    CARD8       request;
167317ca54c3Smrg    KeyCode     firstKeyCode;
167417ca54c3Smrg    CARD8       count;
167517ca54c3Smrg    BYTE        pad1;
1676ea1d6981Smrg    Time        time;
1677ea1d6981Smrg    CARD32      pad00;
1678ea1d6981Smrg    CARD32      pad01;
1679ea1d6981Smrg    CARD32      pad02;
1680ea1d6981Smrg    CARD32      pad03;
1681ea1d6981Smrg    CARD32      pad04;
168217ca54c3Smrg    }  deviceMappingNotify;
168317ca54c3Smrg
168417ca54c3Smrg/**********************************************************
168517ca54c3Smrg *
168617ca54c3Smrg * ChangeDeviceNotify.
168717ca54c3Smrg *
168817ca54c3Smrg */
168917ca54c3Smrg
169017ca54c3Smrgtypedef struct
169117ca54c3Smrg    {
169217ca54c3Smrg    BYTE	type;
169317ca54c3Smrg    BYTE        deviceid;
1694ea1d6981Smrg    CARD16      sequenceNumber;
1695ea1d6981Smrg    Time        time;
169617ca54c3Smrg    CARD8       request;
169717ca54c3Smrg    BYTE        pad1, pad2, pad3;
1698ea1d6981Smrg    CARD32      pad00;
1699ea1d6981Smrg    CARD32      pad01;
1700ea1d6981Smrg    CARD32      pad02;
1701ea1d6981Smrg    CARD32      pad03;
1702ea1d6981Smrg    CARD32      pad04;
170317ca54c3Smrg    }  changeDeviceNotify;
170417ca54c3Smrg
170517ca54c3Smrg/**********************************************************
170617ca54c3Smrg *
170717ca54c3Smrg * devicePresenceNotify.
170817ca54c3Smrg *
170917ca54c3Smrg */
171017ca54c3Smrg
171117ca54c3Smrgtypedef struct
171217ca54c3Smrg    {
171317ca54c3Smrg    BYTE	type;
171417ca54c3Smrg    BYTE        pad00;
1715ea1d6981Smrg    CARD16      sequenceNumber;
1716ea1d6981Smrg    Time        time;
171717ca54c3Smrg    BYTE        devchange; /* Device{Added|Removed|Enabled|Disabled|ControlChanged} */
171817ca54c3Smrg    BYTE        deviceid;
1719ea1d6981Smrg    CARD16      control;
1720ea1d6981Smrg    CARD32      pad02;
1721ea1d6981Smrg    CARD32      pad03;
1722ea1d6981Smrg    CARD32      pad04;
1723ea1d6981Smrg    CARD32      pad05;
1724ea1d6981Smrg    CARD32      pad06;
172517ca54c3Smrg    }  devicePresenceNotify;
172617ca54c3Smrg
172717ca54c3Smrg
172817ca54c3Smrg/*********************************************************
172917ca54c3Smrg * DevicePropertyNotifyEvent
173017ca54c3Smrg *
173117ca54c3Smrg * Sent whenever a device's property changes.
173217ca54c3Smrg *
173317ca54c3Smrg */
173417ca54c3Smrg
173517ca54c3Smrgtypedef struct
173617ca54c3Smrg    {
173717ca54c3Smrg    BYTE        type;
173817ca54c3Smrg    BYTE        state;               /* NewValue or Deleted */
1739ea1d6981Smrg    CARD16      sequenceNumber;
1740ea1d6981Smrg    CARD32      time;
1741ea1d6981Smrg    Atom        atom;                /* affected property */
1742ea1d6981Smrg    CARD32      pad0;
1743ea1d6981Smrg    CARD32      pad1;
1744ea1d6981Smrg    CARD32      pad2;
1745ea1d6981Smrg    CARD32      pad3;
1746ea1d6981Smrg    CARD16      pad5;
174717ca54c3Smrg    CARD8       pad4;
174817ca54c3Smrg    CARD8       deviceid;            /* id of device */
174917ca54c3Smrg    } devicePropertyNotify;
175017ca54c3Smrg
175117ca54c3Smrg#undef Window
175217ca54c3Smrg#undef Time
175317ca54c3Smrg#undef KeyCode
175417ca54c3Smrg#undef Mask
175517ca54c3Smrg#undef Atom
175617ca54c3Smrg#undef Cursor
175717ca54c3Smrg
175817ca54c3Smrg#endif
1759