forked from enlightenment/efl
Efl.Ui.Vg_Animation: Implaments Efl.Playable interface
Summary: Change API .duration_time => Efl.Playable.length.get ref T8476 Depends on D10939 Test Plan: N/A Reviewers: Hermet, bu5hm4n, kimcinoo, segfaultxavi, zmike Reviewed By: segfaultxavi, zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8476 Differential Revision: https://phab.enlightenment.org/D10953
This commit is contained in:
parent
43288c7ace
commit
e3b77fcff8
|
@ -487,7 +487,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
|
|||
|
||||
|
||||
//Duration Text
|
||||
snprintf(buf, sizeof(buf), "Duration: %1.2fs", efl_ui_vg_animation_duration_time_get(anim_view));
|
||||
snprintf(buf, sizeof(buf), "Duration(Length): %1.2fs", efl_playable_length_get(anim_view));
|
||||
efl_add(EFL_UI_TEXTBOX_CLASS, box_sub,
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
|
||||
|
|
|
@ -208,7 +208,7 @@ test_efl_ui_vg_animation(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
|
|||
|
||||
|
||||
//Duration Text
|
||||
snprintf(buf, sizeof(buf), "Duration: %1.2fs", efl_ui_vg_animation_duration_time_get(anim_view));
|
||||
snprintf(buf, sizeof(buf), "Duration(Length): %1.2fs", efl_playable_length_get(anim_view));
|
||||
efl_add(EFL_UI_TEXTBOX_CLASS, box2,
|
||||
efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
|
||||
efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
|
||||
|
|
|
@ -521,12 +521,6 @@ _efl_ui_vg_animation_frame_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Da
|
|||
return (int) ((double) (evas_object_vg_animated_frame_count_get(pd->vg) - 1) * progress);
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
_efl_ui_vg_animation_duration_time_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
|
||||
{
|
||||
return pd->frame_duration;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Size2D
|
||||
_efl_ui_vg_animation_default_view_size_get(const Eo *obj EINA_UNUSED,
|
||||
Efl_Ui_Vg_Animation_Data *pd EINA_UNUSED)
|
||||
|
@ -804,6 +798,26 @@ _efl_ui_vg_animation_efl_player_playback_speed_get(const Eo *obj EINA_UNUSED, Ef
|
|||
return pd->playback_speed;
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
_efl_ui_vg_animation_efl_playable_length_get(const Eo *obj EINA_UNUSED, Efl_Ui_Vg_Animation_Data *pd)
|
||||
{
|
||||
return pd->frame_duration;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_vg_animation_efl_playable_playable_get(const Eo *obj, Efl_Ui_Vg_Animation_Data *pd EINA_UNUSED)
|
||||
{
|
||||
if (!efl_file_loaded_get(obj)) return EINA_FALSE;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_vg_animation_efl_playable_seekable_get(const Eo *obj, Efl_Ui_Vg_Animation_Data *pd EINA_UNUSED)
|
||||
{
|
||||
if (!efl_file_loaded_get(obj)) return EINA_FALSE;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI Elm_Animation_View*
|
||||
elm_animation_view_add(Evas_Object *parent)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ enum @beta Efl.Ui.Vg_Animation_State
|
|||
Otherwise after finished animation or stopped forcibly by request.]]
|
||||
}
|
||||
|
||||
class @beta Efl.Ui.Vg_Animation extends Efl.Ui.Widget implements Efl.Gfx.View, Efl.File, Efl.Player
|
||||
class @beta Efl.Ui.Vg_Animation extends Efl.Ui.Widget implements Efl.Gfx.View, Efl.File, Efl.Player, Efl.Playable
|
||||
{
|
||||
[[Elementary Vector Graphcis Animation class.
|
||||
Vg Animation is designed to show and play animation of
|
||||
|
@ -63,18 +63,6 @@ class @beta Efl.Ui.Vg_Animation extends Efl.Ui.Widget implements Efl.Gfx.View, E
|
|||
autorepeat: bool; [[Loop mode, Default is $false.]]
|
||||
}
|
||||
}
|
||||
@property duration_time {
|
||||
[[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.
|
||||
]]
|
||||
get {
|
||||
}
|
||||
values {
|
||||
frame_duration: double; [[duration time in the seconds]]
|
||||
}
|
||||
}
|
||||
@property frame {
|
||||
[[Number of current frame.
|
||||
|
||||
|
@ -212,6 +200,9 @@ class @beta Efl.Ui.Vg_Animation extends Efl.Ui.Widget implements Efl.Gfx.View, E
|
|||
Efl.Player.playback_position { set; get; }
|
||||
Efl.Player.playback_progress { get; set; }
|
||||
Efl.Player.playback_speed { set; get; }
|
||||
Efl.Playable.length { get; }
|
||||
Efl.Playable.playable { get; }
|
||||
Efl.Playable.seekable { get; }
|
||||
}
|
||||
events {
|
||||
play,start: void; [[Called when animation is just started]]
|
||||
|
|
|
@ -40,7 +40,7 @@ elm_animation_view_speed_get(const Efl_Ui_Vg_Animation *obj)
|
|||
EAPI double
|
||||
elm_animation_view_duration_time_get(const Efl_Ui_Vg_Animation *obj)
|
||||
{
|
||||
return efl_ui_vg_animation_duration_time_get(obj);
|
||||
return efl_playable_length_get(obj);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
Loading…
Reference in New Issue