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