OH_Input_InjectMouseEvent

Function OH_Input_InjectMouseEvent 

Source
pub unsafe extern "C" fn OH_Input_InjectMouseEvent(
    mouseEvent: *const Input_MouseEvent,
) -> i32
Available on crate feature api-12 only.
Expand description

Inject mouse event. 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

  • mouseEvent - - the mouse event to be injected.

§Returns

  • OH_Input_InjectMouseEvent function result code. [INPUT_SUCCESS] inject mouseEvent success.

[INPUT_PERMISSION_DENIED] Permission verification failed.

[INPUT_PARAMETER_ERROR] Parameter check failed.

Required System Capabilities: SystemCapability.MultimodalInput.Input.Core

Available since API-level: 12