summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_vg_animation_eo.legacy.h
blob: 78dd2f1d5dbe940c409e32bb468fd46ab6be9590 (plain)
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
#ifndef _EFL_UI_ANIMATION_VIEW_EO_LEGACY_H_
#define _EFL_UI_ANIMATION_VIEW_EO_LEGACY_H_

#ifndef _ELM_ANIMATION_VIEW_EO_CLASS_TYPE
#define _ELM_ANIMATION_VIEW_EO_CLASS_TYPE

typedef Eo Elm_Animation_View;

#endif

#ifndef _ELM_ANIMATION_VIEW_EO_TYPES
#define _ELM_ANIMATION_VIEW_EO_TYPES

/**
 * @brief Defines the state of animation view
 *
 * @ingroup Elm_Animation_View
 */
typedef enum
{
  ELM_ANIMATION_VIEW_STATE_NOT_READY = 0, /**< Animation is not ready to
                                              * play. (Probably, it didn't file
                                              * set yet or failed to read file.
                                              *
                                              * @since 1.23 */
  ELM_ANIMATION_VIEW_STATE_PLAY, /**< Animation is on playing. see
                                     * @ref elm_animation_view_play
                                     *
                                     * @since 1.23 */
  ELM_ANIMATION_VIEW_STATE_PLAY_BACK, /**< Animation is on playing back
                                          * (rewinding). see
                                          * @ref elm_animation_view_play_back
                                          *
                                          * @since 1.23 */
  ELM_ANIMATION_VIEW_STATE_PAUSE, /**< Animation has been paused. To continue
                                      * animation, call
                                      * @ref elm_animation_view_resume. see
                                      * @ref elm_animation_view_pause
                                      *
                                      * @since 1.23 */
  ELM_ANIMATION_VIEW_STATE_STOP /**< Animation view successfully loaded a
                                    * file then readied for playing. Otherwise
                                    * after finished animation or stopped
                                    * forcely by request. see
                                    * @ref elm_animation_view_stop
                                    *
                                    * @since 1.23 */
} Elm_Animation_View_State;


#endif

/**
 * @brief Animation will be started automatically when it's possible.
 *
 * If @ref elm_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 Elm_Animation_View
 */
EAPI void elm_animation_view_auto_play_set(Elm_Animation_View *obj, Eina_Bool auto_play);

/**
 * @brief Animation will be started automatically when it's possible.
 *
 * If @ref elm_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 Elm_Animation_View
 */
EAPI Eina_Bool elm_animation_view_auto_play_get(const Elm_Animation_View *obj);

/**
 * @brief Turn on/off animation looping.
 *
 * If @ref elm_animation_view_auto_repeat_get is @c true, it repeats animation
 * when animation frame is reached to end. This auto repeat mode is valid to
 * both play and play_back cases.
 *
 * Enable loop mode if @c true, disable otherwise.
 *
 * @param[in] obj The object.
 * @param[in] auto_repeat Loop mode, Defalut is @c false.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI void elm_animation_view_auto_repeat_set(Elm_Animation_View *obj, Eina_Bool auto_repeat);

/**
 * @brief Turn on/off animation looping.
 *
 * If @ref elm_animation_view_auto_repeat_get is @c true, it repeats animation
 * when animation frame is reached to end. This auto repeat mode is valid to
 * both play and play_back cases.
 *
 * Returns auto repeat mode of an animation view object.
 *
 * @param[in] obj The object.
 *
 * @return Loop mode, Defalut is @c false.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI Eina_Bool elm_animation_view_auto_repeat_get(const Elm_Animation_View *obj);

/**
 * @brief Control animation speed.
 *
 * Control animation speed by multiplying @c speed value. If you want to play
 * animation double-time faster, you can give @c speed 2. If you want to play
 * animation double-time slower, you can give @c speed 0.5.
 *
 * @warning speed must be greater than zero.
 *
 * @param[in] obj The object.
 * @param[in] speed Speed factor. Default value is 1.0
 *
 * @return @c true when it's successful. @c false otherwise.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI Eina_Bool elm_animation_view_speed_set(Elm_Animation_View *obj, double speed);

/**
 * @brief Control animation speed.
 *
 * Control animation speed by multiplying @c speed value. If you want to play
 * animation double-time faster, you can give @c speed 2. If you want to play
 * animation double-time slower, you can give @c speed 0.5.
 *
 * @warning speed must be greater than zero.
 *
 * Returns current animation speed of an animation view object.
 *
 * @param[in] obj The object.
 *
 * @return Speed factor. Default value is 1.0
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI double elm_animation_view_speed_get(const Elm_Animation_View *obj);

/**
 * @brief Get the duration of animation in seconds.
 *
 * This API returns total duration time of current animation in the seconds. If
 * current animation source isn't animatable, it returns zero.
 *
 * Returns current duration of an animation in seconds.
 *
 * @param[in] obj The object.
 *
 * @return duration time in the seconds
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI double elm_animation_view_duration_time_get(const Elm_Animation_View *obj);

/**
 * @brief Set current progress position of animation view object.
 *
 * When you required to jump on a certain frame instantly, you can change
 * current position by using this API.
 *
 * @warning The range of progress is 0 ~ 1.
 *
 * Set the current progress position of an animation view object.
 *
 * @param[in] obj The object.
 * @param[in] progress Progress position. Value must be 0 ~ 1.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI void elm_animation_view_progress_set(Elm_Animation_View *obj, double progress);

/**
 * @brief Set current progress position of animation view object.
 *
 * When you required to jump on a certain frame instantly, you can change
 * current position by using this API.
 *
 * @warning The range of progress is 0 ~ 1.
 *
 * Returns current progress position of an animation view object.
 *
 * @param[in] obj The object.
 *
 * @return Progress position. Value must be 0 ~ 1.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI double elm_animation_view_progress_get(const Elm_Animation_View *obj);

/**
 * @brief Number of current frame.
 *
 * Ranges from 0 to @ref elm_animation_view_frame_count_get - 1.
 *
 * Set the current frame of an animation view object.
 *
 * @param[in] obj The object.
 * @param[in] frame_num Current frame number.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI void elm_animation_view_frame_set(Elm_Animation_View *obj, int frame_num);

/**
 * @brief Number of current frame.
 *
 * Ranges from 0 to @ref elm_animation_view_frame_count_get - 1.
 *
 * Returns the current frame of an animation view object.
 *
 * @param[in] obj The object.
 *
 * @return Current frame number.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI int elm_animation_view_frame_get(const Elm_Animation_View *obj);

/**
 * @brief Play animation one time instantly when it's available.
 *
 * If current keyframe is on a certain position by playing back, this will play
 * forward from there.
 *
 * @warning Play request will be ignored if animation source is not set yet or
 * animation is paused state or it's already on playing.
 *
 * @param[in] obj The object.
 *
 * @return @c true when it's successful. @c false otherwise.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI Eina_Bool elm_animation_view_play(Elm_Animation_View *obj);

/**
 * @brief Play back animation one time instantly when it's available.
 *
 * If current keyframe is on a certain position by playing, this will play
 * backward from there.
 *
 * @warning Play back request will be ignored if animation source is not set
 * yet or animation is paused state or it's already on playing back.
 *
 * @param[in] obj The object.
 *
 * @return @c true when it's successful. @c false otherwise.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI Eina_Bool elm_animation_view_play_back(Elm_Animation_View *obj);

/**
 * @brief Pause current animation instantly.
 *
 * Once animation is paused, animation view must get resume to play continue
 * again.
 *
 * @warning Animation must be on playing or playing back status.
 *
 * @param[in] obj The object.
 *
 * @return @c true when it's successful. @c false otherwise.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI Eina_Bool elm_animation_view_pause(Elm_Animation_View *obj);

/**
 * @brief Resume paused animation to continue animation.
 *
 * @warning This resume must be called on animation paused status.
 *
 * @param[in] obj The object.
 *
 * @return @c true when it's successful. @c false otherwise.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI Eina_Bool elm_animation_view_resume(Elm_Animation_View *obj);

/**
 * @brief Stop playing animation.
 *
 * Stop animation instatly regardless of it's status and reset to show first
 * frame of animation. Even though current animation is paused, the animation
 * status will be stopped.
 *
 * @param[in] obj The object.
 *
 * @return @c true when it's successful. @c false otherwise.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI Eina_Bool elm_animation_view_stop(Elm_Animation_View *obj);

/** Get the default view size that specified from vector resource.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI Eina_Size2D elm_animation_view_default_size_get(const Elm_Animation_View *obj);


/**
 * @brief Returns the status whether current animation is on playing forward or
 * backward. warning: If animation view is not on playing, it will return
 * @c false.
 *
 * @param[in] obj The object.
 *
 * @return @c true, if animation on playing back, @c false otherwise.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI Eina_Bool elm_animation_view_is_playing_back(Elm_Animation_View *obj);

/**
 * @brief Get the index of end frame of the animation view, if it's animated.
 *  note : frame number starts with 0.
 *
 * @param[in] obj The object.
 *
 * @return The number of frames. 0, if it's not animated.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI int elm_animation_view_frame_count_get(const Elm_Animation_View *obj);

/**
 * @brief The start progress of the play. Default value is 0.
 *
 * Set start progress of an animation object.
 *
 * @param[in] obj The object.
 * @param[in] min_progress The minimum progress. Value must be 0 ~ 1.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI void elm_animation_view_min_progress_set(Elm_Animation_View *obj, double min_progress);

/**
 * @brief The start progress of the play. Default value is 0.
 *
 * Returns start progress of an animation object.
 *
 * @param[in] obj The object.
 *
 * @return The minimum progress. Value must be 0 ~ 1.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI double elm_animation_view_min_progress_get(const Elm_Animation_View *obj);

/**
 * @brief The last progress of the play. Default value is 1.
 *
 * Set last progress of an animation object.
 *
 * @param[in] obj The object.
 * @param[in] max_progress The maximum progress. Value must be 0 ~ 1.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI void elm_animation_view_max_progress_set(Elm_Animation_View *obj, double max_progress);

/**
 * @brief The last progress of the play. Default value is 1.
 *
 * Returns last progress of an animation object.
 *
 * @param[in] obj The object.
 *
 * @return The maximum progress. Value must be 0 ~ 1.
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI double elm_animation_view_max_progress_get(const Elm_Animation_View *obj);

/**
 * @brief The start frame of the play. Default value is 0.
 *
 * Set minimum frame of an animation object.
 *
 * @param[in] obj The object.
 * @param[in] min_frame The minimum frame for play. Value must be 0 ~
 * @ref elm_animation_view_max_frame_get
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI void elm_animation_view_min_frame_set(Elm_Animation_View *obj, int min_frame);

/**
 * @brief The start frame of the play. Default value is 0.
 *
 * Returns minimum frame of an animation object.
 *
 * @param[in] obj The object.
 *
 * @return The minimum frame for play. Value must be 0 ~
 * @ref elm_animation_view_max_frame_get
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI int elm_animation_view_min_frame_get(const Elm_Animation_View *obj);

/**
 * @brief The last frame of the play. Default value is
 * @ref elm_animation_view_frame_count_get - 1
 *
 * Set maximum frame of an animation object.
 *
 * @param[in] obj The object.
 * @param[in] max_frame The maximum frame for play. Value must be
 * @ref elm_animation_view_min_frame_get ~ (@ref elm_animation_view_frame_count_get - 1)
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI void elm_animation_view_max_frame_set(Elm_Animation_View *obj, int max_frame);

/**
 * @brief The last frame of the play. Default value is
 * @ref elm_animation_view_frame_count_get - 1
 *
 * Returns maximum frame of an animation object.
 *
 * @param[in] obj The object.
 *
 * @return The maximum frame for play. Value must be
 * @ref elm_animation_view_min_frame_get ~ (@ref elm_animation_view_frame_count_get - 1)
 *
 * @since 1.23
 *
 * @ingroup Elm_Animation_View
 */
EAPI int elm_animation_view_max_frame_get(const Elm_Animation_View *obj);

#endif