forked from enlightenment/efl
API break: emotion_object_file_set() returns a boolean, now.
SVN revision: 53648
This commit is contained in:
parent
02dced207e
commit
2d28628c95
|
@ -699,7 +699,10 @@ init_video_object(char *module_filename, char *filename)
|
|||
if (!emotion_object_init(o, module_filename))
|
||||
return;
|
||||
emotion_object_vis_set(o, vis);
|
||||
emotion_object_file_set(o, filename);
|
||||
if (!emotion_object_file_set(o, filename))
|
||||
{
|
||||
return;
|
||||
}
|
||||
emotion_object_play_set(o, 1);
|
||||
evas_object_move(o, 0, 0);
|
||||
evas_object_resize(o, 320, 240);
|
||||
|
|
|
@ -119,7 +119,7 @@ extern "C" {
|
|||
EAPI Evas_Object *emotion_object_add (Evas *evas);
|
||||
EAPI void emotion_object_module_option_set (Evas_Object *obj, const char *opt, const char *val);
|
||||
EAPI Eina_Bool emotion_object_init (Evas_Object *obj, const char *module_filename);
|
||||
EAPI void emotion_object_file_set (Evas_Object *obj, const char *filename);
|
||||
EAPI Eina_Bool emotion_object_file_set (Evas_Object *obj, const char *filename);
|
||||
EAPI const char *emotion_object_file_get (const Evas_Object *obj);
|
||||
EAPI void emotion_object_play_set (Evas_Object *obj, Eina_Bool play);
|
||||
EAPI Eina_Bool emotion_object_play_get (const Evas_Object *obj);
|
||||
|
|
|
@ -314,7 +314,7 @@ emotion_object_init(Evas_Object *obj, const char *module_filename)
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EAPI Eina_Bool
|
||||
emotion_object_file_set(Evas_Object *obj, const char *file)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
@ -322,9 +322,9 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
|
|||
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
|
||||
|
||||
DBG("file=%s", file);
|
||||
if (!sd->module) return;
|
||||
if (!sd->module) return EINA_FALSE;
|
||||
|
||||
if ((file) && (sd->file) && (!strcmp(file, sd->file))) return;
|
||||
if ((file) && (sd->file) && (!strcmp(file, sd->file))) return EINA_FALSE;
|
||||
if ((file) && (file[0] != 0))
|
||||
{
|
||||
int w, h;
|
||||
|
@ -334,7 +334,7 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
|
|||
sd->module->file_close(sd->video);
|
||||
evas_object_image_size_set(sd->obj, 1, 1);
|
||||
if (!sd->module->file_open(sd->file, obj, sd->video))
|
||||
return;
|
||||
return EINA_FALSE;
|
||||
sd->module->size_get(sd->video, &w, &h);
|
||||
evas_object_image_size_set(sd->obj, w, h);
|
||||
_emotion_image_data_zero(sd->obj);
|
||||
|
@ -353,6 +353,8 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
|
|||
free(sd->file);
|
||||
sd->file = NULL;
|
||||
}
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI const char *
|
||||
|
|
Loading…
Reference in New Issue