summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_smart.c
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 /src/lib/edje/edje_smart.c
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
Diffstat (limited to 'src/lib/edje/edje_smart.c')
-rw-r--r--src/lib/edje/edje_smart.c23
1 files changed, 23 insertions, 0 deletions
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{