From: raster Date: Wed, 4 Jan 2012 04:35:37 +0000 (+0000) Subject: add the actual recalc smart callback code and docs. X-Git-Tag: submit/2.0alpha-wayland/20121127.221958~457 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=575a462c281955ad4c9098cf9ab9db3ae72a0311;p=profile%2Fivi%2Fedje.git add the actual recalc smart callback code and docs. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@66843 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/Edje.h b/src/lib/Edje.h index 2848eb5..a1ee420 100644 --- a/src/lib/Edje.h +++ b/src/lib/Edje.h @@ -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. */ diff --git a/src/lib/edje_calc.c b/src/lib/edje_calc.c index 208a56b..5f84b64 100644 --- a/src/lib/edje_calc.c +++ b/src/lib/edje_calc.c @@ -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