summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-02-27 13:17:09 -0500
committerMike Blumenkrantz <zmike@samsung.com>2019-02-27 13:17:10 -0500
commit6326e18b3fb2a4757f8ffa22be5d55a75da23049 (patch)
tree31d586b52638aa0d0b1c759869a8e3368c9daf5d
parent7924660d54500285d3844bfa384394c683825cd9 (diff)
efl.file: improve api a bit
Summary: the previous implementation/api had a number of issues: * "file" property contained both "file" and "key" values - also performed file loading operation * "load_error" property which was specific to image objects * no methods for controlling file loading/unloading this patch attempts the following changes: * split "file" property into "file" and "key" properties - also remove "key" from existing "mmap" property * remove "load_error" * directly return error codes from operations * add "load" and "unload" methods for directly controlling load state * add implicit file loading if file/mmap is set during construction * rewrite all efl.file implementations to move file loading into load() method * rewrite all usage of efl.file api based on these changes * add C extension functions to mimic previous behavior ref T7577 Reviewers: segfaultxavi, bu5hm4n, cedric Reviewed By: segfaultxavi Subscribers: vitor.sousa, #reviewers, #committers Tags: #efl_api Maniphest Tasks: T7577 Differential Revision: https://phab.enlightenment.org/D8018
-rw-r--r--src/Makefile_Efl.am2
-rw-r--r--src/bin/edje/edje_cc_out.c4
-rw-r--r--src/bin/elementary/test_bg.c19
-rw-r--r--src/bin/elementary/test_box.c3
-rw-r--r--src/bin/elementary/test_efl_gfx_mapping.c2
-rw-r--r--src/bin/elementary/test_evas_map.c3
-rw-r--r--src/bin/elementary/test_evas_mask.c5
-rw-r--r--src/bin/elementary/test_evas_snapshot.c3
-rw-r--r--src/bin/elementary/test_gfx_filters.c2
-rw-r--r--src/bin/elementary/test_part_bg.c6
-rw-r--r--src/bin/elementary/test_part_shadow.c2
-rw-r--r--src/bin/elementary/test_photocam.c5
-rw-r--r--src/bin/elementary/test_ui_button.c4
-rw-r--r--src/bin/elementary/test_ui_pager.c12
-rw-r--r--src/bin/elementary/test_ui_pager_scroll.c12
-rw-r--r--src/bin/elementary/test_ui_panel.c2
-rw-r--r--src/bin/elementary/test_ui_popup.c18
-rw-r--r--src/bin/elementary/test_ui_progressbar.c3
-rw-r--r--src/bin/elementary/test_ui_tab_pager.c6
-rw-r--r--src/examples/ecore/efl_io_copier_example.c4
-rw-r--r--src/examples/ecore/efl_net_dialer_http_example.c4
-rw-r--r--src/examples/elementary/bg_cxx_example_02.cc3
-rw-r--r--src/examples/elementary/efl_canvas_layout_text.c4
-rw-r--r--src/examples/elementary/efl_ui_list_example_1.c4
-rw-r--r--src/examples/elementary/efl_ui_scroller_example.c2
-rw-r--r--src/examples/elementary/icon_cxx_example_01.cc4
-rw-r--r--src/examples/elementary/performance/graphical.c6
-rw-r--r--src/examples/elementary/popup_cxx_example.cc4
-rw-r--r--src/examples/elementary/toolbar_cxx_example_01.cc14
-rw-r--r--src/examples/evas/evas-3d-aabb.c4
-rw-r--r--src/examples/evas/evas-3d-colorpick.c2
-rw-r--r--src/examples/evas/evas-3d-cube2.c2
-rw-r--r--src/examples/evas/evas-3d-eet.c4
-rw-r--r--src/examples/evas/evas-3d-frustum.c4
-rw-r--r--src/examples/evas/evas-3d-hull.c2
-rw-r--r--src/examples/evas/evas-3d-md2.c4
-rw-r--r--src/examples/evas/evas-3d-mmap-set.c2
-rw-r--r--src/examples/evas/evas-3d-obj.c4
-rw-r--r--src/examples/evas/evas-3d-parallax-occlusion.c8
-rw-r--r--src/examples/evas/evas-3d-pick.c2
-rw-r--r--src/examples/evas/evas-3d-ply.c6
-rw-r--r--src/examples/evas/evas-3d-shadows.c10
-rw-r--r--src/examples/evas/evas-3d-static-lod.c4
-rw-r--r--src/examples/evas/evas-object-manipulation-eo.c9
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter-macros.h8
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter.c10
-rw-r--r--src/lib/ecore/efl_io_file.c30
-rw-r--r--src/lib/ecore/efl_io_file.eo1
-rw-r--r--src/lib/ecore_con/ecore_con_url.c2
-rw-r--r--src/lib/ecore_file/ecore_file_download.c10
-rw-r--r--src/lib/edje/edje_calc.c8
-rw-r--r--src/lib/edje/edje_edit.c38
-rw-r--r--src/lib/edje/edje_edit.eo3
-rw-r--r--src/lib/edje/edje_legacy.c3
-rw-r--r--src/lib/edje/edje_load.c43
-rw-r--r--src/lib/edje/edje_private.h2
-rw-r--r--src/lib/edje/edje_smart.c45
-rw-r--r--src/lib/edje/efl_canvas_layout.eo11
-rw-r--r--src/lib/efl/Efl.h1
-rw-r--r--src/lib/efl/interfaces/efl_file.c208
-rw-r--r--src/lib/efl/interfaces/efl_file.eo143
-rw-r--r--src/lib/efl/interfaces/efl_file.h10
-rw-r--r--src/lib/efl/interfaces/efl_gfx_image.eo8
-rw-r--r--src/lib/efl/interfaces/meson.build4
-rw-r--r--src/lib/elementary/efl_ui_bg.c68
-rw-r--r--src/lib/elementary/efl_ui_bg.eo3
-rw-r--r--src/lib/elementary/efl_ui_image.c302
-rw-r--r--src/lib/elementary/efl_ui_image.eo8
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.c131
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.eo3
-rw-r--r--src/lib/elementary/efl_ui_layout.c87
-rw-r--r--src/lib/elementary/efl_ui_layout.eo2
-rw-r--r--src/lib/elementary/efl_ui_popup.c24
-rw-r--r--src/lib/elementary/efl_ui_popup_part_backwall.eo2
-rw-r--r--src/lib/elementary/efl_ui_selection_manager.c4
-rw-r--r--src/lib/elementary/efl_ui_text.c53
-rw-r--r--src/lib/elementary/efl_ui_text.eo3
-rw-r--r--src/lib/elementary/efl_ui_text_factory_images.c16
-rw-r--r--src/lib/elementary/efl_ui_video.c26
-rw-r--r--src/lib/elementary/efl_ui_video.eo2
-rw-r--r--src/lib/elementary/efl_ui_widget.c50
-rw-r--r--src/lib/elementary/efl_ui_widget_part_bg.eo4
-rw-r--r--src/lib/elementary/efl_ui_win.c71
-rw-r--r--src/lib/elementary/efl_ui_win_part.eo4
-rw-r--r--src/lib/elementary/elm_entry.c66
-rw-r--r--src/lib/elementary/elm_entry.eo7
-rw-r--r--src/lib/elementary/elm_icon.c30
-rw-r--r--src/lib/elementary/elm_icon.eo2
-rw-r--r--src/lib/elementary/elm_photo.c74
-rw-r--r--src/lib/elementary/elm_photo.eo7
-rw-r--r--src/lib/elementary/elm_thumb.c100
-rw-r--r--src/lib/elementary/elm_thumb.eo4
-rw-r--r--src/lib/elementary/elm_widget_thumb.h1
-rw-r--r--src/lib/emotion/efl_canvas_video.eo4
-rw-r--r--src/lib/emotion/emotion_smart.c41
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.c57
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.eo3
-rw-r--r--src/lib/evas/canvas/efl_canvas_image_internal.eo1
-rw-r--r--src/lib/evas/canvas/efl_canvas_proxy.c2
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.c43
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.eo5
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.c47
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.eo3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.c22
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.eo2
-rw-r--r--src/lib/evas/canvas/evas_image.eo2
-rw-r--r--src/lib/evas/canvas/evas_image_legacy.c43
-rw-r--r--src/lib/evas/canvas/evas_image_private.h7
-rw-r--r--src/lib/evas/canvas/evas_object_image.c6
-rw-r--r--src/tests/edje/edje_test_edje.c3
-rw-r--r--src/tests/edje/edje_test_signal.c9
-rw-r--r--src/tests/edje/edje_test_text.c30
-rw-r--r--src/tests/elementary/efl_ui_test_layout.c2
-rw-r--r--src/tests/emotion/emotion_test_main-eo.c4
-rw-r--r--src/tests/evas/evas_test_image.c4
-rw-r--r--src/tests/evas/evas_test_mesh.c16
116 files changed, 1371 insertions, 956 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index d254f6f8a1..f565ed45a6 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -108,6 +108,7 @@ EXTRA_DIST2 += \
108 lib/efl/Efl_Config.h \ 108 lib/efl/Efl_Config.h \
109 lib/efl/Efl_Config.h.in \ 109 lib/efl/Efl_Config.h.in \
110 lib/efl/Efl.h \ 110 lib/efl/Efl.h \
111 lib/efl/interfaces/efl_file.h \
111 lib/efl/interfaces/efl_common_internal.h \ 112 lib/efl/interfaces/efl_common_internal.h \
112 $(efl_eolian_files) \ 113 $(efl_eolian_files) \
113 $(efl_eolian_type_files) 114 $(efl_eolian_type_files)
@@ -152,6 +153,7 @@ dist_installed_eflheaders_DATA = \
152installed_eflinterfacesdir = $(includedir)/efl-@VMAJ@/interfaces 153installed_eflinterfacesdir = $(includedir)/efl-@VMAJ@/interfaces
153nodist_installed_eflinterfaces_DATA = \ 154nodist_installed_eflinterfaces_DATA = \
154 $(efl_eolian_files_h) \ 155 $(efl_eolian_files_h) \
156 lib/efl/interfaces/efl_file.h \
155 $(efl_eolian_legacy_files_h) 157 $(efl_eolian_legacy_files_h)
156 158
157if HAVE_LUA_BINDINGS 159if HAVE_LUA_BINDINGS
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 90c7d8f46c..096631d5ec 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -1432,7 +1432,9 @@ data_write_vectors(Eet_File *ef, int *vector_num)
1432 if (!f) continue; 1432 if (!f) continue;
1433 eina_file_close(f); 1433 eina_file_close(f);
1434 1434
1435 if (!efl_file_set(vg, eina_strbuf_string_get(buf), NULL)) 1435 if (efl_file_set(vg, eina_strbuf_string_get(buf)))
1436 error_and_abort(ef, "Failed to parse svg : %s", vector->entry);
1437 if (efl_file_load(vg))
1436 error_and_abort(ef, "Failed to parse svg : %s", vector->entry); 1438 error_and_abort(ef, "Failed to parse svg : %s", vector->entry);
1437 1439
1438 eina_strbuf_reset(buf); 1440 eina_strbuf_reset(buf);
diff --git a/src/bin/elementary/test_bg.c b/src/bin/elementary/test_bg.c
index 338084b31a..c7c7f1902a 100644
--- a/src/bin/elementary/test_bg.c
+++ b/src/bin/elementary/test_bg.c
@@ -292,15 +292,15 @@ _file_cb(void *data, const Efl_Event *ev)
292 const char *f, *k; 292 const char *f, *k;
293 293
294 // File API 294 // File API
295 efl_file_get(efl_part(win, "background"), &f, &k); 295 efl_file_simple_get(efl_part(win, "background"), &f, &k);
296 if (f) 296 if (f)
297 { 297 {
298 efl_file_set(efl_part(win, "background"), NULL, NULL); 298 efl_file_simple_load(efl_part(win, "background"), NULL, NULL);
299 } 299 }
300 else 300 else
301 { 301 {
302 efl_file_get(ev->object, &f, &k); 302 efl_file_simple_get(ev->object, &f, &k);
303 efl_file_set(efl_part(win, "background"), f, k); 303 efl_file_simple_load(efl_part(win, "background"), f, k);
304 } 304 }
305} 305}
306 306
@@ -315,10 +315,11 @@ _image_cb(void *data, const Efl_Event *ev)
315 efl_content_set(efl_part(win, "background"), NULL); 315 efl_content_set(efl_part(win, "background"), NULL);
316 else 316 else
317 { 317 {
318 efl_file_get(ev->object, &f, &k); 318 efl_file_simple_get(ev->object, &f, &k);
319 o = efl_add(EFL_UI_IMAGE_CLASS, win, 319 o = efl_add(EFL_UI_IMAGE_CLASS, win,
320 efl_gfx_image_scale_type_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE), 320 efl_gfx_image_scale_type_set(efl_added, EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE),
321 efl_file_set(efl_added, f, k) 321 efl_file_set(efl_added, f),
322 efl_file_key_set(efl_added, k)
322 ); 323 );
323 efl_content_set(efl_part(win, "background"), o); 324 efl_content_set(efl_part(win, "background"), o);
324 } 325 }
@@ -353,7 +354,7 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
353 354
354 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); 355 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
355 efl_add(EFL_UI_IMAGE_CLASS, win, 356 efl_add(EFL_UI_IMAGE_CLASS, win,
356 efl_file_set(efl_added, buf, NULL), 357 efl_file_set(efl_added, buf),
357 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)), 358 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
358 efl_gfx_hint_align_set(efl_added, 0.5, 0.5), 359 efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
359 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _file_cb, win), 360 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _file_cb, win),
@@ -361,7 +362,7 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
361 362
362 snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", elm_app_data_dir_get()); 363 snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", elm_app_data_dir_get());
363 efl_add(EFL_UI_IMAGE_CLASS, win, 364 efl_add(EFL_UI_IMAGE_CLASS, win,
364 efl_file_set(efl_added, buf, NULL), 365 efl_file_set(efl_added, buf),
365 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)), 366 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
366 efl_gfx_hint_align_set(efl_added, 0.5, 0.5), 367 efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
367 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _image_cb, win), 368 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _image_cb, win),
@@ -420,7 +421,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
420 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); 421 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
421 422
422 o_bg = efl_add(EFL_UI_BG_CLASS, box, 423 o_bg = efl_add(EFL_UI_BG_CLASS, box,
423 efl_file_set(efl_added, buf, NULL), 424 efl_file_set(efl_added, buf),
424 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND), 425 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND),
425 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE), 426 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
426 efl_pack(box, efl_added)); 427 efl_pack(box, efl_added));
diff --git a/src/bin/elementary/test_box.c b/src/bin/elementary/test_box.c
index 31ccc9cbb0..c5c596cc00 100644
--- a/src/bin/elementary/test_box.c
+++ b/src/bin/elementary/test_box.c
@@ -916,7 +916,8 @@ test_box_stack(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
916 snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get()); 916 snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
917 o = efl_add(EFL_UI_IMAGE_CLASS, win, 917 o = efl_add(EFL_UI_IMAGE_CLASS, win,
918 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)), 918 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
919 efl_file_set(efl_added, buf, NULL)); 919 efl_file_set(efl_added, buf),
920 efl_file_load(efl_added));
920 efl_pack(bx, o); 921 efl_pack(bx, o);
921 922
922 efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 300)); 923 efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 300));
diff --git a/src/bin/elementary/test_efl_gfx_mapping.c b/src/bin/elementary/test_efl_gfx_mapping.c
index 71cfd82257..cb780d7ba8 100644
--- a/src/bin/elementary/test_efl_gfx_mapping.c
+++ b/src/bin/elementary/test_efl_gfx_mapping.c
@@ -53,7 +53,7 @@ test_efl_gfx_mapping(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
53 snprintf(buf, sizeof(buf), "%s/images/rock_02.jpg", elm_app_data_dir_get()); 53 snprintf(buf, sizeof(buf), "%s/images/rock_02.jpg", elm_app_data_dir_get());
54 img = efl_add(EFL_UI_IMAGE_CLASS, win, 54 img = efl_add(EFL_UI_IMAGE_CLASS, win,
55 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)), 55 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
56 efl_file_set(efl_added, buf, NULL)); 56 efl_file_set(efl_added, buf));
57 efl_gfx_image_scale_type_set(img, EFL_GFX_IMAGE_SCALE_TYPE_FILL); 57 efl_gfx_image_scale_type_set(img, EFL_GFX_IMAGE_SCALE_TYPE_FILL);
58 evas_object_event_callback_add(img, EVAS_CALLBACK_RESIZE, 58 evas_object_event_callback_add(img, EVAS_CALLBACK_RESIZE,
59 _image_resize_cb, NULL); 59 _image_resize_cb, NULL);
diff --git a/src/bin/elementary/test_evas_map.c b/src/bin/elementary/test_evas_map.c
index b598044c7d..3b3e66a56f 100644
--- a/src/bin/elementary/test_evas_map.c
+++ b/src/bin/elementary/test_evas_map.c
@@ -61,7 +61,8 @@ test_evas_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
61 snprintf(buf, sizeof(buf), "%s/images/rock_02.jpg", elm_app_data_dir_get()); 61 snprintf(buf, sizeof(buf), "%s/images/rock_02.jpg", elm_app_data_dir_get());
62 img = efl_add(EFL_UI_IMAGE_CLASS, win, 62 img = efl_add(EFL_UI_IMAGE_CLASS, win,
63 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)), 63 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
64 efl_file_set(efl_added, buf, NULL)); 64 efl_file_set(efl_added, buf),
65 efl_file_load(efl_added));
65 efl_gfx_image_scale_type_set(img, EFL_GFX_IMAGE_SCALE_TYPE_FILL); 66 efl_gfx_image_scale_type_set(img, EFL_GFX_IMAGE_SCALE_TYPE_FILL);
66 evas_object_event_callback_add(img, EVAS_CALLBACK_RESIZE, 67 evas_object_event_callback_add(img, EVAS_CALLBACK_RESIZE,
67 _image_resize_cb, NULL); 68 _image_resize_cb, NULL);
diff --git a/src/bin/elementary/test_evas_mask.c b/src/bin/elementary/test_evas_mask.c
index 497d4a2a97..39a91e155b 100644
--- a/src/bin/elementary/test_evas_mask.c
+++ b/src/bin/elementary/test_evas_mask.c
@@ -118,12 +118,13 @@ test_evas_mask(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
118 118
119 // FIXME: No API to set background as "tile" :( 119 // FIXME: No API to set background as "tile" :(
120 snprintf(buf, sizeof(buf), "%s/images/pm_fill.png", elm_app_data_dir_get()); 120 snprintf(buf, sizeof(buf), "%s/images/pm_fill.png", elm_app_data_dir_get());
121 efl_file_set(efl_part(win, "background"), buf, NULL); 121 efl_file_simple_load(efl_part(win, "background"), buf, NULL);
122 122
123 // FIXME: layout EO API 123 // FIXME: layout EO API
124 snprintf(buf, sizeof(buf), "%s/objects/test_masking.edj", elm_app_data_dir_get()); 124 snprintf(buf, sizeof(buf), "%s/objects/test_masking.edj", elm_app_data_dir_get());
125 ly = efl_add(EFL_UI_LAYOUT_CLASS, win, 125 ly = efl_add(EFL_UI_LAYOUT_CLASS, win,
126 efl_file_set(efl_added, buf, "masking")); 126 efl_file_set(efl_added, buf),
127 efl_file_key_set(efl_added, "masking"));
127 efl_pack(box, ly); 128 efl_pack(box, ly);
128 129
129 // FIXME: No genlist in EO API 130 // FIXME: No genlist in EO API
diff --git a/src/bin/elementary/test_evas_snapshot.c b/src/bin/elementary/test_evas_snapshot.c
index c1b110ead6..70791e6705 100644
--- a/src/bin/elementary/test_evas_snapshot.c
+++ b/src/bin/elementary/test_evas_snapshot.c
@@ -29,7 +29,8 @@ static inline Eo *
29_image_create(Eo *win, const char *path) 29_image_create(Eo *win, const char *path)
30{ 30{
31 return efl_add(EFL_UI_IMAGE_CLASS, win, 31 return efl_add(EFL_UI_IMAGE_CLASS, win,
32 efl_file_set(efl_added, path, NULL), 32 efl_file_set(efl_added, path),
33 efl_file_load(efl_added),
33 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(20, 20))); 34 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(20, 20)));
34} 35}
35 36
diff --git a/src/bin/elementary/test_gfx_filters.c b/src/bin/elementary/test_gfx_filters.c
index 965720a604..d8bd58e2c4 100644
--- a/src/bin/elementary/test_gfx_filters.c
+++ b/src/bin/elementary/test_gfx_filters.c
@@ -403,7 +403,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
403 efl_gfx_hint_align_set(efl_added, 0.5, 0.5), 403 efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
404 efl_gfx_hint_size_max_set(efl_added, size), 404 efl_gfx_hint_size_max_set(efl_added, size),
405 efl_gfx_hint_size_min_set(efl_added, size), 405 efl_gfx_hint_size_min_set(efl_added, size),
406 efl_file_set(efl_added, buf, NULL), 406 efl_file_set(efl_added, buf),
407 efl_name_set(efl_added, images[k].src_name), 407 efl_name_set(efl_added, images[k].src_name),
408 elm_object_tooltip_text_set(efl_added, images[k].src_name)); 408 elm_object_tooltip_text_set(efl_added, images[k].src_name));
409 if (efl_player_playable_get(o)) 409 if (efl_player_playable_get(o))
diff --git a/src/bin/elementary/test_part_bg.c b/src/bin/elementary/test_part_bg.c
index 37e39da2c6..04e436a061 100644
--- a/src/bin/elementary/test_part_bg.c
+++ b/src/bin/elementary/test_part_bg.c
@@ -18,7 +18,7 @@ _reset_cb(void *data, const Efl_Event *ev EINA_UNUSED)
18 target = evas_object_data_get(radio, "data"); 18 target = evas_object_data_get(radio, "data");
19 19
20 efl_gfx_color_set(efl_part(target, "background"), 0, 0, 0, 0); 20 efl_gfx_color_set(efl_part(target, "background"), 0, 0, 0, 0);
21 efl_file_set(efl_part(target, "background"), NULL, NULL); 21 efl_file_simple_load(efl_part(target, "background"), NULL, NULL);
22} 22}
23 23
24static void 24static void
@@ -46,7 +46,7 @@ _scale_type_cb(void *data, const Efl_Event *ev EINA_UNUSED)
46 target = evas_object_data_get(radio, "data"); 46 target = evas_object_data_get(radio, "data");
47 47
48 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); 48 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
49 efl_file_set(efl_part(target, "background"), buf, NULL); 49 efl_file_simple_load(efl_part(target, "background"), buf, NULL);
50 type = efl_gfx_image_scale_type_get(efl_part(target, "background")); 50 type = efl_gfx_image_scale_type_get(efl_part(target, "background"));
51 type = (type + 1) % 5; 51 type = (type + 1) % 5;
52 efl_gfx_image_scale_type_set(efl_part(target, "background"), type); 52 efl_gfx_image_scale_type_set(efl_part(target, "background"), type);
@@ -103,7 +103,7 @@ _create_box_contents(Evas_Object *box)
103 if (efl_isa(content, EFL_UI_IMAGE_CLASS)) 103 if (efl_isa(content, EFL_UI_IMAGE_CLASS))
104 { 104 {
105 snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get()); 105 snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
106 efl_file_set(content, buf, NULL); 106 efl_file_simple_load(content, buf, NULL);
107 } 107 }
108 108
109 evas_object_data_set(radio, "data", content); 109 evas_object_data_set(radio, "data", content);
diff --git a/src/bin/elementary/test_part_shadow.c b/src/bin/elementary/test_part_shadow.c
index 70d9a6f6d2..07aeb8d3b1 100644
--- a/src/bin/elementary/test_part_shadow.c
+++ b/src/bin/elementary/test_part_shadow.c
@@ -109,7 +109,7 @@ test_part_shadow(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
109 109
110 ic = efl_add(EFL_UI_IMAGE_CLASS, win); 110 ic = efl_add(EFL_UI_IMAGE_CLASS, win);
111 snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get()); 111 snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
112 efl_file_set(ic, buf, NULL); 112 efl_file_simple_load(ic, buf, NULL);
113 efl_pack(bx, ic); 113 efl_pack(bx, ic);
114 td->ico = ic; 114 td->ico = ic;
115 115
diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c
index c1e055e997..f00662069f 100644
--- a/src/bin/elementary/test_photocam.c
+++ b/src/bin/elementary/test_photocam.c
@@ -142,7 +142,7 @@ my_bt_open(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
142 if (eina_list_count(grps) > 0) 142 if (eina_list_count(grps) > 0)
143 { 143 {
144 const char *grp = eina_list_nth(grps, 0); 144 const char *grp = eina_list_nth(grps, 0);
145 efl_file_set(ph, file, grp); 145 efl_file_simple_load(ph, file, grp);
146 printf("Successfully set the edje file: %s, group: %s\n", file, grp); 146 printf("Successfully set the edje file: %s, group: %s\n", file, grp);
147 } 147 }
148 else printf("Failed to set edje file\n"); 148 else printf("Failed to set edje file\n");
@@ -823,7 +823,8 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
823 823
824 snprintf(buf, sizeof(buf), "%s/images/animated_logo.gif", elm_app_data_dir_get()); 824 snprintf(buf, sizeof(buf), "%s/images/animated_logo.gif", elm_app_data_dir_get());
825 zoomable = efl_add(EFL_UI_IMAGE_ZOOMABLE_CLASS, win, 825 zoomable = efl_add(EFL_UI_IMAGE_ZOOMABLE_CLASS, win,
826 efl_file_set(efl_added, buf, NULL), 826 efl_file_set(efl_added, buf),
827 efl_file_load(efl_added),
827 efl_pack(bx, efl_added), 828 efl_pack(bx, efl_added),
828 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _zoomable_clicked_cb, NULL) 829 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _zoomable_clicked_cb, NULL)
829 ); 830 );
diff --git a/src/bin/elementary/test_ui_button.c b/src/bin/elementary/test_ui_button.c
index f5aa340ad6..f89a188407 100644
--- a/src/bin/elementary/test_ui_button.c
+++ b/src/bin/elementary/test_ui_button.c
@@ -55,7 +55,7 @@ test_ui_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
55 efl_event_callback_add(efl_added, EFL_UI_EVENT_UNPRESSED, _unpressed, NULL) 55 efl_event_callback_add(efl_added, EFL_UI_EVENT_UNPRESSED, _unpressed, NULL)
56 ); 56 );
57 efl_add(EFL_UI_IMAGE_CLASS, btn, 57 efl_add(EFL_UI_IMAGE_CLASS, btn,
58 efl_file_set(efl_added, buf, NULL), 58 efl_file_set(efl_added, buf),
59 efl_content_set(btn, efl_added) 59 efl_content_set(btn, efl_added)
60 ); 60 );
61 61
@@ -69,7 +69,7 @@ test_ui_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
69 efl_event_callback_add(efl_added, EFL_UI_EVENT_UNPRESSED, _unpressed, NULL) 69 efl_event_callback_add(efl_added, EFL_UI_EVENT_UNPRESSED, _unpressed, NULL)
70 ); 70 );
71 efl_add(EFL_UI_IMAGE_CLASS, btn, 71 efl_add(EFL_UI_IMAGE_CLASS, btn,
72 efl_file_set(efl_added, buf, NULL), 72 efl_file_set(efl_added, buf),
73 efl_content_set(btn, efl_added) 73 efl_content_set(btn, efl_added)
74 ); 74 );
75 75
diff --git a/src/bin/elementary/test_ui_pager.c b/src/bin/elementary/test_ui_pager.c
index e8d602f8d5..cebbbad641 100644
--- a/src/bin/elementary/test_ui_pager.c
+++ b/src/bin/elementary/test_ui_pager.c
@@ -78,7 +78,9 @@ static Eo *page_add(Page_Type p, Eo *parent)
78 snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj", 78 snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj",
79 elm_app_data_dir_get()); 79 elm_app_data_dir_get());
80 page = efl_add(EFL_UI_LAYOUT_CLASS, parent, 80 page = efl_add(EFL_UI_LAYOUT_CLASS, parent,
81 efl_file_set(efl_added, buf, "page"), 81 efl_file_set(efl_added, buf),
82 efl_file_key_set(efl_added, "page"),
83 efl_file_load(efl_added),
82 efl_text_set(efl_part(efl_added, "text"), "Layout Page")); 84 efl_text_set(efl_part(efl_added, "text"), "Layout Page"));
83 efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE); 85 efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
84 break; 86 break;
@@ -104,7 +106,9 @@ static Eo *page_add(Page_Type p, Eo *parent)
104 snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj", 106 snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj",
105 elm_app_data_dir_get()); 107 elm_app_data_dir_get());
106 page = efl_add(EFL_UI_LAYOUT_CLASS, parent, 108 page = efl_add(EFL_UI_LAYOUT_CLASS, parent,
107 efl_file_set(efl_added, buf, "page"), 109 efl_file_set(efl_added, buf),
110 efl_file_key_set(efl_added, "page"),
111 efl_file_load(efl_added),
108 efl_text_set(efl_part(efl_added, "text"), "Layout Page")); 112 efl_text_set(efl_part(efl_added, "text"), "Layout Page"));
109 efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE); 113 efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
110 break; 114 break;
@@ -696,7 +700,9 @@ void test_ui_pager(void *data EINA_UNUSED,
696 snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj", 700 snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj",
697 elm_app_data_dir_get()); 701 elm_app_data_dir_get());
698 layout = efl_add(EFL_UI_LAYOUT_CLASS, panes, 702 layout = efl_add(EFL_UI_LAYOUT_CLASS, panes,
699 efl_file_set(efl_added, buf, "pager"), 703 efl_file_set(efl_added, buf),
704 efl_file_key_set(efl_added, "pager"),
705 efl_file_load(efl_added),
700 efl_content_set(efl_part(panes, "second"), efl_added)); 706 efl_content_set(efl_part(panes, "second"), efl_added));
701 707
702 pager = efl_add(EFL_UI_PAGER_CLASS, layout, 708 pager = efl_add(EFL_UI_PAGER_CLASS, layout,
diff --git a/src/bin/elementary/test_ui_pager_scroll.c b/src/bin/elementary/test_ui_pager_scroll.c
index 9941304491..7a0bfb83eb 100644
--- a/src/bin/elementary/test_ui_pager_scroll.c
+++ b/src/bin/elementary/test_ui_pager_scroll.c
@@ -83,7 +83,9 @@ static Eo *page_add(Page_Type p, Eo *parent)
83 snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj", 83 snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj",
84 elm_app_data_dir_get()); 84 elm_app_data_dir_get());
85 page = efl_add(EFL_UI_LAYOUT_CLASS, parent, 85 page = efl_add(EFL_UI_LAYOUT_CLASS, parent,
86 efl_file_set(efl_added, buf, "page"), 86 efl_file_set(efl_added, buf),
87 efl_file_key_set(efl_added, "page"),
88 efl_file_load(efl_added),
87 efl_text_set(efl_part(efl_added, "text"), "Layout Page")); 89 efl_text_set(efl_part(efl_added, "text"), "Layout Page"));
88 efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE); 90 efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
89 break; 91 break;
@@ -109,7 +111,9 @@ static Eo *page_add(Page_Type p, Eo *parent)
109 snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj", 111 snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj",
110 elm_app_data_dir_get()); 112 elm_app_data_dir_get());
111 page = efl_add(EFL_UI_LAYOUT_CLASS, parent, 113 page = efl_add(EFL_UI_LAYOUT_CLASS, parent,
112 efl_file_set(efl_added, buf, "page"), 114 efl_file_set(efl_added, buf),
115 efl_file_key_set(efl_added, "page"),
116 efl_file_load(efl_added),
113 efl_text_set(efl_part(efl_added, "text"), "Layout Page")); 117 efl_text_set(efl_part(efl_added, "text"), "Layout Page"));
114 efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE); 118 efl_gfx_hint_fill_set(page, EINA_TRUE, EINA_TRUE);
115 break; 119 break;
@@ -877,7 +881,9 @@ void test_ui_pager_scroll(void *data EINA_UNUSED,
877 snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj", 881 snprintf(buf, sizeof(buf), "%s/objects/test_pager.edj",
878 elm_app_data_dir_get()); 882 elm_app_data_dir_get());
879 layout = efl_add(EFL_UI_LAYOUT_CLASS, panes, 883 layout = efl_add(EFL_UI_LAYOUT_CLASS, panes,
880 efl_file_set(efl_added, buf, "pager"), 884 efl_file_set(efl_added, buf),
885 efl_file_key_set(efl_added, "pager"),
886 efl_file_load(efl_added),
881 efl_content_set(efl_part(panes, "second"), efl_added)); 887 efl_content_set(efl_part(panes, "second"), efl_added));
882 888
883 pager = efl_add(EFL_UI_PAGER_CLASS, layout, 889 pager = efl_add(EFL_UI_PAGER_CLASS, layout,
diff --git a/src/bin/elementary/test_ui_panel.c b/src/bin/elementary/test_ui_panel.c
index 40ca680c0f..e73a3186d6 100644
--- a/src/bin/elementary/test_ui_panel.c
+++ b/src/bin/elementary/test_ui_panel.c
@@ -19,7 +19,7 @@ test_ui_panel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
19 19
20 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); 20 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
21 efl_add(EFL_UI_IMAGE_CLASS, table, 21 efl_add(EFL_UI_IMAGE_CLASS, table,
22 efl_file_set(efl_added, buf, NULL), 22 efl_file_set(efl_added, buf),
23 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), 23 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
24 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL), 24 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
25 efl_pack_table(table, efl_added, 0, 0, 4, 5)); 25 efl_pack_table(table, efl_added, 0, 0, 4, 5));
diff --git a/src/bin/elementary/test_ui_popup.c b/src/bin/elementary/test_ui_popup.c
index 311ec1d715..e4a7a89479 100644
--- a/src/bin/elementary/test_ui_popup.c
+++ b/src/bin/elementary/test_ui_popup.c
@@ -85,12 +85,12 @@ _backwall_cb(void *data EINA_UNUSED, const Efl_Event *ev)
85 { 85 {
86 char buf[PATH_MAX]; 86 char buf[PATH_MAX];
87 snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get()); 87 snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
88 efl_file_set(efl_part(p_data->efl_ui_popup, "backwall"), buf, NULL); 88 efl_file_simple_load(efl_part(p_data->efl_ui_popup, "backwall"), buf, NULL);
89 efl_text_set(ev->object, "Backwall UnSet"); 89 efl_text_set(ev->object, "Backwall UnSet");
90 } 90 }
91 else 91 else
92 { 92 {
93 efl_file_set(efl_part(p_data->efl_ui_popup, "backwall"), NULL, NULL); 93 efl_file_simple_load(efl_part(p_data->efl_ui_popup, "backwall"), NULL, NULL);
94 efl_text_set(ev->object, "Backwall Set"); 94 efl_text_set(ev->object, "Backwall Set");
95 } 95 }
96 k = !k; 96 k = !k;
@@ -365,7 +365,7 @@ test_ui_alert_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
365 365
366 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, efl_ui_popup); 366 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, efl_ui_popup);
367 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get()); 367 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
368 efl_file_set(layout, buf, "efl_ui_popup_scroll_content"); 368 efl_file_simple_load(layout, buf, "efl_ui_popup_scroll_content");
369 369
370 efl_content_set(efl_ui_popup, layout); 370 efl_content_set(efl_ui_popup, layout);
371 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_POSITIVE, "Yes", NULL); 371 efl_ui_alert_popup_button_set(efl_ui_popup, EFL_UI_ALERT_POPUP_BUTTON_POSITIVE, "Yes", NULL);
@@ -386,7 +386,7 @@ _alert_scroll_case1_cb(void *data, const Efl_Event *ev EINA_UNUSED)
386 386
387 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, efl_ui_popup); 387 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, efl_ui_popup);
388 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get()); 388 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
389 efl_file_set(layout, buf, "efl_ui_popup_scroll_content"); 389 efl_file_simple_load(layout, buf, "efl_ui_popup_scroll_content");
390 390
391 efl_content_set(efl_ui_popup, layout); 391 efl_content_set(efl_ui_popup, layout);
392 392
@@ -410,7 +410,7 @@ _alert_scroll_case2_cb(void *data, const Efl_Event *ev EINA_UNUSED)
410 410
411 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, efl_ui_popup); 411 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, efl_ui_popup);
412 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get()); 412 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
413 efl_file_set(layout, buf, "efl_ui_popup_scroll_content"); 413 efl_file_simple_load(layout, buf, "efl_ui_popup_scroll_content");
414 414
415 efl_content_set(efl_ui_popup, layout); 415 efl_content_set(efl_ui_popup, layout);
416 416
@@ -436,7 +436,7 @@ _alert_scroll_case3_cb(void *data, const Efl_Event *ev EINA_UNUSED)
436 436
437 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, efl_ui_popup); 437 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, efl_ui_popup);
438 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get()); 438 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
439 efl_file_set(layout, buf, "efl_ui_popup_scroll_content"); 439 efl_file_simple_load(layout, buf, "efl_ui_popup_scroll_content");
440 440
441 efl_content_set(efl_ui_popup, layout); 441 efl_content_set(efl_ui_popup, layout);
442 442
@@ -462,7 +462,7 @@ _alert_scroll_case4_cb(void *data, const Efl_Event *ev EINA_UNUSED)
462 462
463 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, efl_ui_popup); 463 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, efl_ui_popup);
464 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get()); 464 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
465 efl_file_set(layout, buf, "efl_ui_popup_scroll_content"); 465 efl_file_simple_load(layout, buf, "efl_ui_popup_scroll_content");
466 466
467 efl_content_set(efl_ui_popup, layout); 467 efl_content_set(efl_ui_popup, layout);
468 468
@@ -488,7 +488,7 @@ _alert_scroll_case5_cb(void *data, const Efl_Event *ev EINA_UNUSED)
488 488
489 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, efl_ui_popup); 489 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, efl_ui_popup);
490 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get()); 490 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
491 efl_file_set(layout, buf, "efl_ui_popup_scroll_content"); 491 efl_file_simple_load(layout, buf, "efl_ui_popup_scroll_content");
492 492
493 efl_content_set(efl_ui_popup, layout); 493 efl_content_set(efl_ui_popup, layout);
494 494
@@ -1008,7 +1008,7 @@ test_ui_anchor_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
1008 1008
1009 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win); 1009 Eo *layout = efl_add(EFL_UI_LAYOUT_CLASS, win);
1010 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get()); 1010 snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
1011 efl_file_set(layout, buf, "efl_ui_anchor_popup_layout"); 1011 efl_file_simple_load(layout, buf, "efl_ui_anchor_popup_layout");
1012 efl_gfx_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 1012 efl_gfx_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1013 efl_content_set(win, layout); 1013 efl_content_set(win, layout);
1014 1014
diff --git a/src/bin/elementary/test_ui_progressbar.c b/src/bin/elementary/test_ui_progressbar.c
index cbb2fdc95a..16848ef5b1 100644
--- a/src/bin/elementary/test_ui_progressbar.c
+++ b/src/bin/elementary/test_ui_progressbar.c
@@ -138,7 +138,8 @@ test_ui_progressbar(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_inf
138 138
139 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get()); 139 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
140 efl_add(EFL_UI_IMAGE_CLASS, pd->pb1, 140 efl_add(EFL_UI_IMAGE_CLASS, pd->pb1,
141 efl_file_set(efl_added, buf, NULL), 141 efl_file_set(efl_added, buf),
142 efl_file_load(efl_added),
142 efl_content_set(pd->pb1, efl_added) 143 efl_content_set(pd->pb1, efl_added)
143 ); 144 );
144 145
diff --git a/src/bin/elementary/test_ui_tab_pager.c b/src/bin/elementary/test_ui_tab_pager.c
index 318e019e42..af0b900fcf 100644
--- a/src/bin/elementary/test_ui_tab_pager.c
+++ b/src/bin/elementary/test_ui_tab_pager.c
@@ -86,7 +86,8 @@ content_add(Eo *parent, char *text)
86 snprintf(buf, sizeof(buf), "%s/objects/test_tab_pager.edj", elm_app_data_dir_get()); 86 snprintf(buf, sizeof(buf), "%s/objects/test_tab_pager.edj", elm_app_data_dir_get());
87 87
88 page = efl_add(EFL_UI_LAYOUT_CLASS, parent, 88 page = efl_add(EFL_UI_LAYOUT_CLASS, parent,
89 efl_file_set(efl_added, buf, "page_layout"), 89 efl_file_set(efl_added, buf),
90 efl_file_key_set(efl_added, "page_layout"),
90 efl_text_set(efl_part(efl_added, "text"), text), 91 efl_text_set(efl_part(efl_added, "text"), text),
91 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), 92 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
92 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE)); 93 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE));
@@ -129,7 +130,8 @@ test_ui_tab_pager(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
129 130
130 snprintf(buf, sizeof(buf), "%s/objects/test_tab_pager.edj", elm_app_data_dir_get()); 131 snprintf(buf, sizeof(buf), "%s/objects/test_tab_pager.edj", elm_app_data_dir_get());
131 layout = efl_add(EFL_UI_LAYOUT_CLASS, win, 132 layout = efl_add(EFL_UI_LAYOUT_CLASS, win,
132 efl_file_set(efl_added, buf, "tab_page_layout"), 133 efl_file_set(efl_added, buf),
134 efl_file_key_set(efl_added, "tab_page_layout"),
133 efl_content_set(win, efl_added)); 135 efl_content_set(win, efl_added));
134 136
135 navi = elm_naviframe_add(layout); 137 navi = elm_naviframe_add(layout);
diff --git a/src/examples/ecore/efl_io_copier_example.c b/src/examples/ecore/efl_io_copier_example.c
index 25a81140bd..13f26b8577 100644
--- a/src/examples/ecore/efl_io_copier_example.c
+++ b/src/examples/ecore/efl_io_copier_example.c
@@ -664,7 +664,7 @@ efl_main(void *data EINA_UNUSED,
664 { 664 {
665 /* regular file, open with flags: read-only and close-on-exec */ 665 /* regular file, open with flags: read-only and close-on-exec */
666 input = efl_add_ref(EFL_IO_FILE_CLASS, NULL, 666 input = efl_add_ref(EFL_IO_FILE_CLASS, NULL,
667 efl_file_set(efl_added, input_fname, NULL), /* mandatory */ 667 efl_file_set(efl_added, input_fname), /* mandatory */
668 efl_io_file_flags_set(efl_added, O_RDONLY), /* default */ 668 efl_io_file_flags_set(efl_added, O_RDONLY), /* default */
669 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE), /* recommended, set *after* flags, or include O_CLOEXEC in flags -- be careful with _WIN32 that doesn't support it. */ 669 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE), /* recommended, set *after* flags, or include O_CLOEXEC in flags -- be careful with _WIN32 that doesn't support it. */
670 efl_event_callback_array_add(efl_added, input_cbs(), NULL) /* optional */ 670 efl_event_callback_array_add(efl_added, input_cbs(), NULL) /* optional */
@@ -940,7 +940,7 @@ efl_main(void *data EINA_UNUSED,
940 * create if did not exist and truncate if exist. 940 * create if did not exist and truncate if exist.
941 */ 941 */
942 output = efl_add_ref(EFL_IO_FILE_CLASS, NULL, 942 output = efl_add_ref(EFL_IO_FILE_CLASS, NULL,
943 efl_file_set(efl_added, output_fname, NULL), /* mandatory */ 943 efl_file_set(efl_added, output_fname), /* mandatory */
944 efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT | O_TRUNC), /* mandatory for write */ 944 efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT | O_TRUNC), /* mandatory for write */
945 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE), /* recommended, set *after* flags, or include O_CLOEXEC in flags -- be careful with _WIN32 that doesn't support it. */ 945 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE), /* recommended, set *after* flags, or include O_CLOEXEC in flags -- be careful with _WIN32 that doesn't support it. */
946 efl_io_file_mode_set(efl_added, 0644), /* mandatory for write */ 946 efl_io_file_mode_set(efl_added, 0644), /* mandatory for write */
diff --git a/src/examples/ecore/efl_net_dialer_http_example.c b/src/examples/ecore/efl_net_dialer_http_example.c
index 70861dc438..02783dc165 100644
--- a/src/examples/ecore/efl_net_dialer_http_example.c
+++ b/src/examples/ecore/efl_net_dialer_http_example.c
@@ -321,7 +321,7 @@ efl_main(void *data EINA_UNUSED,
321 { 321 {
322 input = efl_add(EFL_IO_FILE_CLASS, loop, 322 input = efl_add(EFL_IO_FILE_CLASS, loop,
323 efl_name_set(efl_added, "input"), 323 efl_name_set(efl_added, "input"),
324 efl_file_set(efl_added, input_fname, NULL), 324 efl_file_set(efl_added, input_fname),
325 efl_io_file_flags_set(efl_added, O_RDONLY), 325 efl_io_file_flags_set(efl_added, O_RDONLY),
326 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE), /* recommended, set *after* flags, or include O_CLOEXEC in flags -- be careful with _WIN32 that doesn't support it. */ 326 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE), /* recommended, set *after* flags, or include O_CLOEXEC in flags -- be careful with _WIN32 that doesn't support it. */
327 efl_event_callback_add(efl_added, EFL_IO_READER_EVENT_EOS, _eos, NULL)); 327 efl_event_callback_add(efl_added, EFL_IO_READER_EVENT_EOS, _eos, NULL));
@@ -336,7 +336,7 @@ efl_main(void *data EINA_UNUSED,
336 { 336 {
337 output = efl_add(EFL_IO_FILE_CLASS, loop, 337 output = efl_add(EFL_IO_FILE_CLASS, loop,
338 efl_name_set(efl_added, "output"), 338 efl_name_set(efl_added, "output"),
339 efl_file_set(efl_added, output_fname, NULL), 339 efl_file_set(efl_added, output_fname),
340 efl_io_file_mode_set(efl_added, 0644), 340 efl_io_file_mode_set(efl_added, 0644),
341 efl_io_file_flags_set(efl_added, O_WRONLY | O_TRUNC | O_CREAT), 341 efl_io_file_flags_set(efl_added, O_WRONLY | O_TRUNC | O_CREAT),
342 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE)); /* recommended, set *after* flags, or include O_CLOEXEC in flags -- be careful with _WIN32 that doesn't support it. */ 342 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE)); /* recommended, set *after* flags, or include O_CLOEXEC in flags -- be careful with _WIN32 that doesn't support it. */
diff --git a/src/examples/elementary/bg_cxx_example_02.cc b/src/examples/elementary/bg_cxx_example_02.cc
index 71c3540d98..94c17e3dcf 100644
--- a/src/examples/elementary/bg_cxx_example_02.cc
+++ b/src/examples/elementary/bg_cxx_example_02.cc
@@ -31,7 +31,8 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
31 31
32 efl::ui::Bg bg(instantiate, win); 32 efl::ui::Bg bg(instantiate, win);
33 bg.scale_type_set(EFL_GFX_IMAGE_SCALE_TYPE_FILL); 33 bg.scale_type_set(EFL_GFX_IMAGE_SCALE_TYPE_FILL);
34 bg.file_set(path, nullptr); 34 bg.file_set(path);
35 bg.load();
35 win.content_set(bg); 36 win.content_set(bg);
36 37
37 win.size_set({640, 400}); 38 win.size_set({640, 400});
diff --git a/src/examples/elementary/efl_canvas_layout_text.c b/src/examples/elementary/efl_canvas_layout_text.c
index a0d7f57e6b..556c528ca0 100644
--- a/src/examples/elementary/efl_canvas_layout_text.c
+++ b/src/examples/elementary/efl_canvas_layout_text.c
@@ -88,7 +88,7 @@ _on_key_down(void *data, const Efl_Event *event)
88 { 88 {
89 // edje group 89 // edje group
90 group_itr = (group_itr + 1) % 2; 90 group_itr = (group_itr + 1) % 2;
91 efl_file_set(layout, edjefile, groups[group_itr]); 91 efl_file_simple_load(layout, edjefile, groups[group_itr]);
92 printf("Changed layout group to: %s\n", groups[group_itr]); 92 printf("Changed layout group to: %s\n", groups[group_itr]);
93 } 93 }
94 else if (!strcmp(key, "w")) 94 else if (!strcmp(key, "w"))
@@ -139,7 +139,7 @@ efl_main(void *data EINA_UNUSED,
139 139
140 140
141 layout = efl_add(EFL_CANVAS_LAYOUT_CLASS, win); 141 layout = efl_add(EFL_CANVAS_LAYOUT_CLASS, win);
142 efl_file_set(layout, edjefile, groups[group_itr]); 142 efl_file_simple_load(layout, edjefile, groups[group_itr]);
143 143
144 efl_content_set(win, layout); 144 efl_content_set(win, layout);
145 efl_gfx_entity_size_set(win, EINA_SIZE2D(110, 100)); 145 efl_gfx_entity_size_set(win, EINA_SIZE2D(110, 100));
diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c
index be47aa0fc9..c34aa0ff53 100644
--- a/src/examples/elementary/efl_ui_list_example_1.c
+++ b/src/examples/elementary/efl_ui_list_example_1.c
@@ -197,13 +197,13 @@ elm_main(int argc EINA_UNUSED, char **argv)
197 break; 197 break;
198 198
199 case 40: 199 case 40:
200 efl_file_set(efl_part(item, "background"), "./sky_01.jpg", NULL); 200 efl_file_simple_load(efl_part(item, "background"), "./sky_01.jpg", NULL);
201 efl_gfx_image_scale_type_set(efl_part(item, "background"), EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE); 201 efl_gfx_image_scale_type_set(efl_part(item, "background"), EFL_GFX_IMAGE_SCALE_TYPE_FIT_OUTSIDE);
202 efl_pack_at(list, item, 39); 202 efl_pack_at(list, item, 39);
203 break; 203 break;
204 204
205 case 50: 205 case 50:
206 efl_file_set(efl_part(item, "background"), "./sky_01.jpg", NULL); 206 efl_file_simple_load(efl_part(item, "background"), "./sky_01.jpg", NULL);
207 efl_gfx_image_scale_type_set(efl_part(item, "background"), EFL_GFX_IMAGE_SCALE_TYPE_TILE); 207 efl_gfx_image_scale_type_set(efl_part(item, "background"), EFL_GFX_IMAGE_SCALE_TYPE_TILE);
208 efl_pack(list, item); 208 efl_pack(list, item);
209 break; 209 break;
diff --git a/src/examples/elementary/efl_ui_scroller_example.c b/src/examples/elementary/efl_ui_scroller_example.c
index 4de4d216a3..e300b659b1 100644
--- a/src/examples/elementary/efl_ui_scroller_example.c
+++ b/src/examples/elementary/efl_ui_scroller_example.c
@@ -24,7 +24,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
24 24
25 content = efl_add(EFL_UI_IMAGE_CLASS, scroller); 25 content = efl_add(EFL_UI_IMAGE_CLASS, scroller);
26 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get()); 26 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
27 efl_file_set(content, buf, NULL); 27 efl_file_simple_load(content, buf, NULL);
28 efl_gfx_entity_size_set(content, EINA_SIZE2D(5000, 5000)); 28 efl_gfx_entity_size_set(content, EINA_SIZE2D(5000, 5000));
29 efl_content_set(scroller, content); 29 efl_content_set(scroller, content);
30} 30}
diff --git a/src/examples/elementary/icon_cxx_example_01.cc b/src/examples/elementary/icon_cxx_example_01.cc
index 88f9f95502..6252ce1cc0 100644
--- a/src/examples/elementary/icon_cxx_example_01.cc
+++ b/src/examples/elementary/icon_cxx_example_01.cc
@@ -14,8 +14,8 @@ elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
14 efl::ui::Image icon(instantiate, win); 14 efl::ui::Image icon(instantiate, win);
15 icon.icon_set("home"); 15 icon.icon_set("home");
16 16
17 efl::eina::string_view path, group; 17 efl::eina::string_view path = icon.file_get();
18 icon.file_get(path, group); 18 efl::eina::string_view group = icon.key_get();
19 std::cout << "path = " << path << ", group = "<< group; 19 std::cout << "path = " << path << ", group = "<< group;
20 20
21 std::cout << ", name = " << icon.icon_get() << std::endl; 21 std::cout << ", name = " << icon.icon_get() << std::endl;
diff --git a/src/examples/elementary/performance/graphical.c b/src/examples/elementary/performance/graphical.c
index d006c3ec5b..13d7ea1a0c 100644
--- a/src/examples/elementary/performance/graphical.c
+++ b/src/examples/elementary/performance/graphical.c
@@ -323,7 +323,7 @@ _change_scene_setup()
323 } 323 }
324 else 324 else
325 { 325 {
326 efl_file_set(globalGraphical.mesh, globalGraphical.model_path, NULL); 326 efl_file_simple_load(globalGraphical.mesh, globalGraphical.model_path, NULL);
327 evas_canvas3d_mesh_frame_material_set(globalGraphical.mesh, 0, globalGraphical.material); 327 evas_canvas3d_mesh_frame_material_set(globalGraphical.mesh, 0, globalGraphical.material);
328 evas_canvas3d_mesh_shader_mode_set(globalGraphical.mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG); 328 evas_canvas3d_mesh_shader_mode_set(globalGraphical.mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG);
329 } 329 }
@@ -427,7 +427,7 @@ _init_scene(Evas_Object *img)
427 427
428 globalGraphical.material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, globalGraphical.evas); 428 globalGraphical.material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, globalGraphical.evas);
429 globalGraphical.texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, globalGraphical.evas); 429 globalGraphical.texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, globalGraphical.evas);
430 efl_file_set(globalGraphical.texture, "target_texture.png", NULL); 430 efl_file_simple_load(globalGraphical.texture, "target_texture.png", NULL);
431 evas_canvas3d_texture_filter_set(globalGraphical.texture, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR); 431 evas_canvas3d_texture_filter_set(globalGraphical.texture, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR);
432 evas_canvas3d_texture_wrap_set(globalGraphical.texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 432 evas_canvas3d_texture_wrap_set(globalGraphical.texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
433 evas_canvas3d_material_texture_set(globalGraphical.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, globalGraphical.texture); 433 evas_canvas3d_material_texture_set(globalGraphical.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, globalGraphical.texture);
@@ -460,7 +460,7 @@ _init_scene(Evas_Object *img)
460 } 460 }
461 else 461 else
462 { 462 {
463 efl_file_set(globalGraphical.mesh, globalGraphical.model_path, NULL); 463 efl_file_simple_load(globalGraphical.mesh, globalGraphical.model_path, NULL);
464 evas_canvas3d_mesh_frame_material_set(globalGraphical.mesh, 0, globalGraphical.material); 464 evas_canvas3d_mesh_frame_material_set(globalGraphical.mesh, 0, globalGraphical.material);
465 evas_canvas3d_mesh_shader_mode_set(globalGraphical.mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG); 465 evas_canvas3d_mesh_shader_mode_set(globalGraphical.mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG);
466 } 466 }
diff --git a/src/examples/elementary/popup_cxx_example.cc b/src/examples/elementary/popup_cxx_example.cc
index b6c78322f9..6c323275f0 100644
--- a/src/examples/elementary/popup_cxx_example.cc
+++ b/src/examples/elementary/popup_cxx_example.cc
@@ -207,11 +207,11 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
207 207
208 backwall_visible = !backwall_visible; 208 backwall_visible = !backwall_visible;
209 if (backwall_visible) { 209 if (backwall_visible) {
210 efl::eo::downcast<efl::File>(g_popup.part_get("backwall")).file_set("./sky_01.jpg", nullptr); 210 efl::eo::downcast<efl::File>(g_popup.part_get("backwall")).file_set("./sky_01.jpg");
211 backwall_btn.text_set("Unset Backwall"); 211 backwall_btn.text_set("Unset Backwall");
212 } 212 }
213 else { 213 else {
214 efl::eo::downcast<efl::File>(g_popup.part_get("backwall")).file_set(nullptr, nullptr); 214 efl::eo::downcast<efl::File>(g_popup.part_get("backwall")).file_set(nullptr);
215 backwall_btn.text_set("Set Backwall"); 215 backwall_btn.text_set("Set Backwall");
216 } 216 }
217 })); 217 }));
diff --git a/src/examples/elementary/toolbar_cxx_example_01.cc b/src/examples/elementary/toolbar_cxx_example_01.cc
index 5a884b96f7..f5c47cb0eb 100644
--- a/src/examples/elementary/toolbar_cxx_example_01.cc
+++ b/src/examples/elementary/toolbar_cxx_example_01.cc
@@ -77,7 +77,7 @@ elm_main(int argc, char* argv[])
77 77
78 elm::Widget photo_1(elm_photo_add(win_1._eo_ptr())); 78 elm::Widget photo_1(elm_photo_add(win_1._eo_ptr()));
79 elm_photo_size_set(photo_1._eo_ptr(), 40); 79 elm_photo_size_set(photo_1._eo_ptr(), 40);
80 efl_file_set(photo_1._eo_ptr(), "/opt/e/share/elementary/images/plant_01.jpg", nullptr); 80 efl_file_simple_load(photo_1._eo_ptr(), "/opt/e/share/elementary/images/plant_01.jpg", nullptr);
81 photo_1.hint_weight_set(1, 1); 81 photo_1.hint_weight_set(1, 1);
82 photo_1.hint_align_set(0.5, 0.5); 82 photo_1.hint_align_set(0.5, 0.5);
83 photo_1.visible_set(true); 83 photo_1.visible_set(true);
@@ -92,7 +92,7 @@ elm_main(int argc, char* argv[])
92 elm_table_pack(table_1._eo_ptr(), photo_2._eo_ptr(), 1, 0, 1, 1); 92 elm_table_pack(table_1._eo_ptr(), photo_2._eo_ptr(), 1, 0, 1, 1);
93 elm::Widget photo_3(elm_photo_add(win_1._eo_ptr())); 93 elm::Widget photo_3(elm_photo_add(win_1._eo_ptr()));
94 elm_photo_size_set(photo_3._eo_ptr(), 20); 94 elm_photo_size_set(photo_3._eo_ptr(), 20);
95 efl_file_set(photo_3._eo_ptr(), "/opt/e/share/elementary/images/sky_01.jpg", nullptr); 95 efl_file_simple_load(photo_3._eo_ptr(), "/opt/e/share/elementary/images/sky_01.jpg", nullptr);
96 photo_3.hint_weight_set(1, 1); 96 photo_3.hint_weight_set(1, 1);
97 photo_3.hint_align_set(0.5, 0.5); 97 photo_3.hint_align_set(0.5, 0.5);
98 photo_3.visible_set(true); 98 photo_3.visible_set(true);
@@ -100,7 +100,7 @@ elm_main(int argc, char* argv[])
100 elm_table_pack(table_1._eo_ptr(), photo_3._eo_ptr(), 0, 1, 1, 1); 100 elm_table_pack(table_1._eo_ptr(), photo_3._eo_ptr(), 0, 1, 1, 1);
101 elm::Widget photo_4(elm_photo_add(win_1._eo_ptr())); 101 elm::Widget photo_4(elm_photo_add(win_1._eo_ptr()));
102 elm_photo_size_set(photo_4._eo_ptr(), 60); 102 elm_photo_size_set(photo_4._eo_ptr(), 60);
103 efl_file_set(photo_4._eo_ptr(), "/opt/e/share/elementary/images/sky_02.jpg", nullptr); 103 efl_file_simple_load(photo_4._eo_ptr(), "/opt/e/share/elementary/images/sky_02.jpg", nullptr);
104 photo_4.hint_weight_set(1, 1); 104 photo_4.hint_weight_set(1, 1);
105 photo_4.hint_align_set(0.5, 0.5); 105 photo_4.hint_align_set(0.5, 0.5);
106 photo_4.visible_set(true); 106 photo_4.visible_set(true);
@@ -111,22 +111,22 @@ elm_main(int argc, char* argv[])
111 win_1.content_set(box_1); 111 win_1.content_set(box_1);
112 112
113 auto _item_2_selected_cb = std::bind([&] () { 113 auto _item_2_selected_cb = std::bind([&] () {
114 efl_file_set(photo_1._eo_ptr(), "/opt/e/share/elementary/images/rock_01.jpg", nullptr); 114 efl_file_simple_load(photo_1._eo_ptr(), "/opt/e/share/elementary/images/rock_01.jpg", nullptr);
115 }); 115 });
116 efl::eolian::event_add(efl::ui::Selectable::selected_event, item_2, _item_2_selected_cb); 116 efl::eolian::event_add(efl::ui::Selectable::selected_event, item_2, _item_2_selected_cb);
117 117
118 auto _item_3_selected_cb = std::bind([&] () { 118 auto _item_3_selected_cb = std::bind([&] () {
119 efl_file_set(photo_4._eo_ptr(), "/opt/e/share/elementary/images/wood_01.jpg", nullptr); 119 efl_file_simple_load(photo_4._eo_ptr(), "/opt/e/share/elementary/images/wood_01.jpg", nullptr);
120 }); 120 });
121 121
122 efl::eolian::event_add(efl::ui::Selectable::selected_event, item_3, _item_3_selected_cb); 122 efl::eolian::event_add(efl::ui::Selectable::selected_event, item_3, _item_3_selected_cb);
123 auto _item_4_selected_cb = std::bind([&] () { 123 auto _item_4_selected_cb = std::bind([&] () {
124 efl_file_set(photo_4._eo_ptr(), "/opt/e/share/elementary/images/sky_03.jpg", nullptr); 124 efl_file_simple_load(photo_4._eo_ptr(), "/opt/e/share/elementary/images/sky_03.jpg", nullptr);
125 }); 125 });
126 126
127 efl::eolian::event_add(efl::ui::Selectable::selected_event, item_4, _item_4_selected_cb); 127 efl::eolian::event_add(efl::ui::Selectable::selected_event, item_4, _item_4_selected_cb);
128 auto _item_5_selected_cb = std::bind([&] () { 128 auto _item_5_selected_cb = std::bind([&] () {
129 efl_file_set(photo_4._eo_ptr(), nullptr, nullptr); 129 efl_file_simple_load(photo_4._eo_ptr(), nullptr, nullptr);
130 }); 130 });
131 131
132 efl::eolian::event_add(efl::ui::Selectable::selected_event, item_5, _item_5_selected_cb); 132 efl::eolian::event_add(efl::ui::Selectable::selected_event, item_5, _item_5_selected_cb);
diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c
index dd4c1f0f27..fdb8a45278 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -170,12 +170,12 @@ main(void)
170 mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); 170 mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas);
171 material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 171 material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
172 172
173 efl_file_set(mesh, model_path, NULL); 173 efl_file_simple_load(mesh, model_path, NULL);
174 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 174 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
175 evas_canvas3d_mesh_shader_mode_set(mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG); 175 evas_canvas3d_mesh_shader_mode_set(mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG);
176 176
177 texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 177 texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
178 efl_file_set(texture, image_path, NULL); 178 efl_file_simple_load(texture, image_path, NULL);
179 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 179 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
180 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 180 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
181 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture); 181 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
diff --git a/src/examples/evas/evas-3d-colorpick.c b/src/examples/evas/evas-3d-colorpick.c
index 8c9ea3b54f..7b894cd23e 100644
--- a/src/examples/evas/evas-3d-colorpick.c
+++ b/src/examples/evas/evas-3d-colorpick.c
@@ -256,7 +256,7 @@ _init_sphere(void *this, const char *texture)
256 evas_canvas3d_mesh_color_pick_enable_set(sphere->mesh, EINA_TRUE); 256 evas_canvas3d_mesh_color_pick_enable_set(sphere->mesh, EINA_TRUE);
257 257
258 sphere->texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 258 sphere->texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
259 efl_file_set(sphere->texture, texture, NULL); 259 efl_file_simple_load(sphere->texture, texture, NULL);
260 evas_canvas3d_texture_filter_set(sphere->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 260 evas_canvas3d_texture_filter_set(sphere->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
261 evas_canvas3d_texture_wrap_set(sphere->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 261 evas_canvas3d_texture_wrap_set(sphere->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
262 evas_canvas3d_material_texture_set(sphere->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, sphere->texture); 262 evas_canvas3d_material_texture_set(sphere->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, sphere->texture);
diff --git a/src/examples/evas/evas-3d-cube2.c b/src/examples/evas/evas-3d-cube2.c
index c8558b622b..b2d905e873 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -168,7 +168,7 @@ _mesh_setup(Scene_Data *data)
168 168
169 evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]); 169 evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]);
170 evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]); 170 evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]);
171 efl_file_set(data->texture_normal, normal_map_path, NULL); 171 efl_file_simple_load(data->texture_normal, normal_map_path, NULL);
172 172
173 evas_canvas3d_material_texture_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture0); 173 evas_canvas3d_material_texture_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture0);
174 evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture1); 174 evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture1);
diff --git a/src/examples/evas/evas-3d-eet.c b/src/examples/evas/evas-3d-eet.c
index da94e06d7e..becd0bcadc 100644
--- a/src/examples/evas/evas-3d-eet.c
+++ b/src/examples/evas/evas-3d-eet.c
@@ -146,7 +146,7 @@ main(void)
146 mesh2 = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); 146 mesh2 = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas);
147 material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 147 material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
148 148
149 efl_file_set(mesh, input_model_path, NULL); 149 efl_file_simple_load(mesh, input_model_path, NULL);
150 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 150 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
151 evas_canvas3d_mesh_shader_mode_set(mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG); 151 evas_canvas3d_mesh_shader_mode_set(mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG);
152 152
@@ -165,7 +165,7 @@ main(void)
165 165
166 efl_file_save(mesh, output_model_path, NULL, NULL); 166 efl_file_save(mesh, output_model_path, NULL, NULL);
167 167
168 efl_file_set(mesh2, output_model_path, NULL); 168 efl_file_simple_load(mesh2, output_model_path, NULL);
169 evas_canvas3d_mesh_shader_mode_set(mesh2, EVAS_CANVAS3D_SHADER_MODE_PHONG); 169 evas_canvas3d_mesh_shader_mode_set(mesh2, EVAS_CANVAS3D_SHADER_MODE_PHONG);
170 170
171 mesh_node = efl_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_type_set(efl_added, EVAS_CANVAS3D_NODE_TYPE_MESH)); 171 mesh_node = efl_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_type_set(efl_added, EVAS_CANVAS3D_NODE_TYPE_MESH));
diff --git a/src/examples/evas/evas-3d-frustum.c b/src/examples/evas/evas-3d-frustum.c
index 02f5bba05e..6e765bd399 100644
--- a/src/examples/evas/evas-3d-frustum.c
+++ b/src/examples/evas/evas-3d-frustum.c
@@ -352,7 +352,7 @@ _mesh_setup_model(Scene_Data *data)
352 data->material_model = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 352 data->material_model = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
353 data->texture_model = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 353 data->texture_model = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
354 354
355 efl_file_set(data->texture_model, texture_path, NULL); 355 efl_file_simple_load(data->texture_model, texture_path, NULL);
356 evas_canvas3d_texture_filter_set(data->texture_model, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 356 evas_canvas3d_texture_filter_set(data->texture_model, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
357 evas_canvas3d_texture_wrap_set(data->texture_model, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 357 evas_canvas3d_texture_wrap_set(data->texture_model, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
358 358
@@ -367,7 +367,7 @@ _mesh_setup_model(Scene_Data *data)
367 evas_canvas3d_material_texture_set(data->material_model, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_model); 367 evas_canvas3d_material_texture_set(data->material_model, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_model);
368 evas_canvas3d_material_shininess_set(data->material_model, 100.0); 368 evas_canvas3d_material_shininess_set(data->material_model, 100.0);
369 369
370 efl_file_set(data->mesh_model, mesh_path, NULL); 370 efl_file_simple_load(data->mesh_model, mesh_path, NULL);
371 evas_canvas3d_mesh_frame_material_set(data->mesh_model, 0, data->material_model); 371 evas_canvas3d_mesh_frame_material_set(data->mesh_model, 0, data->material_model);
372 evas_canvas3d_mesh_shader_mode_set(data->mesh_model, EVAS_CANVAS3D_SHADER_MODE_DIFFUSE); 372 evas_canvas3d_mesh_shader_mode_set(data->mesh_model, EVAS_CANVAS3D_SHADER_MODE_DIFFUSE);
373} 373}
diff --git a/src/examples/evas/evas-3d-hull.c b/src/examples/evas/evas-3d-hull.c
index 0e13705c36..e82f31bca7 100644
--- a/src/examples/evas/evas-3d-hull.c
+++ b/src/examples/evas/evas-3d-hull.c
@@ -87,7 +87,7 @@ int rr;
87 87
88#define MODEL_MESH_INIT(name, model, shade) \ 88#define MODEL_MESH_INIT(name, model, shade) \
89 data->mesh_##name = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); \ 89 data->mesh_##name = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); \
90 efl_file_set(data->mesh_##name, model, NULL); \ 90 efl_file_simple_load(data->mesh_##name, model, NULL); \
91 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_##name, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES); \ 91 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_##name, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES); \
92 evas_canvas3d_mesh_shader_mode_set(data->mesh_##name, EVAS_CANVAS3D_SHADER_MODE_##shade); \ 92 evas_canvas3d_mesh_shader_mode_set(data->mesh_##name, EVAS_CANVAS3D_SHADER_MODE_##shade); \
93 evas_canvas3d_mesh_frame_material_set(data->mesh_##name, 0, data->material); 93 evas_canvas3d_mesh_frame_material_set(data->mesh_##name, 0, data->material);
diff --git a/src/examples/evas/evas-3d-md2.c b/src/examples/evas/evas-3d-md2.c
index adfb6962a0..f97c183bd0 100644
--- a/src/examples/evas/evas-3d-md2.c
+++ b/src/examples/evas/evas-3d-md2.c
@@ -124,12 +124,12 @@ main(void)
124 mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); 124 mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas);
125 material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 125 material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
126 126
127 efl_file_set(mesh, model_path, NULL); 127 efl_file_simple_load(mesh, model_path, NULL);
128 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 128 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
129 evas_canvas3d_mesh_shader_mode_set(mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG); 129 evas_canvas3d_mesh_shader_mode_set(mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG);
130 130
131 texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 131 texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
132 efl_file_set(texture, image_path, NULL); 132 efl_file_simple_load(texture, image_path, NULL);
133 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 133 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
134 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 134 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
135 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture); 135 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
diff --git a/src/examples/evas/evas-3d-mmap-set.c b/src/examples/evas/evas-3d-mmap-set.c
index 360555501e..149217d95a 100644
--- a/src/examples/evas/evas-3d-mmap-set.c
+++ b/src/examples/evas/evas-3d-mmap-set.c
@@ -33,7 +33,7 @@
33 snprintf(buffer, PATH_MAX, "%s%s", template_path, #extention); \ 33 snprintf(buffer, PATH_MAX, "%s%s", template_path, #extention); \
34 extention##_file = eina_file_open(buffer , 0); \ 34 extention##_file = eina_file_open(buffer , 0); \
35 mesh_##extention = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); \ 35 mesh_##extention = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); \
36 efl_file_mmap_set(mesh_##extention, extention##_file, NULL); \ 36 efl_file_simple_mmap_load(mesh_##extention, extention##_file, NULL); \
37 evas_canvas3d_mesh_frame_material_set(mesh_##extention, 0, material); \ 37 evas_canvas3d_mesh_frame_material_set(mesh_##extention, 0, material); \
38 evas_canvas3d_mesh_shader_mode_set(mesh_##extention, EVAS_CANVAS3D_SHADER_MODE_PHONG); \ 38 evas_canvas3d_mesh_shader_mode_set(mesh_##extention, EVAS_CANVAS3D_SHADER_MODE_PHONG); \
39 node_##extention = efl_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_type_set(efl_added, EVAS_CANVAS3D_NODE_TYPE_MESH)); \ 39 node_##extention = efl_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_type_set(efl_added, EVAS_CANVAS3D_NODE_TYPE_MESH)); \
diff --git a/src/examples/evas/evas-3d-obj.c b/src/examples/evas/evas-3d-obj.c
index 65f57ecffd..91126fbfa0 100644
--- a/src/examples/evas/evas-3d-obj.c
+++ b/src/examples/evas/evas-3d-obj.c
@@ -47,7 +47,7 @@
47#define ADD_OBJ_MESH(path, Y, Z, num, shade_mode, name_of_material) \ 47#define ADD_OBJ_MESH(path, Y, Z, num, shade_mode, name_of_material) \
48 mesh[num] = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); \ 48 mesh[num] = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); \
49 snprintf(full_file_path, sizeof(full_file_path), "%s.obj", path); \ 49 snprintf(full_file_path, sizeof(full_file_path), "%s.obj", path); \
50 efl_file_set(mesh[num], full_file_path, NULL); \ 50 efl_file_simple_load(mesh[num], full_file_path, NULL); \
51 evas_canvas3d_mesh_frame_material_set(mesh[num], 0, name_of_material); \ 51 evas_canvas3d_mesh_frame_material_set(mesh[num], 0, name_of_material); \
52 evas_canvas3d_mesh_shader_mode_set(mesh[num], shade_mode); \ 52 evas_canvas3d_mesh_shader_mode_set(mesh[num], shade_mode); \
53 mesh_node[num] = efl_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_type_set(efl_added, EVAS_CANVAS3D_NODE_TYPE_MESH)); \ 53 mesh_node[num] = efl_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_type_set(efl_added, EVAS_CANVAS3D_NODE_TYPE_MESH)); \
@@ -65,7 +65,7 @@
65 65
66#define ADD_TEXTURE(name, path) \ 66#define ADD_TEXTURE(name, path) \
67 name = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \ 67 name = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
68 efl_file_set(name, path, NULL); \ 68 efl_file_simple_load(name, path, NULL); \
69 evas_canvas3d_texture_filter_set(name, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \ 69 evas_canvas3d_texture_filter_set(name, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
70 EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \ 70 EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \
71 evas_canvas3d_texture_wrap_set(name, EVAS_CANVAS3D_WRAP_MODE_REPEAT, \ 71 evas_canvas3d_texture_wrap_set(name, EVAS_CANVAS3D_WRAP_MODE_REPEAT, \
diff --git a/src/examples/evas/evas-3d-parallax-occlusion.c b/src/examples/evas/evas-3d-parallax-occlusion.c
index 83188c0538..1d2cc75263 100644
--- a/src/examples/evas/evas-3d-parallax-occlusion.c
+++ b/src/examples/evas/evas-3d-parallax-occlusion.c
@@ -138,9 +138,9 @@ _mesh_setup(Scene_Data *data)
138 138
139 data->texture_rocks = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 139 data->texture_rocks = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
140 data->texture_rocks_n = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 140 data->texture_rocks_n = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
141 efl_file_set(data->texture_rocks, rock_diffuse, NULL); 141 efl_file_simple_load(data->texture_rocks, rock_diffuse, NULL);
142 evas_canvas3d_texture_wrap_set(data->texture_rocks, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 142 evas_canvas3d_texture_wrap_set(data->texture_rocks, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
143 efl_file_set(data->texture_rocks_n, rock_n_and_height_map, NULL); 143 efl_file_simple_load(data->texture_rocks_n, rock_n_and_height_map, NULL);
144 evas_canvas3d_texture_wrap_set(data->texture_rocks_n, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 144 evas_canvas3d_texture_wrap_set(data->texture_rocks_n, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
145 145
146 evas_canvas3d_material_texture_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_rocks_n); 146 evas_canvas3d_material_texture_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_rocks_n);
@@ -160,9 +160,9 @@ _mesh_setup(Scene_Data *data)
160 160
161 data->texture_wood = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 161 data->texture_wood = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
162 data->texture_four_n = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 162 data->texture_four_n = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
163 efl_file_set(data->texture_wood, wood_diffuse, NULL); 163 efl_file_simple_load(data->texture_wood, wood_diffuse, NULL);
164 evas_canvas3d_texture_wrap_set(data->texture_wood, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 164 evas_canvas3d_texture_wrap_set(data->texture_wood, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
165 efl_file_set(data->texture_four_n, wood_n_and_height_map, NULL); 165 efl_file_simple_load(data->texture_four_n, wood_n_and_height_map, NULL);
166 evas_canvas3d_texture_wrap_set(data->texture_four_n, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 166 evas_canvas3d_texture_wrap_set(data->texture_four_n, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
167 167
168 evas_canvas3d_material_texture_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_four_n); 168 evas_canvas3d_material_texture_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_four_n);
diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c
index 1e2f3d6ead..20230d0112 100644
--- a/src/examples/evas/evas-3d-pick.c
+++ b/src/examples/evas/evas-3d-pick.c
@@ -143,7 +143,7 @@ main(void)
143 material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 143 material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
144 144
145 texture_diffuse = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 145 texture_diffuse = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
146 efl_file_set(texture_diffuse, image_path, NULL); 146 efl_file_simple_load(texture_diffuse, image_path, NULL);
147 evas_canvas3d_texture_filter_set(texture_diffuse, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR); 147 evas_canvas3d_texture_filter_set(texture_diffuse, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR);
148 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse); 148 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse);
149 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 149 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-ply.c b/src/examples/evas/evas-3d-ply.c
index 821195b30e..7769a45442 100644
--- a/src/examples/evas/evas-3d-ply.c
+++ b/src/examples/evas/evas-3d-ply.c
@@ -159,7 +159,7 @@ main(void)
159 159
160 material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 160 material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
161 texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 161 texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
162 efl_file_set(texture, image_path, NULL); 162 efl_file_simple_load(texture, image_path, NULL);
163 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 163 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
164 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 164 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
165 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture); 165 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
@@ -182,7 +182,7 @@ main(void)
182 mesh[i] = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); 182 mesh[i] = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas);
183 183
184 snprintf(buffer, PATH_MAX, "%s%s", input_template, file_name[i % 8]); 184 snprintf(buffer, PATH_MAX, "%s%s", input_template, file_name[i % 8]);
185 efl_file_set(mesh[i], buffer, NULL); 185 efl_file_simple_load(mesh[i], buffer, NULL);
186 evas_canvas3d_mesh_frame_material_set(mesh[i], 0, material); 186 evas_canvas3d_mesh_frame_material_set(mesh[i], 0, material);
187 evas_canvas3d_mesh_shader_mode_set(mesh[i], draw_mode[(i % 8)]); 187 evas_canvas3d_mesh_shader_mode_set(mesh[i], draw_mode[(i % 8)]);
188 188
@@ -191,7 +191,7 @@ main(void)
191 191
192 if (i > 15) 192 if (i > 15)
193 { 193 {
194 efl_file_set(mesh[i], buffer, NULL); 194 efl_file_simple_load(mesh[i], buffer, NULL);
195 evas_canvas3d_mesh_frame_material_set(mesh[i], 0, material); 195 evas_canvas3d_mesh_frame_material_set(mesh[i], 0, material);
196 evas_canvas3d_mesh_shader_mode_set(mesh[i], draw_mode[(i % 8)]); 196 evas_canvas3d_mesh_shader_mode_set(mesh[i], draw_mode[(i % 8)]);
197 } 197 }
diff --git a/src/examples/evas/evas-3d-shadows.c b/src/examples/evas/evas-3d-shadows.c
index ae06a3631a..16733183f4 100644
--- a/src/examples/evas/evas-3d-shadows.c
+++ b/src/examples/evas/evas-3d-shadows.c
@@ -262,12 +262,12 @@ _fence_setup(Body_3D *fence)
262 262
263 Eo *texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 263 Eo *texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
264 evas_canvas3d_texture_atlas_enable_set(texture, EINA_FALSE); 264 evas_canvas3d_texture_atlas_enable_set(texture, EINA_FALSE);
265 efl_file_set(texture, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL); 265 efl_file_simple_load(texture, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL);
266 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 266 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
267 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 267 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
268 Eo *texture1 = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 268 Eo *texture1 = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
269 evas_canvas3d_texture_atlas_enable_set(texture1, EINA_FALSE); 269 evas_canvas3d_texture_atlas_enable_set(texture1, EINA_FALSE);
270 efl_file_set(texture1, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL); 270 efl_file_simple_load(texture1, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL);
271 evas_canvas3d_texture_filter_set(texture1, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 271 evas_canvas3d_texture_filter_set(texture1, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
272 evas_canvas3d_texture_wrap_set(texture1, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 272 evas_canvas3d_texture_wrap_set(texture1, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
273 fence->material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 273 fence->material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
@@ -344,7 +344,7 @@ static void
344_model_setup(Body_3D *model) 344_model_setup(Body_3D *model)
345{ 345{
346 model->texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 346 model->texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
347 efl_file_set(model->texture, image_path, NULL); 347 efl_file_simple_load(model->texture, image_path, NULL);
348 evas_canvas3d_texture_filter_set(model->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 348 evas_canvas3d_texture_filter_set(model->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
349 evas_canvas3d_texture_wrap_set(model->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 349 evas_canvas3d_texture_wrap_set(model->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
350 model->material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 350 model->material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
@@ -358,7 +358,7 @@ _model_setup(Body_3D *model)
358 358
359 359
360 model->mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); 360 model->mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas);
361 efl_file_set(model->mesh, model_path, NULL); 361 efl_file_simple_load(model->mesh, model_path, NULL);
362 evas_canvas3d_mesh_frame_material_set(model->mesh, 0, model->material); 362 evas_canvas3d_mesh_frame_material_set(model->mesh, 0, model->material);
363 evas_canvas3d_mesh_shader_mode_set(model->mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG); 363 evas_canvas3d_mesh_shader_mode_set(model->mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG);
364 364
@@ -373,7 +373,7 @@ static void
373_billboard_setup(Scene_Data *data) 373_billboard_setup(Scene_Data *data)
374{ 374{
375 data->billboard.texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 375 data->billboard.texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
376 efl_file_set(data->billboard.texture, b_image_path, NULL); 376 efl_file_simple_load(data->billboard.texture, b_image_path, NULL);
377 evas_canvas3d_texture_filter_set(data->billboard.texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 377 evas_canvas3d_texture_filter_set(data->billboard.texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
378 evas_canvas3d_texture_wrap_set(data->billboard.texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 378 evas_canvas3d_texture_wrap_set(data->billboard.texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
379 379
diff --git a/src/examples/evas/evas-3d-static-lod.c b/src/examples/evas/evas-3d-static-lod.c
index d7672a48b5..92e3b1a1a9 100644
--- a/src/examples/evas/evas-3d-static-lod.c
+++ b/src/examples/evas/evas-3d-static-lod.c
@@ -179,14 +179,14 @@ _mesh_setup(Scene_Data *data)
179 Eo *mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); 179 Eo *mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas);
180 Eina_Stringshare *str = eina_stringshare_printf("%s%d%s", model_path, 180 Eina_Stringshare *str = eina_stringshare_printf("%s%d%s", model_path,
181 i, ".obj"); 181 i, ".obj");
182 efl_file_set(mesh, str, NULL); 182 efl_file_simple_load(mesh, str, NULL);
183 evas_canvas3d_mesh_frame_material_set(mesh, 0, data->material); 183 evas_canvas3d_mesh_frame_material_set(mesh, 0, data->material);
184 evas_canvas3d_mesh_shader_mode_set(mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG); 184 evas_canvas3d_mesh_shader_mode_set(mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG);
185 evas_canvas3d_mesh_lod_boundary_set(mesh, distances[i], distances[i + 1]); 185 evas_canvas3d_mesh_lod_boundary_set(mesh, distances[i], distances[i + 1]);
186 evas_canvas3d_node_mesh_add(data->lod_mesh_node1, mesh); 186 evas_canvas3d_node_mesh_add(data->lod_mesh_node1, mesh);
187 187
188 mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas); 188 mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, evas);
189 efl_file_set(mesh, str, NULL); 189 efl_file_simple_load(mesh, str, NULL);
190 evas_canvas3d_mesh_frame_material_set(mesh, 0, data->material); 190 evas_canvas3d_mesh_frame_material_set(mesh, 0, data->material);
191 evas_canvas3d_mesh_shader_mode_set(mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG); 191 evas_canvas3d_mesh_shader_mode_set(mesh, EVAS_CANVAS3D_SHADER_MODE_PHONG);
192 evas_canvas3d_mesh_lod_boundary_set(mesh, m_distances[i], m_distances[i + 1]); 192 evas_canvas3d_mesh_lod_boundary_set(mesh, m_distances[i], m_distances[i + 1]);
diff --git a/src/examples/evas/evas-object-manipulation-eo.c b/src/examples/evas/evas-object-manipulation-eo.c
index 551d2873f7..081d063641 100644
--- a/src/examples/evas/evas-object-manipulation-eo.c
+++ b/src/examples/evas/evas-object-manipulation-eo.c
@@ -193,8 +193,9 @@ main(void)
193 * So it's possible to decrement refcount, and 'image' object 193 * So it's possible to decrement refcount, and 'image' object
194 * will be deleted automatically by parent.*/ 194 * will be deleted automatically by parent.*/
195 195
196 efl_file_set(d.img, img_path, NULL); 196 if (efl_file_set(d.img, img_path)) goto panic;
197 err = efl_file_load_error_get(d.img); 197
198 err = efl_file_load(d.img);
198 199
199 if (err != EVAS_LOAD_ERROR_NONE) 200 if (err != EVAS_LOAD_ERROR_NONE)
200 { 201 {
@@ -211,8 +212,8 @@ main(void)
211 212
212 /* border on the image's clipper, here just to emphasize its position */ 213 /* border on the image's clipper, here just to emphasize its position */
213 d.clipper_border = efl_add(EFL_CANVAS_IMAGE_CLASS, d.canvas); 214 d.clipper_border = efl_add(EFL_CANVAS_IMAGE_CLASS, d.canvas);
214 efl_file_set(d.clipper_border, border_img_path, NULL); 215 if (efl_file_set(d.clipper_border, border_img_path)) goto panic;
215 err = efl_file_load_error_get(d.clipper_border); 216 err = efl_file_load(d.clipper_border);
216 217
217 if (err != EVAS_LOAD_ERROR_NONE) 218 if (err != EVAS_LOAD_ERROR_NONE)
218 { 219 {
diff --git a/src/examples/evas/shooter/evas-3d-shooter-macros.h b/src/examples/evas/shooter/evas-3d-shooter-macros.h
index 9cb92a6cf8..94980ec2e3 100644
--- a/src/examples/evas/shooter/evas-3d-shooter-macros.h
+++ b/src/examples/evas/shooter/evas-3d-shooter-macros.h
@@ -150,13 +150,13 @@ typedef struct _vec2
150 150
151 151
152#define MATERIAL_TEXTURE_SET(Object, Name, file, image) \ 152#define MATERIAL_TEXTURE_SET(Object, Name, file, image) \
153 efl_file_set(data->mesh_##Name, file, NULL); \ 153 efl_file_simple_load(data->mesh_##Name, file, NULL); \
154 \ 154 \
155 SETUP_DEFAULT_MESH(Object, Name, PHONG) \ 155 SETUP_DEFAULT_MESH(Object, Name, PHONG) \
156 data->texture_diffuse_##Object = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \ 156 data->texture_diffuse_##Object = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
157 \ 157 \
158 evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_##Object, EINA_FALSE); \ 158 evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_##Object, EINA_FALSE); \
159 efl_file_set(data->texture_diffuse_##Object, image, NULL); \ 159 efl_file_simple_load(data->texture_diffuse_##Object, image, NULL); \
160 evas_canvas3d_texture_filter_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \ 160 evas_canvas3d_texture_filter_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
161 EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \ 161 EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \
162 evas_canvas3d_texture_wrap_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); \ 162 evas_canvas3d_texture_wrap_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); \
@@ -175,7 +175,7 @@ typedef struct _vec2
175 data->texture_diffuse_##Object = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \ 175 data->texture_diffuse_##Object = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
176 \ 176 \
177 evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_##Object, EINA_FALSE); \ 177 evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_##Object, EINA_FALSE); \
178 efl_file_set(data->texture_diffuse_##Object, image, NULL); \ 178 efl_file_simple_load(data->texture_diffuse_##Object, image, NULL); \
179 evas_canvas3d_texture_filter_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \ 179 evas_canvas3d_texture_filter_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
180 EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \ 180 EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \
181 evas_canvas3d_texture_wrap_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); \ 181 evas_canvas3d_texture_wrap_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); \
@@ -190,7 +190,7 @@ typedef struct _vec2
190 data->texture_normal_##Object = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \ 190 data->texture_normal_##Object = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
191 \ 191 \
192 evas_canvas3d_texture_atlas_enable_set(data->texture_normal_##Object, EINA_FALSE); \ 192 evas_canvas3d_texture_atlas_enable_set(data->texture_normal_##Object, EINA_FALSE); \
193 efl_file_set(data->texture_normal_##Object, normal, NULL); \ 193 efl_file_simple_load(data->texture_normal_##Object, normal, NULL); \
194 evas_canvas3d_texture_filter_set(data->texture_normal_##Object, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \ 194 evas_canvas3d_texture_filter_set(data->texture_normal_##Object, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
195 EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \ 195 EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \
196 evas_canvas3d_texture_wrap_set(data->texture_normal_##Object, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); \ 196 evas_canvas3d_texture_wrap_set(data->texture_normal_##Object, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); \
diff --git a/src/examples/evas/shooter/evas-3d-shooter.c b/src/examples/evas/shooter/evas-3d-shooter.c
index ae6bedee7f..1c4deb4d7e 100644
--- a/src/examples/evas/shooter/evas-3d-shooter.c
+++ b/src/examples/evas/shooter/evas-3d-shooter.c
@@ -133,14 +133,14 @@ _key_down(void *data,
133 if (!scene->blending) 133 if (!scene->blending)
134 { 134 {
135 scene->blending = EINA_TRUE; 135 scene->blending = EINA_TRUE;
136 efl_file_set(scene->texture_diffuse_carpet, gazebo_t_trans_path, NULL); 136 efl_file_simple_load(scene->texture_diffuse_carpet, gazebo_t_trans_path, NULL);
137 evas_canvas3d_mesh_blending_enable_set(scene->mesh_carpet, EINA_TRUE); 137 evas_canvas3d_mesh_blending_enable_set(scene->mesh_carpet, EINA_TRUE);
138 evas_canvas3d_mesh_blending_func_set(scene->mesh_carpet, EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA); 138 evas_canvas3d_mesh_blending_func_set(scene->mesh_carpet, EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA);
139 } 139 }
140 else 140 else
141 { 141 {
142 scene->blending = EINA_FALSE; 142 scene->blending = EINA_FALSE;
143 efl_file_set(scene->texture_diffuse_carpet, gazebo_t_path, NULL); 143 efl_file_simple_load(scene->texture_diffuse_carpet, gazebo_t_path, NULL);
144 evas_canvas3d_mesh_blending_enable_set(scene->mesh_carpet, EINA_FALSE); 144 evas_canvas3d_mesh_blending_enable_set(scene->mesh_carpet, EINA_FALSE);
145 } 145 }
146 } 146 }
@@ -733,7 +733,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
733 733
734 ADD_MESH(tommy, tommy, 0.0, 0.3, 1.0) 734 ADD_MESH(tommy, tommy, 0.0, 0.3, 1.0)
735 SETUP_MESH_NODE(tommy) 735 SETUP_MESH_NODE(tommy)
736 efl_file_set(data->mesh_tommy, gun_path, NULL); 736 efl_file_simple_load(data->mesh_tommy, gun_path, NULL);
737 efl_file_save(data->mesh_tommy, "try.obj", NULL, NULL); 737 efl_file_save(data->mesh_tommy, "try.obj", NULL, NULL);
738 evas_canvas3d_mesh_shader_mode_set(data->mesh_tommy, EVAS_CANVAS3D_SHADER_MODE_PHONG); 738 evas_canvas3d_mesh_shader_mode_set(data->mesh_tommy, EVAS_CANVAS3D_SHADER_MODE_PHONG);
739 evas_canvas3d_mesh_frame_material_set(data->mesh_tommy, 0, data->material_tommy); 739 evas_canvas3d_mesh_frame_material_set(data->mesh_tommy, 0, data->material_tommy);
@@ -763,7 +763,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
763 if (data->blending) 763 if (data->blending)
764 { 764 {
765 evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_carpet, EINA_FALSE); 765 evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_carpet, EINA_FALSE);
766 efl_file_set(data->texture_diffuse_carpet, gazebo_t_trans_path, NULL); 766 efl_file_simple_load(data->texture_diffuse_carpet, gazebo_t_trans_path, NULL);
767 evas_canvas3d_mesh_blending_enable_set(data->mesh_carpet, EINA_TRUE); 767 evas_canvas3d_mesh_blending_enable_set(data->mesh_carpet, EINA_TRUE);
768 evas_canvas3d_mesh_blending_func_set(data->mesh_carpet, EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA); 768 evas_canvas3d_mesh_blending_func_set(data->mesh_carpet, EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA);
769 } 769 }
@@ -888,7 +888,7 @@ _mesh_setup_column(Scene_Data *data, int index)
888 888
889 data->texture_diffuse_column = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 889 data->texture_diffuse_column = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
890 890
891 efl_file_set(data->texture_diffuse_column, red_brick_path, NULL); 891 efl_file_simple_load(data->texture_diffuse_column, red_brick_path, NULL);
892 evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_column, EINA_FALSE); 892 evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_column, EINA_FALSE);
893 evas_canvas3d_texture_filter_set(data->texture_diffuse_column, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 893 evas_canvas3d_texture_filter_set(data->texture_diffuse_column, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
894 evas_canvas3d_texture_wrap_set(data->texture_diffuse_column, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 894 evas_canvas3d_texture_wrap_set(data->texture_diffuse_column, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
diff --git a/src/lib/ecore/efl_io_file.c b/src/lib/ecore/efl_io_file.c
index c8716d2935..041db19e95 100644
--- a/src/lib/ecore/efl_io_file.c
+++ b/src/lib/ecore/efl_io_file.c
@@ -29,7 +29,6 @@
29 29
30typedef struct _Efl_Io_File_Data 30typedef struct _Efl_Io_File_Data
31{ 31{
32 const char *path;
33 uint32_t flags; 32 uint32_t flags;
34 uint32_t mode; 33 uint32_t mode;
35 uint64_t last_position; 34 uint64_t last_position;
@@ -123,7 +122,7 @@ _efl_io_file_efl_object_constructor(Eo *o, Efl_Io_File_Data *pd)
123} 122}
124 123
125EOLIAN static void 124EOLIAN static void
126_efl_io_file_efl_object_destructor(Eo *o, Efl_Io_File_Data *pd) 125_efl_io_file_efl_object_destructor(Eo *o, Efl_Io_File_Data *pd EINA_UNUSED)
127{ 126{
128 if (efl_io_closer_close_on_invalidate_get(o) && 127 if (efl_io_closer_close_on_invalidate_get(o) &&
129 (!efl_io_closer_closed_get(o))) 128 (!efl_io_closer_closed_get(o)))
@@ -134,8 +133,6 @@ _efl_io_file_efl_object_destructor(Eo *o, Efl_Io_File_Data *pd)
134 } 133 }
135 134
136 efl_destructor(efl_super(o, MY_CLASS)); 135 efl_destructor(efl_super(o, MY_CLASS));
137
138 eina_stringshare_del(pd->path);
139} 136}
140 137
141EOLIAN static Efl_Object * 138EOLIAN static Efl_Object *
@@ -144,17 +141,18 @@ _efl_io_file_efl_object_finalize(Eo *o, Efl_Io_File_Data *pd)
144 int fd = efl_loop_fd_file_get(o); 141 int fd = efl_loop_fd_file_get(o);
145 if (fd < 0) 142 if (fd < 0)
146 { 143 {
147 EINA_SAFETY_ON_NULL_RETURN_VAL(pd->path, NULL); 144 const char *path = efl_file_get(o);
145 EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
148 146
149 if (pd->mode) 147 if (pd->mode)
150 fd = open(pd->path, pd->flags, pd->mode); 148 fd = open(path, pd->flags, pd->mode);
151 else 149 else
152 fd = open(pd->path, pd->flags); 150 fd = open(path, pd->flags);
153 151
154 if (fd < 0) 152 if (fd < 0)
155 { 153 {
156 eina_error_set(errno); 154 eina_error_set(errno);
157 ERR("Could not open file '%s': %s", pd->path, strerror(errno)); 155 ERR("Could not open file '%s': %s", path, strerror(errno));
158 return NULL; 156 return NULL;
159 } 157 }
160 158
@@ -164,22 +162,6 @@ _efl_io_file_efl_object_finalize(Eo *o, Efl_Io_File_Data *pd)
164 return efl_finalize(efl_super(o, MY_CLASS)); 162 return efl_finalize(efl_super(o, MY_CLASS));
165} 163}
166 164
167EOLIAN static Eina_Bool
168_efl_io_file_efl_file_file_set(Eo *o, Efl_Io_File_Data *pd, const char *file, const char *key EINA_UNUSED)
169{
170 EINA_SAFETY_ON_TRUE_RETURN_VAL(efl_finalized_get(o), EINA_FALSE);
171
172 eina_stringshare_replace(&pd->path, file);
173 return EINA_TRUE;
174}
175
176EOLIAN static void
177_efl_io_file_efl_file_file_get(const Eo *o EINA_UNUSED, Efl_Io_File_Data *pd, const char **file, const char **key)
178{
179 if (file) *file = pd->path;
180 if (key) *key = NULL;
181}
182
183EOLIAN static Eina_Error 165EOLIAN static Eina_Error
184_efl_io_file_efl_io_reader_read(Eo *o, Efl_Io_File_Data *pd, Eina_Rw_Slice *rw_slice) 166_efl_io_file_efl_io_reader_read(Eo *o, Efl_Io_File_Data *pd, Eina_Rw_Slice *rw_slice)
185{ 167{
diff --git a/src/lib/ecore/efl_io_file.eo b/src/lib/ecore/efl_io_file.eo
index c663b723c5..269d46ec37 100644
--- a/src/lib/ecore/efl_io_file.eo
+++ b/src/lib/ecore/efl_io_file.eo
@@ -51,7 +51,6 @@ class @beta Efl.Io.File extends Efl.Loop_Fd implements Efl.File, Efl.Io.Reader_F
51 Efl.Object.destructor; 51 Efl.Object.destructor;
52 Efl.Object.finalize; 52 Efl.Object.finalize;
53 Efl.Loop_Fd.fd_file { set; } 53 Efl.Loop_Fd.fd_file { set; }
54 Efl.File.file { get; set; }
55 Efl.Io.Reader.read; 54 Efl.Io.Reader.read;
56 Efl.Io.Writer.write; 55 Efl.Io.Writer.write;
57 Efl.Io.Closer.close; 56 Efl.Io.Closer.close;
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 5f94ebf2d1..b78498aa0e 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -1177,7 +1177,7 @@ ecore_con_url_ftp_upload(Ecore_Con_Url *url_con,
1177 1177
1178 file = efl_add(EFL_IO_FILE_CLASS, efl_loop_get(url_con->dialer), 1178 file = efl_add(EFL_IO_FILE_CLASS, efl_loop_get(url_con->dialer),
1179 efl_name_set(efl_added, "upload-file"), 1179 efl_name_set(efl_added, "upload-file"),
1180 efl_file_set(efl_added, filename, NULL), 1180 efl_file_set(efl_added, filename),
1181 efl_io_file_flags_set(efl_added, O_RDONLY), 1181 efl_io_file_flags_set(efl_added, O_RDONLY),
1182 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE), 1182 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE),
1183 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE)); 1183 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE));
diff --git a/src/lib/ecore_file/ecore_file_download.c b/src/lib/ecore_file/ecore_file_download.c
index 54666693d2..4b65c51ee6 100644
--- a/src/lib/ecore_file/ecore_file_download.c
+++ b/src/lib/ecore_file/ecore_file_download.c
@@ -66,7 +66,7 @@ _ecore_file_download_copier_done(void *data, const Efl_Event *event EINA_UNUSED)
66 Efl_Net_Http_Status status = efl_net_dialer_http_response_status_get(job->input); 66 Efl_Net_Http_Status status = efl_net_dialer_http_response_status_get(job->input);
67 const char *file; 67 const char *file;
68 68
69 efl_file_get(job->output, &file, NULL); 69 file = efl_file_get(job->output);
70 70
71 DBG("Finished downloading %s (status=%d) -> %s", 71 DBG("Finished downloading %s (status=%d) -> %s",
72 efl_net_dialer_address_dial_get(job->input), 72 efl_net_dialer_address_dial_get(job->input),
@@ -92,7 +92,7 @@ _ecore_file_download_copier_error(void *data, const Efl_Event *event)
92 Eina_Error *perr = event->info; 92 Eina_Error *perr = event->info;
93 const char *file; 93 const char *file;
94 94
95 efl_file_get(job->output, &file, NULL); 95 file = efl_file_get(job->output);
96 96
97 WRN("Failed downloading %s (status=%d) -> %s: %s", 97 WRN("Failed downloading %s (status=%d) -> %s: %s",
98 efl_net_dialer_address_dial_get(job->input), 98 efl_net_dialer_address_dial_get(job->input),
@@ -127,7 +127,7 @@ _ecore_file_download_copier_progress(void *data, const Efl_Event *event EINA_UNU
127 127
128 if (!job->progress_cb) return; 128 if (!job->progress_cb) return;
129 129
130 efl_file_get(job->output, &file, NULL); 130 file = efl_file_get(job->output);
131 efl_net_dialer_http_progress_download_get(job->input, &dn, &dt); 131 efl_net_dialer_http_progress_download_get(job->input, &dn, &dt);
132 efl_net_dialer_http_progress_upload_get(job->input, &un, &ut); 132 efl_net_dialer_http_progress_upload_get(job->input, &un, &ut);
133 ret = job->progress_cb((void *)job->data, file, dt, dn, ut, un); 133 ret = job->progress_cb((void *)job->data, file, dt, dn, ut, un);
@@ -227,7 +227,7 @@ ecore_file_download_full(const char *url,
227 EINA_SAFETY_ON_NULL_GOTO(job->input, error_input); 227 EINA_SAFETY_ON_NULL_GOTO(job->input, error_input);
228 228
229 job->output = efl_add(EFL_IO_FILE_CLASS, loop, 229 job->output = efl_add(EFL_IO_FILE_CLASS, loop,
230 efl_file_set(efl_added, dst, NULL), 230 efl_file_set(efl_added, dst),
231 efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT), 231 efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT),
232 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE), 232 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE),
233 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE), 233 efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE),
@@ -309,7 +309,7 @@ ecore_file_download_abort(Ecore_File_Download_Job *job)
309 return; 309 return;
310 } 310 }
311 311
312 efl_file_get(job->output, &file, NULL); 312 file = efl_file_get(job->output);
313 DBG("Aborting download %s -> %s", 313 DBG("Aborting download %s -> %s",
314 efl_net_dialer_address_dial_get(job->input), 314 efl_net_dialer_address_dial_get(job->input),
315 file); 315 file);
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 1857990f42..18dd82d0cb 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -3200,17 +3200,17 @@ _edje_svg_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3 EINA_U
3200 3200
3201 if (new_svg < 0) 3201 if (new_svg < 0)
3202 { 3202 {
3203 efl_file_set(ep->object, ed->file->path, src_key); 3203 efl_file_simple_load(ep->object, ed->file->path, src_key);
3204 } 3204 }
3205 else 3205 else
3206 { 3206 {
3207 snprintf(dest_key, sizeof(dest_key), "edje/vectors/%i", new_svg); 3207 snprintf(dest_key, sizeof(dest_key), "edje/vectors/%i", new_svg);
3208 3208
3209 efl_file_set(ep->object, ed->file->path, src_key); 3209 efl_file_simple_load(ep->object, ed->file->path, src_key);
3210 src_root = efl_canvas_vg_object_root_node_get(ep->object); 3210 src_root = efl_canvas_vg_object_root_node_get(ep->object);
3211 efl_ref(src_root); 3211 efl_ref(src_root);
3212 3212
3213 efl_file_set(ep->object, ed->file->path, dest_key); 3213 efl_file_simple_load(ep->object, ed->file->path, dest_key);
3214 dest_root = efl_canvas_vg_object_root_node_get(ep->object); 3214 dest_root = efl_canvas_vg_object_root_node_get(ep->object);
3215 efl_ref(dest_root); 3215 efl_ref(dest_root);
3216 3216
@@ -4927,7 +4927,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4927 proxy = ed->file->image_dir->entries[pd_mesh_node->mesh_node.texture.id].entry; 4927 proxy = ed->file->image_dir->entries[pd_mesh_node->mesh_node.texture.id].entry;
4928 if (proxy) 4928 if (proxy)
4929 { 4929 {
4930 efl_file_mmap_set(texture, ed->file->f, proxy); 4930 efl_file_simple_mmap_load(texture, ed->file->f, proxy);
4931 evas_canvas3d_texture_filter_set(texture, pd_mesh_node->mesh_node.texture.filter1, pd_mesh_node->mesh_node.texture.filter2); 4931 evas_canvas3d_texture_filter_set(texture, pd_mesh_node->mesh_node.texture.filter1, pd_mesh_node->mesh_node.texture.filter2);
4932 evas_canvas3d_texture_wrap_set(texture, pd_mesh_node->mesh_node.texture.wrap1, pd_mesh_node->mesh_node.texture.wrap2); 4932 evas_canvas3d_texture_wrap_set(texture, pd_mesh_node->mesh_node.texture.wrap1, pd_mesh_node->mesh_node.texture.wrap2);
4933 } 4933 }
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 010b1aff6b..37133e3731 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -238,11 +238,17 @@ _load_scripts(Eo *obj, Edje_Edit *eed)
238 return EINA_TRUE; 238 return EINA_TRUE;
239} 239}
240 240
241EOLIAN static Eina_Bool 241EOLIAN static Eina_Error
242_edje_edit_efl_file_file_set(Eo *obj, Edje_Edit *eed, const char *file, const char *group) 242_edje_edit_efl_file_load(Eo *obj, Edje_Edit *eed)
243{ 243{
244 Eina_Error err;
245
246 if (efl_file_loaded_get(obj)) return 0;
247
244 _edje_edit_data_clean(eed); 248 _edje_edit_data_clean(eed);
245 249
250 err = efl_file_load(efl_super(obj, MY_CLASS));
251 if (err) return err;
246 /* TODO and maybes: 252 /* TODO and maybes:
247 * * The whole point of this thing is keep track of stuff such as 253 * * The whole point of this thing is keep track of stuff such as
248 * strings to free and who knows what, so we need to take care 254 * strings to free and who knows what, so we need to take care
@@ -257,34 +263,10 @@ _edje_edit_efl_file_file_set(Eo *obj, Edje_Edit *eed, const char *file, const ch
257 * groups). 263 * groups).
258 * P.S. don't forget about mmap version below 264 * P.S. don't forget about mmap version below
259 */ 265 */
260 file = eina_vpath_resolve(file);
261
262 Eina_Bool int_ret;
263 int_ret = efl_file_set(efl_super(obj, MY_CLASS), file, group);
264
265 if (!int_ret)
266 return EINA_FALSE;
267
268 if (!_load_scripts(obj, eed))
269 return EINA_FALSE;
270
271 return EINA_TRUE;
272}
273
274EOLIAN static Eina_Bool
275_edje_edit_efl_file_mmap_set(Eo *obj, Edje_Edit *eed, const Eina_File *mmap, const char *group)
276{
277 _edje_edit_data_clean(eed);
278
279 Eina_Bool int_ret;
280 int_ret = efl_file_mmap_set(efl_super(obj, MY_CLASS), mmap, group);
281 if (!int_ret)
282 return EINA_FALSE;
283
284 if (!_load_scripts(obj, eed)) 266 if (!_load_scripts(obj, eed))
285 return EINA_FALSE; 267 return EFL_GFX_IMAGE_LOAD_ERROR_GENERIC;
286 268
287 return EINA_TRUE; 269 return 0;
288} 270}
289 271
290EAPI Evas_Object * 272EAPI Evas_Object *
diff --git a/src/lib/edje/edje_edit.eo b/src/lib/edje/edje_edit.eo
index a7bb40a550..61ae265498 100644
--- a/src/lib/edje/edje_edit.eo
+++ b/src/lib/edje/edje_edit.eo
@@ -10,7 +10,6 @@ class Edje.Edit extends Efl.Canvas.Layout
10 implements { 10 implements {
11 Efl.Object.constructor; 11 Efl.Object.constructor;
12 Efl.Object.destructor; 12 Efl.Object.destructor;
13 Efl.File.file { set; } 13 Efl.File.load;
14 Efl.File.mmap { set; }
15 } 14 }
16} 15}
diff --git a/src/lib/edje/edje_legacy.c b/src/lib/edje/edje_legacy.c
index fead8b04be..5906ff1969 100644
--- a/src/lib/edje/edje_legacy.c
+++ b/src/lib/edje/edje_legacy.c
@@ -5,11 +5,8 @@
5EAPI Edje_Load_Error 5EAPI Edje_Load_Error
6edje_object_load_error_get(const Eo *obj) 6edje_object_load_error_get(const Eo *obj)
7{ 7{
8 Efl_Gfx_Image_Load_Error p = efl_file_load_error_get(obj);
9 Edje *ed; 8 Edje *ed;
10 9
11 if (p != EFL_GFX_IMAGE_LOAD_ERROR_NONE) return EDJE_LOAD_ERROR_DOES_NOT_EXIST;
12
13 ed = _edje_fetch(obj); 10 ed = _edje_fetch(obj);
14 if (!ed) return EDJE_LOAD_ERROR_GENERIC; 11 if (!ed) return EDJE_LOAD_ERROR_GENERIC;
15 return ed->load_error; 12 return ed->load_error;
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 360365ce91..9256d43acf 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -159,19 +159,21 @@ static int _sort_defined_boxes(const void *a, const void *b);
159 159
160/************************** API Routines **************************/ 160/************************** API Routines **************************/
161 161
162EOLIAN void 162EOLIAN const char *
163_efl_canvas_layout_efl_file_file_get(Eo *obj EINA_UNUSED, Edje *ed, const char **file, const char **group) 163_efl_canvas_layout_efl_file_file_get(Eo *obj EINA_UNUSED, Edje *ed)
164{ 164{
165 if (file) *file = ed->path; 165 return ed->path;
166 if (group) *group = ed->group;
167} 166}
168 167
169EOLIAN Efl_Gfx_Image_Load_Error 168EOLIAN const char *
170_efl_canvas_layout_efl_file_load_error_get(const Eo *obj, Edje *ed) 169_efl_canvas_layout_efl_file_group_get(Eo *obj EINA_UNUSED, Edje *ed)
171{ 170{
172 Efl_Gfx_Image_Load_Error p = efl_file_load_error_get(efl_super(obj, EFL_CANVAS_LAYOUT_CLASS)); 171 return ed->group;
172}
173 173
174 if (p != EFL_GFX_IMAGE_LOAD_ERROR_NONE) return p; 174EOLIAN Efl_Gfx_Image_Load_Error
175_efl_canvas_layout_layout_load_error_get(const Eo *obj EINA_UNUSED, Edje *ed)
176{
175 switch (ed->load_error) 177 switch (ed->load_error)
176 { 178 {
177 case EDJE_LOAD_ERROR_NONE: return EFL_GFX_IMAGE_LOAD_ERROR_NONE; 179 case EDJE_LOAD_ERROR_NONE: return EFL_GFX_IMAGE_LOAD_ERROR_NONE;
@@ -184,8 +186,9 @@ _efl_canvas_layout_efl_file_load_error_get(const Eo *obj, Edje *ed)
184 case EDJE_LOAD_ERROR_INCOMPATIBLE_FILE: return EFL_GFX_IMAGE_LOAD_ERROR_INCOMPATIBLE_FILE; 186 case EDJE_LOAD_ERROR_INCOMPATIBLE_FILE: return EFL_GFX_IMAGE_LOAD_ERROR_INCOMPATIBLE_FILE;
185 case EDJE_LOAD_ERROR_UNKNOWN_COLLECTION: return EFL_GFX_IMAGE_LOAD_ERROR_UNKNOWN_COLLECTION; 187 case EDJE_LOAD_ERROR_UNKNOWN_COLLECTION: return EFL_GFX_IMAGE_LOAD_ERROR_UNKNOWN_COLLECTION;
186 case EDJE_LOAD_ERROR_RECURSIVE_REFERENCE: return EFL_GFX_IMAGE_LOAD_ERROR_RECURSIVE_REFERENCE; 188 case EDJE_LOAD_ERROR_RECURSIVE_REFERENCE: return EFL_GFX_IMAGE_LOAD_ERROR_RECURSIVE_REFERENCE;
187 default: return EFL_GFX_IMAGE_LOAD_ERROR_GENERIC; 189 default: break;
188 } 190 }
191 return EFL_GFX_IMAGE_LOAD_ERROR_GENERIC;
189} 192}
190 193
191EAPI const char * 194EAPI const char *
@@ -761,7 +764,7 @@ _edje_devices_add(Edje *ed, Evas *tev)
761 _edje_device_changed_cb, ed); 764 _edje_device_changed_cb, ed);
762} 765}
763 766
764int 767Eina_Error
765_edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const char *group, const char *parent, Eina_List *group_path, Eina_Array *nested) 768_edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const char *group, const char *parent, Eina_List *group_path, Eina_Array *nested)
766{ 769{
767 Edje *ed; 770 Edje *ed;
@@ -782,12 +785,12 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
782 Edje_Nested_Support *st_nested = (idx >= 0) ? eina_array_data_get(nested, idx) : NULL; 785 Edje_Nested_Support *st_nested = (idx >= 0) ? eina_array_data_get(nested, idx) : NULL;
783 786
784 ed = _edje_fetch(obj); 787 ed = _edje_fetch(obj);
785 if (!ed) return 0; 788 if (!ed) return EFL_GFX_IMAGE_LOAD_ERROR_GENERIC;
786 if (!group) group = ""; 789 if (!group) group = "";
787 if ((ed->file) && (ed->file->f == file) && 790 if ((ed->file) && (ed->file->f == file) &&
788 (ed->group) && (!strcmp(group, ed->group))) 791 (ed->group) && (!strcmp(group, ed->group)))
789 { 792 {
790 return 1; 793 return 0;
791 } 794 }
792 795
793 tev = evas_object_evas_get(obj); 796 tev = evas_object_evas_get(obj);
@@ -840,7 +843,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
840 { 843 {
841 ed->load_error = EDJE_LOAD_ERROR_CORRUPT_FILE; 844 ed->load_error = EDJE_LOAD_ERROR_CORRUPT_FILE;
842 _edje_file_del(ed); 845 _edje_file_del(ed);
843 return 0; 846 return EFL_GFX_IMAGE_LOAD_ERROR_CORRUPT_FILE;
844 } 847 }
845 eina_array_step_set(&parts, sizeof (Eina_Array), 8); 848 eina_array_step_set(&parts, sizeof (Eina_Array), 8);
846 849
@@ -1009,7 +1012,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
1009 eina_mempool_free(_edje_real_part_mp, rp); 1012 eina_mempool_free(_edje_real_part_mp, rp);
1010 evas_event_thaw(tev); 1013 evas_event_thaw(tev);
1011 evas_event_thaw_eval(tev); 1014 evas_event_thaw_eval(tev);
1012 return 0; 1015 return EFL_GFX_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
1013 } 1016 }
1014 1017
1015 _edje_ref(ed); 1018 _edje_ref(ed);
@@ -1106,7 +1109,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
1106 1109
1107 if (pd_mesh_node->mesh_node.mesh.primitive == EVAS_CANVAS3D_MESH_PRIMITIVE_NONE) 1110 if (pd_mesh_node->mesh_node.mesh.primitive == EVAS_CANVAS3D_MESH_PRIMITIVE_NONE)
1108 { 1111 {
1109 efl_file_set(mesh, ed->file->model_dir->entries[pd_mesh_node->mesh_node.mesh.id].entry, NULL); 1112 efl_file_simple_load(mesh, ed->file->model_dir->entries[pd_mesh_node->mesh_node.mesh.id].entry, NULL);
1110 } 1113 }
1111 else 1114 else
1112 { 1115 {
@@ -1460,6 +1463,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
1460 1463
1461 do 1464 do
1462 { 1465 {
1466 Eina_Error load_error;
1463 child_obj = edje_object_add(ed->base.evas); 1467 child_obj = edje_object_add(ed->base.evas);
1464 edje_object_mirrored_set(child_obj, edje_object_mirrored_get(ed->obj)); 1468 edje_object_mirrored_set(child_obj, edje_object_mirrored_get(ed->obj));
1465 1469
@@ -1469,7 +1473,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
1469 _edje_real_part_swallow(ed, rp, child_obj, EINA_FALSE); 1473 _edje_real_part_swallow(ed, rp, child_obj, EINA_FALSE);
1470 } 1474 }
1471 1475
1472 if (!_edje_object_file_set_internal(child_obj, file, source, rp->part->name, group_path, nested)) 1476 load_error = _edje_object_file_set_internal(child_obj, file, source, rp->part->name, group_path, nested);
1477 if (load_error)
1473 { 1478 {
1474 ERR("impossible to set part '%s' of group '%s' from file '%s' to '%s'", 1479 ERR("impossible to set part '%s' of group '%s' from file '%s' to '%s'",
1475 rp->part->name, group_path_entry, eina_file_filename_get(file), source); 1480 rp->part->name, group_path_entry, eina_file_filename_get(file), source);
@@ -1724,11 +1729,11 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
1724 eina_array_flush(&parts); 1729 eina_array_flush(&parts);
1725 evas_event_thaw(tev); 1730 evas_event_thaw(tev);
1726 evas_event_thaw_eval(tev); 1731 evas_event_thaw_eval(tev);
1727 return 1; 1732 return 0;
1728 } 1733 }
1729 evas_event_thaw(tev); 1734 evas_event_thaw(tev);
1730 evas_event_thaw_eval(tev); 1735 evas_event_thaw_eval(tev);
1731 return 0; 1736 return EFL_GFX_IMAGE_LOAD_ERROR_GENERIC;
1732 1737
1733on_error: 1738on_error:
1734 eina_list_free(textblocks); 1739 eina_list_free(textblocks);
@@ -1748,7 +1753,7 @@ on_error:
1748 } 1753 }
1749 evas_event_thaw(tev); 1754 evas_event_thaw(tev);
1750 evas_event_thaw_eval(tev); 1755 evas_event_thaw_eval(tev);
1751 return 0; 1756 return EFL_GFX_IMAGE_LOAD_ERROR_GENERIC;
1752} 1757}
1753 1758
1754void 1759void
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 25a00022b4..a92e5b1273 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -2572,7 +2572,7 @@ Eina_Bool _edje_signal_callback_disable(Edje_Signal_Callback_Group *cgp,
2572EAPI void _edje_edd_init(void); 2572EAPI void _edje_edd_init(void);
2573EAPI void _edje_edd_shutdown(void); 2573EAPI void _edje_edd_shutdown(void);
2574 2574
2575int _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const char *group, const char *parent, Eina_List *group_path, Eina_Array *nested); 2575Eina_Error _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const char *group, const char *parent, Eina_List *group_path, Eina_Array *nested);
2576 2576
2577void _edje_file_callbacks_del(Edje *ed, Evas *e); 2577void _edje_file_callbacks_del(Edje *ed, Evas *e);
2578void _edje_file_del(Edje *ed); 2578void _edje_file_del(Edje *ed);
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index b7ca9c02d2..14f3d50c3c 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -95,7 +95,7 @@ _efl_canvas_layout_efl_object_dbg_info_get(Eo *eo_obj, Edje *_pd EINA_UNUSED, Ef
95 Edje_Load_Error error; 95 Edje_Load_Error error;
96 96
97 const char *file, *edje_group; 97 const char *file, *edje_group;
98 efl_file_get(eo_obj, &file, &edje_group); 98 efl_file_simple_get(eo_obj, &file, &edje_group);
99 EFL_DBG_INFO_APPEND(group, "File", EINA_VALUE_TYPE_STRING, file); 99 EFL_DBG_INFO_APPEND(group, "File", EINA_VALUE_TYPE_STRING, file);
100 EFL_DBG_INFO_APPEND(group, "Group", EINA_VALUE_TYPE_STRING, edje_group); 100 EFL_DBG_INFO_APPEND(group, "Group", EINA_VALUE_TYPE_STRING, edje_group);
101 101
@@ -402,50 +402,55 @@ _efl_canvas_layout_efl_canvas_group_group_calculate(Eo *obj EINA_UNUSED, Edje *e
402 _edje_recalc_do(ed); 402 _edje_recalc_do(ed);
403} 403}
404 404
405EOLIAN static Eina_Bool 405EOLIAN static Eina_Error
406_efl_canvas_layout_efl_file_mmap_set(Eo *obj, Edje *pd EINA_UNUSED, 406_efl_canvas_layout_efl_file_load(Eo *obj, Edje *ed)
407 const Eina_File *f, const char *key)
408{ 407{
409 Eina_Bool ret; 408 Eina_Error err;
410 Eina_Array *nested; 409 Eina_Array *nested;
411 410
412 ret = EINA_FALSE; 411 if (efl_file_loaded_get(obj)) return 0;
412
413 err = efl_file_load(efl_super(obj, MY_CLASS));
414 if (err)
415 {
416 if (err == ENOENT)
417 ed->load_error = EDJE_LOAD_ERROR_DOES_NOT_EXIST;
418 else if (err == ENOMEM)
419 ed->load_error = EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
420 else if ((err == EPERM) || (err == EACCES))
421 ed->load_error = EDJE_LOAD_ERROR_PERMISSION_DENIED;
422 else
423 ed->load_error = EDJE_LOAD_ERROR_GENERIC;
424 return err;
425 }
413 426
414 nested = eina_array_new(8); 427 nested = eina_array_new(8);
415 428
416 if (_edje_object_file_set_internal(obj, f, key, NULL, NULL, nested)) 429 err = _edje_object_file_set_internal(obj, efl_file_mmap_get(obj), efl_file_key_get(obj), NULL, NULL, nested);
417 ret = EINA_TRUE;
418 430
419 eina_array_free(nested); 431 eina_array_free(nested);
420 _edje_object_orientation_inform(obj); 432 _edje_object_orientation_inform(obj);
421 433
422 return ret; 434 return err;
423}
424
425EOLIAN static void
426_efl_canvas_layout_efl_file_mmap_get(const Eo *obj EINA_UNUSED, Edje *pd,
427 const Eina_File **f, const char **key)
428{
429 if (f) *f = pd->file ? pd->file->f : NULL;
430 if (key) *key = pd->group;
431} 435}
432 436
433EAPI Eina_Bool 437EAPI Eina_Bool
434edje_object_mmap_set(Edje_Object *obj, const Eina_File *file, const char *group) 438edje_object_mmap_set(Edje_Object *obj, const Eina_File *file, const char *group)
435{ 439{
436 return efl_file_mmap_set(obj, file, group); 440 return efl_file_simple_mmap_load(obj, file, group);
437} 441}
438 442
439EAPI Eina_Bool 443EAPI Eina_Bool
440edje_object_file_set(Edje_Object *obj, const char *file, const char *group) 444edje_object_file_set(Edje_Object *obj, const char *file, const char *group)
441{ 445{
442 return efl_file_set(obj, file, group); 446 return efl_file_simple_load(obj, file, group);
443} 447}
444 448
445EAPI void 449EAPI void
446edje_object_file_get(const Edje_Object *obj, const char **file, const char **group) 450edje_object_file_get(const Edje_Object *obj, const char **file, const char **group)
447{ 451{
448 efl_file_get((Edje_Object *)obj, file, group); 452 if (file) *file = efl_file_get(obj);
453 if (group) *group = efl_file_key_get(obj);
449} 454}
450 455
451EOLIAN static void 456EOLIAN static void
diff --git a/src/lib/edje/efl_canvas_layout.eo b/src/lib/edje/efl_canvas_layout.eo
index d61ef892f2..5acf87fcd1 100644
--- a/src/lib/edje/efl_canvas_layout.eo
+++ b/src/lib/edje/efl_canvas_layout.eo
@@ -72,6 +72,14 @@ class @beta Efl.Canvas.Layout extends Efl.Canvas.Group implements Efl.File, Efl.
72 device: Efl.Input.Device; [[The seat device]] 72 device: Efl.Input.Device; [[The seat device]]
73 } 73 }
74 } 74 }
75 @property layout_load_error {
76 get {
77 [[Gets the (last) file loading error for a given object.]]
78 }
79 values {
80 error: Efl.Gfx.Image_Load_Error(Efl.Gfx.Image_Load_Error.none); [[The load error code.]]
81 }
82 }
75 } 83 }
76 events { 84 events {
77 part,invalid @beta: string; [[Emitted when trying to use an invalid part. 85 part,invalid @beta: string; [[Emitted when trying to use an invalid part.
@@ -113,8 +121,7 @@ class @beta Efl.Canvas.Layout extends Efl.Canvas.Group implements Efl.File, Efl.
113 Efl.Ui.I18n.mirrored { set; get; } 121 Efl.Ui.I18n.mirrored { set; get; }
114 Efl.Ui.I18n.language { set; get; } 122 Efl.Ui.I18n.language { set; get; }
115 Efl.Gfx.Entity.scale { set; get; } 123 Efl.Gfx.Entity.scale { set; get; }
116 Efl.File.load_error { get; } 124 Efl.File.load;
117 Efl.File.mmap { get; set; }
118 Efl.Container.content_remove; 125 Efl.Container.content_remove;
119 Efl.Container.content_iterate; 126 Efl.Container.content_iterate;
120 Efl.Container.content_count; 127 Efl.Container.content_count;
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 46fd921d3d..a398c1109d 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -82,6 +82,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
82#include "interfaces/efl_config.eo.h" 82#include "interfaces/efl_config.eo.h"
83#include "interfaces/efl_control.eo.h" 83#include "interfaces/efl_control.eo.h"
84#include "interfaces/efl_duplicate.eo.h" 84#include "interfaces/efl_duplicate.eo.h"
85#include "interfaces/efl_file.h"
85#include "interfaces/efl_file.eo.h" 86#include "interfaces/efl_file.eo.h"
86#include "interfaces/efl_file_save.eo.h" 87#include "interfaces/efl_file_save.eo.h"
87#include "interfaces/efl_gfx_image.eo.h" 88#include "interfaces/efl_gfx_image.eo.h"
diff --git a/src/lib/efl/interfaces/efl_file.c b/src/lib/efl/interfaces/efl_file.c
index d1c86ee7c2..3acdc17ce8 100644
--- a/src/lib/efl/interfaces/efl_file.c
+++ b/src/lib/efl/interfaces/efl_file.c
@@ -7,56 +7,210 @@
7typedef struct _Efl_File_Data Efl_File_Data; 7typedef struct _Efl_File_Data Efl_File_Data;
8struct _Efl_File_Data 8struct _Efl_File_Data
9{ 9{
10 Efl_Gfx_Image_Load_Error error; 10 Eina_Stringshare *vpath; /* efl_file_set */
11 Eina_Stringshare *key; /* efl_file_key_set */
12 Eina_File *file; /* efl_file_mmap_set */
13 Eina_Bool file_opened : 1; /* if `file` was opened implicitly during load */
14 Eina_Bool setting : 1; /* set when this file is internally calling methods to avoid infinite recursion */
15 Eina_Bool loaded : 1; /* whether the currently set file properties have been loaded */
11}; 16};
12 17
13static Eina_Bool 18EOLIAN static void
14_efl_file_file_set(Eo *obj, Efl_File_Data *pd, const char *file, const char *key) 19_efl_file_unload(Eo *obj, Efl_File_Data *pd)
15{ 20{
16 char *tmp = NULL; 21 if (!pd->loaded) return;
17 Eina_File *f = NULL; 22 if (!pd->file) return;
18 Eina_Bool r = EINA_FALSE; 23 if (!pd->file_opened) return;
24 pd->setting = 1;
25 eina_file_close(pd->file);
26 efl_file_mmap_set(obj, NULL);
27 pd->setting = 0;
28 pd->loaded = pd->file_opened = EINA_FALSE;
29}
19 30
20 pd->error = EFL_GFX_IMAGE_LOAD_ERROR_DOES_NOT_EXIST; 31EOLIAN static Eina_Error
32_efl_file_load(Eo *obj, Efl_File_Data *pd)
33{
34 Eina_Error ret = 0;
21 35
22 tmp = (char*)(file); 36 if (pd->loaded) return 0;
23 if (tmp) 37 EINA_SAFETY_ON_NULL_RETURN_VAL(pd->vpath, ENOENT);
38 errno = 0;
39 if (!pd->file)
24 { 40 {
25 tmp = eina_vpath_resolve(tmp); 41 Eina_File *f;
42 f = eina_file_open(pd->vpath, EINA_FALSE);
43 if (!f) return errno;
44 pd->file_opened = EINA_TRUE;
45 pd->setting = 1;
46 ret = efl_file_mmap_set(obj, f);
47 pd->setting = 0;
48 if (ret) pd->file_opened = EINA_FALSE;
49 eina_file_close(f);
26 } 50 }
51 pd->loaded = !ret;
52 return ret;
53}
27 54
28 if (tmp) 55EOLIAN static Eina_Error
56_efl_file_mmap_set(Eo *obj, Efl_File_Data *pd, const Eina_File *f)
57{
58 Eina_Error err = 0;
59 Eina_File *file = NULL;
60
61 if (f == pd->file) return 0;
62 if (f)
63 {
64 file = eina_file_dup(f);
65 if (!file) return errno;
66 }
67 if (pd->file) eina_file_close(pd->file);
68 pd->file = file;
69 pd->loaded = EINA_FALSE;
70
71 if (!pd->setting)
29 { 72 {
30 f = eina_file_open(tmp, EINA_FALSE); 73 /* avoid infinite recursion */
31 if (!f) goto on_error; 74 pd->setting = 1;
75 err = efl_file_set(obj, eina_file_filename_get(pd->file));
76 pd->setting = 0;
32 } 77 }
78 return err;
79}
33 80
34 pd->error = EFL_GFX_IMAGE_LOAD_ERROR_NONE; 81EOLIAN static const Eina_File *
82_efl_file_mmap_get(const Eo *obj EINA_UNUSED, Efl_File_Data *pd)
83{
84 return pd->file;
85}
35 86
36 r = efl_file_mmap_set(obj, f, key); 87EOLIAN static Eina_Error
37 if (f) eina_file_close(f); 88_efl_file_file_set(Eo *obj, Efl_File_Data *pd, const char *file)
89{
90 char *tmp;
91 Eina_Error err = 0;
92 Eina_Bool same;
38 93
39 on_error: 94 tmp = (char*)(file);
95 if (tmp)
96 tmp = eina_vpath_resolve(tmp);
40 97
98 same = !eina_stringshare_replace(&pd->vpath, tmp ?: file);
41 free(tmp); 99 free(tmp);
42 return r; 100 if (same) return err;
101 pd->loaded = EINA_FALSE;
102 if (!pd->setting)
103 {
104 pd->setting = 1;
105 err = efl_file_mmap_set(obj, NULL);
106 pd->setting = 0;
107 }
108 return err;
43} 109}
44 110
45static void 111EOLIAN static Eina_Stringshare *
46_efl_file_file_get(const Eo *obj, Efl_File_Data *pd EINA_UNUSED, const char **file, const char **key) 112_efl_file_file_get(const Eo *obj EINA_UNUSED, Efl_File_Data *pd)
47{ 113{
48 const Eina_File *f = NULL; 114 return pd->vpath;
115}
49 116
50 efl_file_mmap_get(obj, &f, key); 117EOLIAN static void
118_efl_file_key_set(Eo *obj EINA_UNUSED, Efl_File_Data *pd, const char *key)
119{
120 if (eina_stringshare_replace(&pd->key, key))
121 pd->loaded = 0;
122}
51 123
52 if (f && file) *file = eina_file_filename_get(f); 124EOLIAN static Eina_Stringshare *
53 else if (file) *file = NULL; 125_efl_file_key_get(const Eo *obj EINA_UNUSED, Efl_File_Data *pd)
126{
127 return pd->key;
128}
129
130EOLIAN static Eina_Bool
131_efl_file_loaded_get(const Eo *obj EINA_UNUSED, Efl_File_Data *pd)
132{
133 return pd->loaded;
134}
135
136EOLIAN static void
137_efl_file_efl_object_destructor(Eo *obj, Efl_File_Data *pd)
138{
139 eina_stringshare_del(pd->vpath);
140 eina_stringshare_del(pd->key);
141 eina_file_close(pd->file);
142 efl_destructor(efl_super(obj, EFL_FILE_MIXIN));
143}
144
145EOLIAN static Eo *
146_efl_file_efl_object_finalize(Eo *obj, Efl_File_Data *pd)
147{
148 obj = efl_finalize(efl_super(obj, EFL_FILE_MIXIN));
149 if (!obj) return NULL;
150 if (pd->file || pd->vpath) efl_file_load(obj);
151 return obj;
152}
153
154////////////////////////////////////////////////////////////////////////////
155
156EAPI Eina_Bool
157efl_file_simple_load(Eo *obj, const char *file, const char *key)
158{
159 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
160 efl_ref(obj);
161 EINA_SAFETY_ON_TRUE_GOTO(efl_file_set(obj, file), fail);
162 efl_file_key_set(obj, key);
163 if (file)
164 {
165 if (efl_file_load(obj)) goto fail;
166 efl_unref(obj);
167 return EINA_TRUE;
168 }
169 efl_file_unload(obj);
170 efl_unref(obj);
171 return EINA_TRUE;
172fail:
173 efl_unref(obj);
174 return EINA_FALSE;
175}
176
177EAPI Eina_Bool
178efl_file_simple_mmap_load(Eo *obj, const Eina_File *file, const char *key)
179{
180 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
181 efl_ref(obj);
182 EINA_SAFETY_ON_TRUE_GOTO(efl_file_mmap_set(obj, file), fail);
183 efl_file_key_set(obj, key);
184 if (file)
185 {
186 if (efl_file_load(obj)) goto fail;
187 efl_unref(obj);
188 return EINA_TRUE;
189 }
190 efl_file_unload(obj);
191 efl_unref(obj);
192 return EINA_TRUE;
193fail:
194 efl_unref(obj);
195 return EINA_FALSE;
196}
197
198EAPI void
199efl_file_simple_get(const Eo *obj, const char **file, const char **key)
200{
201 efl_ref((Eo*)obj);
202 if (file) *file = efl_file_get(obj);
203 if (key) *key = efl_file_key_get(obj);
204 efl_unref((Eo*)obj);
54} 205}
55 206
56static Efl_Gfx_Image_Load_Error 207EAPI void
57_efl_file_load_error_get(const Eo *obj EINA_UNUSED, Efl_File_Data *pd) 208efl_file_simple_mmap_get(const Eo *obj, const Eina_File **file, const char **key)
58{ 209{
59 return pd->error; 210 efl_ref((Eo*)obj);
211 if (file) *file = efl_file_mmap_get(obj);
212 if (key) *key = efl_file_key_get(obj);
213 efl_unref((Eo*)obj);
60} 214}
61 215
62#include "interfaces/efl_file.eo.c" 216#include "interfaces/efl_file.eo.c"
diff --git a/src/lib/efl/interfaces/efl_file.eo b/src/lib/efl/interfaces/efl_file.eo
index 8d98a004a4..985b3fd687 100644
--- a/src/lib/efl/interfaces/efl_file.eo
+++ b/src/lib/efl/interfaces/efl_file.eo
@@ -1,93 +1,108 @@
1import eina_types; 1import eina_types;
2import efl_gfx_types; 2import efl_gfx_types;
3 3
4mixin @beta Efl.File { 4mixin @beta Efl.File requires Efl.Object {
5 [[Efl file interface]] 5 [[Efl file interface]]
6 methods { 6 methods {
7 @property load_error { 7 @property mmap {
8 set {
9 [[Set the mmaped file from where an object will fetch the real
10 data (it must be an Eina_File).
11
12 If mmap is set during object construction, the object will automatically
13 call @.load during the finalize phase of construction.
14
15 ]]
16
17 return: Eina.Error; [[0 on success, error code otherwise]]
18 }
8 get { 19 get {
9 [[Gets the (last) file loading error for a given object.]] 20 [[Get the mmaped file from where an object will fetch the real
21 data (it must be an Eina_File).
22
23 ]]
10 } 24 }
11 values { 25 values {
12 error: Efl.Gfx.Image_Load_Error(Efl.Gfx.Image_Load_Error.none); [[The load error code.]] 26 f: ptr(const(Eina.File)); [[The handle to an Eina_File that will be used]]
13 } 27 }
14 } 28 }
15 @property mmap { 29 @property file {
16 set @pure_virtual { 30 set {
17 [[Set the source mmaped file from where an image object must fetch the real 31 [[Set the file path from where an object will fetch the data.
18 image data (it must be an Eina_File).
19
20 If the file supports multiple data stored in it (as Eet files do),
21 you can specify the key to be used as the index of the image in
22 this file.
23 32
24 @since 1.8]] 33 If file is set during object construction, the object will automatically
34 call @.load during the finalize phase of construction.
35 ]]
25 36
26 return: bool; [[$true on success, $false otherwise]] 37 return: Eina.Error; [[0 on success, error code otherwise]]
27 } 38 }
28 get @pure_virtual { 39 get {
29 [[Get the source mmaped file from where an image object must fetch the real 40 [[Retrieve the file path from where an object is to fetch the data.
30 image data (it must be an Eina_File).
31
32 If the file supports multiple data stored in it (as Eet files do),
33 you can get the key to be used as the index of the image in
34 this file.
35 41
36 @since 1.10]] 42 You must not modify the strings on the returned pointers.]]
37 } 43 }
38 values { 44 values {
39 f: ptr(const(Eina.File)); [[The handler to an Eina_File that will be used as image source]] 45 file: string; [[The file path.]]
40 key: string @optional; [[The group that the image belongs to, in case
41 it's an EET(including Edje case) file. This can be used
42 as a key inside evas image cache if this is a normal image
43 file not eet file.]]
44 } 46 }
45 } 47 }
46 @property file { 48 @property key {
47 set { 49 set {
48 [[Set the source file from where an image object must fetch the real 50 [[Set the key which corresponds to the target data within a file.
49 image data (it may be an Eet file, besides pure image ones). 51
50 52 Some filetypes can contain multiple data streams which are indexed by
51 If the file supports multiple data stored in it (as Eet files do), 53 a key. Use this property for such cases.
52 you can specify the key to be used as the index of the image in 54 ]]
53 this file.]]
54
55 /* FIXME-doc
56 * Example:
57 * @code
58 * img = evas_object_image_add(canvas);
59 * evas_object_image_file_set(img, "/path/to/img", NULL);
60 * err = evas_object_image_load_error_get(img);
61 * if (err != EVAS_LOAD_ERROR_NONE)
62 * {
63 * fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
64 * valid_path, evas_load_error_str(err));
65 * }
66 * else
67 * {
68 * evas_object_image_fill_set(img, 0, 0, w, h);
69 * evas_object_resize(img, w, h);
70 * evas_object_show(img);
71 * }
72 * @endcode
73 */
74
75 return: bool; [[$true on success, $false otherwise]]
76 } 55 }
77 get { 56 get {
78 [[Retrieve the source file from where an image object is to fetch the 57 [[Get the previously-set key which corresponds to the target data within a file.
79 real image data (it may be an Eet file, besides pure image ones).
80 58
81 You must not modify the strings on the returned pointers. 59 Some filetypes can contain multiple data streams which are indexed by
60 a key. Use this property for such cases.
82 61
83 Note: Use $null pointers on the file components you're not 62 You must not modify the strings on the returned pointers.]]
84 interested in: they'll be ignored by the function.]]
85 } 63 }
86 values { 64 values {
87 file: string; [[The image file path.]] 65 key: string; [[The group that the image belongs to, in case
88 key: string; [[The image key in $file (if its an Eet one), or 66 it's an EET(including Edje case) file. This can be used
89 $null, otherwise.]] 67 as a key inside evas image cache if this is a normal image
68 file not eet file.]]
90 } 69 }
91 } 70 }
71 @property loaded {
72 get {
73 [[Get the load state of the object.
74 ]]
75 }
76 values {
77 loaded: bool; [[True if the object is loaded, otherwise false.]]
78 }
79 }
80
81 load {
82 [[Perform all necessary operations to open and load file data into the object
83 using the @.file (or @.mmap) and @.key properties.
84
85 In the case where @.file.set has been called on an object, this will internally
86 open the file and call @.mmap.set on the object using the opened file handle.
87
88 Calling @.load on an object which has already performed file operations based on
89 the currently set properties will have no effect.]]
90
91 return: Eina.Error; [[0 on success, error code otherwise]]
92 }
93
94 unload {
95 [[Perform all necessary operations to unload file data from the object.
96
97 In the case where @.mmap.set has been externally called on an object, the file handle
98 stored in the object will be preserved.
99
100 Calling @.unload on an object which is not currently loaded will have no effect.
101 ]]
102 }
103 }
104 implements {
105 Efl.Object.destructor;
106 Efl.Object.finalize;
92 } 107 }
93} 108}
diff --git a/src/lib/efl/interfaces/efl_file.h b/src/lib/efl/interfaces/efl_file.h
new file mode 100644
index 0000000000..d0457148e4
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_file.h
@@ -0,0 +1,10 @@
1#ifndef _EFL_FILE_H
2# define _EFL_FILE_H
3
4/* add doc note about needing ref/unref when passing efl_part to these functions */
5EAPI Eina_Bool efl_file_simple_load(Eo *obj, const char *file, const char *key);
6EAPI Eina_Bool efl_file_simple_mmap_load(Eo *obj, const Eina_File *file, const char *key);
7EAPI void efl_file_simple_get(const Eo *obj, const char **file, const char **key);
8EAPI void efl_file_simple_mmap_get(const Eo *obj, const Eina_File **file, const char **key);
9
10#endif
diff --git a/src/lib/efl/interfaces/efl_gfx_image.eo b/src/lib/efl/interfaces/efl_gfx_image.eo
index 420bb8199d..eb23f3fe30 100644
--- a/src/lib/efl/interfaces/efl_gfx_image.eo
+++ b/src/lib/efl/interfaces/efl_gfx_image.eo
@@ -203,6 +203,14 @@ interface @beta Efl.Gfx.Image
203 see @Efl.Gfx.Image_Scale_Hint]] 203 see @Efl.Gfx.Image_Scale_Hint]]
204 } 204 }
205 } 205 }
206 @property image_load_error {
207 get {
208 [[Gets the (last) file loading error for a given object.]]
209 }
210 values {
211 error: Efl.Gfx.Image_Load_Error(Efl.Gfx.Image_Load_Error.none); [[The load error code.]]
212 }
213 }
206 } 214 }
207 events { 215 events {
208 preload: void; [[Image data has been preloaded.]] 216 preload: void; [[Image data has been preloaded.]]
diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build
index 74839038f2..d91ea663c6 100644
--- a/src/lib/efl/interfaces/meson.build
+++ b/src/lib/efl/interfaces/meson.build
@@ -183,4 +183,8 @@ efl_src += files([
183# 'efl_common_internal.h' 183# 'efl_common_internal.h'
184#]) 184#])
185 185
186install_headers('efl_file.h',
187 install_dir : join_paths(dir_package_include, 'interfaces'),
188)
189
186eolian_include_directories += ['-I', meson.current_source_dir()] 190eolian_include_directories += ['-I', meson.current_source_dir()]
diff --git a/src/lib/elementary/efl_ui_bg.c b/src/lib/elementary/efl_ui_bg.c
index 90bb5061eb..54b29d91b2 100644
--- a/src/lib/elementary/efl_ui_bg.c
+++ b/src/lib/elementary/efl_ui_bg.c
@@ -210,48 +210,76 @@ _efl_ui_bg_efl_gfx_image_load_controller_load_size_get(const Eo *obj EINA_UNUSED
210EAPI Eina_Bool 210EAPI Eina_Bool
211elm_bg_file_set(Eo *obj, const char *file, const char *group) 211elm_bg_file_set(Eo *obj, const char *file, const char *group)
212{ 212{
213 return efl_file_set((Eo *) obj, file, group); 213 return efl_file_simple_load((Eo *) obj, file, group);
214} 214}
215 215
216EOLIAN static Eina_Bool 216EOLIAN static Eina_Error
217_efl_ui_bg_efl_file_file_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, const char *file, const char *key) 217_efl_ui_bg_efl_file_load(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd)
218{
219 return efl_file_load(sd->img);
220}
221
222EOLIAN static Eina_Error
223_efl_ui_bg_efl_file_file_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, const char *file)
218{ 224{
219 eina_stringshare_replace(&sd->file, file); 225 eina_stringshare_replace(&sd->file, file);
226
227 return efl_file_set(sd->img, file);
228}
229
230EOLIAN static void
231_efl_ui_bg_efl_file_key_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, const char *key)
232{
220 eina_stringshare_replace(&sd->key, key); 233 eina_stringshare_replace(&sd->key, key);
221 234
222 return efl_file_set(sd->img, file, key); 235 efl_file_key_set(sd->img, key);
223} 236}
237
224EAPI void 238EAPI void
225elm_bg_file_get(const Eo *obj, const char **file, const char **group) 239elm_bg_file_get(const Eo *obj, const char **file, const char **group)
226{ 240{
227 efl_file_get((Eo *) obj, file, group); 241 efl_file_simple_get((Eo *) obj, file, group);
228} 242}
229 243
230EOLIAN static void 244EOLIAN static const char *
231_efl_ui_bg_efl_file_file_get(const Eo *obj, Efl_Ui_Bg_Data *sd, const char **file, const char **key) 245_efl_ui_bg_efl_file_file_get(const Eo *obj, Efl_Ui_Bg_Data *sd)
232{ 246{
233 if (elm_widget_is_legacy(obj)) 247 if (elm_widget_is_legacy(obj))
234 { 248 return sd->file;
235 if (file) *file = sd->file;
236 if (key) *key = sd->key;
237 return;
238 }
239 249
240 efl_file_get(sd->img, file, key); 250 return efl_file_get(sd->img);
241} 251}
242 252
243EOLIAN static Eina_Bool 253EOLIAN static const char *
254_efl_ui_bg_efl_file_key_get(const Eo *obj, Efl_Ui_Bg_Data *sd)
255{
256 if (elm_widget_is_legacy(obj))
257 return sd->key;
258
259 return efl_file_key_get(sd->img);
260}
261
262EOLIAN static Eina_Error
244_efl_ui_bg_efl_file_mmap_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, 263_efl_ui_bg_efl_file_mmap_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd,
245 const Eina_File *file, const char *key) 264 const Eina_File *file)
246{ 265{
247 return efl_file_mmap_set(sd->img, file, key); 266 return efl_file_mmap_set(sd->img, file);
248} 267}
249 268
250EOLIAN static void 269EOLIAN static const Eina_File *
251_efl_ui_bg_efl_file_mmap_get(const Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, 270_efl_ui_bg_efl_file_mmap_get(const Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd)
252 const Eina_File **file, const char **key)
253{ 271{
254 efl_file_mmap_get(sd->img, file, key); 272 return efl_file_mmap_get(sd->img);
273}
274
275
276EOLIAN static Eo *
277_efl_ui_bg_efl_object_finalize(Eo *obj, Efl_Ui_Bg_Data *sd)
278{
279 obj = efl_finalize(efl_super(obj, MY_CLASS));
280 if (!obj) return NULL;
281 if (efl_file_get(sd->img) || efl_file_mmap_get(sd->img)) efl_file_load(sd->img);
282 return obj;
255} 283}
256 284
257/* Internal EO APIs and hidden overrides */ 285/* Internal EO APIs and hidden overrides */
diff --git a/src/lib/elementary/efl_ui_bg.eo b/src/lib/elementary/efl_ui_bg.eo
index b928549fef..6809b7f418 100644
--- a/src/lib/elementary/efl_ui_bg.eo
+++ b/src/lib/elementary/efl_ui_bg.eo
@@ -9,7 +9,10 @@ class @beta Efl.Ui.Bg extends Efl.Ui.Layout implements Efl.Gfx.Color, Efl.Gfx.Im
9 implements { 9 implements {
10 Efl.Object.constructor; 10 Efl.Object.constructor;
11 Efl.Object.destructor; 11 Efl.Object.destructor;
12 Efl.Object.finalize;
13 Efl.File.load;
12 Efl.File.file { get; set; } 14 Efl.File.file { get; set; }
15 Efl.File.key { get; set; }
13 Efl.File.mmap { get; set; } 16 Efl.File.mmap { get; set; }
14 Efl.Gfx.Color.color { get; set; } 17 Efl.Gfx.Color.color { get; set; }
15 Efl.Gfx.Image.scale_type { get; set; } 18 Efl.Gfx.Image.scale_type { get; set; }
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index 90ec82003f..d4089edd1f 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -46,11 +46,12 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
46}; 46};
47 47
48static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params); 48static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params);
49static Eina_Bool _efl_ui_image_smart_internal_file_set(Eo *obj, Efl_Ui_Image_Data *sd, const char *file, const Eina_File *f, const char *key); 49static Eina_Error _efl_ui_image_smart_internal_file_set(Eo *obj, Efl_Ui_Image_Data *sd);
50static void _efl_ui_image_remote_copier_cancel(Eo *obj, Efl_Ui_Image_Data *sd); 50static void _efl_ui_image_remote_copier_cancel(Eo *obj, Efl_Ui_Image_Data *sd);
51void _efl_ui_image_sizing_eval(Evas_Object *obj); 51void _efl_ui_image_sizing_eval(Evas_Object *obj);
52static void _efl_ui_image_model_properties_changed_cb(void *data, const Efl_Event *event); 52static void _efl_ui_image_model_properties_changed_cb(void *data, const Efl_Event *event);
53static void _on_size_hints_changed(void *data, const Efl_Event *e); 53static void _on_size_hints_changed(void *data, const Efl_Event *e);
54static Eina_Bool _efl_ui_image_download(Eo *obj, Efl_Ui_Image_Data *sd, const char *url);
54 55
55static const Elm_Action key_actions[] = { 56static const Elm_Action key_actions[] = {
56 {"activate", _key_action_activate}, 57 {"activate", _key_action_activate},
@@ -396,7 +397,7 @@ static void
396_efl_ui_image_async_open_done(void *data, Ecore_Thread *thread) 397_efl_ui_image_async_open_done(void *data, Ecore_Thread *thread)
397{ 398{
398 Async_Open_Data *todo = data; 399 Async_Open_Data *todo = data;
399 Eina_Stringshare *file, *key; 400 const char *key;
400 Eina_Bool ok; 401 Eina_Bool ok;
401 Eina_File *f; 402 Eina_File *f;
402 void *map; 403 void *map;
@@ -414,19 +415,21 @@ _efl_ui_image_async_open_done(void *data, Ecore_Thread *thread)
414 map = todo->map; 415 map = todo->map;
415 f = todo->f_open; 416 f = todo->f_open;
416 ok = f && map; 417 ok = f && map;
417 if (todo->file) file = todo->file;
418 else file = f ? eina_file_filename_get(f) : NULL;
419 418
420 if (ok) 419 if (ok)
421 { 420 {
422 if (sd->edje) 421 efl_file_key_set(sd->self, key);
422 ok = !efl_file_mmap_set(sd->self, f);
423 if (ok)
423 { 424 {
424 _prev_img_del(sd); 425 if (sd->edje)
425 ok = edje_object_mmap_set(sd->img, f, key); 426 {
427 _prev_img_del(sd);
428 ok = edje_object_mmap_set(sd->img, f, key);
429 }
430 else
431 ok = !_efl_ui_image_smart_internal_file_set(sd->self, sd);
426 } 432 }
427 else
428 ok = _efl_ui_image_smart_internal_file_set
429 (sd->self, sd, file, f, key);
430 } 433 }
431 if (ok) evas_object_smart_callback_call(sd->self, SIG_LOAD_OPEN, NULL); 434 if (ok) evas_object_smart_callback_call(sd->self, SIG_LOAD_OPEN, NULL);
432 else evas_object_smart_callback_call(sd->self, SIG_LOAD_ERROR, NULL); 435 else evas_object_smart_callback_call(sd->self, SIG_LOAD_ERROR, NULL);
@@ -437,18 +440,20 @@ _efl_ui_image_async_open_done(void *data, Ecore_Thread *thread)
437 _async_open_data_free(todo); 440 _async_open_data_free(todo);
438} 441}
439 442
440static Eina_Bool 443static Eina_Error
441_efl_ui_image_async_file_set(Eo *obj, Efl_Ui_Image_Data *sd, const char *file, 444_efl_ui_image_async_file_set(Eo *obj, Efl_Ui_Image_Data *sd)
442 const Eina_File *f, const char *key)
443{ 445{
444 Async_Open_Data *todo; 446 Async_Open_Data *todo;
447 const char *file = efl_file_get(obj);
448 const char *key = efl_file_key_get(obj);
449 const Eina_File *f = efl_file_mmap_get(obj);
445 450
446 if (sd->async.th && 451 if (sd->async.th &&
447 ((file == sd->async.file) || 452 ((file == sd->async.file) ||
448 (file && sd->async.file && !strcmp(file, sd->async.file))) && 453 (file && sd->async.file && !strcmp(file, sd->async.file))) &&
449 ((key == sd->async.key) || 454 ((key == sd->async.key) ||
450 (key && sd->async.key && !strcmp(key, sd->async.key)))) 455 (key && sd->async.key && !strcmp(key, sd->async.key))))
451 return EINA_TRUE; 456 return 0;
452 457
453 todo = calloc(1, sizeof(Async_Open_Data)); 458 todo = calloc(1, sizeof(Async_Open_Data));
454 if (!todo) return EINA_FALSE; 459 if (!todo) return EINA_FALSE;
@@ -467,22 +472,28 @@ _efl_ui_image_async_file_set(Eo *obj, Efl_Ui_Image_Data *sd, const char *file,
467 sd->async.th = ecore_thread_run(_efl_ui_image_async_open_do, 472 sd->async.th = ecore_thread_run(_efl_ui_image_async_open_do,
468 _efl_ui_image_async_open_done, 473 _efl_ui_image_async_open_done,
469 _efl_ui_image_async_open_cancel, todo); 474 _efl_ui_image_async_open_cancel, todo);
470 if (sd->async.th) return EINA_TRUE; 475 if (sd->async.th) return 0;
471 476
472 _async_open_data_free(todo); 477 _async_open_data_free(todo);
473 _async_clear(sd); 478 _async_clear(sd);
474 DBG("Could not spawn an async thread!"); 479 DBG("Could not spawn an async thread!");
475 return EINA_FALSE; 480 return EFL_GFX_IMAGE_LOAD_ERROR_GENERIC;
476} 481}
477 482
478static Eina_Bool 483static Eina_Error
479_efl_ui_image_edje_file_set(Evas_Object *obj, 484_efl_ui_image_edje_file_set(Evas_Object *obj)
480 const char *file,
481 const Eina_File *f,
482 const char *group)
483{ 485{
486 Eina_Error err;
487 const Eina_File *f;
488 const char *key;
489
484 EFL_UI_IMAGE_DATA_GET(obj, sd); 490 EFL_UI_IMAGE_DATA_GET(obj, sd);
485 491
492 err = efl_file_load(efl_super(obj, MY_CLASS));
493 if (err) return err;
494
495 f = efl_file_mmap_get(obj);
496 key = efl_file_key_get(obj);
486 _prev_img_del(sd); 497 _prev_img_del(sd);
487 498
488 if (!sd->edje) 499 if (!sd->edje)
@@ -500,32 +511,23 @@ _efl_ui_image_edje_file_set(Evas_Object *obj,
500 511
501 if (!sd->async_enable) 512 if (!sd->async_enable)
502 { 513 {
503 if (f) 514 efl_file_key_set(sd->img, key);
504 { 515 err = efl_file_mmap_set(sd->img, f);
505 if (!edje_object_mmap_set(sd->img, f, group)) 516 if (!err) err = efl_file_load(sd->img);
506 { 517 if (err)
507 ERR("failed to set edje file '%s', group '%s': %s", file, group,
508 edje_load_error_str(edje_object_load_error_get(sd->img)));
509 return EINA_FALSE;
510 }
511 }
512 else
513 { 518 {
514 if (!edje_object_file_set(sd->img, file, group)) 519 ERR("failed to set edje file '%s', group '%s': %s", eina_file_filename_get(f), key,
515 { 520 edje_load_error_str(edje_object_load_error_get(sd->img)));
516 ERR("failed to set edje file '%s', group '%s': %s", file, group, 521 return err;
517 edje_load_error_str(edje_object_load_error_get(sd->img)));
518 return EINA_FALSE;
519 }
520 } 522 }
521 } 523 }
522 else 524 else
523 return _efl_ui_image_async_file_set(obj, sd, file, f, group); 525 return _efl_ui_image_async_file_set(obj, sd);
524 526
525 /* FIXME: do i want to update icon on file change ? */ 527 /* FIXME: do i want to update icon on file change ? */
526 _efl_ui_image_sizing_eval(obj); 528 _efl_ui_image_sizing_eval(obj);
527 529
528 return EINA_TRUE; 530 return 0;
529} 531}
530 532
531EOLIAN static void 533EOLIAN static void
@@ -547,7 +549,7 @@ _efl_ui_image_drag_n_drop_cb(void *elm_obj,
547 Elm_Selection_Data *drop) 549 Elm_Selection_Data *drop)
548{ 550{
549 Eina_Bool ret = EINA_FALSE; 551 Eina_Bool ret = EINA_FALSE;
550 ret = efl_file_set(obj, drop->data, NULL); 552 ret = efl_file_simple_load(obj, drop->data, NULL);
551 if (ret) 553 if (ret)
552 { 554 {
553 DBG("dnd: %s, %s, %s", elm_widget_type_get(elm_obj), 555 DBG("dnd: %s, %s, %s", elm_widget_type_get(elm_obj),
@@ -864,12 +866,33 @@ _efl_ui_image_efl_object_constructor(Eo *obj, Efl_Ui_Image_Data *pd)
864 return obj; 866 return obj;
865} 867}
866 868
867EOLIAN Eina_Bool 869static const Eina_Slice remote_uri[] = {
868_efl_ui_image_efl_file_mmap_set(Eo *obj, Efl_Ui_Image_Data *sd, 870 EINA_SLICE_STR_LITERAL("http://"),
869 const Eina_File *file, const char *key) 871 EINA_SLICE_STR_LITERAL("https://"),
872 EINA_SLICE_STR_LITERAL("ftp://"),
873 { }
874};
875
876static inline Eina_Bool
877_efl_ui_image_is_remote(const char *file)
870{ 878{
871 Eina_Bool ret = EINA_FALSE; 879 Eina_Slice s = EINA_SLICE_STR(file);
880 const Eina_Slice *itr;
881
882 for (itr = remote_uri; itr->mem; itr++)
883 if (eina_slice_startswith(s, *itr))
884 return EINA_TRUE;
885
886 return EINA_FALSE;
887}
888
889EOLIAN Eina_Error
890_efl_ui_image_efl_file_load(Eo *obj, Efl_Ui_Image_Data *sd)
891{
892 Eina_Error ret;
893 const char *file = efl_file_get(obj);
872 894
895 if (efl_file_loaded_get(obj)) return 0;
873 _async_cancel(sd); 896 _async_cancel(sd);
874 897
875 /* stop preloading as it may hit to-be-freed memory */ 898 /* stop preloading as it may hit to-be-freed memory */
@@ -879,48 +902,100 @@ _efl_ui_image_efl_file_mmap_set(Eo *obj, Efl_Ui_Image_Data *sd,
879 if (sd->remote.copier) _efl_ui_image_remote_copier_cancel(obj, sd); 902 if (sd->remote.copier) _efl_ui_image_remote_copier_cancel(obj, sd);
880 if (sd->remote.binbuf) ELM_SAFE_FREE(sd->remote.binbuf, eina_binbuf_free); 903 if (sd->remote.binbuf) ELM_SAFE_FREE(sd->remote.binbuf, eina_binbuf_free);
881 904
905 if (sd->anim)
906 {
907 ELM_SAFE_FREE(sd->anim_timer, ecore_timer_del);
908 sd->play = EINA_FALSE;
909 sd->anim = EINA_FALSE;
910 }
911
912 if (file && _efl_ui_image_is_remote(file))
913 {
914 evas_object_hide(sd->img);
915 if (_efl_ui_image_download(obj, sd, file))
916 {
917 evas_object_smart_callback_call(obj, SIG_DOWNLOAD_START, NULL);
918 return 0;
919 }
920 }
921
882 if (!sd->async_enable) 922 if (!sd->async_enable)
883 ret = _efl_ui_image_smart_internal_file_set(obj, sd, eina_file_filename_get(file), file, key); 923 ret = _efl_ui_image_smart_internal_file_set(obj, sd);
884 else 924 else
885 ret = _efl_ui_image_async_file_set(obj, sd, eina_file_filename_get(file), file, key); 925 ret = _efl_ui_image_async_file_set(obj, sd);
886 926
887 return ret; 927 return ret;
888} 928}
889 929
890EOLIAN void 930EOLIAN void
891_efl_ui_image_efl_file_mmap_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, const Eina_File **file, const char **group) 931_efl_ui_image_efl_file_unload(Eo *obj, Efl_Ui_Image_Data *sd)
892{ 932{
893 if (sd->img) efl_file_mmap_get(sd->img, file, group); 933 _async_cancel(sd);
934
935 /* stop preloading as it may hit to-be-freed memory */
936 if (sd->img && sd->preload_status == EFL_UI_IMAGE_PRELOADING)
937 evas_object_image_preload(sd->img, EINA_TRUE);
938
939 if (sd->remote.copier) _efl_ui_image_remote_copier_cancel(obj, sd);
940 if (sd->remote.binbuf) ELM_SAFE_FREE(sd->remote.binbuf, eina_binbuf_free);
941
942 if (sd->anim)
943 {
944 ELM_SAFE_FREE(sd->anim_timer, ecore_timer_del);
945 sd->play = EINA_FALSE;
946 sd->anim = EINA_FALSE;
947 }
948
949 if (sd->prev_img)
950 _prev_img_del(sd);
951 _efl_ui_image_file_set_do(obj);
952 efl_file_unload(sd->img);
953 efl_file_unload(efl_super(obj, MY_CLASS));
954 if (sd->preload_status == EFL_UI_IMAGE_PRELOAD_DISABLED)
955 _prev_img_del(sd);
956 else
957 {
958 evas_object_hide(sd->img);
959 sd->preload_status = EFL_UI_IMAGE_PRELOADING;
960 evas_object_image_preload(sd->img, EINA_FALSE);
961 }
962
963 _efl_ui_image_sizing_eval(obj);
894} 964}
895 965
896static Eina_Bool 966static Eina_Error
897_efl_ui_image_smart_internal_file_set(Eo *obj, Efl_Ui_Image_Data *sd, 967_efl_ui_image_smart_internal_file_set(Eo *obj, Efl_Ui_Image_Data *sd)
898 const char *file, const Eina_File *f, const char *key)
899{ 968{
900 Evas_Load_Error err; 969 Eina_Error err;
970 const Eina_File *f;
971 const char *key;
972 const char *file = efl_file_get(obj);
901 973
902 if (eina_str_has_extension(file, ".edj")) 974 if (eina_str_has_extension(file, ".edj"))
903 return _efl_ui_image_edje_file_set(obj, file, f, key); 975 return _efl_ui_image_edje_file_set(obj);
976
977 err = efl_file_load(efl_super(obj, MY_CLASS));
978 if (err) return err;
979
980 f = efl_file_mmap_get(obj);
981 key = efl_file_key_get(obj);
904 982
905 _efl_ui_image_file_set_do(obj); 983 _efl_ui_image_file_set_do(obj);
906 984
907 if (f) 985 evas_object_image_mmap_set(sd->img, f, key);
908 evas_object_image_mmap_set(sd->img, f, key);
909 else
910 evas_object_image_file_set(sd->img, file, key);
911 986
912 err = evas_object_image_load_error_get(sd->img); 987 err = evas_object_image_load_error_get(sd->img);
913 if (err != EVAS_LOAD_ERROR_NONE) 988 if (err)
914 { 989 {
915 if (file || f) 990 if (file || f)
916 { 991 {
917 if (key) 992 if (key)
918 ERR("Failed to load image '%s' '%s': %s. (%p)", 993 ERR("Failed to load image '%s' '%s': %s. (%p)",
919 file ? file : eina_file_filename_get(f), key, 994 eina_file_filename_get(f), key,
920 evas_load_error_str(err), obj); 995 evas_load_error_str(err), obj);
921 else 996 else
922 ERR("Failed to load image '%s': %s. (%p)", 997 ERR("Failed to load image '%s': %s. (%p)",
923 file ? file : eina_file_filename_get(f), 998 eina_file_filename_get(f),
924 evas_load_error_str(err), obj); 999 evas_load_error_str(err), obj);
925 } 1000 }
926 else 1001 else
@@ -928,7 +1003,7 @@ _efl_ui_image_smart_internal_file_set(Eo *obj, Efl_Ui_Image_Data *sd,
928 ERR("NULL image file passed! (%p)", obj); 1003 ERR("NULL image file passed! (%p)", obj);
929 } 1004 }
930 _prev_img_del(sd); 1005 _prev_img_del(sd);
931 return EINA_FALSE; 1006 return err;
932 } 1007 }
933 1008
934 if (sd->preload_status == EFL_UI_IMAGE_PRELOAD_DISABLED) 1009 if (sd->preload_status == EFL_UI_IMAGE_PRELOAD_DISABLED)
@@ -942,7 +1017,7 @@ _efl_ui_image_smart_internal_file_set(Eo *obj, Efl_Ui_Image_Data *sd,
942 1017
943 _efl_ui_image_sizing_eval(obj); 1018 _efl_ui_image_sizing_eval(obj);
944 1019
945 return EINA_TRUE; 1020 return 0;
946} 1021}
947 1022
948static void 1023static void
@@ -979,7 +1054,7 @@ _efl_ui_image_remote_copier_done(void *data, const Efl_Event *event EINA_UNUSED)
979 Eina_File *f; 1054 Eina_File *f;
980 Eo *dialer; 1055 Eo *dialer;
981 const char *url; 1056 const char *url;
982 Eina_Bool ret = EINA_FALSE; 1057 Eina_Error ret;
983 1058
984 /* we're called from _efl_ui_image_remote_copier_cancel() */ 1059 /* we're called from _efl_ui_image_remote_copier_cancel() */
985 if (!sd->remote.copier) return; 1060 if (!sd->remote.copier) return;
@@ -997,11 +1072,11 @@ _efl_ui_image_remote_copier_done(void *data, const Efl_Event *event EINA_UNUSED)
997 eina_binbuf_string_get(sd->remote.binbuf), 1072 eina_binbuf_string_get(sd->remote.binbuf),
998 eina_binbuf_length_get(sd->remote.binbuf), 1073 eina_binbuf_length_get(sd->remote.binbuf),
999 EINA_FALSE); 1074 EINA_FALSE);
1000 1075 efl_file_mmap_set(obj, f);
1001 ret = _efl_ui_image_smart_internal_file_set(obj, sd, url, f, sd->remote.key); 1076 ret = _efl_ui_image_smart_internal_file_set(obj, sd);
1002 eina_file_close(f); 1077 eina_file_close(f);
1003 1078
1004 if (!ret) 1079 if (ret)
1005 { 1080 {
1006 Efl_Ui_Image_Error err = { 0, EINA_TRUE }; 1081 Efl_Ui_Image_Error err = { 0, EINA_TRUE };
1007 1082
@@ -1057,11 +1132,12 @@ EFL_CALLBACKS_ARRAY_DEFINE(_efl_ui_image_remote_copier_cbs,
1057 { EFL_IO_COPIER_EVENT_PROGRESS, _efl_ui_image_remote_copier_progress }); 1132 { EFL_IO_COPIER_EVENT_PROGRESS, _efl_ui_image_remote_copier_progress });
1058 1133
1059static Eina_Bool 1134static Eina_Bool
1060_efl_ui_image_download(Eo *obj, Efl_Ui_Image_Data *sd, const char *url, const char *key) 1135_efl_ui_image_download(Eo *obj, Efl_Ui_Image_Data *sd, const char *url)
1061{ 1136{
1062 Eo *dialer; 1137 Eo *dialer;
1063 Efl_Ui_Image_Error img_err = { ENOSYS, EINA_FALSE }; 1138 Efl_Ui_Image_Error img_err = { ENOSYS, EINA_FALSE };
1064 Eina_Error err; 1139 Eina_Error err;
1140 const char *key = efl_file_key_get(obj);
1065 1141
1066 dialer = efl_add(EFL_NET_DIALER_HTTP_CLASS, obj, 1142 dialer = efl_add(EFL_NET_DIALER_HTTP_CLASS, obj,
1067 efl_net_dialer_http_allow_redirects_set(efl_added, EINA_TRUE)); 1143 efl_net_dialer_http_allow_redirects_set(efl_added, EINA_TRUE));
@@ -1096,72 +1172,6 @@ _efl_ui_image_download(Eo *obj, Efl_Ui_Image_Data *sd, const char *url, const ch
1096 return EINA_FALSE; 1172 return EINA_FALSE;
1097} 1173}
1098 1174
1099static const Eina_Slice remote_uri[] = {
1100 EINA_SLICE_STR_LITERAL("http://"),
1101 EINA_SLICE_STR_LITERAL("https://"),
1102 EINA_SLICE_STR_LITERAL("ftp://"),
1103 { }
1104};
1105
1106static inline Eina_Bool
1107_efl_ui_image_is_remote(const char *file)
1108{
1109 Eina_Slice s = EINA_SLICE_STR(file);
1110 const Eina_Slice *itr;
1111
1112 for (itr = remote_uri; itr->mem; itr++)
1113 if (eina_slice_startswith(s, *itr))
1114 return EINA_TRUE;
1115
1116 return EINA_FALSE;
1117}
1118
1119EOLIAN static Eina_Bool
1120_efl_ui_image_efl_file_file_set(Eo *obj, Efl_Ui_Image_Data *sd, const char *file, const char *key)
1121{
1122 Eina_Bool ret = EINA_FALSE;
1123
1124 _async_cancel(sd);
1125
1126 /* stop preloading as it may hit to-be-freed memory */
1127 if (sd->img && sd->preload_status == EFL_UI_IMAGE_PRELOADING)
1128 evas_object_image_preload(sd->img, EINA_TRUE);
1129
1130 if (sd->remote.copier) _efl_ui_image_remote_copier_cancel(obj, sd);
1131 if (sd->remote.binbuf) ELM_SAFE_FREE(sd->remote.binbuf, eina_binbuf_free);
1132
1133 if (sd->anim)
1134 {
1135 ELM_SAFE_FREE(sd->anim_timer, ecore_timer_del);
1136 sd->play = EINA_FALSE;
1137 sd->anim = EINA_FALSE;
1138 }
1139
1140 if (!file)
1141 {
1142 if (sd->prev_img)
1143 _prev_img_del(sd);
1144 return _efl_ui_image_smart_internal_file_set(obj, sd, file, NULL, key);;
1145 }
1146
1147 if (_efl_ui_image_is_remote(file))
1148 {
1149 evas_object_hide(sd->img);
1150 if (_efl_ui_image_download(obj, sd, file, key))
1151 {
1152 evas_object_smart_callback_call(obj, SIG_DOWNLOAD_START, NULL);
1153 return EINA_TRUE;
1154 }
1155 }
1156
1157 if (!sd->async_enable)
1158 ret = _efl_ui_image_smart_internal_file_set(obj, sd, file, NULL, key);
1159 else
1160 ret = _efl_ui_image_async_file_set(obj, sd, file, NULL, key);
1161
1162 return ret;
1163}
1164
1165EOLIAN static const char* 1175EOLIAN static const char*
1166_efl_ui_image_efl_layout_group_group_data_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, const char *key) 1176_efl_ui_image_efl_layout_group_group_data_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, const char *key)
1167{ 1177{
@@ -1264,18 +1274,6 @@ _efl_ui_image_efl_layout_calc_calc_auto_update_hints_get(const Eo *obj EINA_UNUS
1264 return EINA_TRUE; 1274 return EINA_TRUE;
1265} 1275}
1266 1276
1267EOLIAN static void
1268_efl_ui_image_efl_file_file_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, const char **file, const char **key)
1269{
1270 if (sd->async.th)
1271 {
1272 if (file) *file = sd->async.file;
1273 if (key) *key = sd->async.key;
1274 return;
1275 }
1276 efl_file_get(sd->img, file, key);
1277}
1278
1279#if 0 1277#if 0
1280// Kept for reference: wait for async open to complete - probably unused. 1278// Kept for reference: wait for async open to complete - probably unused.
1281static Eina_Bool 1279static Eina_Bool
@@ -1725,7 +1723,7 @@ _icon_freedesktop_set(Evas_Object *obj, const char *name, int size)
1725 if (sd->freedesktop.use) 1723 if (sd->freedesktop.use)
1726 { 1724 {
1727 sd->freedesktop.requested_size = size; 1725 sd->freedesktop.requested_size = size;
1728 efl_file_set(obj, path, NULL); 1726 efl_file_simple_load(obj, path, NULL);
1729 return EINA_TRUE; 1727 return EINA_TRUE;
1730 } 1728 }
1731 return EINA_FALSE; 1729 return EINA_FALSE;
@@ -1793,7 +1791,7 @@ _internal_efl_ui_image_icon_set(Evas_Object *obj, const char *name, Eina_Bool *f
1793 { 1791 {
1794 if (fdo) 1792 if (fdo)
1795 *fdo = EINA_FALSE; 1793 *fdo = EINA_FALSE;
1796 return efl_file_set(obj, name, NULL); 1794 return efl_file_simple_load(obj, name, NULL);
1797 } 1795 }
1798 1796
1799 /* if that fails, see if icon name is in the format size/name. if so, 1797 /* if that fails, see if icon name is in the format size/name. if so,
@@ -1875,13 +1873,13 @@ _update_viewmodel(Eo *obj, Efl_Ui_Image_Data *pd)
1875 { 1873 {
1876 eina_value_get(vfile, &f); 1874 eina_value_get(vfile, &f);
1877 1875
1878 efl_file_mmap_set(obj, f, key); 1876 efl_file_simple_mmap_load(obj, f, key);
1879 } 1877 }
1880 else 1878 else
1881 { 1879 {
1882 file = eina_value_to_string(vfile); 1880 file = eina_value_to_string(vfile);
1883 1881
1884 efl_file_set(obj, file, key); 1882 efl_file_simple_load(obj, file, key);
1885 } 1883 }
1886 } 1884 }
1887 1885
@@ -2010,7 +2008,7 @@ elm_image_file_set(Evas_Object *obj, const char *file, const char *group)
2010 Eina_Bool ret = EINA_FALSE; 2008 Eina_Bool ret = EINA_FALSE;
2011 2009
2012 EFL_UI_IMAGE_CHECK(obj) EINA_FALSE; 2010 EFL_UI_IMAGE_CHECK(obj) EINA_FALSE;
2013 ret = efl_file_set(obj, file, group); 2011 ret = efl_file_simple_load(obj, file, group);
2014 _efl_ui_image_sizing_eval(obj); 2012 _efl_ui_image_sizing_eval(obj);
2015 return ret; 2013 return ret;
2016} 2014}
@@ -2018,14 +2016,14 @@ elm_image_file_set(Evas_Object *obj, const char *file, const char *group)
2018EAPI void 2016EAPI void
2019elm_image_file_get(const Eo *obj, const char **file, const char **group) 2017elm_image_file_get(const Eo *obj, const char **file, const char **group)
2020{ 2018{
2021 efl_file_get((Eo *) obj, file, group); 2019 efl_file_simple_get((Eo *) obj, file, group);
2022} 2020}
2023 2021
2024EAPI Eina_Bool 2022EAPI Eina_Bool
2025elm_image_mmap_set(Evas_Object *obj, const Eina_File *file, const char *group) 2023elm_image_mmap_set(Evas_Object *obj, const Eina_File *file, const char *group)
2026{ 2024{
2027 EFL_UI_IMAGE_CHECK(obj) EINA_FALSE; 2025 EFL_UI_IMAGE_CHECK(obj) EINA_FALSE;
2028 return efl_file_mmap_set(obj, file, group); 2026 return efl_file_simple_mmap_load(obj, file, group);
2029} 2027}
2030 2028
2031EAPI Eina_Bool 2029EAPI Eina_Bool
diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo
index 7a19d04b8f..109ef76d57 100644
--- a/src/lib/elementary/efl_ui_image.eo
+++ b/src/lib/elementary/efl_ui_image.eo
@@ -66,8 +66,8 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.
66 the absolute path of an image file, this image will be used. 66 the absolute path of an image file, this image will be used.
67 Lookup order used by @.icon.set can be set using "icon_theme" in config. 67 Lookup order used by @.icon.set can be set using "icon_theme" in config.
68 68
69 Note: The image set by this function can be changed by 69 Note: The image set by this function is changed when
70 @Efl.File.file.set. 70 @Efl.File.load is called.
71 71
72 Note: This function does not accept relative icon path. 72 Note: This function does not accept relative icon path.
73 73
@@ -89,8 +89,8 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.
89 } 89 }
90 implements { 90 implements {
91 Efl.Object.constructor; 91 Efl.Object.constructor;
92 Efl.File.file { get; set; } 92 Efl.File.load;
93 Efl.File.mmap { get; set; } 93 Efl.File.unload;
94 Efl.Gfx.Color.color { set; } 94 Efl.Gfx.Color.color { set; }
95 Efl.Gfx.Entity.visible { set; } 95 Efl.Gfx.Entity.visible { set; }
96 Efl.Gfx.Entity.position { set; } 96 Efl.Gfx.Entity.position { set; }
diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c
index dc17dce226..21d3d6fc31 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.c
+++ b/src/lib/elementary/efl_ui_image_zoomable.c
@@ -2023,14 +2023,17 @@ _efl_ui_image_zoomable_efl_layout_signal_signal_callback_del(Eo *obj, Efl_Ui_Ima
2023 return ok; 2023 return ok;
2024} 2024}
2025 2025
2026static Eina_Bool 2026static Eina_Error
2027_img_proxy_set(Evas_Object *obj, Efl_Ui_Image_Zoomable_Data *sd, 2027_img_proxy_set(Evas_Object *obj, Efl_Ui_Image_Zoomable_Data *sd,
2028 const char *file, const Eina_File *f, const char *group,
2029 Eina_Bool resize) 2028 Eina_Bool resize)
2030{ 2029{
2031 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 2030 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
2032 double tz; 2031 double tz;
2033 int w, h; 2032 int w, h;
2033 Eina_Error err;
2034
2035 err = efl_file_load(efl_super(obj, MY_CLASS));
2036 if (err) return err;
2034 2037
2035 sd->zoom = 1.0; 2038 sd->zoom = 1.0;
2036 evas_object_image_smooth_scale_set(sd->img, (sd->no_smooth == 0)); 2039 evas_object_image_smooth_scale_set(sd->img, (sd->no_smooth == 0));
@@ -2042,23 +2045,13 @@ _img_proxy_set(Evas_Object *obj, Efl_Ui_Image_Zoomable_Data *sd,
2042 sd->edje = edje_object_add(evas_object_evas_get(obj)); 2045 sd->edje = edje_object_add(evas_object_evas_get(obj));
2043 if (!resize) 2046 if (!resize)
2044 { 2047 {
2045 if (f) 2048 efl_file_key_set(sd->edje, efl_file_key_get(obj));
2049 err = efl_file_mmap_set(sd->edje, efl_file_mmap_get(obj));
2050 if (err)
2046 { 2051 {
2047 if (!edje_object_mmap_set(sd->edje, f, group)) 2052 ERR("failed to set edje file '%s', group '%s': %s", efl_file_get(obj), efl_file_key_get(obj),
2048 { 2053 edje_load_error_str(edje_object_load_error_get(sd->edje)));
2049 ERR("failed to set edje file '%s', group '%s': %s", sd->file, group, 2054 return err;
2050 edje_load_error_str(edje_object_load_error_get(sd->edje)));
2051 return EINA_FALSE;
2052 }
2053 }
2054 else if (file)
2055 {
2056 if (!edje_object_file_set(sd->edje, file, group))
2057 {
2058 ERR("failed to set edje file '%s', group '%s': %s", file, group,
2059 edje_load_error_str(edje_object_load_error_get(sd->edje)));
2060 return EINA_FALSE;
2061 }
2062 } 2055 }
2063 } 2056 }
2064 2057
@@ -2100,41 +2093,42 @@ _img_proxy_set(Evas_Object *obj, Efl_Ui_Image_Zoomable_Data *sd,
2100 sd->flip = EFL_FLIP_NONE; 2093 sd->flip = EFL_FLIP_NONE;
2101 sd->orientation_changed = EINA_FALSE; 2094 sd->orientation_changed = EINA_FALSE;
2102 2095
2103 return EINA_TRUE; 2096 return 0;
2104} 2097}
2105 2098
2106static Eina_Bool 2099static Eina_Error
2107_image_zoomable_edje_file_set(Evas_Object *obj, 2100_image_zoomable_edje_file_set(Evas_Object *obj)
2108 const char *file,
2109 const char *group)
2110{ 2101{
2111 EFL_UI_IMAGE_ZOOMABLE_DATA_GET(obj, sd); 2102 EFL_UI_IMAGE_ZOOMABLE_DATA_GET(obj, sd);
2112 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 2103 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_GFX_IMAGE_LOAD_ERROR_GENERIC);
2113 2104
2114 if (file) eina_stringshare_replace(&sd->file, file); 2105 return _img_proxy_set(obj, sd, EINA_FALSE);
2115 return _img_proxy_set(obj, sd, file, NULL, group, EINA_FALSE);
2116} 2106}
2117 2107
2118static void 2108static Eina_Error
2119_internal_file_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, const char *file, Eina_File *f, const char *key, Evas_Load_Error *ret) 2109_internal_file_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Evas_Load_Error *ret)
2120{ 2110{
2121 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 2111 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_GFX_IMAGE_LOAD_ERROR_GENERIC);
2122 Evas_Load_Error err;
2123 int w, h; 2112 int w, h;
2124 double tz; 2113 double tz;
2114 Eina_Error err;
2115 const char *file;
2116
2117 err = efl_file_load(efl_super(obj, MY_CLASS));
2118 if (err) return err;
2119
2120 file = efl_file_get(obj);
2125 2121
2126 if (eina_str_has_extension(file, ".edj")) 2122 if (eina_str_has_extension(file, ".edj"))
2127 { 2123 {
2128 _image_zoomable_edje_file_set(obj, file, key); 2124 return _image_zoomable_edje_file_set(obj);
2129 return;
2130 } 2125 }
2131 2126
2132 // It is actually to late, we have lost the reference to the previous 2127 // It is actually to late, we have lost the reference to the previous
2133 // file descriptor already, so we can't know if the file changed. To 2128 // file descriptor already, so we can't know if the file changed. To
2134 // be safe we do for now just force a full reload on file_set and hope 2129 // be safe we do for now just force a full reload on file_set and hope
2135 // on evas to catch it, if there is no change. 2130 // on evas to catch it, if there is no change.
2136 eina_stringshare_replace(&sd->file, file); 2131 sd->f = eina_file_dup(efl_file_mmap_get(obj));
2137 sd->f = eina_file_dup(f);
2138 2132
2139 evas_object_image_smooth_scale_set(sd->img, (sd->no_smooth == 0)); 2133 evas_object_image_smooth_scale_set(sd->img, (sd->no_smooth == 0));
2140 evas_object_image_file_set(sd->img, NULL, NULL); 2134 evas_object_image_file_set(sd->img, NULL, NULL);
@@ -2145,7 +2139,7 @@ _internal_file_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, const char *file, Ei
2145 { 2139 {
2146 ERR("Things are going bad for '%s' (%p) : %i", file, sd->img, err); 2140 ERR("Things are going bad for '%s' (%p) : %i", file, sd->img, err);
2147 if (ret) *ret = err; 2141 if (ret) *ret = err;
2148 return; 2142 return err;
2149 } 2143 }
2150 evas_object_image_size_get(sd->img, &w, &h); 2144 evas_object_image_size_get(sd->img, &w, &h);
2151 2145
@@ -2161,7 +2155,7 @@ _internal_file_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, const char *file, Ei
2161 { 2155 {
2162 ERR("Things are going bad for '%s' (%p)", file, sd->img); 2156 ERR("Things are going bad for '%s' (%p)", file, sd->img);
2163 if (ret) *ret = err; 2157 if (ret) *ret = err;
2164 return; 2158 return err;
2165 } 2159 }
2166 2160
2167 evas_object_image_preload(sd->img, 0); 2161 evas_object_image_preload(sd->img, 0);
@@ -2189,6 +2183,7 @@ _internal_file_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, const char *file, Ei
2189 sd->orientation_changed = EINA_FALSE; 2183 sd->orientation_changed = EINA_FALSE;
2190 2184
2191 if (ret) *ret = evas_object_image_load_error_get(sd->img); 2185 if (ret) *ret = evas_object_image_load_error_get(sd->img);
2186 return efl_gfx_image_load_error_get(sd->img);
2192} 2187}
2193 2188
2194static void 2189static void
@@ -2239,11 +2234,11 @@ _efl_ui_image_zoomable_remote_copier_done(void *data, const Efl_Event *event EIN
2239 eina_binbuf_string_get(sd->remote.binbuf), 2234 eina_binbuf_string_get(sd->remote.binbuf),
2240 eina_binbuf_length_get(sd->remote.binbuf), 2235 eina_binbuf_length_get(sd->remote.binbuf),
2241 EINA_FALSE); 2236 EINA_FALSE);
2242 2237 efl_file_mmap_set(obj, f);