ohos_arkui_binding/component/built_in_component/
image_animator.rs1impl super::ImageAnimator {
5 pub fn set_image_animator_images<T: Into<crate::ArkUINodeAttributeItem>>(
6 &self,
7 value: T,
8 ) -> crate::ArkUIResult<()> {
9 <Self as crate::ArkUICommonAttribute>::set_attribute(
10 self,
11 crate::ArkUINodeAttributeType::ImageAnimatorImages,
12 value.into(),
13 )
14 }
15
16 pub fn get_image_animator_images(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
17 <Self as crate::ArkUICommonAttribute>::get_attribute(
18 self,
19 crate::ArkUINodeAttributeType::ImageAnimatorImages,
20 )
21 }
22
23 pub fn set_image_animator_state<T: Into<crate::ArkUINodeAttributeItem>>(
24 &self,
25 value: T,
26 ) -> crate::ArkUIResult<()> {
27 <Self as crate::ArkUICommonAttribute>::set_attribute(
28 self,
29 crate::ArkUINodeAttributeType::ImageAnimatorState,
30 value.into(),
31 )
32 }
33
34 pub fn get_image_animator_state(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
35 <Self as crate::ArkUICommonAttribute>::get_attribute(
36 self,
37 crate::ArkUINodeAttributeType::ImageAnimatorState,
38 )
39 }
40
41 pub fn set_image_animator_duration<T: Into<crate::ArkUINodeAttributeItem>>(
42 &self,
43 value: T,
44 ) -> crate::ArkUIResult<()> {
45 <Self as crate::ArkUICommonAttribute>::set_attribute(
46 self,
47 crate::ArkUINodeAttributeType::ImageAnimatorDuration,
48 value.into(),
49 )
50 }
51
52 pub fn get_image_animator_duration(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
53 <Self as crate::ArkUICommonAttribute>::get_attribute(
54 self,
55 crate::ArkUINodeAttributeType::ImageAnimatorDuration,
56 )
57 }
58
59 pub fn set_image_animator_reverse<T: Into<crate::ArkUINodeAttributeItem>>(
60 &self,
61 value: T,
62 ) -> crate::ArkUIResult<()> {
63 <Self as crate::ArkUICommonAttribute>::set_attribute(
64 self,
65 crate::ArkUINodeAttributeType::ImageAnimatorReverse,
66 value.into(),
67 )
68 }
69
70 pub fn get_image_animator_reverse(&self) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
71 <Self as crate::ArkUICommonAttribute>::get_attribute(
72 self,
73 crate::ArkUINodeAttributeType::ImageAnimatorReverse,
74 )
75 }
76
77 pub fn set_image_animator_fixed_size<T: Into<crate::ArkUINodeAttributeItem>>(
78 &self,
79 value: T,
80 ) -> crate::ArkUIResult<()> {
81 <Self as crate::ArkUICommonAttribute>::set_attribute(
82 self,
83 crate::ArkUINodeAttributeType::ImageAnimatorFixedSize,
84 value.into(),
85 )
86 }
87
88 pub fn get_image_animator_fixed_size(
89 &self,
90 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
91 <Self as crate::ArkUICommonAttribute>::get_attribute(
92 self,
93 crate::ArkUINodeAttributeType::ImageAnimatorFixedSize,
94 )
95 }
96
97 pub fn set_image_animator_fill_mode<T: Into<crate::ArkUINodeAttributeItem>>(
98 &self,
99 value: T,
100 ) -> crate::ArkUIResult<()> {
101 <Self as crate::ArkUICommonAttribute>::set_attribute(
102 self,
103 crate::ArkUINodeAttributeType::ImageAnimatorFillMode,
104 value.into(),
105 )
106 }
107
108 pub fn get_image_animator_fill_mode(
109 &self,
110 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
111 <Self as crate::ArkUICommonAttribute>::get_attribute(
112 self,
113 crate::ArkUINodeAttributeType::ImageAnimatorFillMode,
114 )
115 }
116
117 pub fn set_image_animator_iteration<T: Into<crate::ArkUINodeAttributeItem>>(
118 &self,
119 value: T,
120 ) -> crate::ArkUIResult<()> {
121 <Self as crate::ArkUICommonAttribute>::set_attribute(
122 self,
123 crate::ArkUINodeAttributeType::ImageAnimatorIteration,
124 value.into(),
125 )
126 }
127
128 pub fn get_image_animator_iteration(
129 &self,
130 ) -> crate::ArkUIResult<crate::ArkUINodeAttributeItem> {
131 <Self as crate::ArkUICommonAttribute>::get_attribute(
132 self,
133 crate::ArkUINodeAttributeType::ImageAnimatorIteration,
134 )
135 }
136}
137impl super::ImageAnimator {
140 pub fn on_image_animator_start<T: Fn() + 'static>(&mut self, cb: T) {
141 crate::ArkUIEvent::on_event_no_param(
142 self,
143 crate::NodeEventType::ImageAnimatorEventOnStart,
144 cb,
145 );
146 }
147
148 pub fn on_image_animator_pause<T: Fn() + 'static>(&mut self, cb: T) {
149 crate::ArkUIEvent::on_event_no_param(
150 self,
151 crate::NodeEventType::ImageAnimatorEventOnPause,
152 cb,
153 );
154 }
155
156 pub fn on_image_animator_repeat<T: Fn() + 'static>(&mut self, cb: T) {
157 crate::ArkUIEvent::on_event_no_param(
158 self,
159 crate::NodeEventType::ImageAnimatorEventOnRepeat,
160 cb,
161 );
162 }
163
164 pub fn on_image_animator_cancel<T: Fn() + 'static>(&mut self, cb: T) {
165 crate::ArkUIEvent::on_event_no_param(
166 self,
167 crate::NodeEventType::ImageAnimatorEventOnCancel,
168 cb,
169 );
170 }
171
172 pub fn on_image_animator_finish<T: Fn() + 'static>(&mut self, cb: T) {
173 crate::ArkUIEvent::on_event_no_param(
174 self,
175 crate::NodeEventType::ImageAnimatorEventOnFinish,
176 cb,
177 );
178 }
179}