dispatchRelativeScrollWheelEvent
Dispatches a relative scroll wheel event to the system.
Declaration
virtual kern_return_t dispatchRelativeScrollWheelEvent(uint64_t timeStamp, IOFixed dx, IOFixed dy, IOFixed dz, IOOptionBits options, bool accelerate);Parameters
- timeStamp:
The timestamp of the event. Use the timestamp of the report element that is the source of the event.
- dx:
The delta X value.
- dy:
The delta Y value.
- dz:
The delta Z value.
- options:
Additional options for scrolling-related events. Specify
0for no options. For a list of other values, see Iohidscrolleventoptions. - accelerate:
Scroll events are subject to an acceleration algorithm. Pass in
falseif you don’t wish to have acceleration logic applied to the scroll event.
Return Value
kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.
Discussion
Call this method from your event service to dispatch a scroll-wheel event to the system. Typically, you call this method when handling a report from the device, after you determine that the report originated from scroll-wheel hardware or otherwise represents a scrolling event.