diff options
author | Tom Hacohen <tom@stosb.com> | 2014-07-22 16:37:57 +0100 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2014-08-20 17:14:09 +0100 |
commit | b1df565d44cfecd676f86a2012305b90f552002d (patch) | |
tree | ce0182268aa501cc828a2dfffdcdc2c37029d17f | |
parent | a336d6069ea3ee93a252114de23aec926e3ef2db (diff) | |
download | elementary-b1df565d44cfecd676f86a2012305b90f552002d.tar.gz |
Video: Use file interface.
-rw-r--r-- | src/lib/elm_video.c | 9 | ||||
-rw-r--r-- | src/lib/elm_video.eo | 27 | ||||
-rw-r--r-- | src/lib/elm_video_legacy.h | 24 |
3 files changed, 33 insertions, 27 deletions
diff --git a/src/lib/elm_video.c b/src/lib/elm_video.c index cf0ac909d..20e1dc848 100644 --- a/src/lib/elm_video.c +++ b/src/lib/elm_video.c @@ -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" diff --git a/src/lib/elm_video.eo b/src/lib/elm_video.eo index 5354bf879..3ff579762 100644 --- a/src/lib/elm_video.eo +++ b/src/lib/elm_video.eo @@ -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; diff --git a/src/lib/elm_video_legacy.h b/src/lib/elm_video_legacy.h index 3963a7cba..82e41918b 100644 --- a/src/lib/elm_video_legacy.h +++ b/src/lib/elm_video_legacy.h @@ -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" |