📄 xinput.h
字号:
/******************************************************************* * * ChangeDeviceNotify event. This event is sent when an * XChangeKeyboard or XChangePointer request is made. * */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; /* NewPointer or NewKeyboard */} XChangeDeviceNotifyEvent;/******************************************************************* * * Control structures for input devices that support input class * Feedback. These are used by the XGetFeedbackControl and * XChangeFeedbackControl functions. * */typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id;} XFeedbackState;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id; int click; int percent; int pitch; int duration; int led_mask; int global_auto_repeat; char auto_repeats[32];} XKbdFeedbackState;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id; int accelNum; int accelDenom; int threshold;} XPtrFeedbackState;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id; int resolution; int minVal; int maxVal;} XIntegerFeedbackState;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id; int max_symbols; int num_syms_supported; KeySym *syms_supported;} XStringFeedbackState;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id; int percent; int pitch; int duration;} XBellFeedbackState;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id; int led_values; int led_mask;} XLedFeedbackState;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id;} XFeedbackControl;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id; int accelNum; int accelDenom; int threshold;} XPtrFeedbackControl;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id; int click; int percent; int pitch; int duration; int led_mask; int led_value; int key; int auto_repeat_mode;} XKbdFeedbackControl;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id; int num_keysyms; KeySym *syms_to_display;} XStringFeedbackControl;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id; int int_to_display;} XIntegerFeedbackControl;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id; int percent; int pitch; int duration;} XBellFeedbackControl;typedef struct {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; XID id; int led_mask; int led_values;} XLedFeedbackControl;/******************************************************************* * * Device control structures. * */typedef struct { XID control; int length;} XDeviceControl;typedef struct { XID control; int length; int first_valuator; int num_valuators; int *resolutions;} XDeviceResolutionControl;typedef struct { XID control; int length; int num_valuators; int *resolutions; int *min_resolutions; int *max_resolutions;} XDeviceResolutionState;/******************************************************************* * * An array of XDeviceList structures is returned by the * XListInputDevices function. Each entry contains information * about one input device. Among that information is an array of * pointers to structures that describe the characteristics of * the input device. * */typedef struct _XAnyClassinfo *XAnyClassPtr;typedef struct _XAnyClassinfo {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; } XAnyClassInfo;typedef struct _XDeviceInfo *XDeviceInfoPtr;typedef struct _XDeviceInfo { XID id; Atom type; char *name; int num_classes; int use; XAnyClassPtr inputclassinfo; } XDeviceInfo;typedef struct _XKeyInfo *XKeyInfoPtr;typedef struct _XKeyInfo {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; unsigned short min_keycode; unsigned short max_keycode; unsigned short num_keys; } XKeyInfo;typedef struct _XButtonInfo *XButtonInfoPtr;typedef struct _XButtonInfo {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; short num_buttons; } XButtonInfo;typedef struct _XAxisInfo *XAxisInfoPtr;typedef struct _XAxisInfo { int resolution; int min_value; int max_value; } XAxisInfo;typedef struct _XValuatorInfo *XValuatorInfoPtr;typedef struct _XValuatorInfo {#if defined(__cplusplus) || defined(c_plusplus) XID c_class;#else XID class;#endif int length; unsigned char num_axes; unsigned char mode; unsigned long motion_buffer; XAxisInfoPtr axes; } XValuatorInfo;/******************************************************************* * * An XDevice structure is returned by the XOpenDevice function. * It contains an array of pointers to XInputClassInfo structures. * Each contains information about a class of input supported by the * device, including a pointer to an array of data for each type of event * the device reports. * */typedef struct { unsigned char input_class; unsigned char event_type_base;} XInputClassInfo;typedef struct { XID device_id; int num_classes; XInputClassInfo *classes;} XDevice;/******************************************************************* * * The following structure is used to return information for the * XGetSelectedExtensionEvents function. * */typedef struct { XEventClass event_type; XID device;} XEventList;/******************************************************************* * * The following structure is used to return motion history data from * an input device that supports the input class Valuators. * This information is returned by the XGetDeviceMotionEvents function. * */typedef struct { Time time; int *data;} XDeviceTimeCoord;/******************************************************************* * * Device state structure. * This is returned by the XQueryDeviceState request. * */typedef struct { XID device_id; int num_classes; XInputClass *data;} XDeviceState;/******************************************************************* * * Note that the mode field is a bitfield that reports the Proximity * status of the device as well as the mode. The mode field should * be OR'd with the mask DeviceMode and compared with the values * Absolute and Relative to determine the mode, and should be OR'd * with the mask ProximityState and compared with the values InProximity * and OutOfProximity to determine the proximity state. * */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;} XValuatorState;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -