summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-08-29 09:26:15 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-29 17:17:08 +0200
commit9e0a285eea9753ed8f6999c1813d43724faf0c31 (patch)
tree6bc9977f44e6c9940bc887efb20ccfe4c9d8c01f
parent0ef9228e5ff0b5b506ebb95136998463d6d0091c (diff)
efl: implement efl.file::unload for classes that implement load
unload is a crucial method for classes that implement load, as this is the method which is called during e.g., efl_file_simple_load() when a new file is specified in order to destroy the previous object data Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9786
-rw-r--r--src/lib/edje/edje_edit.c7
-rw-r--r--src/lib/edje/edje_edit_eo.c1
-rw-r--r--src/lib/edje/edje_smart.c23
-rw-r--r--src/lib/edje/efl_canvas_layout.eo1
-rw-r--r--src/lib/elementary/efl_ui_bg.c6
-rw-r--r--src/lib/elementary/efl_ui_bg.eo1
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.c32
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.eo1
-rw-r--r--src/lib/elementary/efl_ui_layout.c11
-rw-r--r--src/lib/elementary/efl_ui_layout.eo1
-rw-r--r--src/lib/elementary/efl_ui_text.c8
-rw-r--r--src/lib/elementary/efl_ui_text.eo1
-rw-r--r--src/lib/elementary/efl_ui_video.c13
-rw-r--r--src/lib/elementary/efl_ui_video.eo1
-rw-r--r--src/lib/elementary/efl_ui_widget.c8
-rw-r--r--src/lib/elementary/efl_ui_widget_part_bg.eo1
-rw-r--r--src/lib/elementary/efl_ui_win.c21
-rw-r--r--src/lib/elementary/efl_ui_win_part.eo1
-rw-r--r--src/lib/elementary/elm_photo.c7
-rw-r--r--src/lib/elementary/elm_photo_eo.c1
-rw-r--r--src/lib/elementary/elm_thumb.c30
-rw-r--r--src/lib/elementary/elm_thumb_eo.c1
-rw-r--r--src/lib/emotion/efl_canvas_video.eo1
-rw-r--r--src/lib/emotion/emotion_smart.c17
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.c7
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.eo1
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.c9
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.eo1
28 files changed, 199 insertions, 14 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 969ef84..eeb043a 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -269,6 +269,13 @@ _edje_edit_efl_file_load(Eo *obj, Edje_Edit *eed)
269 return 0; 269 return 0;
270} 270}
271 271
272EOLIAN static void
273_edje_edit_efl_file_unload(Eo *obj, Edje_Edit *eed)
274{
275 efl_file_unload(efl_super(obj, MY_CLASS));
276 _edje_edit_data_clean(eed);
277}
278
272EAPI Evas_Object * 279EAPI Evas_Object *
273edje_edit_object_add(Evas *evas) 280edje_edit_object_add(Evas *evas)
274{ 281{
diff --git a/src/lib/edje/edje_edit_eo.c b/src/lib/edje/edje_edit_eo.c
index 12fac92..ffde56e 100644
--- a/src/lib/edje/edje_edit_eo.c
+++ b/src/lib/edje/edje_edit_eo.c
@@ -23,6 +23,7 @@ _edje_edit_class_initializer(Efl_Class *klass)
23 EFL_OBJECT_OP_FUNC(efl_constructor, _edje_edit_efl_object_constructor), 23 EFL_OBJECT_OP_FUNC(efl_constructor, _edje_edit_efl_object_constructor),
24 EFL_OBJECT_OP_FUNC(efl_destructor, _edje_edit_efl_object_destructor), 24 EFL_OBJECT_OP_FUNC(efl_destructor, _edje_edit_efl_object_destructor),
25 EFL_OBJECT_OP_FUNC(efl_file_load, _edje_edit_efl_file_load), 25 EFL_OBJECT_OP_FUNC(efl_file_load, _edje_edit_efl_file_load),
26 EFL_OBJECT_OP_FUNC(efl_file_unload, _edje_edit_efl_file_unload),
26 EDJE_EDIT_EXTRA_OPS 27 EDJE_EDIT_EXTRA_OPS
27 ); 28 );
28 opsp = &ops; 29 opsp = &ops;
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index 1549962..3a25b75 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -402,6 +402,29 @@ _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 void
406_efl_canvas_layout_efl_file_unload(Eo *obj, Edje *ed)
407{
408 efl_file_unload(efl_super(obj, MY_CLASS));
409 if (_edje_lua_script_only(ed)) _edje_lua_script_only_shutdown(ed);
410#ifdef HAVE_EPHYSICS
411 /* clear physics world / shutdown ephysics */
412 if ((ed->collection) && (ed->collection->physics_enabled) && (ed->world))
413 {
414 if (EPH_LOAD())
415 {
416 EPH_CALL(ephysics_world_del)(ed->world);
417 EPH_CALL(ephysics_shutdown)();
418 }
419 }
420#endif
421 if (ed->persp) edje_object_perspective_set(obj, NULL);
422 _edje_file_del(ed);
423 eina_stringshare_replace(&ed->path, NULL);
424 eina_stringshare_replace(&ed->group, NULL);
425 eina_stringshare_replace(&ed->parent, NULL);
426}
427
405EOLIAN static Eina_Error 428EOLIAN static Eina_Error
406_efl_canvas_layout_efl_file_load(Eo *obj, Edje *ed) 429_efl_canvas_layout_efl_file_load(Eo *obj, Edje *ed)
407{ 430{
diff --git a/src/lib/edje/efl_canvas_layout.eo b/src/lib/edje/efl_canvas_layout.eo
index d4ce1b3..f5c1a2c 100644
--- a/src/lib/edje/efl_canvas_layout.eo
+++ b/src/lib/edje/efl_canvas_layout.eo
@@ -124,6 +124,7 @@ class @beta Efl.Canvas.Layout extends Efl.Canvas.Group implements Efl.File, Efl.
124 Efl.Ui.I18n.language { set; get; } 124 Efl.Ui.I18n.language { set; get; }
125 Efl.Gfx.Entity.scale { set; get; } 125 Efl.Gfx.Entity.scale { set; get; }
126 Efl.File.load; 126 Efl.File.load;
127 Efl.File.unload;
127 Efl.Container.content_iterate; 128 Efl.Container.content_iterate;
128 Efl.Container.content_count; 129 Efl.Container.content_count;
129 Efl.Part.part_get; [[Returns @Efl.Canvas.Layout_Part]] 130 Efl.Part.part_get; [[Returns @Efl.Canvas.Layout_Part]]
diff --git a/src/lib/elementary/efl_ui_bg.c b/src/lib/elementary/efl_ui_bg.c
index 8455c3e..acde39f 100644
--- a/src/lib/elementary/efl_ui_bg.c
+++ b/src/lib/elementary/efl_ui_bg.c
@@ -218,6 +218,12 @@ _efl_ui_bg_efl_file_load(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd)
218 return efl_file_load(sd->img); 218 return efl_file_load(sd->img);
219} 219}
220 220
221EOLIAN static void
222_efl_ui_bg_efl_file_unload(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd)
223{
224 efl_file_unload(sd->img);
225}
226
221EOLIAN static Eina_Error 227EOLIAN static Eina_Error
222_efl_ui_bg_efl_file_file_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, const char *file) 228_efl_ui_bg_efl_file_file_set(Eo *obj EINA_UNUSED, Efl_Ui_Bg_Data *sd, const char *file)
223{ 229{
diff --git a/src/lib/elementary/efl_ui_bg.eo b/src/lib/elementary/efl_ui_bg.eo
index bc0ef7e..2d38a32 100644
--- a/src/lib/elementary/efl_ui_bg.eo
+++ b/src/lib/elementary/efl_ui_bg.eo
@@ -10,6 +10,7 @@ class @beta Efl.Ui.Bg extends Efl.Ui.Layout_Base implements Efl.File, Efl.Gfx.Co
10 Efl.Object.destructor; 10 Efl.Object.destructor;
11 Efl.Object.finalize; 11 Efl.Object.finalize;
12 Efl.File.load; 12 Efl.File.load;
13 Efl.File.unload;
13 Efl.File.file { get; set; } 14 Efl.File.file { get; set; }
14 Efl.File.key { get; set; } 15 Efl.File.key { get; set; }
15 Efl.File.mmap { get; set; } 16 Efl.File.mmap { get; set; }
diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c
index c0f1f8d..ee9ad07 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.c
+++ b/src/lib/elementary/efl_ui_image_zoomable.c
@@ -2314,6 +2314,25 @@ static Eina_Error
2314_efl_ui_image_zoomable_file_set_internal(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Evas_Load_Error *ret) 2314_efl_ui_image_zoomable_file_set_internal(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Evas_Load_Error *ret)
2315{ 2315{
2316 const char *file = efl_file_get(obj); 2316 const char *file = efl_file_get(obj);
2317 efl_file_unload(obj);
2318
2319 if (_efl_ui_image_zoomable_is_remote(file))
2320 {
2321 if (_efl_ui_image_zoomable_download(obj, sd, file))
2322 {
2323 efl_event_callback_legacy_call
2324 (obj, EFL_UI_IMAGE_ZOOMABLE_EVENT_DOWNLOAD_START, NULL);
2325 *ret = EVAS_LOAD_ERROR_NONE;
2326 return 0;
2327 }
2328 }
2329
2330 return _internal_file_set(obj, sd, ret);
2331}
2332
2333EOLIAN static void
2334_efl_ui_image_zoomable_efl_file_unload(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd)
2335{
2317 ELM_SAFE_FREE(sd->edje, evas_object_del); 2336 ELM_SAFE_FREE(sd->edje, evas_object_del);
2318 eina_stringshare_replace(&sd->stdicon, NULL); 2337 eina_stringshare_replace(&sd->stdicon, NULL);
2319 2338
@@ -2332,19 +2351,6 @@ _efl_ui_image_zoomable_file_set_internal(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd
2332 if (sd->remote.binbuf) ELM_SAFE_FREE(sd->remote.binbuf, eina_binbuf_free); 2351 if (sd->remote.binbuf) ELM_SAFE_FREE(sd->remote.binbuf, eina_binbuf_free);
2333 2352
2334 sd->preload_num = 0; 2353 sd->preload_num = 0;
2335
2336 if (_efl_ui_image_zoomable_is_remote(file))
2337 {
2338 if (_efl_ui_image_zoomable_download(obj, sd, file))
2339 {
2340 efl_event_callback_legacy_call
2341 (obj, EFL_UI_IMAGE_ZOOMABLE_EVENT_DOWNLOAD_START, NULL);
2342 *ret = EVAS_LOAD_ERROR_NONE;
2343 return 0;
2344 }
2345 }
2346
2347 return _internal_file_set(obj, sd, ret);
2348} 2354}
2349 2355
2350EOLIAN static Eina_Error 2356EOLIAN static Eina_Error
diff --git a/src/lib/elementary/efl_ui_image_zoomable.eo b/src/lib/elementary/efl_ui_image_zoomable.eo
index 6b4dccd..4669a4f 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.eo
+++ b/src/lib/elementary/efl_ui_image_zoomable.eo
@@ -64,6 +64,7 @@ class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom,
64 Efl.Ui.Scrollable_Interactive.scroll; 64 Efl.Ui.Scrollable_Interactive.scroll;
65 Efl.Access.Widget.Action.elm_actions { get; } 65 Efl.Access.Widget.Action.elm_actions { get; }
66 Efl.File.load; 66 Efl.File.load;
67 Efl.File.unload;
67 Efl.File.file { get; set; } 68 Efl.File.file { get; set; }
68 Efl.Gfx.Image_Orientable.image_orientation { get; set; } 69 Efl.Gfx.Image_Orientable.image_orientation { get; set; }
69 Efl.Layout.Group.group_size_min { get; } 70 Efl.Layout.Group.group_size_min { get; }
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 4f9409c..5cd990e 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -930,6 +930,17 @@ _parts_cursors_find(Efl_Ui_Layout_Data *sd,
930/* The public functions down here are meant to operate on whichever 930/* The public functions down here are meant to operate on whichever
931 * widget inheriting from elm_layout */ 931 * widget inheriting from elm_layout */
932 932
933EOLIAN static void
934_efl_ui_layout_efl_file_unload(Eo *obj, void *_pd EINA_UNUSED)
935{
936 Efl_Ui_Layout_Data *sd = efl_data_scope_get(obj, MY_CLASS);
937
938 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
939
940 efl_file_unload(wd->resize_obj);
941 sd->file_set = EINA_FALSE;
942}
943
933EOLIAN static Eina_Error 944EOLIAN static Eina_Error
934_efl_ui_layout_efl_file_load(Eo *obj, void *_pd EINA_UNUSED) 945_efl_ui_layout_efl_file_load(Eo *obj, void *_pd EINA_UNUSED)
935{ 946{
diff --git a/src/lib/elementary/efl_ui_layout.eo b/src/lib/elementary/efl_ui_layout.eo
index 7e3de17..0ebbb4e 100644
--- a/src/lib/elementary/efl_ui_layout.eo
+++ b/src/lib/elementary/efl_ui_layout.eo
@@ -19,6 +19,7 @@ class Efl.Ui.Layout extends Efl.Ui.Layout_Base implements Efl.File
19 Efl.File.key { get; set; } 19 Efl.File.key { get; set; }
20 Efl.File.mmap { get; set; } 20 Efl.File.mmap { get; set; }
21 Efl.File.load; 21 Efl.File.load;
22 Efl.File.unload;
22 Efl.Object.constructor; 23 Efl.Object.constructor;
23 Efl.Canvas.Group.group_calculate; 24 Efl.Canvas.Group.group_calculate;
24 } 25 }
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index 631cd1b..50bc480 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -2530,6 +2530,14 @@ _efl_ui_text_efl_file_file_set(Eo *obj, Efl_Ui_Text_Data *sd, const char *file)
2530 return efl_file_set(efl_super(obj, MY_CLASS), file); 2530 return efl_file_set(efl_super(obj, MY_CLASS), file);
2531} 2531}
2532 2532
2533EOLIAN static void
2534_efl_ui_text_efl_file_unload(Eo *obj, Efl_Ui_Text_Data *sd)
2535{
2536 efl_file_unload(efl_super(obj, MY_CLASS));
2537 ELM_SAFE_FREE(sd->delay_write, ecore_timer_del);
2538 elm_object_text_set(obj, "");
2539}
2540
2533EOLIAN static Eina_Error 2541EOLIAN static Eina_Error
2534_efl_ui_text_efl_file_load(Eo *obj, Efl_Ui_Text_Data *sd) 2542_efl_ui_text_efl_file_load(Eo *obj, Efl_Ui_Text_Data *sd)
2535{ 2543{
diff --git a/src/lib/elementary/efl_ui_text.eo b/src/lib/elementary/efl_ui_text.eo
index a7ec16e..cc94852 100644
--- a/src/lib/elementary/efl_ui_text.eo
+++ b/src/lib/elementary/efl_ui_text.eo
@@ -352,6 +352,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
352 Efl.Access.Editable.Text.paste; 352 Efl.Access.Editable.Text.paste;
353 Efl.File.file { set; } 353 Efl.File.file { set; }
354 Efl.File.load; 354 Efl.File.load;
355 Efl.File.unload;
355 Efl.Text_Interactive.editable { set; } 356 Efl.Text_Interactive.editable { set; }
356 Efl.Part.part_get; 357 Efl.Part.part_get;
357 } 358 }
diff --git a/src/lib/elementary/efl_ui_video.c b/src/lib/elementary/efl_ui_video.c
index a80ce0a..ccee479 100644
--- a/src/lib/elementary/efl_ui_video.c
+++ b/src/lib/elementary/efl_ui_video.c
@@ -288,6 +288,19 @@ _efl_ui_video_efl_object_constructor(Eo *obj, Efl_Ui_Video_Data *_pd EINA_UNUSED
288 return obj; 288 return obj;
289} 289}
290 290
291EOLIAN static void
292_efl_ui_video_efl_file_unload(Eo *obj, Efl_Ui_Video_Data *sd)
293{
294 if (sd->remember) emotion_object_last_position_save(sd->emotion);
295 sd->stop = EINA_FALSE;
296 efl_file_unload(sd->emotion);
297
298 if(elm_widget_is_legacy(obj))
299 elm_layout_signal_emit(obj, "elm,video,stop", "elm");
300 else
301 elm_layout_signal_emit(obj, "efl,video,stop", "efl");
302}
303
291EOLIAN static Eina_Error 304EOLIAN static Eina_Error
292_efl_ui_video_efl_file_load(Eo *obj, Efl_Ui_Video_Data *sd) 305_efl_ui_video_efl_file_load(Eo *obj, Efl_Ui_Video_Data *sd)
293{ 306{
diff --git a/src/lib/elementary/efl_ui_video.eo b/src/lib/elementary/efl_ui_video.eo
index 9ecdc35..d6b42f9 100644
--- a/src/lib/elementary/efl_ui_video.eo
+++ b/src/lib/elementary/efl_ui_video.eo
@@ -42,6 +42,7 @@ class @beta Efl.Ui.Video extends Efl.Ui.Layout_Base implements Efl.File, Efl.Pla
42 implements { 42 implements {
43 Efl.Object.constructor; 43 Efl.Object.constructor;
44 Efl.File.load; 44 Efl.File.load;
45 Efl.File.unload;
45 Efl.Canvas.Group.group_calculate; 46 Efl.Canvas.Group.group_calculate;
46 Efl.Ui.Widget.widget_input_event_handler; 47 Efl.Ui.Widget.widget_input_event_handler;
47 Efl.Access.Widget.Action.elm_actions { get; } 48 Efl.Access.Widget.Action.elm_actions { get; }
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index f116b98..997d781 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -5693,6 +5693,14 @@ _efl_ui_widget_part_bg_efl_file_load(Eo *obj, void *pd EINA_UNUSED)
5693 return efl_file_load(bg_obj); 5693 return efl_file_load(bg_obj);
5694} 5694}
5695 5695
5696EOLIAN static void
5697_efl_ui_widget_part_bg_efl_file_unload(Eo *obj, void *pd EINA_UNUSED)
5698{
5699 Evas_Object *bg_obj = efl_ui_widget_part_bg_get(obj);
5700
5701 efl_file_unload(bg_obj);
5702}
5703
5696EOLIAN static const char * 5704EOLIAN static const char *
5697_efl_ui_widget_part_bg_efl_file_file_get(const Eo *obj, void *pd EINA_UNUSED) 5705_efl_ui_widget_part_bg_efl_file_file_get(const Eo *obj, void *pd EINA_UNUSED)
5698{ 5706{
diff --git a/src/lib/elementary/efl_ui_widget_part_bg.eo b/src/lib/elementary/efl_ui_widget_part_bg.eo
index 94f87b8..3ed5d54 100644
--- a/src/lib/elementary/efl_ui_widget_part_bg.eo
+++ b/src/lib/elementary/efl_ui_widget_part_bg.eo
@@ -7,6 +7,7 @@ class @beta Efl.Ui.Widget_Part_Bg extends Efl.Ui.Widget_Part implements Efl.File
7 Efl.File.key { get; set; } 7 Efl.File.key { get; set; }
8 Efl.File.mmap { get; set; } 8 Efl.File.mmap { get; set; }
9 Efl.File.load; 9 Efl.File.load;
10 Efl.File.unload;
10 Efl.Gfx.Color.color { set; get; } 11 Efl.Gfx.Color.color { set; get; }
11 Efl.Gfx.Image.scale_type { get; set; } 12 Efl.Gfx.Image.scale_type { get; set; }
12 } 13 }
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 7202077..58af84b 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -7706,6 +7706,19 @@ _efl_ui_win_part_color_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char
7706 return EINA_FALSE; 7706 return EINA_FALSE;
7707} 7707}
7708 7708
7709static void
7710_efl_ui_win_part_file_unload(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eo *part_obj EINA_UNUSED, const char *part)
7711{
7712 sd->legacy.forbidden = EINA_TRUE;
7713 if (eina_streq(part, "background"))
7714 {
7715 _elm_win_bg_set(sd, NULL);
7716 return;
7717 }
7718
7719 WIN_PART_ERR(part);
7720}
7721
7709static Eina_Error 7722static Eina_Error
7710_efl_ui_win_part_file_load(Eo *obj, Efl_Ui_Win_Data *sd, Eo *part_obj, const char *part) 7723_efl_ui_win_part_file_load(Eo *obj, Efl_Ui_Win_Data *sd, Eo *part_obj, const char *part)
7711{ 7724{
@@ -7815,6 +7828,14 @@ _efl_ui_win_part_efl_file_key_get(const Eo *obj, void *_pd EINA_UNUSED)
7815 return _efl_ui_win_part_file_key_get(pd->obj, sd, obj, pd->part); 7828 return _efl_ui_win_part_file_key_get(pd->obj, sd, obj, pd->part);
7816} 7829}
7817 7830
7831EOLIAN static void
7832_efl_ui_win_part_efl_file_unload(Eo *obj, void *_pd EINA_UNUSED)
7833{
7834 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
7835 Efl_Ui_Win_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
7836 return _efl_ui_win_part_file_unload(pd->obj, sd, obj, pd->part);
7837}
7838
7818EOLIAN static Eina_Error 7839EOLIAN static Eina_Error
7819_efl_ui_win_part_efl_file_load(Eo *obj, void *_pd EINA_UNUSED) 7840_efl_ui_win_part_efl_file_load(Eo *obj, void *_pd EINA_UNUSED)
7820{ 7841{
diff --git a/src/lib/elementary/efl_ui_win_part.eo b/src/lib/elementary/efl_ui_win_part.eo
index ea9d09f..380b041 100644
--- a/src/lib/elementary/efl_ui_win_part.eo
+++ b/src/lib/elementary/efl_ui_win_part.eo
@@ -7,6 +7,7 @@ class @beta Efl.Ui.Win_Part extends Efl.Ui.Widget_Part implements Efl.Content, E
7 Efl.Content.content_unset; 7 Efl.Content.content_unset;
8 Efl.Gfx.Color.color { get; set; } 8 Efl.Gfx.Color.color { get; set; }
9 Efl.File.load; 9 Efl.File.load;
10 Efl.File.unload;
10 Efl.File.file { get; } 11 Efl.File.file { get; }
11 Efl.File.key { get; } 12 Efl.File.key { get; }
12 } 13 }
diff --git a/src/lib/elementary/elm_photo.c b/src/lib/elementary/elm_photo.c
index 765ede2..9fc5933 100644
--- a/src/lib/elementary/elm_photo.c
+++ b/src/lib/elementary/elm_photo.c
@@ -335,6 +335,13 @@ _elm_photo_efl_object_constructor(Eo *obj, Elm_Photo_Data *_pd EINA_UNUSED)
335 return obj; 335 return obj;
336} 336}
337 337
338EOLIAN static void
339_elm_photo_efl_file_unload(Eo *obj, Elm_Photo_Data *sd)
340{
341 elm_icon_standard_set(sd->icon, "no_photo");
342 _sizing_eval(obj);
343}
344
338EOLIAN static Eina_Error 345EOLIAN static Eina_Error
339_elm_photo_efl_file_load(Eo *obj, Elm_Photo_Data *sd) 346_elm_photo_efl_file_load(Eo *obj, Elm_Photo_Data *sd)
340{ 347{
diff --git a/src/lib/elementary/elm_photo_eo.c b/src/lib/elementary/elm_photo_eo.c
index 6d46584..59b6ef1 100644
--- a/src/lib/elementary/elm_photo_eo.c
+++ b/src/lib/elementary/elm_photo_eo.c
@@ -56,6 +56,7 @@ _elm_photo_class_initializer(Efl_Class *klass)
56 EFL_OBJECT_OP_FUNC(efl_file_mmap_set, _elm_photo_efl_file_mmap_set), 56 EFL_OBJECT_OP_FUNC(efl_file_mmap_set, _elm_photo_efl_file_mmap_set),
57 EFL_OBJECT_OP_FUNC(efl_file_mmap_get, _elm_photo_efl_file_mmap_get), 57 EFL_OBJECT_OP_FUNC(efl_file_mmap_get, _elm_photo_efl_file_mmap_get),
58 EFL_OBJECT_OP_FUNC(efl_file_load, _elm_photo_efl_file_load), 58 EFL_OBJECT_OP_FUNC(efl_file_load, _elm_photo_efl_file_load),
59 EFL_OBJECT_OP_FUNC(efl_file_unload, _elm_photo_efl_file_unload),
59 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_photo_efl_ui_widget_theme_apply), 60 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_photo_efl_ui_widget_theme_apply),
60 EFL_OBJECT_OP_FUNC(efl_ui_draggable_drag_target_set, _elm_photo_efl_ui_draggable_drag_target_set), 61 EFL_OBJECT_OP_FUNC(efl_ui_draggable_drag_target_set, _elm_photo_efl_ui_draggable_drag_target_set),
61 EFL_OBJECT_OP_FUNC(efl_ui_draggable_drag_target_get, _elm_photo_efl_ui_draggable_drag_target_get), 62 EFL_OBJECT_OP_FUNC(efl_ui_draggable_drag_target_get, _elm_photo_efl_ui_draggable_drag_target_get),
diff --git a/src/lib/elementary/elm_thumb.c b/src/lib/elementary/elm_thumb.c
index 98f6541..555ff01 100644
--- a/src/lib/elementary/elm_thumb.c
+++ b/src/lib/elementary/elm_thumb.c
@@ -634,6 +634,36 @@ _elm_thumb_efl_file_loaded_get(const Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd)
634 return sd->loaded; 634 return sd->loaded;
635} 635}
636 636
637EOLIAN static void
638_elm_thumb_efl_file_unload(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd)
639{
640 sd->is_video = EINA_FALSE;
641 eina_stringshare_replace(&(sd->thumb.file), NULL);
642 eina_stringshare_replace(&(sd->thumb.key), NULL);
643 sd->loaded = EINA_FALSE;
644
645 if (sd->thumb.request)
646 {
647 ethumb_client_thumb_async_cancel(_elm_ethumb_client, sd->thumb.request);
648 sd->thumb.request = NULL;
649 }
650 if (sd->thumb.retry)
651 {
652 retry = eina_list_remove(retry, sd);
653 efl_data_unref(sd->obj, sd);
654 sd->thumb.retry = EINA_FALSE;
655 }
656 evas_object_event_callback_del_full(sd->view, EVAS_CALLBACK_IMAGE_PRELOADED,
657 _on_thumb_preloaded, sd);
658
659 ELM_SAFE_FREE(sd->view, evas_object_del);
660 eina_stringshare_replace(&sd->thumb.thumb_path, NULL);
661 eina_stringshare_replace(&sd->thumb.thumb_key, NULL);
662
663 ELM_SAFE_FREE(sd->eeh, ecore_event_handler_del);
664
665}
666
637EOLIAN static Eina_Error 667EOLIAN static Eina_Error
638_elm_thumb_efl_file_load(Eo *obj, Elm_Thumb_Data *sd) 668_elm_thumb_efl_file_load(Eo *obj, Elm_Thumb_Data *sd)
639{ 669{
diff --git a/src/lib/elementary/elm_thumb_eo.c b/src/lib/elementary/elm_thumb_eo.c
index c94e123..1741e19 100644
--- a/src/lib/elementary/elm_thumb_eo.c
+++ b/src/lib/elementary/elm_thumb_eo.c
@@ -57,6 +57,7 @@ _elm_thumb_class_initializer(Efl_Class *klass)
57 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_thumb_efl_object_constructor), 57 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_thumb_efl_object_constructor),
58 EFL_OBJECT_OP_FUNC(efl_finalize, _elm_thumb_efl_object_finalize), 58 EFL_OBJECT_OP_FUNC(efl_finalize, _elm_thumb_efl_object_finalize),
59 EFL_OBJECT_OP_FUNC(efl_file_load, _elm_thumb_efl_file_load), 59 EFL_OBJECT_OP_FUNC(efl_file_load, _elm_thumb_efl_file_load),
60 EFL_OBJECT_OP_FUNC(efl_file_unload, _elm_thumb_efl_file_unload),
60 EFL_OBJECT_OP_FUNC(efl_file_loaded_get, _elm_thumb_efl_file_loaded_get), 61 EFL_OBJECT_OP_FUNC(efl_file_loaded_get, _elm_thumb_efl_file_loaded_get),
61 EFL_OBJECT_OP_FUNC(efl_file_set, _elm_thumb_efl_file_file_set), 62 EFL_OBJECT_OP_FUNC(efl_file_set, _elm_thumb_efl_file_file_set),
62 EFL_OBJECT_OP_FUNC(efl_file_get, _elm_thumb_efl_file_file_get), 63 EFL_OBJECT_OP_FUNC(efl_file_get, _elm_thumb_efl_file_file_get),
diff --git a/src/lib/emotion/efl_canvas_video.eo b/src/lib/emotion/efl_canvas_video.eo
index 3aa165f..be94fcc 100644
--- a/src/lib/emotion/efl_canvas_video.eo
+++ b/src/lib/emotion/efl_canvas_video.eo
@@ -52,6 +52,7 @@ class @beta Efl.Canvas.Video extends Efl.Canvas.Group implements Efl.File, Efl.P
52 Efl.Gfx.Entity.position { set; } 52 Efl.Gfx.Entity.position { set; }
53 Efl.Gfx.Entity.size { set; } 53 Efl.Gfx.Entity.size { set; }
54 Efl.File.load; 54 Efl.File.load;
55 Efl.File.unload;
55 Efl.File.file { set; } 56 Efl.File.file { set; }
56 Efl.File.loaded { get; } 57 Efl.File.loaded { get; }
57 Efl.Player.play { get; set; } 58 Efl.Player.play { get; set; }
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index d733e41..a7a8fa8 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -366,6 +366,22 @@ _efl_canvas_video_efl_file_loaded_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vide
366 return sd->open && sd->loaded; 366 return sd->open && sd->loaded;
367} 367}
368 368
369EOLIAN static void
370_efl_canvas_video_efl_file_unload(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
371{
372 if (sd->engine_instance) emotion_engine_instance_file_close(sd->engine_instance);
373 sd->engine_instance = NULL;
374 evas_object_image_data_set(sd->obj, NULL);
375 evas_object_image_size_set(sd->obj, 1, 1);
376 _emotion_image_data_zero(sd->obj);
377
378 if (sd->anim) ecore_animator_del(sd->anim);
379 sd->anim = NULL;
380
381 _xattr_data_cancel(sd->xattr);
382 sd->loaded = 0;
383}
384
369EOLIAN static Eina_Error 385EOLIAN static Eina_Error
370_efl_canvas_video_efl_file_load(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd) 386_efl_canvas_video_efl_file_load(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
371{ 387{
@@ -410,7 +426,6 @@ _efl_canvas_video_efl_file_load(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
410 evas_object_image_data_set(sd->obj, NULL); 426 evas_object_image_data_set(sd->obj, NULL);
411 evas_object_image_size_set(sd->obj, 1, 1); 427 evas_object_image_size_set(sd->obj, 1, 1);
412 _emotion_image_data_zero(sd->obj); 428 _emotion_image_data_zero(sd->obj);
413 eina_stringshare_replace(&sd->file, NULL);
414 } 429 }
415 430
416 if (sd->anim) ecore_animator_del(sd->anim); 431 if (sd->anim) ecore_animator_del(sd->anim);
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.c b/src/lib/evas/canvas/evas_canvas3d_mesh.c
index bdf50e0d..64dd5f9 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.c
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.c
@@ -861,6 +861,13 @@ _evas_canvas3d_mesh_alpha_test_enable_get(const Eo *obj EINA_UNUSED, Evas_Canvas
861 return pd->alpha_test_enabled; 861 return pd->alpha_test_enabled;
862} 862}
863 863
864EOLIAN static void
865_evas_canvas3d_mesh_efl_file_unload(Eo *obj, Evas_Canvas3D_Mesh_Data *pd)
866{
867 efl_file_unload(efl_super(obj, MY_CLASS));
868 _mesh_fini(pd);
869}
870
864EOLIAN static Eina_Error 871EOLIAN static Eina_Error
865_evas_canvas3d_mesh_efl_file_load(Eo *obj, Evas_Canvas3D_Mesh_Data *pd) 872_evas_canvas3d_mesh_efl_file_load(Eo *obj, Evas_Canvas3D_Mesh_Data *pd)
866{ 873{
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.eo b/src/lib/evas/canvas/evas_canvas3d_mesh.eo
index f30037d..bf51fe3 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.eo
@@ -427,6 +427,7 @@ class @beta Evas.Canvas3D.Mesh extends Evas.Canvas3D.Object implements Efl.File,
427 Evas.Canvas3D.Object.update_notify; 427 Evas.Canvas3D.Object.update_notify;
428 Evas.Canvas3D.Object.change_notify; 428 Evas.Canvas3D.Object.change_notify;
429 Efl.File.load; 429 Efl.File.load;
430 Efl.File.unload;
430 Efl.File_Save.save; 431 Efl.File_Save.save;
431 @empty Evas.Canvas3D.Object.callback_register; 432 @empty Evas.Canvas3D.Object.callback_register;
432 @empty Evas.Canvas3D.Object.callback_unregister; 433 @empty Evas.Canvas3D.Object.callback_unregister;
diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.c b/src/lib/evas/canvas/evas_canvas3d_texture.c
index 7154e7e..0381c87 100644
--- a/src/lib/evas/canvas/evas_canvas3d_texture.c
+++ b/src/lib/evas/canvas/evas_canvas3d_texture.c
@@ -373,6 +373,15 @@ _evas_canvas3d_texture_data_set(Eo *obj, Evas_Canvas3D_Texture_Data *pd,
373 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_TEXTURE_DATA, NULL); 373 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_TEXTURE_DATA, NULL);
374} 374}
375 375
376EOLIAN static void
377_evas_canvas3d_texture_efl_file_unload(Eo *obj, Evas_Canvas3D_Texture_Data *pd)
378{
379 efl_file_unload(efl_super(obj, MY_CLASS));
380 eina_file_close(pd->f); // close matching open (matches open in _evas_canvas3d_texture_efl_file_load) OK
381 pd->f = NULL;
382 _texture_fini(obj);
383}
384
376EOLIAN static Eina_Error 385EOLIAN static Eina_Error
377_evas_canvas3d_texture_efl_file_load(Eo *obj, Evas_Canvas3D_Texture_Data *pd) 386_evas_canvas3d_texture_efl_file_load(Eo *obj, Evas_Canvas3D_Texture_Data *pd)
378{ 387{
diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.eo b/src/lib/evas/canvas/evas_canvas3d_texture.eo
index 8aed886..61ae3ca 100644
--- a/src/lib/evas/canvas/evas_canvas3d_texture.eo
+++ b/src/lib/evas/canvas/evas_canvas3d_texture.eo
@@ -156,6 +156,7 @@ class @beta Evas.Canvas3D.Texture extends Evas.Canvas3D.Object implements Efl.Fi
156 Evas.Canvas3D.Object.update_notify; 156 Evas.Canvas3D.Object.update_notify;
157 Evas.Canvas3D.Object.change_notify; 157 Evas.Canvas3D.Object.change_notify;
158 Efl.File.load; 158 Efl.File.load;
159 Efl.File.unload;
159 @empty Evas.Canvas3D.Object.callback_register; 160 @empty Evas.Canvas3D.Object.callback_register;
160 @empty Evas.Canvas3D.Object.callback_unregister; 161 @empty Evas.Canvas3D.Object.callback_unregister;
161 } 162 }