Functions | |
EMOTION_API Evas_Object * | emotion_object_add (Evas *evas) |
Add an emotion object to the canvas. More... | |
EMOTION_API Eina_Bool | emotion_object_file_set (Evas_Object *obj, const char *filename) |
Set the file to be played in the Emotion object. More... | |
EMOTION_API const char * | emotion_object_file_get (const Evas_Object *obj) |
Get the filename of the file associated with the emotion object. More... | |
EMOTION_API 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 EINA_SAFETY_ON_FALSE_RETURN_VAL, and EVAS_CANVAS_CLASS.
EMOTION_API 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.
EMOTION_API 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)
.