arkui_sys/drawable_descriptor/
drawable_descriptor_ffi.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// 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;

#[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.
    ///
    /// * `iterations` - 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;
}