arkui-sys 0.3.3

Bindings to the native ArkUI API of OpenHarmony
Documentation
// automatically generated by rust-bindgen 0.71.1

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
use crate::native_type::*;
pub use ohos_sys_opaque_types::OH_PixelmapNative;

/// Defines the drawable descriptor.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct ArkUI_DrawableDescriptor {
    _unused: [u8; 0],
}
/// Defines the pointer to OH_PixelmapNative.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub type OH_PixelmapNativeHandle = *mut OH_PixelmapNative;
extern "C" {
    /// Creates a DrawableDescriptor from a Pixelmap.
    ///
    /// # Arguments
    ///
    /// * `pixelMap` - Indicates the pointer to a Pixelmap
    ///
    /// # Returns
    ///
    /// * Returns the pointer to the drawableDescriptor.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_ArkUI_DrawableDescriptor_CreateFromPixelMap(
        pixelMap: OH_PixelmapNativeHandle,
    ) -> *mut ArkUI_DrawableDescriptor;
    /// Creates a DrawableDescriptor from a Pixelmap array.
    ///
    /// # Arguments
    ///
    /// * `array` - Indicates the pointer to a Pixelmap array.
    ///
    /// * `size` - Indicates the size of the Pixelmap array.
    ///
    /// # Returns
    ///
    /// * Returns the pointer to the drawableDescriptor.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_ArkUI_DrawableDescriptor_CreateFromAnimatedPixelMap(
        array: *mut OH_PixelmapNativeHandle,
        size: i32,
    ) -> *mut ArkUI_DrawableDescriptor;
    /// Destroys the pointer to the drawableDescriptor.
    ///
    /// # Arguments
    ///
    /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_ArkUI_DrawableDescriptor_Dispose(drawableDescriptor: *mut ArkUI_DrawableDescriptor);
    /// Obtains the Pixelmap object.
    ///
    /// # Arguments
    ///
    /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
    ///
    /// # Returns
    ///
    /// * Returns the pointer to the PixelMap.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_ArkUI_DrawableDescriptor_GetStaticPixelMap(
        drawableDescriptor: *mut ArkUI_DrawableDescriptor,
    ) -> OH_PixelmapNativeHandle;
    /// Obtains the Pixelmap array used to play the animation.
    ///
    /// # Arguments
    ///
    /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
    ///
    /// # Returns
    ///
    /// * Returns the pointer to the PixelMap array.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_ArkUI_DrawableDescriptor_GetAnimatedPixelMapArray(
        drawableDescriptor: *mut ArkUI_DrawableDescriptor,
    ) -> *mut OH_PixelmapNativeHandle;
    /// Obtains the size of the Pixelmap array used to play the animation.
    ///
    /// # Arguments
    ///
    /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
    ///
    /// # Returns
    ///
    /// * Returns the size of the Pixelmap array.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_ArkUI_DrawableDescriptor_GetAnimatedPixelMapArraySize(
        drawableDescriptor: *mut ArkUI_DrawableDescriptor,
    ) -> i32;
    /// Sets the total playback duration.
    ///
    /// # Arguments
    ///
    /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
    ///
    /// * `duration` - Indicates the total playback duration. The unit is millisecond.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_ArkUI_DrawableDescriptor_SetAnimationDuration(
        drawableDescriptor: *mut ArkUI_DrawableDescriptor,
        duration: i32,
    );
    /// Obtains the total playback duration.
    ///
    /// # Arguments
    ///
    /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
    ///
    /// # Returns
    ///
    /// * Return the total playback duration. The unit is millisecond.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_ArkUI_DrawableDescriptor_GetAnimationDuration(
        drawableDescriptor: *mut ArkUI_DrawableDescriptor,
    ) -> i32;
    /// Sets the number of playback times.
    ///
    /// # Arguments
    ///
    /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
    ///
    /// * `iteration` - Indicates the number of playback times.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_ArkUI_DrawableDescriptor_SetAnimationIteration(
        drawableDescriptor: *mut ArkUI_DrawableDescriptor,
        iteration: i32,
    );
    /// Obtains the number of playback times.
    ///
    /// # Arguments
    ///
    /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
    ///
    /// # Returns
    ///
    /// * Returns the number of playback times.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_ArkUI_DrawableDescriptor_GetAnimationIteration(
        drawableDescriptor: *mut ArkUI_DrawableDescriptor,
    ) -> i32;
}