Changeset View
Changeset View
Standalone View
Standalone View
src/lib/elementary/efl_ui_animation_view.eo
1 | 1 | | |||
---|---|---|---|---|---|
2 | enum Efl.Ui.Animation_View.State | 2 | enum Efl.Ui.Animation_View.State | ||
3 | { | 3 | { | ||
4 | //FIXME: This enum is not neccessary in legacy header. but legacy:null command is not working correct. | 4 | not_ready, [[Animation is not ready to play. (Probably, it didn't file set yet or failed to read file. @since 1.23]] | ||
5 | //legacy: null; | 5 | play, [[Animation is on playing. see @Efl.Ui.Animation_View.play @since 1.23]] | ||
6 | not_ready, [[Animation is not ready to play. (Probably, it didn't file set yet or failed to read file. @since 1.22]] | 6 | play_back, [[Animation is on playing back (rewinding). see @Efl.Ui.Animation_View.play_back @since 1.23]] | ||
7 | play, [[Animation is on playing. see @Efl.Ui.Animation_View.play @since 1.22]] | 7 | pause, [[Animation has been paused. To continue animation, call @Efl.Ui.Animation_View.resume. see @Efl.Ui.Animation_View.pause @since 1.23]] | ||
8 | play_back, [[Animation is on playing back (rewinding). see @Efl.Ui.Animation_View.play_back @since 1.22]] | 8 | stop [[Animation view successfully loaded a file then readied for playing. Otherwise after finished animation or stopped forcely by request. see @Efl.Ui.Animation_View.stop @since 1.23]] | ||
9 | pause, [[Animation has been paused. To continue animation, call @Efl.Ui.Animation_View.resume. see @Efl.Ui.Animation_View.pause @since 1.22]] | | |||
10 | stop [[Animation view successfully loaded a file then readied for playing. Otherwise after finished animation or stopped forcely by request. see @Efl.Ui.Animation_View.stop @since 1.22]] | | |||
11 | } | 9 | } | ||
12 | 10 | | |||
13 | class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View, Efl.File | 11 | class @beta Efl.Ui.Animation_View extends Efl.Ui.Widget implements Efl.Gfx.View, Efl.File | ||
14 | { | 12 | { | ||
15 | [[Elementary Animation View class]] | 13 | [[Elementary Animation view class. | ||
14 | Animation view is designed to show and play animation of | ||||
15 | vector graphics based content. It hides all efl_canvas_vg details | ||||
16 | but just open an API to read vector data from file. Also, it implements | ||||
17 | details of animation control methods of Vector. | ||||
18 | | ||||
19 | Vector data could contain static or animatable vector elements including | ||||
20 | animation infomation. Currently approved vector data file format is svg, json and eet. | ||||
21 | Only json(known for Lottie file as well) and eet could contains animation infomation, | ||||
22 | currently Animation_View is supporting. | ||||
23 | | ||||
24 | This widget emits the following signals, besides the ones sent from | ||||
segfaultxavi: The end of this line is missing! | |||||
jsuyaAuthorUnsubmitted Not Done ReplyThanks i will fix soon. jsuya: Thanks i will fix soon. | |||||
25 | "play,start": animation is just started. | ||||
segfaultxaviUnsubmitted Done ReplyI don't think we need to list the events here. There should be an events section in the EO file with these docs. segfaultxavi: I don't think we need to list the events here. There should be an `events` section in the EO… | |||||
jsuyaAuthorUnsubmitted Not Done ReplyI know, We should add and implement events in event section. I will delete this list. jsuya: I know, We should add and implement events in event section.
we will do it soon.
I will delete… | |||||
26 | "play,repeat": animation is just repeated. | ||||
27 | "play,done": animation is just finished. | ||||
28 | "play,pause": animation is just paused. | ||||
29 | "play,resume": animation is just resumed. | ||||
30 | "play,stop": animation is just stopped. | ||||
31 | "play,update": animation is updated to the next frame. | ||||
32 | | ||||
33 | @since 1.23 | ||||
34 | ]] | ||||
16 | event_prefix: efl_ui_animation_view; | 35 | event_prefix: efl_ui_animation_view; | ||
17 | methods { | 36 | methods { | ||
18 | @property auto_play { | 37 | @property auto_play { | ||
Done ReplyThis comment is not related to your change. kimcinoo: This comment is not related to your change.
But if you do not mind please add description… | |||||
19 | [[Animation will be started automatically when it's possible. | 38 | [[Animation will be started automatically when it's possible. | ||
20 | 39 | | |||
21 | If @.auto_play is $true, animation will be started when it's readied. | 40 | If @.auto_play is $true, animation will be started when it's readied. | ||
22 | The condition of $auto play is when animation view opened file successfully, | 41 | The condition of $auto play is when animation view opened file successfully, | ||
23 | yet to play it plus when the object is visible. | 42 | yet to play it plus when the object is visible. | ||
24 | If animation view is disabled, invisible, | 43 | If animation view is disabled, invisible, | ||
25 | it turns to pause state then resume animation when it's visible again. | 44 | it turns to pause state then resume animation when it's visible again. | ||
26 | 45 | | |||
27 | Warning: This auto play will be only affected to the next animation source. | 46 | Warning: This auto play will be only affected to the next animation source. | ||
28 | So must be called before setting animation file ]] | 47 | So must be called before setting animation file | ||
48 | | ||||
49 | @since 1.23 | ||||
50 | ]] | ||||
29 | set { | 51 | set { | ||
52 | [[Set auto play mode of an animation view object. | ||||
segfaultxaviUnsubmitted Not Done ReplyPlease do not add BOTH property AND set/get docs. Only one will be used. segfaultxavi: Please do not add BOTH property AND set/get docs. Only one will be used. | |||||
jsuyaAuthorUnsubmitted Not Done Replysorry i dont understand your comment [src/lib/elementary/efl_ui_animation_view.eo.h] /** * @brief Animation will be started automatically when it's possible. * * If @ref efl_ui_animation_view_auto_play_get is @c true, animation will be * started when it's readied. The condition of @c auto play is when animation * view opened file successfully, yet to play it plus when the object is * visible. If animation view is disabled, invisible, it turns to pause state * then resume animation when it's visible again. * * @warning This auto play will be only affected to the next animation source. * So must be called before setting animation file * * Set auto play mode of an animation view object. @c true Enable auto play * mode, disable otherwise * * @param[in] obj The object. * @param[in] auto_play Auto play mode, Default value is @c false * * @since 1.23 * * @ingroup Efl_Ui_Animation_View */ EOAPI void efl_ui_animation_view_auto_play_set(Eo *obj, Eina_Bool auto_play); /** * @brief Animation will be started automatically when it's possible. * * If @ref efl_ui_animation_view_auto_play_get is @c true, animation will be * started when it's readied. The condition of @c auto play is when animation * view opened file successfully, yet to play it plus when the object is * visible. If animation view is disabled, invisible, it turns to pause state * then resume animation when it's visible again. * * @warning This auto play will be only affected to the next animation source. * So must be called before setting animation file * * Returns auto play mode of an animation view object. * * @param[in] obj The object. * * @return Auto play mode, Default value is @c false * * @since 1.23 * * @ingroup Efl_Ui_Animation_View */ EOAPI Eina_Bool efl_ui_animation_view_auto_play_get(const Eo *obj); jsuya: sorry i dont understand your comment
set and get docs are added to docs of property and output. | |||||
segfaultxaviUnsubmitted Done ReplyYeah, but unfortunately this does not happen for the C# docs. segfaultxavi: Yeah, but unfortunately this does not happen for the C# docs. | |||||
53 | $true Enable auto play mode, disable otherwise]] | ||||
30 | } | 54 | } | ||
31 | get { | 55 | get { | ||
56 | [[Returns auto play mode of an animation view object.]] | ||||
32 | } | 57 | } | ||
33 | values { | 58 | values { | ||
34 | auto_play: bool; [[$true Enable auto play mode, disable otherwise]] | 59 | auto_play: bool; [[Auto play mode, Default value is $false]] | ||
35 | } | 60 | } | ||
36 | } | 61 | } | ||
37 | @property auto_repeat { | 62 | @property auto_repeat { | ||
38 | [[Turn on/off animation looping. | 63 | [[Turn on/off animation looping. | ||
39 | 64 | | |||
40 | If @.auto_repeat is $true, it repeats animation when animation frame is reached to | 65 | If @.auto_repeat is $true, it repeats animation when animation frame is reached to | ||
41 | end. This auto repeat mode is valid to both play and play_back cases.]] | 66 | end. This auto repeat mode is valid to both play and play_back cases. | ||
67 | | ||||
68 | @since 1.23 | ||||
69 | ]] | ||||
42 | set { | 70 | set { | ||
71 | [[Enable loop mode if $true, disable otherwise | ||||
72 | $true Enable auto play mode, disable otherwise]] | ||||
43 | } | 73 | } | ||
44 | get { | 74 | get { | ||
75 | [[Returns auto repeat mode of an animation view object.]] | ||||
45 | } | 76 | } | ||
46 | values { | 77 | values { | ||
47 | auto_repeat: bool; [[Enable loop mode if $true, disable otherwise]] | 78 | auto_repeat: bool; [[Loop mode, Defalut is $false.]] | ||
48 | } | 79 | } | ||
49 | } | 80 | } | ||
50 | @property speed { | 81 | @property speed { | ||
51 | [[Control animation speed. | 82 | [[Control animation speed. | ||
52 | 83 | | |||
53 | Control animation speed by multiplying $speed value. If you want to play | 84 | Control animation speed by multiplying $speed value. If you want to play | ||
54 | animation double-time faster, you can give $speed 2. If you want to play | 85 | animation double-time faster, you can give $speed 2. If you want to play | ||
55 | animation double-time slower, you can give $speed 0.5. | 86 | animation double-time slower, you can give $speed 0.5. | ||
56 | 87 | | |||
57 | Warning: speed must be greater than zero.]] | 88 | Warning: speed must be greater than zero. | ||
89 | | ||||
90 | @since 1.23 | ||||
91 | ]] | ||||
58 | set { | 92 | set { | ||
59 | return: bool; [[$true when it's successful. $false otherwise.]] | 93 | return: bool; [[$true when it's successful. $false otherwise.]] | ||
60 | } | 94 | } | ||
61 | get { | 95 | get { | ||
96 | [[Returns current animation speed of an animation view object.]] | ||||
62 | } | 97 | } | ||
63 | values { | 98 | values { | ||
64 | speed: double; [[ Speed factor. Default value is 1]] | 99 | speed: double; [[ Speed factor. Default value is 1.0]] | ||
65 | } | 100 | } | ||
66 | } | 101 | } | ||
67 | @property duration_time { | 102 | @property duration_time { | ||
68 | [[Get the duration of animation in seconds. | 103 | [[Get the duration of animation in seconds. | ||
69 | 104 | | |||
70 | This API returns total duration time of current animation in the seconds. | 105 | This API returns total duration time of current animation in the seconds. | ||
71 | If current animation source isn't animatable, it returns zero.]] | 106 | If current animation source isn't animatable, it returns zero. | ||
107 | | ||||
108 | @since 1.23 | ||||
109 | ]] | ||||
72 | get { | 110 | get { | ||
111 | [[Returns current duration of an animation in seconds.]] | ||||
73 | } | 112 | } | ||
74 | values { | 113 | values { | ||
75 | frame_duration: double; [[duration time in the seconds]] | 114 | frame_duration: double; [[duration time in the seconds]] | ||
76 | } | 115 | } | ||
77 | } | 116 | } | ||
78 | @property progress { | 117 | @property progress { | ||
79 | [[Set current progress position of animation view. | 118 | [[Set current progress position of animation view object. | ||
80 | 119 | | |||
81 | When you required to jump on a certain frame instantly, | 120 | When you required to jump on a certain frame instantly, | ||
82 | you can change current position by using this API. | 121 | you can change current position by using this API. | ||
83 | 122 | | |||
84 | Warning: The range of progress is 0 ~ 1.]] | 123 | Warning: The range of progress is 0 ~ 1. | ||
124 | | ||||
125 | @since 1.23 | ||||
126 | ]] | ||||
85 | set { | 127 | set { | ||
128 | [[Set the current progress position of an animation view object.]] | ||||
86 | } | 129 | } | ||
87 | get { | 130 | get { | ||
131 | [[Returns current progress position of an animation view object.]] | ||||
88 | } | 132 | } | ||
89 | values { | 133 | values { | ||
90 | progress: double; [[Progress position. Value must be 0 ~ 1.]] | 134 | progress: double; [[Progress position. Value must be 0 ~ 1.]] | ||
91 | } | 135 | } | ||
92 | } | 136 | } | ||
93 | @property frame { | 137 | @property frame { | ||
94 | //FIXME : frame_count need add '@' symbol after add eo method frame_count. | | |||
95 | [[Number of current frame. | 138 | [[Number of current frame. | ||
96 | 139 | | |||
97 | Ranges from 0 to frame_count - 1. | 140 | Ranges from 0 to @.frame_count - 1. | ||
141 | | ||||
142 | @since 1.23 | ||||
98 | ]] | 143 | ]] | ||
99 | set { | 144 | set { | ||
100 | [[Set the current frame of an animation view object.]] | 145 | [[Set the current frame of an animation view object.]] | ||
101 | } | 146 | } | ||
102 | get {} | 147 | get { | ||
148 | [[Returns the current frame of an animation view object.]] | ||||
149 | } | ||||
103 | values { | 150 | values { | ||
104 | frame_num: int; [[Current frame number.]] | 151 | frame_num: int; [[Current frame number.]] | ||
105 | } | 152 | } | ||
106 | } | 153 | } | ||
107 | play { | 154 | play { | ||
108 | [[Play animation one time instantly when it's available. | 155 | [[Play animation one time instantly when it's available. | ||
109 | 156 | | |||
110 | If current keyframe is on a certain position by playing back, this will | 157 | If current keyframe is on a certain position by playing back, this will | ||
111 | play forward from there. | 158 | play forward from there. | ||
112 | 159 | | |||
113 | Warning: Play request will be ignored if animation source is not set yet or | 160 | Warning: Play request will be ignored if animation source is not set yet or | ||
114 | animation is paused state or it's already on playing.]] | 161 | animation is paused state or it's already on playing | ||
162 | | ||||
163 | @since 1.23 | ||||
164 | ]] | ||||
115 | 165 | | |||
116 | return: bool; [[$true when it's successful. $false otherwise.]] | 166 | return: bool; [[$true when it's successful. $false otherwise.]] | ||
117 | } | 167 | } | ||
118 | play_back { | 168 | play_back { | ||
119 | [[Play back animation one time instantly when it's available. | 169 | [[Play back animation one time instantly when it's available. | ||
120 | 170 | | |||
121 | If current keyframe is on a certain position by playing, this will | 171 | If current keyframe is on a certain position by playing, this will | ||
122 | play backward from there. | 172 | play backward from there. | ||
123 | 173 | | |||
124 | Warning: Play back request will be ignored if animation source is not set yet or | 174 | Warning: Play back request will be ignored if animation source is not set yet or | ||
125 | animation is paused state or it's already on playing back.]] | 175 | animation is paused state or it's already on playing back | ||
176 | | ||||
177 | @since 1.23 | ||||
178 | ]] | ||||
126 | 179 | | |||
127 | return: bool; [[$true when it's successful. $false otherwise.]] | 180 | return: bool; [[$true when it's successful. $false otherwise.]] | ||
128 | } | 181 | } | ||
129 | pause { | 182 | pause { | ||
130 | [[Pause current animation instantly. | 183 | [[Pause current animation instantly. | ||
131 | 184 | | |||
132 | Once animation is paused, animation view must get resume to play continue again. | 185 | Once animation is paused, animation view must get resume to play continue again. | ||
133 | 186 | | |||
134 | Warning: Animation must be on playing or playing back status.]] | 187 | Warning: Animation must be on playing or playing back status. | ||
188 | | ||||
189 | @since 1.23 | ||||
190 | ]] | ||||
135 | 191 | | |||
136 | return: bool; [[$true when it's successful. $false otherwise.]] | 192 | return: bool; [[$true when it's successful. $false otherwise.]] | ||
137 | } | 193 | } | ||
138 | resume { | 194 | resume { | ||
139 | [[Resume paused animation to continue animation. | 195 | [[Resume paused animation to continue animation. | ||
140 | 196 | | |||
141 | Warning: This resume must be called on animation paused status. ]] | 197 | Warning: This resume must be called on animation paused status. | ||
198 | | ||||
199 | @since 1.23 | ||||
200 | ]] | ||||
142 | 201 | | |||
143 | return: bool; [[$true when it's successful. $false otherwise.]] | 202 | return: bool; [[$true when it's successful. $false otherwise.]] | ||
144 | } | 203 | } | ||
145 | stop { | 204 | stop { | ||
146 | [[Stop playing animation. | 205 | [[Stop playing animation. | ||
147 | 206 | | |||
148 | Stop animation instatly regardless of it's status and reset to | 207 | Stop animation instatly regardless of it's status and reset to | ||
149 | show first frame of animation. Even though current animation is paused, | 208 | show first frame of animation. Even though current animation is paused, | ||
150 | the animation status will be stopped.]] | 209 | the animation status will be stopped. | ||
210 | | ||||
211 | @since 1.23 | ||||
212 | ]] | ||||
151 | 213 | | |||
152 | return: bool; [[$true when it's successful. $false otherwise.]] | 214 | return: bool; [[$true when it's successful. $false otherwise.]] | ||
153 | } | 215 | } | ||
154 | @property default_size { | 216 | @property default_size { | ||
155 | get { | 217 | get { | ||
156 | [[Get the default view size that specified from vector resource. | 218 | [[Get the default view size that specified from vector resource. | ||
157 | @since 1.22]] | 219 | | ||
220 | @since 1.23 | ||||
221 | ]] | ||||
158 | } | 222 | } | ||
159 | values { | 223 | values { | ||
160 | size: Eina.Size2D; | 224 | size: Eina.Size2D; | ||
161 | } | 225 | } | ||
162 | } | 226 | } | ||
163 | @property state { | 227 | @property state { | ||
164 | get{ | 228 | get{ | ||
165 | [[Get current animation view state. | 229 | [[Get current animation view state. | ||
166 | see @.State | 230 | see @.State | ||
167 | @since 1.22]] | 231 | | ||
232 | @since 1.23 | ||||
233 | ]] | ||||
168 | } | 234 | } | ||
169 | values { | 235 | values { | ||
170 | state: Efl.Ui.Animation_View.State; [[Current animation view state]] | 236 | state: Efl.Ui.Animation_View.State; [[Current animation view state]] | ||
171 | } | 237 | } | ||
172 | } | 238 | } | ||
173 | is_playing_back { | 239 | is_playing_back { | ||
174 | [[Returns the status whether current animation is on playing forward or backward. | 240 | [[Returns the status whether current animation is on playing forward or backward. | ||
175 | warning: If animation view is not on playing, it will return $false. | 241 | warning: If animation view is not on playing, it will return $false. | ||
176 | @since 1.22]] | 242 | | ||
243 | @since 1.23 | ||||
244 | ]] | ||||
177 | return: bool; [[$true, if animation on playing back, $false otherwise.]] | 245 | return: bool; [[$true, if animation on playing back, $false otherwise.]] | ||
178 | } | 246 | } | ||
179 | @property frame_count { | 247 | @property frame_count { | ||
180 | get { | 248 | get { | ||
181 | [[Get the index of end frame of the animation view, if it's animated. | 249 | [[Get the index of end frame of the animation view, if it's animated. | ||
182 | note : frame number starts with 0. | 250 | note : frame number starts with 0. | ||
183 | @since 1.22]] | 251 | | ||
252 | @since 1.23 | ||||
253 | ]] | ||||
184 | } | 254 | } | ||
185 | values { | 255 | values { | ||
186 | frame_count: int; [[ The number of frames. 0, if it's not animated.]] | 256 | frame_count: int; [[ The number of frames. 0, if it's not animated.]] | ||
187 | } | 257 | } | ||
188 | } | 258 | } | ||
189 | @property min_progress { | 259 | @property min_progress { | ||
190 | [[ The start progress of the play. | 260 | [[ The start progress of the play. | ||
191 | Default value is 0. | 261 | Default value is 0. | ||
262 | | ||||
263 | @since 1.23 | ||||
192 | ]] | 264 | ]] | ||
193 | set { | 265 | set { | ||
194 | [[Set start progress of an animation object. | 266 | [[Set start progress of an animation object.]] | ||
195 | @since 1.22]] | | |||
196 | } | 267 | } | ||
197 | get { | 268 | get { | ||
198 | [[Returns start progress of an animation object. | 269 | [[Returns start progress of an animation object.]] | ||
199 | @since 1.22]] | | |||
200 | } | 270 | } | ||
201 | values { | 271 | values { | ||
202 | min_progress: double; [[ The minimum progress. Value must be 0 ~ 1. ]] | 272 | min_progress: double; [[ The minimum progress. Value must be 0 ~ 1. ]] | ||
203 | } | 273 | } | ||
204 | } | 274 | } | ||
205 | @property max_progress { | 275 | @property max_progress { | ||
206 | [[ The last progress of the play. | 276 | [[ The last progress of the play. | ||
207 | Default value is 1. | 277 | Default value is 1. | ||
278 | | ||||
279 | @since 1.23 | ||||
208 | ]] | 280 | ]] | ||
209 | set { | 281 | set { | ||
210 | [[Set last progress of an animation object. | 282 | [[Set last progress of an animation object.]] | ||
211 | @since 1.22]] | | |||
212 | } | 283 | } | ||
213 | get { | 284 | get { | ||
214 | [[Returns last progress of an animation object. | 285 | [[Returns last progress of an animation object.]] | ||
215 | @since 1.22]] | | |||
216 | } | 286 | } | ||
217 | values { | 287 | values { | ||
218 | max_progress: double; [[ The maximum progress. Value must be 0 ~ 1. ]] | 288 | max_progress: double; [[ The maximum progress. Value must be 0 ~ 1. ]] | ||
219 | } | 289 | } | ||
220 | } | 290 | } | ||
221 | @property min_frame { | 291 | @property min_frame { | ||
222 | [[ The start frame of the play. | 292 | [[ The start frame of the play. | ||
223 | Default value is 0. | 293 | Default value is 0. | ||
294 | | ||||
295 | @since 1.23 | ||||
224 | ]] | 296 | ]] | ||
225 | set { | 297 | set { | ||
226 | [[Set minimum frame of an animation object. | 298 | [[Set minimum frame of an animation object.]] | ||
227 | @since 1.22]] | | |||
228 | } | 299 | } | ||
229 | get { | 300 | get { | ||
230 | [[Returns minimum frame of an animation object. | 301 | [[Returns minimum frame of an animation object.]] | ||
231 | @since 1.22]] | | |||
232 | } | 302 | } | ||
233 | values { | 303 | values { | ||
234 | min_frame: int; [[ The minimum frame for play. Value must be 0 ~ @.max_frame ]] | 304 | min_frame: int; [[ The minimum frame for play. Value must be 0 ~ @.max_frame ]] | ||
235 | } | 305 | } | ||
236 | } | 306 | } | ||
237 | @property max_frame { | 307 | @property max_frame { | ||
238 | [[ The last frame of the play. | 308 | [[ The last frame of the play. | ||
239 | Default value is @.frame_count - 1 | 309 | Default value is @.frame_count - 1 | ||
310 | | ||||
311 | @since 1.23 | ||||
240 | ]] | 312 | ]] | ||
241 | set { | 313 | set { | ||
242 | [[Set maximum frame of an animation object. | 314 | [[Set maximum frame of an animation object.]] | ||
243 | @since 1.22]] | | |||
244 | } | 315 | } | ||
245 | get { | 316 | get { | ||
246 | [[Returns maximum frame of an animation object. | 317 | [[Returns maximum frame of an animation object.]] | ||
247 | @since 1.22]] | | |||
248 | } | 318 | } | ||
249 | values { | 319 | values { | ||
250 | max_frame: int; [[ The maximum frame for play. Value must be @.min_frame ~ (@.frame_count - 1) ]] | 320 | max_frame: int; [[ The maximum frame for play. Value must be @.min_frame ~ (@.frame_count - 1) ]] | ||
251 | } | 321 | } | ||
252 | } | 322 | } | ||
253 | 323 | | |||
254 | } | 324 | } | ||
255 | implements { | 325 | implements { | ||
Show All 9 Lines |
The end of this line is missing!