XIproto.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
/* $Xorg: XIproto.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Hewlett-Packard not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
/* $XFree86: xc/include/extensions/XIproto.h,v 1.4 2001/01/17 17:53:17 dawes Exp $ */
#ifndef _XIPROTO_H
#define _XIPROTO_H
/* make sure types have right sizes for protocol structures. */
/*********************************************************
*
* number of events, errors, and extension name.
*
*/
#define MORE_EVENTS 0x80
#define DEVICE_BITS 0x7F
#define numInputClasses 7
#define IEVENTS 15
#define IERRORS 5
#define CLIENT_REQ 1
typedef struct _XExtEventInfo
{
typedef unsigned char *Pointer;
struct tmask
{
};
/*********************************************************
*
* Event constants used by library.
*
*/
#define XI_DeviceValuator 0
#define XI_DeviceKeyPress 1
#define XI_DeviceKeyRelease 2
#define XI_DeviceButtonPress 3
#define XI_DeviceButtonRelease 4
#define XI_DeviceMotionNotify 5
#define XI_DeviceFocusIn 6
#define XI_DeviceFocusOut 7
#define XI_ProximityIn 8
#define XI_ProximityOut 9
#define XI_DeviceStateNotify 10
#define XI_DeviceMappingNotify 11
#define XI_ChangeDeviceNotify 12
#define XI_DeviceKeystateNotify 13
#define XI_DeviceButtonstateNotify 14
/*********************************************************
*
* Protocol request constants
*
*/
#define X_GetExtensionVersion 1
#define X_ListInputDevices 2
#define X_OpenDevice 3
#define X_CloseDevice 4
#define X_SetDeviceMode 5
#define X_SelectExtensionEvent 6
#define X_GetSelectedExtensionEvents 7
#define X_ChangeDeviceDontPropagateList 8
#define X_GetDeviceDontPropagateList 9
#define X_GetDeviceMotionEvents 10
#define X_ChangeKeyboardDevice 11
#define X_ChangePointerDevice 12
#define X_GrabDevice 13
#define X_UngrabDevice 14
#define X_GrabDeviceKey 15
#define X_UngrabDeviceKey 16
#define X_GrabDeviceButton 17
#define X_UngrabDeviceButton 18
#define X_AllowDeviceEvents 19
#define X_GetDeviceFocus 20
#define X_SetDeviceFocus 21
#define X_GetFeedbackControl 22
#define X_ChangeFeedbackControl 23
#define X_GetDeviceKeyMapping 24
#define X_ChangeDeviceKeyMapping 25
#define X_GetDeviceModifierMapping 26
#define X_SetDeviceModifierMapping 27
#define X_GetDeviceButtonMapping 28
#define X_SetDeviceButtonMapping 29
#define X_QueryDeviceState 30
#define X_SendExtensionEvent 31
#define X_DeviceBell 32
#define X_SetDeviceValuators 33
#define X_GetDeviceControl 34
#define X_ChangeDeviceControl 35
/*********************************************************
*
* Protocol request and reply structures.
*
* GetExtensionVersion.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* ListInputDevices.
*
*/
typedef struct {
typedef struct {
typedef struct _xDeviceInfo *xDeviceInfoPtr;
typedef struct _xAnyClassinfo *xAnyClassPtr;
typedef struct _xAnyClassinfo {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct _xDeviceInfo {
} xDeviceInfo;
typedef struct _xKeyInfo *xKeyInfoPtr;
typedef struct _xKeyInfo {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
} xKeyInfo;
typedef struct _xButtonInfo *xButtonInfoPtr;
typedef struct _xButtonInfo {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
} xButtonInfo;
typedef struct _xValuatorInfo *xValuatorInfoPtr;
typedef struct _xValuatorInfo {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct _xAxisInfo *xAxisInfoPtr;
typedef struct _xAxisInfo {
} xAxisInfo;
/*********************************************************
*
* OpenDevice.
*
*/
typedef struct {
typedef struct {
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
/*********************************************************
*
* CloseDevice.
*
*/
typedef struct {
/*********************************************************
*
* SetDeviceMode.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* SelectExtensionEvent.
*
*/
typedef struct {
/*********************************************************
*
* GetSelectedExtensionEvent.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* ChangeDeviceDontPropagateList.
*
*/
typedef struct {
/*********************************************************
*
* GetDeviceDontPropagateList.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* GetDeviceMotionEvents.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* ChangeKeyboardDevice.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* ChangePointerDevice.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* GrabDevice.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* UngrabDevice.
*
*/
typedef struct {
/*********************************************************
*
* GrabDeviceKey.
*
*/
typedef struct {
/*********************************************************
*
* UngrabDeviceKey.
*
*/
typedef struct {
/*********************************************************
*
* GrabDeviceButton.
*
*/
typedef struct {
/*********************************************************
*
* UngrabDeviceButton.
*
*/
typedef struct {
/*********************************************************
*
* AllowDeviceEvents.
*
*/
typedef struct {
/*********************************************************
*
* GetDeviceFocus.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* SetDeviceFocus.
*
*/
typedef struct {
/*********************************************************
*
* GetFeedbackControl.
*
*/
typedef struct {
typedef struct {
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
/*********************************************************
*
* ChangeFeedbackControl.
*
*/
typedef struct {
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
} xFeedbackCtl;
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
/*********************************************************
*
* GetDeviceKeyMapping.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* ChangeDeviceKeyMapping.
*
*/
typedef struct {
/*********************************************************
*
* GetDeviceModifierMapping.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* SetDeviceModifierMapping.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* GetDeviceButtonMapping.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* SetDeviceButtonMapping.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* QueryDeviceState.
*
*/
typedef struct {
typedef struct {
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
} xKeyState;
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
} xButtonState;
typedef struct {
#if defined(__cplusplus) || defined(c_plusplus)
#else
#endif
/*********************************************************
*
* SendExtensionEvent.
* THIS REQUEST MUST BE KEPT A MULTIPLE OF 8 BYTES IN LENGTH!
* MORE EVENTS MAY FOLLOW AND THEY MUST BE QUAD-ALIGNED!
*
*/
typedef struct {
/*********************************************************
*
* DeviceBell.
*
*/
typedef struct {
/*********************************************************
*
* SetDeviceValuators.
*
*/
typedef struct {
typedef struct {
/*********************************************************
*
* GetDeviceControl.
*
*/
typedef struct {
typedef struct {
typedef struct {
} xDeviceState;
typedef struct {
/*********************************************************
*
* ChangeDeviceControl.
*
*/
typedef struct {
typedef struct {
typedef struct {
} xDeviceCtl;
typedef struct {
/* Merged from Metrolink tree for XINPUT stuff */
typedef struct {
/* End of merged section */
/**********************************************************
*
* Input extension events.
*
* DeviceValuator
*
*/
typedef struct
{
/**********************************************************
*
* DeviceKeyButtonPointer.
*
* Used for: DeviceKeyPress, DeviceKeyRelease,
* DeviceButtonPress, DeviceButtonRelease,
* ProximityIn, ProximityOut
* DeviceMotionNotify,
*
*/
typedef struct
{
/**********************************************************
*
* DeviceFocus.
*
*/
typedef struct
{
} deviceFocus;
/**********************************************************
*
* DeviceStateNotify.
*
* Note that the two high-order bits in the classes_reported
* field are the proximity state (InProximity or OutOfProximity),
* and the device mode (Absolute or Relative), respectively.
*
*/
typedef struct
{
/**********************************************************
*
* DeviceKeyStateNotify.
*
*/
typedef struct
{
/**********************************************************
*
* DeviceButtonStateNotify.
*
*/
typedef struct
{
/**********************************************************
*
* DeviceMappingNotify.
* Fields must be kept in sync with core mappingnotify event.
*
*/
typedef struct
{
/**********************************************************
*
* ChangeDeviceNotify.
*
*/
typedef struct
{
#endif