diff --git a/src/Makefile_Emotion.am b/src/Makefile_Emotion.am index 919edc0516..05141591b7 100644 --- a/src/Makefile_Emotion.am +++ b/src/Makefile_Emotion.am @@ -4,8 +4,7 @@ emotion_eolian_files = \ lib/emotion/efl_canvas_video.eo emotion_eolian_c = $(emotion_eolian_files:%.eo=%.eo.c) -emotion_eolian_h = $(emotion_eolian_files:%.eo=%.eo.h) \ - $(emotion_eolian_files:%.eo=%.eo.legacy.h) +emotion_eolian_h = $(emotion_eolian_files:%.eo=%.eo.h) BUILT_SOURCES += \ $(emotion_eolian_c) \ @@ -23,6 +22,7 @@ lib/emotion/libemotion.la installed_emotionmainheadersdir = $(includedir)/emotion-@VMAJ@ dist_installed_emotionmainheaders_DATA = lib/emotion/Emotion.h \ + lib/emotion/efl_canvas_video_eo.legacy.h \ lib/emotion/Emotion_Legacy.h \ lib/emotion/Emotion_Eo.h diff --git a/src/lib/emotion/Emotion_Legacy.h b/src/lib/emotion/Emotion_Legacy.h index 6db3fe0050..de4532ab53 100644 --- a/src/lib/emotion/Emotion_Legacy.h +++ b/src/lib/emotion/Emotion_Legacy.h @@ -1,3 +1,3 @@ -#include "efl_canvas_video.eo.legacy.h" +#include "efl_canvas_video_eo.legacy.h" diff --git a/src/lib/emotion/efl_canvas_video.eo b/src/lib/emotion/efl_canvas_video.eo index 38a9894631..3aa165fe74 100644 --- a/src/lib/emotion/efl_canvas_video.eo +++ b/src/lib/emotion/efl_canvas_video.eo @@ -12,7 +12,6 @@ class @beta Efl.Canvas.Video extends Efl.Canvas.Group implements Efl.File, Efl.P Please don't use this function, consider using @Efl.Player.mute instead. ]] - legacy: emotion_object_module_option_set; } values { opt: string; [[The option that is being set. Currently @@ -39,7 +38,6 @@ class @beta Efl.Canvas.Video extends Efl.Canvas.Group implements Efl.File, Efl.P See also @Efl.File.file. ]] - legacy: emotion_object_init; return: bool; [[$true if the specified module was successfully initialized for this object, $false otherwise.]] } diff --git a/src/lib/emotion/efl_canvas_video_eo.legacy.c b/src/lib/emotion/efl_canvas_video_eo.legacy.c new file mode 100644 index 0000000000..e7e0dcee67 --- /dev/null +++ b/src/lib/emotion/efl_canvas_video_eo.legacy.c @@ -0,0 +1,12 @@ + +EAPI void +emotion_object_module_option_set(Efl_Canvas_Video *obj, const char *opt, const char *val) +{ + efl_canvas_video_option_set(obj, opt, val); +} + +EAPI Eina_Bool +emotion_object_init(Efl_Canvas_Video *obj, const char *module_filename) +{ + return efl_canvas_video_engine_set(obj, module_filename); +} diff --git a/src/lib/emotion/efl_canvas_video_eo.legacy.h b/src/lib/emotion/efl_canvas_video_eo.legacy.h new file mode 100644 index 0000000000..205c305aea --- /dev/null +++ b/src/lib/emotion/efl_canvas_video_eo.legacy.h @@ -0,0 +1,60 @@ +#ifndef _EFL_CANVAS_VIDEO_EO_LEGACY_H_ +#define _EFL_CANVAS_VIDEO_EO_LEGACY_H_ + +#ifndef _EFL_CANVAS_VIDEO_EO_CLASS_TYPE +#define _EFL_CANVAS_VIDEO_EO_CLASS_TYPE + +typedef Eo Efl_Canvas_Video; + +#endif + +#ifndef _EFL_CANVAS_VIDEO_EO_TYPES +#define _EFL_CANVAS_VIDEO_EO_TYPES + + +#endif + +/** + * @brief Set the specified option for the current module. + * + * This function allows one to mute the video or audio of the emotion object. + * + * Please don't use this function, consider using @ref Efl.Player.mute instead. + * + * @param[in] obj The object. + * @param[in] opt The option that is being set. Currently supported options: + * "video" and "audio". + * @param[in] val The value of the option. Currently only supports "off" + * (?!?!?!) + * + * @ingroup (null)_Group + */ +EAPI void emotion_object_module_option_set(Efl_Canvas_Video *obj, const char *opt, const char *val); + +/** + * @brief Initializes an emotion object with the specified module. + * + * This function is required after creating the emotion object, in order to + * specify which module will be used with this object. Different objects can + * use different modules to play a media file. The current supported modules + * are gstreamer and xine. + * + * To use any of them, you need to make sure that support for them was compiled + * correctly. + * + * It's possible to disable the build of a module with --disable-module_name. + * + * See also @ref Efl.File.file. + * + * @param[in] obj The object. + * @param[in] module_filename The name of the module to be used (gstreamer or + * xine). + * + * @return @c true if the specified module was successfully initialized for + * this object, @c false otherwise. + * + * @ingroup (null)_Group + */ +EAPI Eina_Bool emotion_object_init(Efl_Canvas_Video *obj, const char *module_filename); + +#endif diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c index 568bc40299..e2243c818d 100644 --- a/src/lib/emotion/emotion_smart.c +++ b/src/lib/emotion/emotion_smart.c @@ -1978,3 +1978,4 @@ _efl_canvas_video_efl_gfx_entity_size_set(Evas_Object *obj, Efl_Canvas_Video_Dat #include "efl_canvas_video.eo.c" +#include "efl_canvas_video_eo.legacy.c" diff --git a/src/lib/emotion/meson.build b/src/lib/emotion/meson.build index ad25dc65a6..93218828b3 100644 --- a/src/lib/emotion/meson.build +++ b/src/lib/emotion/meson.build @@ -17,16 +17,6 @@ foreach eo_file : pub_legacy_eo_files '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'), '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'), '-gchd', '@INPUT@']) - pub_eo_file_target += custom_target('eolian_gen_legacy_' + eo_file, - input : eo_file, - output : [eo_file + '.legacy.h'], - depfile : eo_file + '.legacy.d', - install : true, - install_dir : dir_package_include, - command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories, - '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'), - '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.d'), - '-gld', '@INPUT@']) endforeach eolian_include_directories += ['-I', meson.current_source_dir()] @@ -34,7 +24,8 @@ eolian_include_directories += ['-I', meson.current_source_dir()] emotion_header_src = [ 'Emotion.h', 'Emotion_Legacy.h', - 'Emotion_Eo.h' + 'Emotion_Eo.h', + 'efl_canvas_video_eo.legacy.h', ] emotion_src = [