efl/player: prune properties duplicated in efl.playable
authorMike Blumenkrantz <zmike@samsung.com>
Tue, 24 Sep 2019 13:39:21 +0000 (09:39 -0400)
committerJongmin Lee <jm105.lee@samsung.com>
Wed, 25 Sep 2019 21:11:54 +0000 (06:11 +0900)
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

15 files changed:
src/bin/elementary/test_evas_snapshot.c
src/bin/elementary/test_gfx_filters.c
src/bin/elementary/test_photocam.c
src/lib/edje/edje_smart.c
src/lib/edje/efl_canvas_layout.eo
src/lib/efl/interfaces/efl_player.eo
src/lib/elementary/efl_ui_image.c
src/lib/elementary/efl_ui_image.eo
src/lib/elementary/efl_ui_image_zoomable.c
src/lib/elementary/efl_ui_image_zoomable.eo
src/lib/elementary/efl_ui_video.c
src/lib/emotion/efl_canvas_video.eo
src/lib/emotion/emotion_smart.c
src/lib/evas/canvas/efl_canvas_animation_player.c
src/lib/evas/canvas/efl_canvas_animation_player.eo

index ea79aa8..ecfee19 100644 (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);
index 4fdee9d..e7410c8 100644 (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);
index 6f50740..70d6da2 100644 (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);
index a6a300b..a410313 100644 (file)
@@ -588,7 +588,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;
 }
index 9af2434..b75498a 100644 (file)
@@ -5,7 +5,7 @@ import edje_types;
 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]]
@@ -388,7 +388,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; }
    }
index 1aecb53..3ff0649 100644 (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.]]
-             }
-        }
    }
 }
index 49e8d7f..a80e27b 100644 (file)
@@ -1732,11 +1732,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;
 
index 080c0ce..2103545 100644 (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;
index af4d0ba..959ff43 100644 (file)
@@ -3016,7 +3016,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);
index 4b48388..1157cbd 100644 (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; }
index b04ec11..e29ce9a 100644 (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
index 4cb7c2e..3e14920 100644 (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; }
index 73c588b..9a30bed 100644 (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);
index aa89c36..2dc7d55 100644 (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);
index 8d33cc7..ffec283 100644 (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. */