dispatchRelativePointerEvent
Dispatches a relative pointer event to the system.
Declaration
virtual kern_return_t dispatchRelativePointerEvent(uint64_t timeStamp, IOFixed dx, IOFixed dy, uint32_t buttonState, 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 distance traveled along the X axis, relative to the pointer’s previous location.
- dy:
The distance traveled along the Y axis, relative to the pointer’s previous location.
- buttonState:
The button state, if any.
- options:
Additional options for pointer events. Specify
0for no options. For a list of other values, see Iohidpointereventoptions. - accelerate:
A Boolean value indicating whether to apply the acceleration algorithm to the pointer event. Specify
falseif you don’t want to apply that logic.
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 keyboard event to the system. Typically, you call this method after determining that a report contains data representing a mouse- or pointer-related event.