summaryrefslogtreecommitdiff
path: root/legacy/emotion
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2010-10-20 07:55:20 +0000
committerVincent Torri <vincent.torri@gmail.com>2010-10-20 07:55:20 +0000
commit2d28628c95718de0e9ea89fd1e8db321ea8283b1 (patch)
tree86dafb58fbc107969ee1a82ece2d2dead4ac37ac /legacy/emotion
parent02dced207e84fabe3f67e6949ee1f216a1c0051b (diff)
API break: emotion_object_file_set() returns a boolean, now.
SVN revision: 53648
Diffstat (limited to 'legacy/emotion')
-rw-r--r--legacy/emotion/src/bin/emotion_test_main.c5
-rw-r--r--legacy/emotion/src/lib/Emotion.h2
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c10
3 files changed, 11 insertions, 6 deletions
diff --git a/legacy/emotion/src/bin/emotion_test_main.c b/legacy/emotion/src/bin/emotion_test_main.c
index e6b3eff908..80b0438cd3 100644
--- a/legacy/emotion/src/bin/emotion_test_main.c
+++ b/legacy/emotion/src/bin/emotion_test_main.c
@@ -699,7 +699,10 @@ init_video_object(char *module_filename, char *filename)
699 if (!emotion_object_init(o, module_filename)) 699 if (!emotion_object_init(o, module_filename))
700 return; 700 return;
701 emotion_object_vis_set(o, vis); 701 emotion_object_vis_set(o, vis);
702 emotion_object_file_set(o, filename); 702 if (!emotion_object_file_set(o, filename))
703 {
704 return;
705 }
703 emotion_object_play_set(o, 1); 706 emotion_object_play_set(o, 1);
704 evas_object_move(o, 0, 0); 707 evas_object_move(o, 0, 0);
705 evas_object_resize(o, 320, 240); 708 evas_object_resize(o, 320, 240);
diff --git a/legacy/emotion/src/lib/Emotion.h b/legacy/emotion/src/lib/Emotion.h
index 929b30aa43..009e39101e 100644
--- a/legacy/emotion/src/lib/Emotion.h
+++ b/legacy/emotion/src/lib/Emotion.h
@@ -119,7 +119,7 @@ extern "C" {
119EAPI Evas_Object *emotion_object_add (Evas *evas); 119EAPI Evas_Object *emotion_object_add (Evas *evas);
120EAPI void emotion_object_module_option_set (Evas_Object *obj, const char *opt, const char *val); 120EAPI void emotion_object_module_option_set (Evas_Object *obj, const char *opt, const char *val);
121EAPI Eina_Bool emotion_object_init (Evas_Object *obj, const char *module_filename); 121EAPI Eina_Bool emotion_object_init (Evas_Object *obj, const char *module_filename);
122EAPI void emotion_object_file_set (Evas_Object *obj, const char *filename); 122EAPI Eina_Bool emotion_object_file_set (Evas_Object *obj, const char *filename);
123EAPI const char *emotion_object_file_get (const Evas_Object *obj); 123EAPI const char *emotion_object_file_get (const Evas_Object *obj);
124EAPI void emotion_object_play_set (Evas_Object *obj, Eina_Bool play); 124EAPI void emotion_object_play_set (Evas_Object *obj, Eina_Bool play);
125EAPI Eina_Bool emotion_object_play_get (const Evas_Object *obj); 125EAPI Eina_Bool emotion_object_play_get (const Evas_Object *obj);
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index 30d0951b40..ad649707e7 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -314,7 +314,7 @@ emotion_object_init(Evas_Object *obj, const char *module_filename)
314 return EINA_TRUE; 314 return EINA_TRUE;
315} 315}
316 316
317EAPI void 317EAPI Eina_Bool
318emotion_object_file_set(Evas_Object *obj, const char *file) 318emotion_object_file_set(Evas_Object *obj, const char *file)
319{ 319{
320 Smart_Data *sd; 320 Smart_Data *sd;
@@ -322,9 +322,9 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
322 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 322 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
323 323
324 DBG("file=%s", file); 324 DBG("file=%s", file);
325 if (!sd->module) return; 325 if (!sd->module) return EINA_FALSE;
326 326
327 if ((file) && (sd->file) && (!strcmp(file, sd->file))) return; 327 if ((file) && (sd->file) && (!strcmp(file, sd->file))) return EINA_FALSE;
328 if ((file) && (file[0] != 0)) 328 if ((file) && (file[0] != 0))
329 { 329 {
330 int w, h; 330 int w, h;
@@ -334,7 +334,7 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
334 sd->module->file_close(sd->video); 334 sd->module->file_close(sd->video);
335 evas_object_image_size_set(sd->obj, 1, 1); 335 evas_object_image_size_set(sd->obj, 1, 1);
336 if (!sd->module->file_open(sd->file, obj, sd->video)) 336 if (!sd->module->file_open(sd->file, obj, sd->video))
337 return; 337 return EINA_FALSE;
338 sd->module->size_get(sd->video, &w, &h); 338 sd->module->size_get(sd->video, &w, &h);
339 evas_object_image_size_set(sd->obj, w, h); 339 evas_object_image_size_set(sd->obj, w, h);
340 _emotion_image_data_zero(sd->obj); 340 _emotion_image_data_zero(sd->obj);
@@ -353,6 +353,8 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
353 free(sd->file); 353 free(sd->file);
354 sd->file = NULL; 354 sd->file = NULL;
355 } 355 }
356
357 return EINA_TRUE;
356} 358}
357 359
358EAPI const char * 360EAPI const char *