dispatchAbsolutePointerEvent
Dispatches an absolute pointer event to the system.
Declaration
virtual kern_return_t dispatchAbsolutePointerEvent(uint64_t timeStamp, IOFixed x, IOFixed y, 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.
- x:
The X value, specified in the range
0to1. - y:
The Y value, specified in the range
0to1. - buttonState:
The current 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.