arkui_sys/drawable_descriptor/drawable_descriptor_ffi.rs
1// automatically generated by rust-bindgen 0.71.1
2
3#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6use crate::native_type::*;
7pub use ohos_sys_opaque_types::OH_PixelmapNative;
8
9#[repr(C)]
10pub struct ArkUI_DrawableDescriptor {
11 _unused: [u8; 0],
12}
13/// Defines the pointer to OH_PixelmapNative.
14///
15///
16/// Available since API-level: 12
17#[cfg(feature = "api-12")]
18#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
19pub type OH_PixelmapNativeHandle = *mut OH_PixelmapNative;
20extern "C" {
21 /// Creates a DrawableDescriptor from a Pixelmap.
22 ///
23 /// # Arguments
24 ///
25 /// * `pixelMap` - Indicates the pointer to a Pixelmap
26 ///
27 /// # Returns
28 ///
29 /// * Returns the pointer to the drawableDescriptor.
30 ///
31 /// Available since API-level: 12
32 #[cfg(feature = "api-12")]
33 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
34 pub fn OH_ArkUI_DrawableDescriptor_CreateFromPixelMap(
35 pixelMap: OH_PixelmapNativeHandle,
36 ) -> *mut ArkUI_DrawableDescriptor;
37 /// Creates a DrawableDescriptor from a Pixelmap array.
38 ///
39 /// # Arguments
40 ///
41 /// * `array` - Indicates the pointer to a Pixelmap array.
42 ///
43 /// * `size` - Indicates the size of the Pixelmap array.
44 ///
45 /// # Returns
46 ///
47 /// * Returns the pointer to the drawableDescriptor.
48 ///
49 /// Available since API-level: 12
50 #[cfg(feature = "api-12")]
51 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
52 pub fn OH_ArkUI_DrawableDescriptor_CreateFromAnimatedPixelMap(
53 array: *mut OH_PixelmapNativeHandle,
54 size: i32,
55 ) -> *mut ArkUI_DrawableDescriptor;
56 /// Destroys the pointer to the drawableDescriptor.
57 ///
58 /// # Arguments
59 ///
60 /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
61 ///
62 /// Available since API-level: 12
63 #[cfg(feature = "api-12")]
64 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
65 pub fn OH_ArkUI_DrawableDescriptor_Dispose(drawableDescriptor: *mut ArkUI_DrawableDescriptor);
66 /// Obtains the Pixelmap object.
67 ///
68 /// # Arguments
69 ///
70 /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
71 ///
72 /// # Returns
73 ///
74 /// * Returns the pointer to the PixelMap.
75 ///
76 /// Available since API-level: 12
77 #[cfg(feature = "api-12")]
78 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
79 pub fn OH_ArkUI_DrawableDescriptor_GetStaticPixelMap(
80 drawableDescriptor: *mut ArkUI_DrawableDescriptor,
81 ) -> OH_PixelmapNativeHandle;
82 /// Obtains the Pixelmap array used to play the animation.
83 ///
84 /// # Arguments
85 ///
86 /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
87 ///
88 /// # Returns
89 ///
90 /// * Returns the pointer to the PixelMap array.
91 ///
92 /// Available since API-level: 12
93 #[cfg(feature = "api-12")]
94 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
95 pub fn OH_ArkUI_DrawableDescriptor_GetAnimatedPixelMapArray(
96 drawableDescriptor: *mut ArkUI_DrawableDescriptor,
97 ) -> *mut OH_PixelmapNativeHandle;
98 /// Obtains the size of the Pixelmap array used to play the animation.
99 ///
100 /// # Arguments
101 ///
102 /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
103 ///
104 /// # Returns
105 ///
106 /// * Returns the size of the Pixelmap array.
107 ///
108 /// Available since API-level: 12
109 #[cfg(feature = "api-12")]
110 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
111 pub fn OH_ArkUI_DrawableDescriptor_GetAnimatedPixelMapArraySize(
112 drawableDescriptor: *mut ArkUI_DrawableDescriptor,
113 ) -> i32;
114 /// Sets the total playback duration.
115 ///
116 /// # Arguments
117 ///
118 /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
119 ///
120 /// * `duration` - Indicates the total playback duration. The unit is millisecond.
121 ///
122 /// Available since API-level: 12
123 #[cfg(feature = "api-12")]
124 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
125 pub fn OH_ArkUI_DrawableDescriptor_SetAnimationDuration(
126 drawableDescriptor: *mut ArkUI_DrawableDescriptor,
127 duration: i32,
128 );
129 /// Obtains the total playback duration.
130 ///
131 /// # Arguments
132 ///
133 /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
134 ///
135 /// # Returns
136 ///
137 /// * Return the total playback duration. The unit is millisecond.
138 ///
139 /// Available since API-level: 12
140 #[cfg(feature = "api-12")]
141 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
142 pub fn OH_ArkUI_DrawableDescriptor_GetAnimationDuration(
143 drawableDescriptor: *mut ArkUI_DrawableDescriptor,
144 ) -> i32;
145 /// Sets the number of playback times.
146 ///
147 /// # Arguments
148 ///
149 /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
150 ///
151 /// * `iterations` - Indicates the number of playback times.
152 ///
153 /// Available since API-level: 12
154 #[cfg(feature = "api-12")]
155 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
156 pub fn OH_ArkUI_DrawableDescriptor_SetAnimationIteration(
157 drawableDescriptor: *mut ArkUI_DrawableDescriptor,
158 iteration: i32,
159 );
160 /// Obtains the number of playback times.
161 ///
162 /// # Arguments
163 ///
164 /// * `drawableDescriptor` - Indicates the pointer to the drawableDescriptor.
165 ///
166 /// # Returns
167 ///
168 /// * Returns the number of playback times.
169 ///
170 /// Available since API-level: 12
171 #[cfg(feature = "api-12")]
172 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
173 pub fn OH_ArkUI_DrawableDescriptor_GetAnimationIteration(
174 drawableDescriptor: *mut ArkUI_DrawableDescriptor,
175 ) -> i32;
176}