⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xinput.h

📁 远程桌面连接工具
💻 H
📖 第 1 页 / 共 3 页
字号:
/* $XConsortium: XInput.h,v 1.22 94/04/17 20:11:13 rws Exp $ *//************************************************************Copyright (c) 1989  X ConsortiumPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THEX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER INAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR INCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.Except as contained in this notice, the name of the X Consortium shall not beused in advertising or otherwise to promote the sale, use or other dealingsin this Software without prior written authorization from the X Consortium.Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, California.			All Rights ReservedPermission to use, copy, modify, and distribute this software and itsdocumentation for any purpose and without fee is hereby granted,provided that the above copyright notice appear in all copies and thatboth that copyright notice and this permission notice appear insupporting documentation, and that the name of Hewlett-Packard not beused in advertising or publicity pertaining to distribution of thesoftware without specific, written prior permission.HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDINGALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALLHEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ORANY 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 THISSOFTWARE.********************************************************//* Definitions used by the library and client */#ifndef _XINPUT_H_#define _XINPUT_H_#ifndef _XLIB_H_#include <X11/Xlib.h>#endif#ifndef _XI_H_#include "XI.h"#endif#define _deviceKeyPress		0#define _deviceKeyRelease	1#define _deviceButtonPress	0#define _deviceButtonRelease	1#define _deviceMotionNotify	0#define _deviceFocusIn		0#define _deviceFocusOut		1#define _proximityIn		0#define _proximityOut		1#define _deviceStateNotify	0#define _deviceMappingNotify	1#define _changeDeviceNotify	2#define FindTypeAndClass(d,type,_class,classid,offset) \    { int _i; XInputClassInfo *_ip; \    type = 0; _class = 0; \    for (_i=0, _ip= ((XDevice *) d)->classes; \	 _i< ((XDevice *) d)->num_classes; \	 _i++, _ip++) \	if (_ip->input_class == classid) \	    {type =  _ip->event_type_base + offset; \	     _class =  ((XDevice *) d)->device_id << 8 | type;}}#define DeviceKeyPress(d,type,_class) \    FindTypeAndClass(d, type, _class, KeyClass, _deviceKeyPress)#define DeviceKeyRelease(d,type,_class) \    FindTypeAndClass(d, type, _class, KeyClass, _deviceKeyRelease)#define DeviceButtonPress(d,type,_class) \    FindTypeAndClass(d, type, _class, ButtonClass, _deviceButtonPress)#define DeviceButtonRelease(d,type,_class) \    FindTypeAndClass(d, type, _class, ButtonClass, _deviceButtonRelease)#define DeviceMotionNotify(d,type,_class) \    FindTypeAndClass(d, type, _class, ValuatorClass, _deviceMotionNotify)#define DeviceFocusIn(d,type,_class) \    FindTypeAndClass(d, type, _class, FocusClass, _deviceFocusIn)#define DeviceFocusOut(d,type,_class) \    FindTypeAndClass(d, type, _class, FocusClass, _deviceFocusOut)#define ProximityIn(d,type,_class) \    FindTypeAndClass(d, type, _class, ProximityClass, _proximityIn)#define ProximityOut(d,type,_class) \    FindTypeAndClass(d, type, _class, ProximityClass, _proximityOut)#define DeviceStateNotify(d,type,_class) \    FindTypeAndClass(d, type, _class, OtherClass, _deviceStateNotify)#define DeviceMappingNotify(d,type,_class) \    FindTypeAndClass(d, type, _class, OtherClass, _deviceMappingNotify)#define ChangeDeviceNotify(d,type,_class) \    FindTypeAndClass(d, type, _class, OtherClass, _changeDeviceNotify)#define DevicePointerMotionHint(d,type,_class) \    { _class =  ((XDevice *) d)->device_id << 8 | _devicePointerMotionHint;}#define DeviceButton1Motion(d,type,_class) \    { _class =  ((XDevice *) d)->device_id << 8 | _deviceButton1Motion;}#define DeviceButton2Motion(d,type,_class) \    { _class =  ((XDevice *) d)->device_id << 8 | _deviceButton2Motion;}#define DeviceButton3Motion(d,type,_class) \    { _class =  ((XDevice *) d)->device_id << 8 | _deviceButton3Motion;}#define DeviceButton4Motion(d,type, _class) \    { _class =  ((XDevice *) d)->device_id << 8 | _deviceButton4Motion;}#define DeviceButton5Motion(d,type,_class) \    { _class =  ((XDevice *) d)->device_id << 8 | _deviceButton5Motion;}#define DeviceButtonMotion(d,type, _class) \    { _class =  ((XDevice *) d)->device_id << 8 | _deviceButtonMotion;}#define DeviceOwnerGrabButton(d,type,_class) \    { _class =  ((XDevice *) d)->device_id << 8 | _deviceOwnerGrabButton;}#define DeviceButtonPressGrab(d,type,_class) \    { _class =  ((XDevice *) d)->device_id << 8 | _deviceButtonGrab;}#define NoExtensionEvent(d,type,_class) \    { _class =  ((XDevice *) d)->device_id << 8 | _noExtensionEvent;}#define BadDevice(dpy,error) _xibaddevice(dpy, &error)#define BadClass(dpy,error) _xibadclass(dpy, &error)#define BadEvent(dpy,error) _xibadevent(dpy, &error)#define BadMode(dpy,error) _xibadmode(dpy, &error)#define DeviceBusy(dpy,error) _xidevicebusy(dpy, &error)/*************************************************************** * * DeviceKey events.  These events are sent by input devices that * support input class Keys. * The location of the X pointer is reported in the coordinate * fields of the x,y and x_root,y_root fields. * */typedef struct     {    int            type;         /* of event */    unsigned long  serial;       /* # of last request processed */    Bool           send_event;   /* true if from SendEvent request */    Display        *display;     /* Display the event was read from */    Window         window;       /* "event" window reported relative to */    XID            deviceid;    Window         root;         /* root window event occured on */    Window         subwindow;    /* child window */    Time           time;         /* milliseconds */    int            x, y;         /* x, y coordinates in event window */    int            x_root;       /* coordinates relative to root */    int            y_root;       /* coordinates relative to root */    unsigned int   state;        /* key or button mask */    unsigned int   keycode;      /* detail */    Bool           same_screen;  /* same screen flag */    unsigned int   device_state; /* device key or button mask */    unsigned char  axes_count;    unsigned char  first_axis;    int            axis_data[6];    } XDeviceKeyEvent;typedef XDeviceKeyEvent XDeviceKeyPressedEvent;typedef XDeviceKeyEvent XDeviceKeyReleasedEvent;/******************************************************************* * * DeviceButton events.  These events are sent by extension devices * that support input class Buttons. * */typedef struct {    int           type;         /* of event */    unsigned long serial;       /* # of last request processed by server */    Bool          send_event;   /* true if from a SendEvent request */    Display       *display;     /* Display the event was read from */    Window        window;       /* "event" window reported relative to */    XID           deviceid;    Window        root;         /* root window that the event occured on */    Window        subwindow;    /* child window */    Time          time;         /* milliseconds */    int           x, y;         /* x, y coordinates in event window */    int           x_root;       /* coordinates relative to root */    int           y_root;       /* coordinates relative to root */    unsigned int  state;        /* key or button mask */    unsigned int  button;       /* detail */    Bool          same_screen;  /* same screen flag */    unsigned int  device_state; /* device key or button mask */    unsigned char axes_count;    unsigned char first_axis;    int           axis_data[6];    } XDeviceButtonEvent;typedef XDeviceButtonEvent XDeviceButtonPressedEvent;typedef XDeviceButtonEvent XDeviceButtonReleasedEvent;/******************************************************************* * * DeviceMotionNotify event.  These events are sent by extension devices * that support input class Valuators. * */typedef struct     {    int           type;        /* of event */    unsigned long serial;      /* # of last request processed by server */    Bool          send_event;  /* true if from a SendEvent request */    Display       *display;    /* Display the event was read from */    Window        window;      /* "event" window reported relative to */    XID           deviceid;    Window        root;        /* root window that the event occured on */    Window        subwindow;   /* child window */    Time          time;        /* milliseconds */    int           x, y;        /* x, y coordinates in event window */    int           x_root;      /* coordinates relative to root */    int           y_root;      /* coordinates relative to root */    unsigned int  state;       /* key or button mask */    char          is_hint;     /* detail */    Bool          same_screen; /* same screen flag */    unsigned int  device_state; /* device key or button mask */    unsigned char axes_count;    unsigned char first_axis;    int           axis_data[6];    } XDeviceMotionEvent;/******************************************************************* * * DeviceFocusChange events.  These events are sent when the focus * of an extension device that can be focused is changed. * */typedef struct     {    int           type;       /* of event */    unsigned long serial;     /* # of last request processed by server */    Bool          send_event; /* true if from a SendEvent request */    Display       *display;   /* Display the event was read from */    Window        window;     /* "event" window reported relative to */    XID           deviceid;    int           mode;       /* NotifyNormal, NotifyGrab, NotifyUngrab */    int           detail;	/*	 * NotifyAncestor, NotifyVirtual, NotifyInferior, 	 * NotifyNonLinear,NotifyNonLinearVirtual, NotifyPointer,	 * NotifyPointerRoot, NotifyDetailNone 	 */    Time                time;    } XDeviceFocusChangeEvent;typedef XDeviceFocusChangeEvent XDeviceFocusInEvent;typedef XDeviceFocusChangeEvent XDeviceFocusOutEvent;/******************************************************************* * * ProximityNotify events.  These events are sent by those absolute * positioning devices that are capable of generating proximity information. * */typedef struct     {    int             type;      /* ProximityIn or ProximityOut */            unsigned long   serial;    /* # of last request processed by server */    Bool            send_event; /* true if this came from a SendEvent request */    Display         *display;  /* Display the event was read from */    Window          window;          XID	            deviceid;    Window          root;                Window          subwindow;          Time            time;                int             x, y;                int             x_root, y_root;      unsigned int    state;               Bool            same_screen;         unsigned int    device_state; /* device key or button mask */    unsigned char   axes_count;    unsigned char   first_axis;    int             axis_data[6];    } XProximityNotifyEvent;typedef XProximityNotifyEvent XProximityInEvent;typedef XProximityNotifyEvent XProximityOutEvent;/******************************************************************* * * DeviceStateNotify events are generated on EnterWindow and FocusIn  * for those clients who have selected DeviceState. * */typedef struct    {#if defined(__cplusplus) || defined(c_plusplus)    unsigned char	c_class;#else    unsigned char	class;#endif    unsigned char	length;    } XInputClass;typedef struct {    int           type;    unsigned long serial;       /* # of last request processed by server */    Bool          send_event;   /* true if this came from a SendEvent request */    Display       *display;     /* Display the event was read from */    Window        window;    XID           deviceid;    Time          time;    int           num_classes;    char	  data[64];} XDeviceStateNotifyEvent;	typedef struct {#if defined(__cplusplus) || defined(c_plusplus)    unsigned char	c_class;#else    unsigned char	class;#endif    unsigned char	length;    unsigned char	num_valuators;    unsigned char	mode;    int        		valuators[6];} XValuatorStatus;typedef struct {#if defined(__cplusplus) || defined(c_plusplus)    unsigned char	c_class;#else    unsigned char	class;#endif    unsigned char	length;    short		num_keys;    char        	keys[32];} XKeyStatus;typedef struct {#if defined(__cplusplus) || defined(c_plusplus)    unsigned char	c_class;#else    unsigned char	class;#endif    unsigned char	length;    short		num_buttons;    char        	buttons[32];} XButtonStatus;/******************************************************************* * * DeviceMappingNotify event.  This event is sent when the key mapping, * modifier mapping, or button mapping of an extension device is changed. * */typedef struct {    int           type;    unsigned long serial;       /* # of last request processed by server */    Bool          send_event;   /* true if this came from a SendEvent request */    Display       *display;     /* Display the event was read from */    Window        window;       /* unused */    XID           deviceid;    Time          time;    int           request;      /* one of MappingModifier, MappingKeyboard,                                    MappingPointer */    int           first_keycode;/* first keycode */    int           count;        /* defines range of change w. first_keycode*/} XDeviceMappingEvent;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -