74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* $Xorg: XInput.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncCopyright 1989, 1998 The Open Group
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncPermission to use, copy, modify, distribute, and sell this software and its
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncdocumentation for any purpose is hereby granted without fee, provided that
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncthe above copyright notice appear in all copies and that both that
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynccopyright notice and this permission notice appear in supporting
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncdocumentation.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncThe above copyright notice and this permission notice shall be included in
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncall copies or substantial portions of the Software.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncExcept as contained in this notice, the name of The Open Group shall not be
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncused in advertising or otherwise to promote the sale, use or other dealings
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncin this Software without prior written authorization from The Open Group.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncCopyright 1989 by Hewlett-Packard Company, Palo Alto, California.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync All Rights Reserved
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncPermission to use, copy, modify, and distribute this software and its
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncdocumentation for any purpose and without fee is hereby granted,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncprovided that the above copyright notice appear in all copies and that
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncboth that copyright notice and this permission notice appear in
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncsupporting documentation, and that the name of Hewlett-Packard not be
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncused in advertising or publicity pertaining to distribution of the
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncsoftware without specific, written prior permission.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncHEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncHEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncSOFTWARE.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync********************************************************/
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* $XFree86: xc/include/extensions/XInput.h,v 1.3 2001/12/14 19:53:28 dawes Exp $ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* Definitions used by the library and client */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#ifndef _XINPUT_H_
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _XINPUT_H_
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#include <X11/Xlib.h>
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#include <X11/extensions/XI.h>
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _deviceKeyPress 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _deviceKeyRelease 1
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _deviceButtonPress 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _deviceButtonRelease 1
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _deviceMotionNotify 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _deviceFocusIn 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _deviceFocusOut 1
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _proximityIn 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _proximityOut 1
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _deviceStateNotify 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _deviceMappingNotify 1
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _changeDeviceNotify 2
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define FindTypeAndClass(d,type,_class,classid,offset) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync { int _i; XInputClassInfo *_ip; \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync type = 0; _class = 0; \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync for (_i=0, _ip= ((XDevice *) d)->classes; \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync _i< ((XDevice *) d)->num_classes; \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync _i++, _ip++) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync if (_ip->input_class == classid) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync {type = _ip->event_type_base + offset; \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync _class = ((XDevice *) d)->device_id << 8 | type;}}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceKeyPress(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FindTypeAndClass(d, type, _class, KeyClass, _deviceKeyPress)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceKeyRelease(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FindTypeAndClass(d, type, _class, KeyClass, _deviceKeyRelease)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceButtonPress(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FindTypeAndClass(d, type, _class, ButtonClass, _deviceButtonPress)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceButtonRelease(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FindTypeAndClass(d, type, _class, ButtonClass, _deviceButtonRelease)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceMotionNotify(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FindTypeAndClass(d, type, _class, ValuatorClass, _deviceMotionNotify)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceFocusIn(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FindTypeAndClass(d, type, _class, FocusClass, _deviceFocusIn)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceFocusOut(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FindTypeAndClass(d, type, _class, FocusClass, _deviceFocusOut)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ProximityIn(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FindTypeAndClass(d, type, _class, ProximityClass, _proximityIn)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ProximityOut(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FindTypeAndClass(d, type, _class, ProximityClass, _proximityOut)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceStateNotify(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FindTypeAndClass(d, type, _class, OtherClass, _deviceStateNotify)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceMappingNotify(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FindTypeAndClass(d, type, _class, OtherClass, _deviceMappingNotify)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ChangeDeviceNotify(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FindTypeAndClass(d, type, _class, OtherClass, _changeDeviceNotify)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DevicePointerMotionHint(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync { _class = ((XDevice *) d)->device_id << 8 | _devicePointerMotionHint;}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceButton1Motion(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync { _class = ((XDevice *) d)->device_id << 8 | _deviceButton1Motion;}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceButton2Motion(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync { _class = ((XDevice *) d)->device_id << 8 | _deviceButton2Motion;}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceButton3Motion(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync { _class = ((XDevice *) d)->device_id << 8 | _deviceButton3Motion;}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceButton4Motion(d,type, _class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync { _class = ((XDevice *) d)->device_id << 8 | _deviceButton4Motion;}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceButton5Motion(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync { _class = ((XDevice *) d)->device_id << 8 | _deviceButton5Motion;}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceButtonMotion(d,type, _class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync { _class = ((XDevice *) d)->device_id << 8 | _deviceButtonMotion;}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceOwnerGrabButton(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync { _class = ((XDevice *) d)->device_id << 8 | _deviceOwnerGrabButton;}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceButtonPressGrab(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync { _class = ((XDevice *) d)->device_id << 8 | _deviceButtonGrab;}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define NoExtensionEvent(d,type,_class) \
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync { _class = ((XDevice *) d)->device_id << 8 | _noExtensionEvent;}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define BadDevice(dpy,error) _xibaddevice(dpy, &error)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define BadClass(dpy,error) _xibadclass(dpy, &error)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define BadEvent(dpy,error) _xibadevent(dpy, &error)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define BadMode(dpy,error) _xibadmode(dpy, &error)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define DeviceBusy(dpy,error) _xidevicebusy(dpy, &error)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/***************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * DeviceKey events. These events are sent by input devices that
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * support input class Keys.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * The location of the X pointer is reported in the coordinate
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * fields of the x,y and x_root,y_root fields.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int type; /* of event */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long serial; /* # of last request processed */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool send_event; /* true if from SendEvent request */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display *display; /* Display the event was read from */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window window; /* "event" window reported relative to */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID deviceid;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window root; /* root window event occured on */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window subwindow; /* child window */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time time; /* milliseconds */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int x, y; /* x, y coordinates in event window */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int x_root; /* coordinates relative to root */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int y_root; /* coordinates relative to root */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int state; /* key or button mask */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int keycode; /* detail */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool same_screen; /* same screen flag */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int device_state; /* device key or button mask */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char axes_count;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char first_axis;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int axis_data[6];
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync } XDeviceKeyEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef XDeviceKeyEvent XDeviceKeyPressedEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef XDeviceKeyEvent XDeviceKeyReleasedEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * DeviceButton events. These events are sent by extension devices
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * that support input class Buttons.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int type; /* of event */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long serial; /* # of last request processed by server */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool send_event; /* true if from a SendEvent request */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display *display; /* Display the event was read from */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window window; /* "event" window reported relative to */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID deviceid;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window root; /* root window that the event occured on */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window subwindow; /* child window */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time time; /* milliseconds */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int x, y; /* x, y coordinates in event window */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int x_root; /* coordinates relative to root */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int y_root; /* coordinates relative to root */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int state; /* key or button mask */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int button; /* detail */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool same_screen; /* same screen flag */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int device_state; /* device key or button mask */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char axes_count;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char first_axis;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int axis_data[6];
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync } XDeviceButtonEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef XDeviceButtonEvent XDeviceButtonPressedEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef XDeviceButtonEvent XDeviceButtonReleasedEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * DeviceMotionNotify event. These events are sent by extension devices
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * that support input class Valuators.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int type; /* of event */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long serial; /* # of last request processed by server */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool send_event; /* true if from a SendEvent request */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display *display; /* Display the event was read from */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window window; /* "event" window reported relative to */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID deviceid;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window root; /* root window that the event occured on */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window subwindow; /* child window */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time time; /* milliseconds */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int x, y; /* x, y coordinates in event window */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int x_root; /* coordinates relative to root */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int y_root; /* coordinates relative to root */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int state; /* key or button mask */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync char is_hint; /* detail */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool same_screen; /* same screen flag */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int device_state; /* device key or button mask */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char axes_count;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char first_axis;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int axis_data[6];
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync } XDeviceMotionEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * DeviceFocusChange events. These events are sent when the focus
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * of an extension device that can be focused is changed.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int type; /* of event */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long serial; /* # of last request processed by server */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool send_event; /* true if from a SendEvent request */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display *display; /* Display the event was read from */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window window; /* "event" window reported relative to */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID deviceid;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int detail;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync /*
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * NotifyAncestor, NotifyVirtual, NotifyInferior,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * NotifyNonLinear,NotifyNonLinearVirtual, NotifyPointer,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * NotifyPointerRoot, NotifyDetailNone
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time time;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync } XDeviceFocusChangeEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef XDeviceFocusChangeEvent XDeviceFocusInEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef XDeviceFocusChangeEvent XDeviceFocusOutEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * ProximityNotify events. These events are sent by those absolute
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * positioning devices that are capable of generating proximity information.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int type; /* ProximityIn or ProximityOut */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long serial; /* # of last request processed by server */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool send_event; /* true if this came from a SendEvent request */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display *display; /* Display the event was read from */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window window;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID deviceid;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window root;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window subwindow;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time time;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int x, y;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int x_root, y_root;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int state;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool same_screen;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int device_state; /* device key or button mask */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char axes_count;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char first_axis;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int axis_data[6];
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync } XProximityNotifyEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef XProximityNotifyEvent XProximityInEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef XProximityNotifyEvent XProximityOutEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * DeviceStateNotify events are generated on EnterWindow and FocusIn
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * for those clients who have selected DeviceState.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync } XInputClass;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int type;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long serial; /* # of last request processed by server */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool send_event; /* true if this came from a SendEvent request */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display *display; /* Display the event was read from */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window window;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID deviceid;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time time;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int num_classes;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync char data[64];
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XDeviceStateNotifyEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char num_valuators;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char mode;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int valuators[6];
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XValuatorStatus;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync short num_keys;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync char keys[32];
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XKeyStatus;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync short num_buttons;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync char buttons[32];
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XButtonStatus;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * DeviceMappingNotify event. This event is sent when the key mapping,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * modifier mapping, or button mapping of an extension device is changed.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int type;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long serial; /* # of last request processed by server */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool send_event; /* true if this came from a SendEvent request */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display *display; /* Display the event was read from */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window window; /* unused */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID deviceid;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time time;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int request; /* one of MappingModifier, MappingKeyboard,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync MappingPointer */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int first_keycode;/* first keycode */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int count; /* defines range of change w. first_keycode*/
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XDeviceMappingEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * ChangeDeviceNotify event. This event is sent when an
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * XChangeKeyboard or XChangePointer request is made.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int type;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long serial; /* # of last request processed by server */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool send_event; /* true if this came from a SendEvent request */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display *display; /* Display the event was read from */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window window; /* unused */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID deviceid;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time time;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int request; /* NewPointer or NewKeyboard */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XChangeDeviceNotifyEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Control structures for input devices that support input class
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Feedback. These are used by the XGetFeedbackControl and
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * XChangeFeedbackControl functions.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XFeedbackState;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int click;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int percent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int pitch;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int duration;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int led_mask;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int global_auto_repeat;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync char auto_repeats[32];
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XKbdFeedbackState;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int accelNum;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int accelDenom;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int threshold;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XPtrFeedbackState;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int resolution;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int minVal;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int maxVal;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XIntegerFeedbackState;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int max_symbols;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int num_syms_supported;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync KeySym *syms_supported;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XStringFeedbackState;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int percent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int pitch;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int duration;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XBellFeedbackState;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int led_values;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int led_mask;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XLedFeedbackState;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XFeedbackControl;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int accelNum;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int accelDenom;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int threshold;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XPtrFeedbackControl;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int click;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int percent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int pitch;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int duration;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int led_mask;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int led_value;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int key;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int auto_repeat_mode;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XKbdFeedbackControl;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int num_keysyms;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync KeySym *syms_to_display;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XStringFeedbackControl;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int int_to_display;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XIntegerFeedbackControl;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int percent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int pitch;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int duration;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XBellFeedbackControl;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int led_mask;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int led_values;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XLedFeedbackControl;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Device control structures.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID control;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XDeviceControl;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID control;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int first_valuator;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int num_valuators;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int *resolutions;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XDeviceResolutionControl;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID control;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int num_valuators;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int *resolutions;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int *min_resolutions;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int *max_resolutions;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XDeviceResolutionState;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * An array of XDeviceList structures is returned by the
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * XListInputDevices function. Each entry contains information
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * about one input device. Among that information is an array of
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * pointers to structures that describe the characteristics of
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * the input device.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _XAnyClassinfo *XAnyClassPtr;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _XAnyClassinfo {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync } XAnyClassInfo;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _XDeviceInfo *XDeviceInfoPtr;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _XDeviceInfo
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Atom type;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync char *name;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int num_classes;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int use;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XAnyClassPtr inputclassinfo;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync } XDeviceInfo;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _XKeyInfo *XKeyInfoPtr;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _XKeyInfo
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned short min_keycode;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned short max_keycode;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned short num_keys;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync } XKeyInfo;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _XButtonInfo *XButtonInfoPtr;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _XButtonInfo {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync short num_buttons;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync } XButtonInfo;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _XAxisInfo *XAxisInfoPtr;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _XAxisInfo {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int resolution;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int min_value;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int max_value;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync } XAxisInfo;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _XValuatorInfo *XValuatorInfoPtr;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct _XValuatorInfo
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char num_axes;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char mode;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long motion_buffer;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XAxisInfoPtr axes;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync } XValuatorInfo;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * An XDevice structure is returned by the XOpenDevice function.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * It contains an array of pointers to XInputClassInfo structures.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Each contains information about a class of input supported by the
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * device, including a pointer to an array of data for each type of event
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * the device reports.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char input_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char event_type_base;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XInputClassInfo;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID device_id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int num_classes;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XInputClassInfo *classes;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XDevice;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * The following structure is used to return information for the
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * XGetSelectedExtensionEvents function.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XEventClass event_type;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID device;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XEventList;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * The following structure is used to return motion history data from
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * an input device that supports the input class Valuators.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * This information is returned by the XGetDeviceMotionEvents function.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time time;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int *data;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XDeviceTimeCoord;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Device state structure.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * This is returned by the XQueryDeviceState request.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID device_id;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int num_classes;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XInputClass *data;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XDeviceState;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Note that the mode field is a bitfield that reports the Proximity
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * status of the device as well as the mode. The mode field should
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * be OR'd with the mask DeviceMode and compared with the values
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Absolute and Relative to determine the mode, and should be OR'd
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * with the mask ProximityState and compared with the values InProximity
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * and OutOfProximity to determine the proximity state.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char num_valuators;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char mode;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int *valuators;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XValuatorState;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync short num_keys;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync char keys[32];
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XKeyState;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if defined(__cplusplus) || defined(c_plusplus)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char c_class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char class;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char length;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync short num_buttons;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync char buttons[32];
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XButtonState;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*******************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Function definitions.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync_XFUNCPROTOBEGIN
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XChangeKeyboardDevice(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XChangePointerDevice(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* xaxis */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* yaxis */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XGrabDevice(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* grab_window */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool /* ownerEvents */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* event count */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XEventClass* /* event_list */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* this_device_mode */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* other_devices_mode */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time /* time */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XUngrabDevice(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time /* time */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XGrabDeviceKey(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int /* key */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int /* modifiers */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* modifier_device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* grab_window */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool /* owner_events */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int /* event_count */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XEventClass* /* event_list */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* this_device_mode */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* other_devices_mode */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XUngrabDeviceKey(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int /* key */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int /* modifiers */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* modifier_dev */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* grab_window */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XGrabDeviceButton(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int /* button */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int /* modifiers */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* modifier_device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* grab_window */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool /* owner_events */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int /* event_count */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XEventClass* /* event_list */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* this_device_mode */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* other_devices_mode */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XUngrabDeviceButton(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int /* button */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int /* modifiers */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* modifier_dev */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* grab_window */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XAllowDeviceEvents(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* event_mode */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time /* time */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XGetDeviceFocus(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window* /* focus */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* revert_to */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time* /* time */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XSetDeviceFocus(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* focus */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* revert_to */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time /* time */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern XFeedbackState *XGetFeedbackControl(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* num_feedbacks */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XFreeFeedbackList(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XFeedbackState* /* list */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XChangeFeedbackControl(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long /* mask */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XFeedbackControl* /* f */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XDeviceBell(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID /* feedbackclass */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID /* feedbackid */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* percent */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern KeySym *XGetDeviceKeyMapping(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedWidePrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int /* first */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#else
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync KeyCode /* first */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* keycount */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* syms_per_code */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XChangeDeviceKeyMapping(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* first */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* syms_per_code */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync KeySym* /* keysyms */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* count */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern XModifierKeymap *XGetDeviceModifierMapping(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XSetDeviceModifierMapping(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XModifierKeymap* /* modmap */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XSetDeviceButtonMapping(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char* /* map[] */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* nmap */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XGetDeviceButtonMapping(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char* /* map[] */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int /* nmap */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern XDeviceState *XQueryDeviceState(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XFreeDeviceState(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDeviceState* /* list */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern XExtensionVersion *XGetExtensionVersion(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync _Xconst char* /* name */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern XDeviceInfo *XListInputDevices(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* ndevices */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XFreeDeviceList(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDeviceInfo* /* list */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern XDevice *XOpenDevice(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XID /* id */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XCloseDevice(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XSetDeviceMode(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* mode */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XSetDeviceValuators(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* valuators */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* first_valuator */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* num_valuators */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern XDeviceControl *XGetDeviceControl(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* control */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XChangeDeviceControl(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* control */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDeviceControl* /* d */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XSelectExtensionEvent(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* w */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XEventClass* /* event_list */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* count */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XGetSelectedExtensionEvents(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* w */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* this_client_count */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XEventClass** /* this_client_list */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* all_clients_count */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XEventClass** /* all_clients_list */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern int XChangeDeviceDontPropagateList(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* window */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* count */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XEventClass* /* events */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* mode */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern XEventClass *XGetDeviceDontPropagateList(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* window */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* count */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern Status XSendExtensionEvent(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* dest */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool /* prop */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* count */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XEventClass* /* list */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XEvent* /* event */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern XDeviceTimeCoord *XGetDeviceMotionEvents(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDevice* /* device */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time /* start */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time /* stop */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* nEvents */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* mode */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* axis_count */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XFreeDeviceMotionEvents(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDeviceTimeCoord* /* events */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XFreeDeviceControl(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XDeviceControl* /* control */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync_XFUNCPROTOEND
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif /* _XINPUT_H_ */