pub unsafe extern "C" fn OH_NativeXComponent_RegisterOnTouchInterceptCallback(
component: *mut OH_NativeXComponent,
callback: Option<unsafe extern "C" fn(component: *mut OH_NativeXComponent, event: *mut ArkUI_UIInputEvent) -> HitTestMode>,
) -> i32Available on crate feature
api-12 only.Expand description
Registers a custom event intercept callback for an OH_NativeXComponent instance. This enables the specified during hit testing. UI input-related operations are not supported on event objects received through this callback. For full functionality, use the NODE_ON_TOUCH_INTERCEPT event on native nodes instead.
§Arguments
-
component- Indicates the pointer to the OH_NativeXComponent instance. -
callback- Indicates the pointer to the custom event intercept callback.
§Returns
- Returns the error code.
Returns [
ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. Returns [ARKUI_ERROR_CODE_PARAM_INVALID] if a parameter error occurs.
Available since API-level: 12