Video: Use file interface.
authorTom Hacohen <tom@stosb.com>
Tue, 22 Jul 2014 15:37:57 +0000 (16:37 +0100)
committerTom Hacohen <tom@stosb.com>
Thu, 21 Aug 2014 10:04:28 +0000 (11:04 +0100)
src/lib/elm_video.c
src/lib/elm_video.eo
src/lib/elm_video_legacy.h

index cf0ac90..20e1dc8 100644 (file)
@@ -291,7 +291,7 @@ _elm_video_eo_base_constructor(Eo *obj, Elm_Video_Data *_pd EINA_UNUSED)
 }
 
 EOLIAN static Eina_Bool
-_elm_video_file_set(Eo *obj, Elm_Video_Data *sd, const char *filename)
+_elm_video_efl_file_file_set(Eo *obj, Elm_Video_Data *sd, const char *filename, const char *key EINA_UNUSED)
 {
    if (sd->remember) emotion_object_last_position_save(sd->emotion);
    sd->stop = EINA_FALSE;
@@ -452,4 +452,11 @@ _elm_video_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED
    return &atspi_actions[0];
 }
 
+EAPI Eina_Bool
+elm_video_file_set(Eo *obj, const char *filename)
+{
+   return eo_do((Eo *) obj, efl_file_set(filename, NULL));
+}
+
+
 #include "elm_video.eo.c"
index 5354bf8..3ff5797 100644 (file)
@@ -1,4 +1,4 @@
-class Elm_Video (Elm_Layout, Elm_Interface_Atspi_Widget_Action)
+class Elm_Video (Elm_Layout, Efl.File, Elm_Interface_Atspi_Widget_Action)
 {
    eo_prefix: elm_obj_video;
    properties {
@@ -85,30 +85,6 @@ class Elm_Video (Elm_Layout, Elm_Interface_Atspi_Widget_Action)
             bool mute; /*@ The new mute state. */
          }
       }
-      file {
-         set {
-            /*@
-            @brief Define the file or URI that will be the video source.
-
-            @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
-
-            This function will explicitly define a file or URI as a source
-            for the video of the Elm_Video object.
-
-            @see elm_video_add()
-            @see elm_player_add()
-
-            @ingroup Video */
-            return: bool;
-         }
-         values {
-            const(char)* filename; /*@ The file or URI to target.
-            Local files can be specified using file:// or by using full file paths.
-            URI could be remote source of video, like http:// or local source like
-            WebCam (v4l2://). (You can use Emotion API to request and list
-            the available Webcam on your system). */
-         }
-      }
       is_playing {
          get {
             /*@
@@ -204,6 +180,7 @@ class Elm_Video (Elm_Layout, Elm_Interface_Atspi_Widget_Action)
    implements {
       class.constructor;
       Eo.Base.constructor;
+      Efl.File.file.set;
       Evas.Object_Smart.add;
       Evas.Object_Smart.del;
       Elm_Widget.focus_next_manager_is;
index 3963a7c..82e4191 100644 (file)
@@ -26,4 +26,26 @@ EAPI Evas_Object         *elm_player_add(Evas_Object *parent);
  */
 EAPI Evas_Object         *elm_video_add(Evas_Object *parent);
 
-#include "elm_video.eo.legacy.h"
\ No newline at end of file
+/**
+ *
+ * @brief Define the file or URI that will be the video source.
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise
+ *
+ * This function will explicitly define a file or URI as a source
+ * for the video of the Elm_Video object.
+ *
+ * @see elm_video_add()
+ * @see elm_player_add()
+ *
+ * @ingroup Video
+ *
+ * @param[in] filename The file or URI to target.
+Local files can be specified using file:// or by using full file paths.
+URI could be remote source of video, like http:// or local source like
+WebCam (v4l2://). (You can use Emotion API to request and list
+the available Webcam on your system).
+ */
+EAPI Eina_Bool elm_video_file_set(Eo *obj, const char *filename);
+
+#include "elm_video.eo.legacy.h"