ephysics: pass evas object associated to body on del
authorBruno Dilly <bdilly@profusion.mobi>
Tue, 4 Sep 2012 22:42:20 +0000 (22:42 +0000)
committerBruno Dilly <bdilly@profusion.mobi>
Tue, 4 Sep 2012 22:42:20 +0000 (22:42 +0000)
 event

SVN revision: 76153

legacy/ephysics/src/lib/EPhysics.h
legacy/ephysics/src/lib/ephysics_body.cpp

index fd3577e..76250b9 100644 (file)
@@ -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
index 008b309..29c38dd 100644 (file)
@@ -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);
 }