efl/player: prune properties duplicated in efl.playable

efl.playable implements a number of properties which are also present
in efl.player. playable was intended to be separate, so enforce this
split in all classes which use player

ref T7877

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10109
This commit is contained in:
Mike Blumenkrantz 2019-09-24 09:39:21 -04:00 committed by Cedric Bail
parent c99f7d06cb
commit 5c2ea620a1
15 changed files with 32 additions and 56 deletions

View File

@ -46,7 +46,7 @@ _anim_toggle(void *data, const Efl_Event *ev EINA_UNUSED)
it = efl_content_iterate(table);
EINA_ITERATOR_FOREACH(it, o)
{
if (efl_isa(o, EFL_PLAYER_INTERFACE) && efl_player_playable_get(o))
if (efl_isa(o, EFL_PLAYER_INTERFACE) && efl_playable_get(o))
efl_player_play_set(o, !efl_player_play_get(o));
}
eina_iterator_free(it);

View File

@ -407,7 +407,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
efl_file_set(efl_added, buf),
efl_name_set(efl_added, images[k].src_name),
elm_object_tooltip_text_set(efl_added, images[k].src_name));
if (efl_player_playable_get(o))
if (efl_playable_get(o))
efl_player_play_set(o, 1);
efl_event_callback_add(o, EFL_INPUT_EVENT_CLICKED, _img_click, win);
efl_pack(box2, o);

View File

@ -152,7 +152,7 @@ my_bt_open(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
}
if (file && eina_str_has_extension(file, ".gif")
&& efl_player_playable_get(ph))
&& efl_playable_get(ph))
efl_player_play_set(ph, EINA_TRUE);
}
@ -829,7 +829,7 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, _zoomable_clicked_cb, NULL)
);
if (efl_player_playable_get(zoomable))
if (efl_playable_get(zoomable))
{
printf("animation is available for this image.\n");
efl_player_play_set(zoomable, EINA_TRUE);

View File

@ -538,7 +538,7 @@ _efl_canvas_layout_efl_observer_update(Eo *obj EINA_UNUSED, Edje *ed, Efl_Object
}
EOLIAN Eina_Bool
_efl_canvas_layout_efl_player_playable_get(const Eo *obj EINA_UNUSED, Edje *pd EINA_UNUSED)
_efl_canvas_layout_efl_playable_playable_get(const Eo *obj EINA_UNUSED, Edje *pd EINA_UNUSED)
{
return EINA_TRUE;
}

View File

@ -3,7 +3,7 @@
class @beta Efl.Canvas.Layout extends Efl.Canvas.Group implements Efl.File, Efl.Container, Efl.Part,
Efl.Observer, Efl.Ui.I18n, Efl.Layout.Calc,
Efl.Layout.Signal, Efl.Layout.Group,
Efl.Player, Efl.Gfx.Color_Class, Efl.Gfx.Text_Class,
Efl.Player, Efl.Playable, Efl.Gfx.Color_Class, Efl.Gfx.Text_Class,
Efl.Gfx.Size_Class
{
[[Edje object class]]
@ -126,7 +126,7 @@ class @beta Efl.Canvas.Layout extends Efl.Canvas.Group implements Efl.File, Efl.
Efl.Container.content_count;
Efl.Part.part_get; [[Returns @Efl.Canvas.Layout_Part]]
Efl.Observer.update;
Efl.Player.playable { get; }
Efl.Playable.playable { get; }
Efl.Player.play { get; set; }
Efl.Player.play_speed { get; set; }
}

View File

@ -9,14 +9,6 @@ interface @beta Efl.Player
stop {
[[Stop playable object.]]
}
@property playable {
[[Whether or not the playable can be played.]]
get {
}
values {
play: bool; [[$true if the object have playable data, $false otherwise]]
}
}
@property play {
[[Playback state of the media file.
@ -75,21 +67,5 @@ interface @beta Efl.Player
speed: double; [[The play speed in the [0, infinity) range.]]
}
}
@property length {
[[Get the length of play for the media file.]]
get {
}
values {
length: double; [[The length of the stream in seconds.]]
}
}
@property seekable {
[[Get whether the media file is seekable.]]
get {
}
values {
seekable: bool; [[$true if seekable.]]
}
}
}
}

View File

@ -1716,11 +1716,11 @@ _efl_ui_image_efl_ui_draggable_drag_target_get(const Eo *obj EINA_UNUSED, Efl_Ui
EAPI Eina_Bool
elm_image_animated_available_get(const Evas_Object *obj)
{
return efl_player_playable_get(obj);
return efl_playable_get(obj);
}
EOLIAN static Eina_Bool
_efl_ui_image_efl_player_playable_get(const Eo *obj, Efl_Ui_Image_Data *sd)
_efl_ui_image_efl_playable_playable_get(const Eo *obj, Efl_Ui_Image_Data *sd)
{
if (sd->edje) return EINA_TRUE;

View File

@ -17,7 +17,7 @@ struct @beta Efl.Ui.Image_Error
}
class Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Input.Clickable, Efl.Ui.Draggable,
Efl.File, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller, Efl.Player, Efl.Gfx.View,
Efl.File, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller, Efl.Player, Efl.Playable, Efl.Gfx.View,
Efl.Access.Component, Efl.Access.Widget.Action, Efl.Gfx.Color,
Efl.Gfx.Image_Orientable,
Efl.Layout.Calc, Efl.Layout.Group, Efl.Layout.Signal,
@ -97,7 +97,7 @@ class Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Input.Clickable, Efl.Ui.
Efl.Gfx.Image.scale_hint { get; set; }
Efl.Gfx.Image.content_hint { get; set; }
Efl.Gfx.Image.image_load_error { get; }
Efl.Player.playable { get; }
Efl.Playable.playable { get; }
Efl.Player.play { get; set; }
Efl.Layout.Signal.signal_emit;
Efl.Layout.Signal.message_send;

View File

@ -3003,7 +3003,7 @@ _efl_ui_image_zoomable_gesture_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Ima
}
EOLIAN static Eina_Bool
_efl_ui_image_zoomable_efl_player_playable_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd)
_efl_ui_image_zoomable_efl_playable_playable_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd)
{
if (sd->edje) return EINA_TRUE;
return evas_object_image_animated_get(sd->img);

View File

@ -43,7 +43,7 @@ class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom
Efl.Gfx.View.view_size { get; }
Efl.Gfx.Image.image_size { get; }
Efl.Ui.Image.icon { set; get; }
Efl.Player.playable { get; }
Efl.Playable.playable { get; }
Efl.Player.play { get; set; }
Efl.Ui.Zoom.zoom_animation { set; get; }
Efl.Ui.Zoom.zoom_level { set; get; }

View File

@ -498,13 +498,13 @@ elm_video_audio_mute_get(const Evas_Object *obj)
EAPI double
elm_video_play_length_get(const Evas_Object *obj)
{
return efl_player_length_get(obj);
return efl_playable_length_get(obj);
}
EAPI Eina_Bool
elm_video_is_seekable_get(const Evas_Object *obj)
{
return efl_player_seekable_get(obj);
return efl_playable_seekable_get(obj);
}
EAPI void

View File

@ -1,5 +1,5 @@
class @beta Efl.Canvas.Video extends Efl.Canvas.Group
implements Efl.File, Efl.Audio_Control, Efl.Player,
implements Efl.File, Efl.Audio_Control, Efl.Player, Efl.Playable,
Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller
{
[[Efl canvas video class]]
@ -62,8 +62,8 @@ class @beta Efl.Canvas.Video extends Efl.Canvas.Group
Efl.Player.progress { get; }
Efl.Audio_Control.volume { get; set; }
Efl.Audio_Control.mute { get; set; }
Efl.Player.length { get; }
Efl.Player.seekable { get; }
Efl.Playable.length { get; }
Efl.Playable.seekable { get; }
Efl.Gfx.Image_Load_Controller.load_size { get; }
Efl.Gfx.Image.ratio { get; }
Efl.Gfx.Image.smooth_scale { get; set; }

View File

@ -731,7 +731,7 @@ emotion_object_buffer_size_get(const Evas_Object *obj)
EAPI Eina_Bool
emotion_object_seekable_get(const Evas_Object *obj)
{
return efl_player_seekable_get(obj);
return efl_playable_seekable_get(obj);
}
EAPI Eina_Bool
@ -757,7 +757,7 @@ emotion_object_audio_handled_get(const Evas_Object *obj)
EAPI double
emotion_object_play_length_get(const Evas_Object *obj)
{
return efl_player_length_get(obj);
return efl_playable_length_get(obj);
}
EAPI void
@ -1171,7 +1171,7 @@ _efl_canvas_video_efl_player_progress_get(const Eo *obj EINA_UNUSED, Efl_Canvas_
}
EOLIAN static double
_efl_canvas_video_efl_player_length_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
_efl_canvas_video_efl_playable_length_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
if (!sd->engine_instance) return 0.0;
sd->len = emotion_engine_instance_len_get(sd->engine_instance);
@ -1179,7 +1179,7 @@ _efl_canvas_video_efl_player_length_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vi
}
EOLIAN static Eina_Bool
_efl_canvas_video_efl_player_seekable_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
_efl_canvas_video_efl_playable_seekable_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
if (!sd->engine_instance) return EINA_FALSE;
return emotion_engine_instance_seekable(sd->engine_instance);

View File

@ -83,7 +83,7 @@ _animator_cb(void *data)
EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
double duration, elapsed_time, vector;
if (efl_player_seekable_get(eo_obj))
if (efl_playable_seekable_get(eo_obj))
{
pd->time.current = ecore_loop_time_get();
@ -195,7 +195,7 @@ _efl_canvas_animation_player_efl_player_start(Eo *eo_obj,
double start_delay;
EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
if (!efl_player_playable_get(eo_obj)) return;
if (!efl_playable_get(eo_obj)) return;
pd->is_play = EINA_TRUE;
//TODO: check this case is correct
if (pd->start_delay_timer) return;
@ -317,7 +317,7 @@ _efl_canvas_animation_player_efl_player_play_get(const Eo *eo_obj EINA_UNUSED,
}
EOLIAN static Eina_Bool
_efl_canvas_animation_player_efl_player_playable_get(const Eo *eo_obj,
_efl_canvas_animation_player_efl_playable_playable_get(const Eo *eo_obj,
Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED)
{
Efl_Canvas_Animation *anim = efl_animation_player_animation_get(eo_obj);
@ -342,7 +342,7 @@ _efl_canvas_animation_player_efl_player_pos_set(Eo *eo_obj,
double sec)
{
//TODO: this is not correct
if (!efl_player_seekable_get(eo_obj))
if (!efl_playable_seekable_get(eo_obj))
return;
EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
@ -382,7 +382,7 @@ _efl_canvas_animation_player_efl_player_play_speed_get(const Eo *eo_obj EINA_UNU
}
EOLIAN static double
_efl_canvas_animation_player_efl_player_length_get(const Eo *eo_obj,
_efl_canvas_animation_player_efl_playable_length_get(const Eo *eo_obj,
Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED)
{
EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
@ -390,7 +390,7 @@ _efl_canvas_animation_player_efl_player_length_get(const Eo *eo_obj,
}
EOLIAN static Eina_Bool
_efl_canvas_animation_player_efl_player_seekable_get(const Eo *eo_obj EINA_UNUSED,
_efl_canvas_animation_player_efl_playable_seekable_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED)
{
EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);

View File

@ -1,4 +1,4 @@
class @beta Efl.Canvas.Animation_Player extends Efl.Object implements Efl.Player
class @beta Efl.Canvas.Animation_Player extends Efl.Object implements Efl.Player, Efl.Playable
{
[[Efl animation object class]]
c_prefix: efl_animation_player;
@ -38,14 +38,14 @@ class @beta Efl.Canvas.Animation_Player extends Efl.Object implements Efl.Player
Efl.Player.start;
Efl.Player.stop;
Efl.Player.play { get; set; }
Efl.Player.playable { get; }
Efl.Playable.playable { get; }
Efl.Player.pos { get; set; }
Efl.Player.progress { get;}
Efl.Player.play_speed { get; set; }
//Efl.Player.volume { get; set; }
//Efl.Player.mute { get; set; }
Efl.Player.length { get; }
Efl.Player.seekable { get; }
Efl.Playable.length { get; }
Efl.Playable.seekable { get; }
}
events {
/* FIXME: This event is similar to Efl.Canvas.Object.anim_started but with different type, might be confusing. */