summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_animation_view.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_animation_view.c')
-rw-r--r--src/lib/elementary/efl_ui_animation_view.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_animation_view.c b/src/lib/elementary/efl_ui_animation_view.c
index 82aba0f..074ebfd 100644
--- a/src/lib/elementary/efl_ui_animation_view.c
+++ b/src/lib/elementary/efl_ui_animation_view.c
@@ -468,6 +468,37 @@ _efl_ui_animation_view_play(Eo *obj, Efl_Ui_Animation_View_Data *pd)
468 return EINA_TRUE; 468 return EINA_TRUE;
469} 469}
470 470
471Eina_Bool _efl_ui_animation_view_play_sector(Eo *obj, Efl_Ui_Animation_View_Data *pd, const char *start, const char *end)
472{
473 int start_frame = 0;
474 int end_frame = evas_object_vg_animated_frame_count_get(pd->vg) - 1;
475
476 if (start && end)
477 {
478 efl_gfx_frame_controller_sector_get(pd->vg, start, &start_frame, NULL);
479 efl_gfx_frame_controller_sector_get(pd->vg, end, &end_frame, NULL);
480 }
481 else
482 {
483 if (start)
484 {
485 efl_gfx_frame_controller_sector_get(pd->vg, start, &start_frame, &end_frame);
486 }
487 else if (end)
488 {
489 efl_gfx_frame_controller_sector_get(pd->vg, end, &end_frame, NULL);
490 }
491 }
492
493 efl_ui_animation_view_min_frame_set(obj, start_frame);
494 if (start_frame < end_frame)
495 efl_ui_animation_view_max_frame_set(obj, end_frame);
496
497 if (!efl_ui_animation_view_play(obj))
498 return EINA_FALSE;
499 return EINA_TRUE;
500}
501
471EOLIAN static Eina_Bool 502EOLIAN static Eina_Bool
472_efl_ui_animation_view_stop(Eo *obj, Efl_Ui_Animation_View_Data *pd) 503_efl_ui_animation_view_stop(Eo *obj, Efl_Ui_Animation_View_Data *pd)
473{ 504{