Skip to main content

OH_ArkUI_Swiper_FakeDragBy

Function OH_ArkUI_Swiper_FakeDragBy 

Source
pub unsafe extern "C" fn OH_ArkUI_Swiper_FakeDragBy(
    node: ArkUI_NodeHandle,
    offset: f32,
    isConsumedOffset: *mut bool,
) -> i32
Available on crate features api-12 and api-23 only.
Expand description

Fake drag by an offset of the Swiper node. The OH_ArkUI_Swiper_StartFakeDrag must be called first.

§Arguments

  • node - ArkUI_NodeHandle pointer.

  • offset - The offset that needs to be scrolled. The unit is vp.

  • isConsumedOffset - If not in a fake drag progress, or no offset is consumed, return false. If any offset is consumed, return true.

§Returns

  • Error code. [ARKUI_ERROR_CODE_NO_ERROR] Success. [ARKUI_ERROR_CODE_PARAM_INVALID] Function parameter exception.

Available since API-level: 23