add the actual recalc smart callback code and docs.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 4 Jan 2012 04:35:37 +0000 (04:35 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 4 Jan 2012 04:35:37 +0000 (04:35 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@66843 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/Edje.h
src/lib/edje_calc.c

index 2848eb5..a1ee420 100644 (file)
@@ -1653,8 +1653,21 @@ EAPI void         edje_box_layout_register        (const char *name, Evas_Object
  *   }
  *
  * @endcode
+ * 
+ * @note You can get a callback every time edje re-calculates the object
+ * (either due to animation or some kind of signal or input). This is called
+ * in-line just after the recalculation has occured. It is a good idea not
+ * to go and delete or alter the object inside this callbacks, simply make
+ * a note that the recalculation has taken place and then do somethnig about
+ * it outside the callback. to register a callback use code like:
+ * 
+ * @code
+ *    evas_object_smart_callback_add(edje_obj, "recalc", my_cb, my_cb_data);
+ * @endcode
+ * 
+ * @see evas_object_smart_callback_add()
  *
- * @note before creating the first Edje object in your code, remember
+ * @note Before creating the first Edje object in your code, remember
  * to initialize the library, with edje_init(), or unexpected behavior
  * might occur.
  */
index 208a56b..5f84b64 100644 (file)
@@ -460,6 +460,7 @@ _edje_recalc_do(Edje *ed)
    ed->all_part_change = 0;
    ed->text_part_change = 0;
 #endif
+   evas_object_smart_callback_call(ed->obj, "recalc", NULL);
 }
 
 void