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);
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);
return EINA_TRUE;
}
-EAPI void
+EAPI Eina_Bool
emotion_object_file_set(Evas_Object *obj, const char *file)
{
Smart_Data *sd;
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;
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);
free(sd->file);
sd->file = NULL;
}
+
+ return EINA_TRUE;
}
EAPI const char *