OH_Input_InjectTouchEventGlobal

Function OH_Input_InjectTouchEventGlobal 

Source
pub unsafe extern "C" fn OH_Input_InjectTouchEventGlobal(
    touchEvent: *const Input_TouchEvent,
) -> i32
Available on crate feature api-20 only.
Expand description

Inject touch event using global coordinate. since API 20, it is recommended to use OH_Input_RequestInjection to request authorization before using the interface, and then use OH_Input_QueryAuthorizedStatus to query the authorization status. When the authorization status is AUTHORIZED, use the interface.

§Arguments

  • touchEvent - - the touch event to be injected, set up effective globalX globalY.

§Returns

  • OH_Input_InjectTouchEventGlobal function result code. [INPUT_SUCCESS] inject touchEvent success.

[INPUT_PARAMETER_ERROR] Parameter check failed.

[INPUT_PERMISSION_DENIED] Permission verification failed.

Available since API-level: 20