inputproto 1.4.2.1

This commit is contained in:
matthieu 2007-11-24 16:20:15 +00:00
parent 1969f0b7b1
commit 2f598ef997
4 changed files with 193 additions and 19 deletions

View File

@ -137,6 +137,7 @@ SOFTWARE.
#define XInput_Add_XDeviceBell 2
#define XInput_Add_XSetDeviceValuators 3
#define XInput_Add_XChangeDeviceControl 4
#define XInput_Add_DevicePresenceNotify 5
#define XI_Absent 0
#define XI_Present 1
@ -153,7 +154,14 @@ SOFTWARE.
#define XI_Add_XChangeDeviceControl_Major 1
#define XI_Add_XChangeDeviceControl_Minor 3
#define XI_Add_DevicePresenceNotify_Major 1
#define XI_Add_DevicePresenceNotify_Minor 4
#define DEVICE_RESOLUTION 1
#define DEVICE_ABS_CALIB 2
#define DEVICE_CORE 3
#define DEVICE_ENABLE 4
#define DEVICE_ABS_AREA 5
#define NoSuchExtension 1
@ -171,6 +179,8 @@ SOFTWARE.
#define IsXPointer 0
#define IsXKeyboard 1
#define IsXExtensionDevice 2
#define IsXExtensionKeyboard 3
#define IsXExtensionPointer 4
#define AsyncThisDevice 0
#define SyncThisDevice 1
@ -204,12 +214,6 @@ SOFTWARE.
#define DeviceMode (1L << 0)
#define Relative 0
#define Absolute 1
/* Merged from Metrolink tree for XINPUT stuff */
#define TS_Raw 57
#define TS_Scaled 58
#define SendCoreEvents 59
#define DontSendCoreEvents 60
/* End of merged section */
#define ProximityState (1L << 1)
#define InProximity (0L << 1)
@ -244,6 +248,14 @@ SOFTWARE.
#define _deviceOwnerGrabButton 8
#define _noExtensionEvent 9
#define _devicePresence 0
#define DeviceAdded 0
#define DeviceRemoved 1
#define DeviceEnabled 2
#define DeviceDisabled 3
#define DeviceUnrecoverable 4
#define XI_BadDevice 0
#define XI_BadEvent 1
#define XI_BadMode 2

View File

@ -149,6 +149,13 @@ SOFTWARE.
#define NoExtensionEvent(d,type,_class) \
{ _class = ((XDevice *) d)->device_id << 8 | _noExtensionEvent;}
#define DevicePresence(dpy, type, _class) \
{ \
extern int _XiGetDevicePresenceNotifyEvent(Display *); \
type = _XiGetDevicePresenceNotifyEvent(dpy); \
_class = (0x10000 | _devicePresence); \
}
#define BadDevice(dpy,error) _xibaddevice(dpy, &error)
#define BadClass(dpy,error) _xibadclass(dpy, &error)
@ -416,6 +423,31 @@ typedef struct {
int request; /* NewPointer or NewKeyboard */
} XChangeDeviceNotifyEvent;
/*******************************************************************
*
* DevicePresenceNotify event. This event is sent when the list of
* input devices changes, in which case devchange will be false, and
* no information about the change will be contained in the event;
* the client should use XListInputDevices() to learn what has changed.
*
* If devchange is true, an attribute that the server believes is
* important has changed on a device, and the client should use
* XGetDeviceControl to examine the device. If control is non-zero,
* then that control has changed meaningfully.
*/
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 */
Time time;
Bool devchange;
XID deviceid;
XID control;
} XDevicePresenceNotifyEvent;
/*******************************************************************
*
* Control structures for input devices that support input class
@ -632,6 +664,49 @@ typedef struct {
int *max_resolutions;
} XDeviceResolutionState;
typedef struct {
XID control;
int length;
int min_x;
int max_x;
int min_y;
int max_y;
int flip_x;
int flip_y;
int rotation;
int button_threshold;
} XDeviceAbsCalibControl, XDeviceAbsCalibState;
typedef struct {
XID control;
int length;
int offset_x;
int offset_y;
int width;
int height;
int screen;
XID following;
} XDeviceAbsAreaControl, XDeviceAbsAreaState;
typedef struct {
XID control;
int length;
int status;
} XDeviceCoreControl;
typedef struct {
XID control;
int length;
int status;
int iscore;
} XDeviceCoreState;
typedef struct {
XID control;
int length;
int enable;
} XDeviceEnableControl, XDeviceEnableState;
/*******************************************************************
*
* An array of XDeviceList structures is returned by the

View File

@ -72,7 +72,7 @@ SOFTWARE.
#define numInputClasses 7
#define IEVENTS 15
#define IEVENTS 16
#define IERRORS 5
#define CLIENT_REQ 1
@ -113,6 +113,7 @@ struct tmask
#define XI_ChangeDeviceNotify 12
#define XI_DeviceKeystateNotify 13
#define XI_DeviceButtonstateNotify 14
#define XI_DevicePresenceNotify 15
/*********************************************************
*
@ -1290,6 +1291,46 @@ typedef struct {
CARD32 num_valuators B32; /* number of valuators */
} xDeviceResolutionState;
typedef struct {
CARD16 control B16;
CARD16 length B16;
INT32 min_x B32;
INT32 max_x B32;
INT32 min_y B32;
INT32 max_y B32;
CARD32 flip_x B32;
CARD32 flip_y B32;
CARD32 rotation B32;
CARD32 button_threshold B32;
} xDeviceAbsCalibState;
typedef struct {
CARD16 control B16;
CARD16 length B16;
CARD32 offset_x B32;
CARD32 offset_y B32;
CARD32 width B32;
CARD32 height B32;
CARD32 screen B32;
CARD32 following B32;
} xDeviceAbsAreaState;
typedef struct {
CARD16 control B16; /* control type */
CARD16 length B16; /* control length */
CARD8 status;
CARD8 iscore;
CARD16 pad1 B16;
} xDeviceCoreState;
typedef struct {
CARD16 control B16; /* control type */
CARD16 length B16; /* control length */
CARD8 enable;
CARD8 pad0;
CARD16 pad1 B16;
} xDeviceEnableState;
/*********************************************************
*
* ChangeDeviceControl.
@ -1332,21 +1373,45 @@ typedef struct {
CARD8 pad1,pad2;
} xDeviceResolutionCtl;
/* Merged from Metrolink tree for XINPUT stuff */
typedef struct {
CARD16 control B16;
CARD16 length B16;
INT32 min_x;
INT32 max_x;
INT32 min_y;
INT32 max_y;
CARD32 flip_x;
CARD32 flip_y;
CARD32 rotation;
CARD32 button_threshold;
} xDeviceAbsCalibCtl;
typedef struct {
CARD16 control;
CARD16 length;
CARD32 min_x;
CARD32 max_x;
CARD32 min_y;
CARD32 max_y;
CARD32 button_threshold;
} xDeviceTSCalibrationCtl;
CARD16 control B16;
CARD16 length B16;
CARD32 offset_x;
CARD32 offset_y;
INT32 width;
INT32 height;
INT32 screen;
CARD32 following;
} xDeviceAbsAreaCtl;
/* End of merged section */
typedef struct {
CARD16 control B16;
CARD16 length B16;
CARD8 status;
CARD8 pad0;
CARD16 pad1 B16;
} xDeviceCoreCtl;
typedef struct {
CARD16 control B16;
CARD16 length B16;
CARD8 enable;
CARD8 pad0;
CARD16 pad1 B16;
} xDeviceEnableCtl;
/**********************************************************
*
@ -1523,6 +1588,28 @@ typedef struct
CARD32 pad04 B32;
} changeDeviceNotify;
/**********************************************************
*
* devicePresenceNotify.
*
*/
typedef struct
{
BYTE type;
BYTE pad00;
CARD16 sequenceNumber B16;
Time time B32;
BYTE devchange; /* Device{Added|Removed|Enabled|Disabled} */
BYTE deviceid;
CARD16 control B16;
CARD32 pad02 B32;
CARD32 pad03 B32;
CARD32 pad04 B32;
CARD32 pad05 B32;
CARD32 pad06 B32;
} devicePresenceNotify;
#undef Window
#undef Time
#undef KeyCode

View File

@ -1,5 +1,5 @@
AC_PREREQ([2.57])
AC_INIT([InputProto], [1.3.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AC_INIT([InputProto], [1.4.2.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
XORG_RELEASE_VERSION