diff options
Diffstat (limited to 'src/evdev.h')
-rw-r--r-- | src/evdev.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/evdev.h b/src/evdev.h index 56983c2..83f03f4 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -40,6 +40,13 @@ #include <X11/extensions/XKBstr.h> #endif +/* axis specific data for wheel emulation */ +typedef struct { + int up_button; + int down_button; + int traveled_distance; +} WheelAxis, *WheelAxisPtr; + typedef struct { int kernel24; int screen; @@ -68,6 +75,14 @@ typedef struct { Time expires; /* time of expiry */ Time timeout; } emulateMB; + struct { + BOOL enabled; + int button; + int button_state; + int inertia; + WheelAxis X; + WheelAxis Y; + } emulateWheel; unsigned char btnmap[32]; /* config-file specified button mapping */ } EvdevRec, *EvdevPtr; @@ -89,4 +104,9 @@ Atom EvdevMBEmuInitPropertyTimeout(DeviceIntPtr, char*); BOOL EvdevMBEmuSetProperty(DeviceIntPtr, Atom, XIPropertyValuePtr); #endif +/* Mouse Wheel emulation */ +void EvdevWheelEmuPreInit(InputInfoPtr pInfo); +BOOL EvdevWheelEmuFilterButton(InputInfoPtr pInfo, unsigned int button, int value); +BOOL EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct input_event *pEv); + #endif |