ohos-arkui-binding 0.2.0

OpenHarmony's arkui binding for rust
Documentation
//! Module type::drag wrappers and related types.

use ohos_arkui_sys::*;

use ohos_enum_derive::EnumFrom;

#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumFrom)]
#[config(ArkUI_PreDragStatus, "ArkUI_PreDragStatus_ARKUI_PRE_DRAG_STATUS_")]
/// Lifecycle status used by the pre-drag detection phase.
pub enum PreDragStatus {
    Unknown,
    ActionDetecting,
    ReadyToTriggerDrag,
    PreviewLiftStarted,
    PreviewLiftFinished,
    PreviewLandingStarted,
    PreviewLandingFinished,
    CanceledBeforeDrag,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumFrom)]
#[config(ArkUI_DragResult, "ArkUI_DragResult_ARKUI_DRAG_RESULT_")]
/// End result reported by a drag session.
pub enum DragResult {
    Successful,
    Failed,
    Canceled,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumFrom)]
#[config(ArkUI_DropOperation, "ArkUI_DropOperation_ARKUI_DROP_OPERATION_")]
/// Operation type requested by a drop target.
pub enum DropOperation {
    Copy,
    Move,
}