Functions | |
EAPI Evas_Object * | emotion_object_add (Evas *evas) |
Add an emotion object to the canvas. More... | |
EAPI void | emotion_object_module_option_set (Evas_Object *obj, const char *opt, const char *val) |
Set the specified option for the current module. More... | |
EAPI Eina_Bool | emotion_object_init (Evas_Object *obj, const char *module_filename) |
Initializes an emotion object with the specified module. More... | |
EAPI Eina_Bool | emotion_object_file_set (Evas_Object *obj, const char *filename) |
Set the file to be played in the Emotion object. More... | |
EAPI const char * | emotion_object_file_get (const Evas_Object *obj) |
Get the filename of the file associated with the emotion object. More... | |
EAPI Evas_Object* emotion_object_add | ( | Evas * | evas | ) |
Add an emotion object to the canvas.
evas | The canvas where the object will be added to. |
This function creates an emotion object and adds it to the specified evas
. The returned object can be manipulated as any other Evas object, using the default object manipulation functions - evas_object_*.
After creating the object with this function, it's still necessary to initialize it with emotion_object_init(), and if an audio file is going to be played with this object instead of a video, use emotion_object_video_mute_set().
The next step is to open the desired file with emotion_object_file_set(), and start playing it with emotion_object_play_set().
References EAPI, and evas_object_smart_add().
EAPI void emotion_object_module_option_set | ( | Evas_Object * | obj, |
const char * | opt, | ||
const char * | val | ||
) |
Set the specified option for the current module.
obj | The emotion object which the option is being set to. |
opt | The option that is being set. Currently supported optiosn: "video" and "audio". |
val | The value of the option. Currently only supports "off" (?!?!?!) |
This function allows one to mute the video or audio of the emotion object.
References EAPI, EINA_FALSE, and EINA_TRUE.
EAPI Eina_Bool emotion_object_init | ( | Evas_Object * | obj, |
const char * | module_filename | ||
) |
Initializes an emotion object with the specified module.
obj | The emotion object to be initialized. |
module_filename | The name of the module to be used (gstreamer or xine). |
EINA_TRUE
if the specified module was successfully initialized for this object, EINA_FALSE
otherwise.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.
References EAPI, ecore_animator_del(), EINA_FALSE, eina_stringshare_del(), EINA_TRUE, and emotion_object_file_set().
EAPI Eina_Bool emotion_object_file_set | ( | Evas_Object * | obj, |
const char * | filename | ||
) |
Set the file to be played in the Emotion object.
obj | The emotion object where the file is being loaded. |
filename | Path to the file to be loaded. It can be absolute or relative path. |
filename
is the same as the one previously set.This function sets the file to be used with this emotion object. If the object already has another file set, this file will be unset and unloaded, and the new file will be loaded to this emotion object. The seek position will be set to 0, and the emotion object will be paused, instead of playing.
If there was already a filename set, and it's the same as the one being set now, this function does nothing and returns EINA_FALSE.
Use NULL
as argument to filename
if you want to unload the current file but don't want to load anything else.
References EAPI, ecore_animator_del(), EINA_FALSE, EINA_TRUE, eio_file_cancel(), evas_object_image_data_set(), and evas_object_image_size_set().
Referenced by emotion_object_init().
EAPI const char* emotion_object_file_get | ( | const Evas_Object * | obj | ) |
Get the filename of the file associated with the emotion object.
obj | The emotion object from which the filename will be retrieved. |
This function returns the path of the file loaded in this emotion object. If no object is loaded, it will return NULL
.
emotion_object_file_set(obj, NULL)
.References EAPI, EMOTION_ASPECT_CROP, EMOTION_ASPECT_CUSTOM, EMOTION_ASPECT_KEEP_BOTH, EMOTION_ASPECT_KEEP_HEIGHT, EMOTION_ASPECT_KEEP_NONE, EMOTION_ASPECT_KEEP_WIDTH, evas_object_clip_get(), evas_object_clip_set(), evas_object_clip_unset(), evas_object_color_set(), evas_object_del(), evas_object_evas_get(), evas_object_geometry_get(), evas_object_rectangle_add(), evas_object_show(), evas_object_smart_member_add(), and evas_object_visible_get().