On Sat, Dec 8, 2012 at 7:21 AM, Enlightenment SVN
<[email protected]> wrote:
> Log:
> edje: use eo more.
>
>
> Author: cedric
> Date: 2012-12-08 01:21:10 -0800 (Sat, 08 Dec 2012)
> New Revision: 80519
> Trac: http://trac.enlightenment.org/e/changeset/80519
>
> Modified:
> trunk/edje/src/lib/edje_calc.c
>
> Modified: trunk/edje/src/lib/edje_calc.c
> ===================================================================
> --- trunk/edje/src/lib/edje_calc.c 2012-12-08 08:53:38 UTC (rev 80518)
> +++ trunk/edje/src/lib/edje_calc.c 2012-12-08 09:21:10 UTC (rev 80519)
> @@ -676,8 +676,9 @@
>
> ed->recalc_hints = EINA_FALSE;
>
> - edje_object_size_min_calc(ed->obj, &w, &h);
> - evas_object_size_hint_min_set(ed->obj, w, h);
> + eo_do(ed->obj,
> + edje_obj_size_min_get(&w, &h),
> + evas_obj_size_hint_min_set(w, h));
Hey Cedric, you are changin from size_min_calc to size_min_get here ^
Is this intended ?
> }
>
> if (!ed->collection) return ;
> @@ -1230,9 +1231,9 @@
> tw = th = 0;
> if (!chosen_desc->text.min_x)
> {
> - evas_object_resize(ep->object, params->w, params->h);
> - evas_object_textblock_size_formatted_get(ep->object,
> &tw,
> - &th);
> + eo_do(ep->object,
> + evas_obj_size_set(params->w, params->h),
> + evas_obj_textblock_size_formatted_get(&tw, &th));
> }
> else
> evas_object_textblock_size_native_get(ep->object, &tw,
> &th);
> @@ -1257,8 +1258,9 @@
> tw = th = 0;
> if (!chosen_desc->text.max_x)
> {
> - evas_object_resize(ep->object, params->w, params->h);
> - evas_object_textblock_size_formatted_get(ep->object, &tw,
> &th);
> + eo_do(ep->object,
> + evas_obj_size_set(params->w, params->h),
> + evas_obj_textblock_size_formatted_get(&tw, &th));
> }
> else
> evas_object_textblock_size_native_get(ep->object, &tw, &th);
> @@ -1282,16 +1284,17 @@
> double s = 1.0;
>
> if (ep->part->scale) s = TO_DOUBLE(sc);
> - evas_object_scale_set(ep->object, s);
> - evas_object_textblock_size_formatted_get(ep->object, &tw, &th);
> + eo_do(ep->object,
> + evas_obj_scale_set(s),
> + evas_obj_textblock_size_formatted_get(&tw, &th));
> if (chosen_desc->text.fit_x)
> {
> if ((tw > 0) && (tw > params->w))
> {
> s = (s * params->w) / (double)tw;
> - evas_object_scale_set(ep->object, s);
> - evas_object_textblock_size_formatted_get(ep->object,
> - &tw, &th);
> + eo_do(ep->object,
> + evas_obj_scale_set(s),
> + evas_obj_textblock_size_formatted_get(&tw, &th));
> }
> }
> if (chosen_desc->text.fit_y)
> @@ -1299,9 +1302,9 @@
> if ((th > 0) && (th > params->h))
> {
> s = (s * params->h) / (double)th;
> - evas_object_scale_set(ep->object, s);
> - evas_object_textblock_size_formatted_get(ep->object,
> - &tw, &th);
> + eo_do(ep->object,
> + evas_obj_scale_set(s),
> + evas_obj_textblock_size_formatted_get(&tw, &th));
> }
> }
> }
> @@ -1373,8 +1376,9 @@
> (!chosen_desc->text.max_x) && (!chosen_desc->text.max_y)))
> return;
>
> - evas_object_geometry_get(ep->object, NULL, NULL, &tw, &th);
> - evas_object_text_style_pad_get(ep->object, &l, &r, &t, &b);
> + eo_do(ep->object,
> + evas_obj_size_get(&tw, &th),
> + evas_obj_text_style_pad_get(&l, &r, &t, &b));
>
> mw = tw + l + r;
> mh = th + t + b;
> @@ -1533,9 +1537,10 @@
> [(ep->part->effect & EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION)
> >> 4];
> EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(style, shadow);
>
> - evas_object_text_style_set(ep->object, style);
> - evas_object_text_text_set(ep->object, text);
> - evas_object_geometry_get(ep->object, NULL, NULL, &tw, &th);
> + eo_do(ep->object,
> + evas_obj_text_style_set(style),
> + evas_obj_text_text_set(text),
> + evas_obj_size_get(&tw, &th));
> if (chosen_desc->text.max_x)
> {
> int l, r;
> @@ -2121,9 +2126,10 @@
> {
> Evas_Coord lminw = 0, lminh = 0;
>
> - evas_object_smart_need_recalculate_set(ep->object, 1);
> - evas_object_smart_calculate(ep->object);
> - evas_object_size_hint_min_get(ep->object, &lminw, &lminh);
> + eo_do(ep->object,
> + evas_obj_smart_need_recalculate_set(1),
> + evas_obj_smart_calculate(),
> + evas_obj_size_hint_min_get(&lminw, &lminh));
> if (((Edje_Part_Description_Table *)chosen_desc)->table.min.h)
> {
> if (lminw > minw) minw = lminw;
> @@ -2139,9 +2145,10 @@
> {
> Evas_Coord lminw = 0, lminh = 0;
>
> - evas_object_smart_need_recalculate_set(ep->object, 1);
> - evas_object_smart_calculate(ep->object);
> - evas_object_size_hint_min_get(ep->object, &lminw, &lminh);
> + eo_do(ep->object,
> + evas_obj_smart_need_recalculate_set(1),
> + evas_obj_smart_calculate(),
> + evas_obj_size_hint_min_get(&lminw, &lminh));
> if (((Edje_Part_Description_Box *)chosen_desc)->box.min.h)
> {
> if (lminw > minw) minw = lminw;
> @@ -2308,13 +2315,15 @@
> Edje_Calc_Params *p3 __UNUSED__,
> Edje_Part_Description_Table *chosen_desc)
> {
> - evas_object_table_homogeneous_set(ep->object,
> chosen_desc->table.homogeneous);
> - evas_object_table_align_set(ep->object,
> TO_DOUBLE(chosen_desc->table.align.x), TO_DOUBLE(chosen_desc->table.align.y));
> - evas_object_table_padding_set(ep->object, chosen_desc->table.padding.x,
> chosen_desc->table.padding.y);
> + eo_do(ep->object,
> + evas_obj_table_homogeneous_set(chosen_desc->table.homogeneous),
> + evas_obj_table_align_set(TO_DOUBLE(chosen_desc->table.align.x),
> TO_DOUBLE(chosen_desc->table.align.y)),
> + evas_obj_table_padding_set(chosen_desc->table.padding.x,
> chosen_desc->table.padding.y));
> if (evas_object_smart_need_recalculate_get(ep->object))
> {
> - evas_object_smart_need_recalculate_set(ep->object, 0);
> - evas_object_smart_calculate(ep->object);
> + eo_do(ep->object,
> + evas_obj_smart_need_recalculate_set(0),
> + evas_obj_smart_calculate());
> }
> }
>
> @@ -2372,9 +2381,10 @@
> }
> }
>
> - evas_object_image_fill_set(ep->object, p3->type.common.fill.x,
> p3->type.common.fill.y,
> - p3->type.common.fill.w,
> p3->type.common.fill.h);
> - evas_object_image_smooth_scale_set(ep->object, p3->smooth);
> + eo_do(ep->object,
> + evas_obj_image_fill_set(p3->type.common.fill.x,
> p3->type.common.fill.y,
> + p3->type.common.fill.w,
> p3->type.common.fill.h),
> + evas_obj_image_smooth_scale_set(p3->smooth));
> }
>
> static void
> @@ -2384,9 +2394,10 @@
>
> sc = ed->scale;
> if (sc == 0.0) sc = _edje_scale;
> - evas_object_image_fill_set(ep->object, p3->type.common.fill.x,
> p3->type.common.fill.y,
> - p3->type.common.fill.w,
> p3->type.common.fill.h);
> - evas_object_image_smooth_scale_set(ep->object, p3->smooth);
> + eo_do(ep->object,
> + evas_obj_image_fill_set(p3->type.common.fill.x,
> p3->type.common.fill.y,
> + p3->type.common.fill.w,
> p3->type.common.fill.h),
> + evas_obj_image_smooth_scale_set(p3->smooth));
> if (chosen_desc->image.border.scale)
> {
> if (p3->type.common.spec.image.border_scale_by > FROM_DOUBLE(0.0))
> @@ -3149,15 +3160,16 @@
> }
> else
> #endif
> - evas_object_move(ep->object, ed->x + pf->x, ed->y + pf->y);
> - evas_object_resize(ep->object, pf->w, pf->h);
> + eo_do(ep->object,
> + evas_obj_position_set(ed->x + pf->x, ed->y + pf->y),
> + evas_obj_size_set(pf->w, pf->h));
This one breaks physics support. I've already fixed it on svn.
Regards
>
> if (ep->nested_smart)
> { /* Move, Resize all nested parts */
> /* Not really needed but will improve the bounding box
> evaluation done by Evas */
> - evas_object_move(ep->nested_smart,
> - ed->x + pf->x, ed->y + pf->y);
> - evas_object_resize(ep->nested_smart, pf->w, pf->h);
> + eo_do(ep->nested_smart,
> + evas_obj_position_set(ed->x + pf->x, ed->y + pf->y),
> + evas_obj_size_set(pf->w, pf->h));
> }
> if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
> _edje_entry_real_part_configure(ep);
> @@ -3225,9 +3237,10 @@
> // pf->color.a);
> if (pf->visible)
> {
> - evas_object_move(ep->typedata.swallow->swallowed_object,
> ed->x + pf->x, ed->y + pf->y);
> - evas_object_resize(ep->typedata.swallow->swallowed_object,
> pf->w, pf->h);
> - evas_object_show(ep->typedata.swallow->swallowed_object);
> + eo_do(ep->typedata.swallow->swallowed_object,
> + evas_obj_position_set(ed->x + pf->x, ed->y + pf->y),
> + evas_obj_size_set(pf->w, pf->h),
> + evas_obj_visibility_set(EINA_TRUE));
> }
> else evas_object_hide(ep->typedata.swallow->swallowed_object);
> mo = ep->typedata.swallow->swallowed_object;
> @@ -3300,21 +3313,24 @@
>
> if (ep->nested_smart)
> { /* Apply map to smart obj holding nested parts */
> - evas_object_map_set(ep->nested_smart, map);
> - evas_object_map_enable_set(ep->nested_smart, 1);
> + eo_do(ep->nested_smart,
> + evas_obj_map_set(map),
> + evas_obj_map_enable_set(1));
> }
> else
> {
> - evas_object_map_set(mo, map);
> - evas_object_map_enable_set(mo, 1);
> + eo_do(mo,
> + evas_obj_map_set(map),
> + evas_obj_map_enable_set(1));
> }
> }
> else
> {
> if (ep->nested_smart)
> { /* Cancel map of smart obj holding nested parts */
> - evas_object_map_enable_set(ep->nested_smart, 0);
> - evas_object_map_set(ep->nested_smart, NULL);
> + eo_do(ep->nested_smart,
> + evas_obj_map_enable_set(0),
> + evas_obj_map_set(NULL));
> }
> else
> {
> @@ -3322,8 +3338,9 @@
> if (!ep->body)
> {
> #endif
> - evas_object_map_enable_set(mo, 0);
> - evas_object_map_set(mo, NULL);
> + eo_do(mo,
> + evas_obj_map_enable_set(0),
> + evas_obj_map_set(NULL));
> #ifdef HAVE_EPHYSICS
> }
> #endif
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
--
Bruno Dilly
Lead Developer
ProFUSION embedded systems
http://profusion.mobi
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel