From: Bruno Dilly Date: Tue, 4 Sep 2012 22:42:20 +0000 (+0000) Subject: ephysics: pass evas object associated to body on del X-Git-Tag: submit/devel/efl/20131022.203902~4396 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06d88ea8341c17f64b7f5910314bb8c475e6c813;p=platform%2Fupstream%2Fefl.git ephysics: pass evas object associated to body on del event SVN revision: 76153 --- diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h index fd3577e..76250b9 100644 --- a/legacy/ephysics/src/lib/EPhysics.h +++ b/legacy/ephysics/src/lib/EPhysics.h @@ -1984,11 +1984,6 @@ EAPI void ephysics_body_evas_object_update(EPhysics_Body *body); * * So it's enough to do customized updates or fix pointers in your program. * - * Regarding EPHYSICS_CALLBACK_BODY_DEL: - * - * Registered callbacks will be called before body is freed. - * No event_info is passed. - * * Regarding EPHYSICS_CALLBACK_BODY_UPDATE: * * This update event happens after each physics world tick. Its main use @@ -2035,7 +2030,8 @@ EAPI void ephysics_body_evas_object_update(EPhysics_Body *body); * * - #EPHYSICS_CALLBACK_BODY_DEL: Called when a body deletion has been issued * and just before the deletion actually happens. @p body points to the body - * being deleted and no @p event_info is provided. + * being deleted and @p event_info is a pointer to the evas object + * associated to it. * * - #EPHYSICS_CALLBACK_BODY_STOPPED: Called when a body is found to be * stopped. @p body points to the body of interest and @p event_info is a diff --git a/legacy/ephysics/src/lib/ephysics_body.cpp b/legacy/ephysics/src/lib/ephysics_body.cpp index 008b309..29c38dd 100644 --- a/legacy/ephysics/src/lib/ephysics_body.cpp +++ b/legacy/ephysics/src/lib/ephysics_body.cpp @@ -1079,7 +1079,8 @@ ephysics_orphan_body_del(EPhysics_Body *body) { EPhysics_Body_Callback *cb; - _ephysics_body_event_callback_call(body, EPHYSICS_CALLBACK_BODY_DEL, NULL); + _ephysics_body_event_callback_call(body, EPHYSICS_CALLBACK_BODY_DEL, + (void *) body->evas_obj); _ephysics_body_del(body); INF("Body %p deleted.", body); }