# On branch master # Changes to be committed: # (use "git reset HEAD ..." to unstage) # # modified: XI.h # modified: XInput.h # modified: XIproto.h # # Untracked files: # (use "git add ..." to include in what will be committed) # # XI.h.orig diff --git a/XI.h b/XI.h index 0bfefcc..79d96de 100644 --- a/XI.h +++ b/XI.h @@ -163,6 +163,21 @@ SOFTWARE. #define DEVICE_CORE 3 #define DEVICE_ENABLE 4 #define DEVICE_ABS_AREA 5 +#define DEVICE_PTRACCEL 6 + +/* Pointer acceleration schemes */ +#define PtrAccelDisable 0 +#define PtrAccelPredictable 1 +#define PtrAccelClassic 2 + +#define PredictableAccelProfile (1<<0) +#define PredictableAccelConstDec (1<<1) +#define PredictableAccelAdaptiveDec (1<<2) +#define PredictableAccelScale (1<<3) +#define PredictableAccelCoupling (1<<4) +#define PredictableAccelNvReset (1<<5) +#define PredictableAccelHalflife (1<<6) +#define PredictableAccelSoftening (1<<7) #define NoSuchExtension 1 diff --git a/XInput.h b/XInput.h index e3585b4..9d73359 100644 --- a/XInput.h +++ b/XInput.h @@ -707,6 +707,49 @@ typedef struct { int enable; } XDeviceEnableControl, XDeviceEnableState; +typedef struct { + XID control; + int length; + short scheme; +} XDeviceAccelControl, XDeviceAccelState; + +typedef struct { + XID control; + int length; + short scheme; /* PtrAccelPredictable */ + unsigned int valid_set; /* fields to apply */ + unsigned int default_set; /* fields to reset to default */ + int profile; /* 1 */ + int const_deceleration; /* 2 */ + int adaptive_deceleration_num; /* 4 */ + int adaptive_deceleration_den; + int scale_num; /* 8 */ + int scale_den; + int coupling_num; /* 16 */ + int coupling_den; + int reset_ms; /* 32 */ + int halflife_ms; /* 64 */ + int softening; /* 128 */ +} XDeviceAccelPredictableControl; + +typedef struct { + XID control; + int length; + short scheme; /* PtrAccelPredictable */ + unsigned int valid_set; /* valid fields */ + int profile; /* 1 */ + int const_deceleration; /* 2 */ + int adaptive_deceleration_num; /* 4 */ + int adaptive_deceleration_den; + int scale_num; /* 8 */ + int scale_den; + int coupling_num; /* 16 */ + int coupling_den; + int reset_ms; /* 32 */ + int halflife_ms; /* 64 */ + int softening; /* 128 */ +} XDeviceAccelPredictableState; + /******************************************************************* * * An array of XDeviceList structures is returned by the diff --git a/XIproto.h b/XIproto.h index 4f46f4f..c572d86 100644 --- a/XIproto.h +++ b/XIproto.h @@ -1331,6 +1331,31 @@ typedef struct { CARD16 pad1 B16; } xDeviceEnableState; +typedef struct { + CARD16 control B16; + CARD16 length B16; + CARD16 scheme; +} xDeviceAccelState; + +typedef struct { + CARD16 control B16; + CARD16 length B16; + CARD16 scheme; + CARD32 valid_set; + CARD32 profile; + CARD32 const_deceleration; + CARD32 adaptive_deceleration_num; + CARD32 adaptive_deceleration_den; + CARD32 scale_num; + CARD32 scale_den; + CARD32 coupling_num; + CARD32 coupling_den; + CARD32 reset_ms; + CARD32 halflife_ms; + CARD32 softening; +} xDeviceAccelPredictableState; + + /********************************************************* * * ChangeDeviceControl. @@ -1413,6 +1438,31 @@ typedef struct { CARD16 pad1 B16; } xDeviceEnableCtl; +typedef struct { + CARD16 control B16; + CARD16 length B16; + CARD16 scheme; +} xDeviceAccelCtl; + +typedef struct { + CARD16 control B16; + CARD16 length B16; + CARD16 scheme; + CARD32 valid_set; + CARD32 default_set; + CARD32 profile; + CARD32 const_deceleration; + CARD32 adaptive_deceleration_num; + CARD32 adaptive_deceleration_den; + CARD32 scale_num; + CARD32 scale_den; + CARD32 coupling_num; + CARD32 coupling_den; + CARD32 reset_ms; + CARD32 halflife_ms; + CARD32 softening; +} xDeviceAccelPredictableCtl; + /********************************************************** * * Input extension events.