summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-01 18:02:49 +0000
committerTom Hacohen <tom@stosb.com>2016-03-03 09:56:20 +0000
commit3faf3f3fc68a839f06b311c35ba020cb25e7c9c4 (patch)
treeff8d82046a45223eccd2db2e92163d7f3f32dc46
parent438e1db893c0226c7f8fd2998f5ee2f3d261b712 (diff)
Some automatic migration and some manual adjustments to calc and text.
These file needed some manual adjustments in addition to the automatic migration, that's why these are separate from the previous and next commits, so I can easily know there are additional changes to these, and it wasn't just the script.
-rw-r--r--src/lib/edje/edje_calc.c321
-rw-r--r--src/lib/edje/edje_text.c113
2 files changed, 166 insertions, 268 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 28a346b..8fa3cb9 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -57,40 +57,35 @@ static void _edje_part_recalc_single(Edje *ed, Edje_Rea
57 \ 57 \
58 eina_quaternion_scale(&quaternion, &quaternion, 1/norm); \ 58 eina_quaternion_scale(&quaternion, &quaternion, 1/norm); \
59 \ 59 \
60 eo_do(ep->node, \ 60 evas_canvas3d_node_orientation_set(ep->node, quaternion.x, quaternion.y, \
61 evas_canvas3d_node_orientation_set(quaternion.x, quaternion.y, \ 61 quaternion.z, quaternion.w);
62 quaternion.z, quaternion.w));
63 62
64#define SET_LOOK_AT(type) \ 63#define SET_LOOK_AT(type) \
65 eo_do(ep->node, \ 64 evas_canvas3d_node_look_at_set(ep->node, pd_##type->type.position.space, \
66 evas_canvas3d_node_look_at_set(pd_##type->type.position.space, \ 65 pd_##type->type.orientation.data[0], \
67 pd_##type->type.orientation.data[0], \ 66 pd_##type->type.orientation.data[1], \
68 pd_##type->type.orientation.data[1], \ 67 pd_##type->type.orientation.data[2], \
69 pd_##type->type.orientation.data[2], \ 68 pd_##type->type.position.space, \
70 pd_##type->type.position.space, \ 69 pd_##type->type.orientation.data[3], \
71 pd_##type->type.orientation.data[3], \ 70 pd_##type->type.orientation.data[4], \
72 pd_##type->type.orientation.data[4], \ 71 pd_##type->type.orientation.data[5]);
73 pd_##type->type.orientation.data[5]));
74 72
75#define SET_LOOK_TO(type) \ 73#define SET_LOOK_TO(type) \
76 Edje_Real_Part *look_to; \ 74 Edje_Real_Part *look_to; \
77 Evas_Real x, y ,z; \ 75 Evas_Real x, y ,z; \
78 look_to = ed->table_parts[pd_##type->type.orientation.look_to % ed->table_parts_size]; \ 76 look_to = ed->table_parts[pd_##type->type.orientation.look_to % ed->table_parts_size]; \
79 eo_do(look_to->node, \ 77 evas_canvas3d_node_position_get(look_to->node, pd_##type->type.position.space, &x, &y, &z); \
80 evas_canvas3d_node_position_get(pd_##type->type.position.space, &x, &y, &z)); \ 78 evas_canvas3d_node_look_at_set(ep->node, pd_##type->type.position.space, x, y, z, \
81 eo_do(ep->node, \ 79 pd_##type->type.position.space, \
82 evas_canvas3d_node_look_at_set(pd_##type->type.position.space, x, y, z, \ 80 pd_##type->type.orientation.data[3], \
83 pd_##type->type.position.space, \ 81 pd_##type->type.orientation.data[4], \
84 pd_##type->type.orientation.data[3], \ 82 pd_##type->type.orientation.data[5]);
85 pd_##type->type.orientation.data[4], \
86 pd_##type->type.orientation.data[5]));
87 83
88#define SET_ANGLE_AXIS(type) \ 84#define SET_ANGLE_AXIS(type) \
89 eo_do(ep->node, \ 85 evas_canvas3d_node_orientation_angle_axis_set(ep->node, pd_##type->type.orientation.data[0], \
90 evas_canvas3d_node_orientation_angle_axis_set(pd_##type->type.orientation.data[0], \ 86 pd_##type->type.orientation.data[1], \
91 pd_##type->type.orientation.data[1], \ 87 pd_##type->type.orientation.data[2], \
92 pd_##type->type.orientation.data[2], \ 88 pd_##type->type.orientation.data[3]);
93 pd_##type->type.orientation.data[3]));
94 89
95 90
96void 91void
@@ -897,7 +892,7 @@ _edje_recalc_do(Edje *ed)
897 if (!ed->calc_only) 892 if (!ed->calc_only)
898 { 893 {
899 if (ed->recalc_call) 894 if (ed->recalc_call)
900 eo_do(ed->obj, eo_event_callback_call(EDJE_OBJECT_EVENT_RECALC, NULL)); 895 eo_event_callback_call(ed->obj, EDJE_OBJECT_EVENT_RECALC, NULL);
901 } 896 }
902 else 897 else
903 evas_object_smart_need_recalculate_set(ed->obj, need_calc); 898 evas_object_smart_need_recalculate_set(ed->obj, need_calc);
@@ -909,8 +904,8 @@ _edje_recalc_do(Edje *ed)
909 904
910 ed->recalc_hints = EINA_FALSE; 905 ed->recalc_hints = EINA_FALSE;
911 906
912 eo_do(ed->obj, edje_obj_size_min_calc(&w, &h)); 907 edje_obj_size_min_calc(ed->obj, &w, &h);
913 eo_do(ed->obj, evas_obj_size_hint_min_set(w, h)); 908 evas_obj_size_hint_min_set(ed->obj, w, h);
914 } 909 }
915 910
916 if (!ed->collection) return; 911 if (!ed->collection) return;
@@ -1489,9 +1484,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
1489 double s = base_s; 1484 double s = base_s;
1490 1485
1491 if (ep->part->scale) base_s = TO_DOUBLE(sc); 1486 if (ep->part->scale) base_s = TO_DOUBLE(sc);
1492 eo_do(ep->object, 1487 evas_obj_scale_set(ep->object, base_s);
1493 evas_obj_scale_set(base_s), 1488 evas_obj_textblock_size_native_get(ep->object, &tw, &th);
1494 evas_obj_textblock_size_native_get(&tw, &th));
1495 1489
1496 orig_s = base_s; 1490 orig_s = base_s;
1497 /* Now make it bigger so calculations will be more accurate 1491 /* Now make it bigger so calculations will be more accurate
@@ -1499,9 +1493,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
1499 { 1493 {
1500 orig_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s, 1494 orig_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s,
1501 orig_s * TO_INT(params->eval.w) / tw); 1495 orig_s * TO_INT(params->eval.w) / tw);
1502 eo_do(ep->object, 1496 evas_obj_scale_set(ep->object, orig_s);
1503 evas_obj_scale_set(orig_s), 1497 evas_obj_textblock_size_native_get(ep->object, &tw, &th);
1504 evas_obj_textblock_size_native_get(&tw, &th));
1505 } 1498 }
1506 if (chosen_desc->text.fit_x) 1499 if (chosen_desc->text.fit_x)
1507 { 1500 {
@@ -1509,9 +1502,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
1509 { 1502 {
1510 s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s, 1503 s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s,
1511 orig_s * TO_INT(params->eval.w) / tw); 1504 orig_s * TO_INT(params->eval.w) / tw);
1512 eo_do(ep->object, 1505 evas_obj_scale_set(ep->object, s);
1513 evas_obj_scale_set(s), 1506 evas_obj_textblock_size_native_get(ep->object, NULL, NULL);
1514 evas_obj_textblock_size_native_get(NULL, NULL));
1515 } 1507 }
1516 } 1508 }
1517 if (chosen_desc->text.fit_y) 1509 if (chosen_desc->text.fit_y)
@@ -1527,9 +1519,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
1527 s = tmp_s; 1519 s = tmp_s;
1528 } 1520 }
1529 1521
1530 eo_do(ep->object, 1522 evas_obj_scale_set(ep->object, s);
1531 evas_obj_scale_set(s), 1523 evas_obj_textblock_size_native_get(ep->object, NULL, NULL);
1532 evas_obj_textblock_size_native_get(NULL, NULL));
1533 } 1524 }
1534 } 1525 }
1535 1526
@@ -1538,8 +1529,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
1538 { 1529 {
1539 int i = 5; /* Tries before we give up. */ 1530 int i = 5; /* Tries before we give up. */
1540 Evas_Coord fw, fh; 1531 Evas_Coord fw, fh;
1541 eo_do(ep->object, 1532 evas_obj_textblock_size_native_get(ep->object, &fw, &fh);
1542 evas_obj_textblock_size_native_get(&fw, &fh));
1543 1533
1544 /* If we are still too big, try reducing the size to 1534 /* If we are still too big, try reducing the size to
1545 * 95% each try. */ 1535 * 95% each try. */
@@ -1554,9 +1544,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
1554 break; 1544 break;
1555 s = tmp_s; 1545 s = tmp_s;
1556 1546
1557 eo_do(ep->object, 1547 evas_obj_scale_set(ep->object, s);
1558 evas_obj_scale_set(s), 1548 evas_obj_textblock_size_native_get(ep->object, &fw, &fh);
1559 evas_obj_textblock_size_native_get(&fw, &fh));
1560 i--; 1549 i--;
1561 } 1550 }
1562 } 1551 }
@@ -1582,9 +1571,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
1582 tw = th = 0; 1571 tw = th = 0;
1583 if (!chosen_desc->text.min_x) 1572 if (!chosen_desc->text.min_x)
1584 { 1573 {
1585 eo_do(ep->object, 1574 efl_gfx_size_set(ep->object, TO_INT(params->eval.w), TO_INT(params->eval.h));
1586 efl_gfx_size_set(TO_INT(params->eval.w), TO_INT(params->eval.h)), 1575 evas_obj_textblock_size_formatted_get(ep->object, &tw, &th);
1587 evas_obj_textblock_size_formatted_get(&tw, &th));
1588 } 1576 }
1589 else 1577 else
1590 evas_object_textblock_size_native_get(ep->object, &tw, &th); 1578 evas_object_textblock_size_native_get(ep->object, &tw, &th);
@@ -1610,9 +1598,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
1610 tw = th = 0; 1598 tw = th = 0;
1611 if (!chosen_desc->text.max_x) 1599 if (!chosen_desc->text.max_x)
1612 { 1600 {
1613 eo_do(ep->object, 1601 efl_gfx_size_set(ep->object, TO_INT(params->eval.w), TO_INT(params->eval.h));
1614 efl_gfx_size_set(TO_INT(params->eval.w), TO_INT(params->eval.h)), 1602 evas_obj_textblock_size_formatted_get(ep->object, &tw, &th);
1615 evas_obj_textblock_size_formatted_get(&tw, &th));
1616 } 1603 }
1617 else 1604 else
1618 evas_object_textblock_size_native_get(ep->object, &tw, &th); 1605 evas_object_textblock_size_native_get(ep->object, &tw, &th);
@@ -1699,7 +1686,7 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
1699 return; 1686 return;
1700 1687
1701 // Note: No need to add padding to that, it's already in the geometry 1688 // Note: No need to add padding to that, it's already in the geometry
1702 eo_do(ep->object, efl_gfx_size_get(&mw, &mh)); 1689 efl_gfx_size_get(ep->object, &mw, &mh);
1703 1690
1704 if (chosen_desc->text.max_x) 1691 if (chosen_desc->text.max_x)
1705 { 1692 {
@@ -1857,10 +1844,9 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
1857 [(ep->part->effect & EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION) >> 4]; 1844 [(ep->part->effect & EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION) >> 4];
1858 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(style, shadow); 1845 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(style, shadow);
1859 1846
1860 eo_do(ep->object, 1847 evas_obj_text_style_set(ep->object, style);
1861 evas_obj_text_style_set(style), 1848 evas_obj_text_set(ep->object, text);
1862 evas_obj_text_set(text), 1849 efl_gfx_size_get(ep->object, &tw, &th);
1863 efl_gfx_size_get(&tw, &th));
1864 if (chosen_desc->text.max_x) 1850 if (chosen_desc->text.max_x)
1865 { 1851 {
1866 int l, r; 1852 int l, r;
@@ -2578,7 +2564,7 @@ _edje_part_recalc_single_filter(Edje *ed,
2578 code = _edje_filter_get(ed, filter); 2564 code = _edje_filter_get(ed, filter);
2579 if (!code) 2565 if (!code)
2580 { 2566 {
2581 eo_do(obj, efl_gfx_filter_program_set(NULL, NULL)); 2567 efl_gfx_filter_program_set(obj, NULL, NULL);
2582 return; 2568 return;
2583 } 2569 }
2584 2570
@@ -2599,7 +2585,7 @@ _edje_part_recalc_single_filter(Edje *ed,
2599 continue; 2585 continue;
2600 if (!data->value) 2586 if (!data->value)
2601 { 2587 {
2602 efl_gfx_filter_data_set(data->name, NULL, EINA_FALSE); 2588 efl_gfx_filter_data_set(obj, data->name, NULL, EINA_FALSE);
2603 } 2589 }
2604 else if (!strncmp(data->value, "color_class('", sizeof("color_class('") - 1)) 2590 else if (!strncmp(data->value, "color_class('", sizeof("color_class('") - 1))
2605 { 2591 {
@@ -2629,7 +2615,7 @@ _edje_part_recalc_single_filter(Edje *ed,
2629 (int) cc->r2, (int) cc->g2, (int) cc->b2, (int) cc->a2, 2615 (int) cc->r2, (int) cc->g2, (int) cc->b2, (int) cc->a2,
2630 (int) cc->r3, (int) cc->g3, (int) cc->b3, (int) cc->a3); 2616 (int) cc->r3, (int) cc->g3, (int) cc->b3, (int) cc->a3);
2631 buffer[len - 1] = 0; 2617 buffer[len - 1] = 0;
2632 efl_gfx_filter_data_set(data->name, buffer, EINA_TRUE); 2618 efl_gfx_filter_data_set(obj, data->name, buffer, EINA_TRUE);
2633 } 2619 }
2634 else 2620 else
2635 { 2621 {
@@ -2646,10 +2632,10 @@ _edje_part_recalc_single_filter(Edje *ed,
2646 } 2632 }
2647 } 2633 }
2648 else 2634 else
2649 efl_gfx_filter_data_set(data->name, data->value, EINA_FALSE); 2635 efl_gfx_filter_data_set(obj, data->name, data->value, EINA_FALSE);
2650 } 2636 }
2651 } 2637 }
2652 efl_gfx_filter_program_set(code, filter->name); 2638 efl_gfx_filter_program_set(obj, code, filter->name);
2653 if (prev_sources != filter_sources) 2639 if (prev_sources != filter_sources)
2654 { 2640 {
2655 /* remove sources that are not there anymore 2641 /* remove sources that are not there anymore
@@ -2669,7 +2655,7 @@ _edje_part_recalc_single_filter(Edje *ed,
2669 { 2655 {
2670 part = strchr(src1, ':'); 2656 part = strchr(src1, ':');
2671 if (!part) 2657 if (!part)
2672 efl_gfx_filter_source_set(src1, NULL); 2658 efl_gfx_filter_source_set(obj, src1, NULL);
2673 else 2659 else
2674 { 2660 {
2675 char *name = strdup(src1); 2661 char *name = strdup(src1);
@@ -2693,20 +2679,20 @@ _edje_part_recalc_single_filter(Edje *ed,
2693 else 2679 else
2694 part = src1; 2680 part = src1;
2695 rp = _edje_real_part_get(ed, part); 2681 rp = _edje_real_part_get(ed, part);
2696 efl_gfx_filter_source_set(name ? name : part, rp ? rp->object : NULL); 2682 efl_gfx_filter_source_set(obj, name ? name : part, rp ? rp->object : NULL);
2697 free(name); 2683 free(name);
2698 } 2684 }
2699 } 2685 }
2700 /* pass edje state for transitions */ 2686 /* pass edje state for transitions */
2701 if (ep->param2) 2687 if (ep->param2)
2702 { 2688 {
2703 efl_gfx_filter_state_set(chosen_desc->state.name, chosen_desc->state.value, 2689 efl_gfx_filter_state_set(obj, chosen_desc->state.name, chosen_desc->state.value,
2704 ep->param2->description->state.name, ep->param2->description->state.value, 2690 ep->param2->description->state.name, ep->param2->description->state.value,
2705 pos); 2691 pos);
2706 } 2692 }
2707 else 2693 else
2708 { 2694 {
2709 efl_gfx_filter_state_set(chosen_desc->state.name, chosen_desc->state.value, 2695 efl_gfx_filter_state_set(obj, chosen_desc->state.name, chosen_desc->state.value,
2710 NULL, 0.0, pos); 2696 NULL, 0.0, pos);
2711 } 2697 }
2712} 2698}
@@ -2921,10 +2907,9 @@ _edje_part_recalc_single(Edje *ed,
2921 { 2907 {
2922 Evas_Coord lminw = 0, lminh = 0; 2908 Evas_Coord lminw = 0, lminh = 0;
2923 2909
2924 eo_do(ep->object, 2910 evas_obj_smart_need_recalculate_set(ep->object, 1);
2925 evas_obj_smart_need_recalculate_set(1), 2911 evas_obj_smart_calculate(ep->object);
2926 evas_obj_smart_calculate(), 2912 evas_obj_size_hint_min_get(ep->object, &lminw, &lminh);
2927 evas_obj_size_hint_min_get(&lminw, &lminh));
2928 if (((Edje_Part_Description_Table *)chosen_desc)->table.min.h) 2913 if (((Edje_Part_Description_Table *)chosen_desc)->table.min.h)
2929 { 2914 {
2930 if (lminw > minw) minw = lminw; 2915 if (lminw > minw) minw = lminw;
@@ -2940,10 +2925,9 @@ _edje_part_recalc_single(Edje *ed,
2940 { 2925 {
2941 Evas_Coord lminw = 0, lminh = 0; 2926 Evas_Coord lminw = 0, lminh = 0;
2942 2927
2943 eo_do(ep->object, 2928 evas_obj_smart_need_recalculate_set(ep->object, 1);
2944 evas_obj_smart_need_recalculate_set(1), 2929 evas_obj_smart_calculate(ep->object);
2945 evas_obj_smart_calculate(), 2930 evas_obj_size_hint_min_get(ep->object, &lminw, &lminh);
2946 evas_obj_size_hint_min_get(&lminw, &lminh));
2947 if (((Edje_Part_Description_Box *)chosen_desc)->box.min.h) 2931 if (((Edje_Part_Description_Box *)chosen_desc)->box.min.h)
2948 { 2932 {
2949 if (lminw > minw) minw = lminw; 2933 if (lminw > minw) minw = lminw;
@@ -3103,15 +3087,13 @@ _edje_table_recalc_apply(Edje *ed EINA_UNUSED,
3103 Edje_Calc_Params *p3 EINA_UNUSED, 3087 Edje_Calc_Params *p3 EINA_UNUSED,
3104 Edje_Part_Description_Table *chosen_desc) 3088 Edje_Part_Description_Table *chosen_desc)
3105{ 3089{
3106 eo_do(ep->object, 3090 evas_obj_table_homogeneous_set(ep->object, chosen_desc->table.homogeneous);
3107 evas_obj_table_homogeneous_set(chosen_desc->table.homogeneous), 3091 evas_obj_table_align_set(ep->object, TO_DOUBLE(chosen_desc->table.align.x), TO_DOUBLE(chosen_desc->table.align.y));
3108 evas_obj_table_align_set(TO_DOUBLE(chosen_desc->table.align.x), TO_DOUBLE(chosen_desc->table.align.y)), 3092 evas_obj_table_padding_set(ep->object, chosen_desc->table.padding.x, chosen_desc->table.padding.y);
3109 evas_obj_table_padding_set(chosen_desc->table.padding.x, chosen_desc->table.padding.y));
3110 if (evas_object_smart_need_recalculate_get(ep->object)) 3093 if (evas_object_smart_need_recalculate_get(ep->object))
3111 { 3094 {
3112 eo_do(ep->object, 3095 evas_obj_smart_need_recalculate_set(ep->object, 0);
3113 evas_obj_smart_need_recalculate_set(0), 3096 evas_obj_smart_calculate(ep->object);
3114 evas_obj_smart_calculate());
3115 } 3097 }
3116} 3098}
3117 3099
@@ -3173,14 +3155,10 @@ _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
3173 } 3155 }
3174 } 3156 }
3175 3157
3176 eo_do(ep->object, 3158 efl_gfx_fill_set(ep->object, p3->type.common.fill.x, p3->type.common.fill.y, p3->type.common.fill.w, p3->type.common.fill.h);
3177 efl_gfx_fill_set(p3->type.common.fill.x, 3159 efl_image_smooth_scale_set(ep->object, p3->smooth);
3178 p3->type.common.fill.y, 3160 evas_obj_image_source_visible_set(ep->object, chosen_desc->proxy.source_visible);
3179 p3->type.common.fill.w, 3161 evas_obj_image_source_clip_set(ep->object, chosen_desc->proxy.source_clip);
3180 p3->type.common.fill.h),
3181 efl_image_smooth_scale_set(p3->smooth),
3182 evas_obj_image_source_visible_set(chosen_desc->proxy.source_visible),
3183 evas_obj_image_source_clip_set(chosen_desc->proxy.source_clip));
3184} 3162}
3185 3163
3186static void 3164static void
@@ -3214,10 +3192,8 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
3214 SET_BORDER_DEFINED(p3->type.common.spec.image.border_scale_by, set->entry->border.scale_by); 3192 SET_BORDER_DEFINED(p3->type.common.spec.image.border_scale_by, set->entry->border.scale_by);
3215 } 3193 }
3216 3194
3217 eo_do(ep->object, 3195 efl_gfx_fill_set(ep->object, p3->type.common.fill.x, p3->type.common.fill.y, p3->type.common.fill.w, p3->type.common.fill.h);
3218 efl_gfx_fill_set(p3->type.common.fill.x, p3->type.common.fill.y, 3196 efl_image_smooth_scale_set(ep->object, p3->smooth);
3219 p3->type.common.fill.w, p3->type.common.fill.h),
3220 efl_image_smooth_scale_set(p3->smooth));
3221 if (chosen_desc->image.border.scale) 3197 if (chosen_desc->image.border.scale)
3222 { 3198 {
3223 if (p3->type.common.spec.image.border_scale_by > FROM_DOUBLE(0.0)) 3199 if (p3->type.common.spec.image.border_scale_by > FROM_DOUBLE(0.0))
@@ -4609,8 +4585,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4609 case EDJE_PART_TYPE_EXTERNAL: 4585 case EDJE_PART_TYPE_EXTERNAL:
4610 /* visibility and color have no meaning on SWALLOW and GROUP part. */ 4586 /* visibility and color have no meaning on SWALLOW and GROUP part. */
4611#ifdef HAVE_EPHYSICS 4587#ifdef HAVE_EPHYSICS
4612 eo_do(ep->object, 4588 efl_gfx_size_set(ep->object, pf->final.w, pf->final.h);
4613 efl_gfx_size_set(pf->final.w, pf->final.h));
4614 if ((ep->part->physics_body) && (!ep->body)) 4589 if ((ep->part->physics_body) && (!ep->body))
4615 { 4590 {
4616 if (_edje_physics_world_geometry_check(ed->world)) 4591 if (_edje_physics_world_geometry_check(ed->world))
@@ -4627,19 +4602,16 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4627 _edje_physics_body_props_update(ed, ep, pf, !pf->physics->ignore_part_pos); 4602 _edje_physics_body_props_update(ed, ep, pf, !pf->physics->ignore_part_pos);
4628 } 4603 }
4629 else 4604 else
4630 eo_do(ep->object, 4605 efl_gfx_position_set(ep->object, ed->x + pf->final.x, ed->y + pf->final.y);
4631 efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y));
4632#else 4606#else
4633 eo_do(ep->object, 4607 efl_gfx_position_set(ep->object, ed->x + pf->final.x, ed->y + pf->final.y);
4634 efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y), 4608 efl_gfx_size_set(ep->object, pf->final.w, pf->final.h);
4635 efl_gfx_size_set(pf->final.w, pf->final.h));
4636#endif 4609#endif
4637 4610
4638 if (ep->nested_smart) /* Move, Resize all nested parts */ 4611 if (ep->nested_smart) /* Move, Resize all nested parts */
4639 { /* Not really needed but will improve the bounding box evaluation done by Evas */ 4612 { /* Not really needed but will improve the bounding box evaluation done by Evas */
4640 eo_do(ep->nested_smart, 4613 efl_gfx_position_set(ep->nested_smart, ed->x + pf->final.x, ed->y + pf->final.y);
4641 efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y), 4614 efl_gfx_size_set(ep->nested_smart, pf->final.w, pf->final.h);
4642 efl_gfx_size_set(pf->final.w, pf->final.h));
4643 } 4615 }
4644 if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE) 4616 if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
4645 _edje_entry_real_part_configure(ed, ep); 4617 _edje_entry_real_part_configure(ed, ep);
@@ -4671,15 +4643,11 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4671 Edje_Part_Description_Camera *pd_camera; 4643 Edje_Part_Description_Camera *pd_camera;
4672 4644
4673 pd_camera = (Edje_Part_Description_Camera*) ep->chosen_description; 4645 pd_camera = (Edje_Part_Description_Camera*) ep->chosen_description;
4674 eo_do(ep->node, camera = evas_canvas3d_node_camera_get()); 4646 camera = evas_canvas3d_node_camera_get(ep->node);
4675 4647
4676 eo_do(camera, 4648 evas_canvas3d_camera_projection_perspective_set(camera, pd_camera->camera.camera.fovy, pd_camera->camera.camera.aspect, pd_camera->camera.camera.frustum_near, pd_camera->camera.camera.frustum_far);
4677 evas_canvas3d_camera_projection_perspective_set(pd_camera->camera.camera.fovy, pd_camera->camera.camera.aspect,
4678 pd_camera->camera.camera.frustum_near, pd_camera->camera.camera.frustum_far));
4679 4649
4680 eo_do(ep->node, 4650 evas_canvas3d_node_position_set(ep->node, pf->type.node.point.x, pf->type.node.point.y, pf->type.node.point.z);
4681 evas_canvas3d_node_position_set(pf->type.node.point.x, pf->type.node.point.y,
4682 pf->type.node.point.z));
4683 switch (pd_camera->camera.orientation.type) 4651 switch (pd_camera->camera.orientation.type)
4684 { 4652 {
4685 case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE: 4653 case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE:
@@ -4708,28 +4676,15 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4708 Edje_Part_Description_Light *pd_light; 4676 Edje_Part_Description_Light *pd_light;
4709 4677
4710 pd_light = (Edje_Part_Description_Light*) ep->chosen_description; 4678 pd_light = (Edje_Part_Description_Light*) ep->chosen_description;
4711 eo_do(ep->node, light_node = evas_canvas3d_node_light_get()); 4679 light_node = evas_canvas3d_node_light_get(ep->node);
4712 4680
4713 eo_do(light_node, 4681 evas_canvas3d_light_ambient_set(light_node, (float) pd_light->light.properties.ambient.r / 255, (float) pd_light->light.properties.ambient.g / 255, (float) pd_light->light.properties.ambient.b / 255, (float) pd_light->light.properties.ambient.a / 255);
4714 evas_canvas3d_light_ambient_set((float) pd_light->light.properties.ambient.r / 255, 4682 evas_canvas3d_light_diffuse_set(light_node, (float) pd_light->light.properties.diffuse.r / 255, (float) pd_light->light.properties.diffuse.g / 255, (float) pd_light->light.properties.diffuse.b / 255, (float) pd_light->light.properties.diffuse.a / 255);
4715 (float) pd_light->light.properties.ambient.g / 255, 4683 evas_canvas3d_light_specular_set(light_node, (float) pd_light->light.properties.specular.r / 255, (float) pd_light->light.properties.specular.g / 255, (float) pd_light->light.properties.specular.b / 255, (float) pd_light->light.properties.specular.a / 255);
4716 (float) pd_light->light.properties.ambient.b / 255, 4684 evas_canvas3d_light_directional_set(light_node, EINA_TRUE);
4717 (float) pd_light->light.properties.ambient.a / 255), 4685 evas_canvas3d_light_projection_perspective_set(light_node, pd_light->light.light.fovy, pd_light->light.light.aspect, pd_light->light.light.frustum_near, pd_light->light.light.frustum_far);
4718 evas_canvas3d_light_diffuse_set((float) pd_light->light.properties.diffuse.r / 255, 4686
4719 (float) pd_light->light.properties.diffuse.g / 255, 4687 evas_canvas3d_node_position_set(ep->node, pf->type.node.point.x, pf->type.node.point.y, pf->type.node.point.z);
4720 (float) pd_light->light.properties.diffuse.b / 255,
4721 (float) pd_light->light.properties.diffuse.a / 255),
4722 evas_canvas3d_light_specular_set((float) pd_light->light.properties.specular.r / 255,
4723 (float) pd_light->light.properties.specular.g / 255,
4724 (float) pd_light->light.properties.specular.b / 255,
4725 (float) pd_light->light.properties.specular.a / 255),
4726 evas_canvas3d_light_directional_set(EINA_TRUE),
4727 evas_canvas3d_light_projection_perspective_set(pd_light->light.light.fovy, pd_light->light.light.aspect,
4728 pd_light->light.light.frustum_near, pd_light->light.light.frustum_far));
4729
4730 eo_do(ep->node,
4731 evas_canvas3d_node_position_set(pf->type.node.point.x, pf->type.node.point.y,
4732 pf->type.node.point.z));
4733 switch (pd_light->light.orientation.type) 4688 switch (pd_light->light.orientation.type)
4734 { 4689 {
4735 case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE: 4690 case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE:
@@ -4763,36 +4718,23 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4763 const Eina_List *list; 4718 const Eina_List *list;
4764 Eina_Bool frame_exist; 4719 Eina_Bool frame_exist;
4765 4720
4766 eo_do(ep->node, meshes = evas_canvas3d_node_mesh_list_get()); 4721 meshes = evas_canvas3d_node_mesh_list_get(ep->node);
4767 4722
4768 EINA_LIST_FOREACH(meshes, list, mesh) 4723 EINA_LIST_FOREACH(meshes, list, mesh)
4769 { 4724 {
4770 eo_do(mesh, material = evas_canvas3d_mesh_frame_material_get(0)); 4725 material = evas_canvas3d_mesh_frame_material_get(mesh, 0);
4771 eo_do(material, texture = evas_canvas3d_material_texture_get(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE)); 4726 texture = evas_canvas3d_material_texture_get(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE);
4772 4727
4773 pd_mesh_node = (Edje_Part_Description_Mesh_Node*) ep->chosen_description; 4728 pd_mesh_node = (Edje_Part_Description_Mesh_Node*) ep->chosen_description;
4774 4729
4775 eo_do(material, 4730 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
4776 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), 4731 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
4777 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), 4732 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
4778 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), 4733 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, pd_mesh_node->mesh_node.properties.normal);
4779 evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, pd_mesh_node->mesh_node.properties.normal), 4734 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, (float) pd_mesh_node->mesh_node.properties.ambient.r / 255, (float) pd_mesh_node->mesh_node.properties.ambient.g / 255, (float) pd_mesh_node->mesh_node.properties.ambient.b / 255, (float) pd_mesh_node->mesh_node.properties.ambient.a / 255);
4780 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 4735 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, (float) pd_mesh_node->mesh_node.properties.diffuse.r / 255, (float) pd_mesh_node->mesh_node.properties.diffuse.g / 255, (float) pd_mesh_node->mesh_node.properties.diffuse.b / 255, (float) pd_mesh_node->mesh_node.properties.diffuse.a / 255);
4781 (float) pd_mesh_node->mesh_node.properties.ambient.r / 255, 4736 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, (float) pd_mesh_node->mesh_node.properties.specular.r / 255, (float) pd_mesh_node->mesh_node.properties.specular.g / 255, (float) pd_mesh_node->mesh_node.properties.specular.b / 255, (float) pd_mesh_node->mesh_node.properties.specular.a / 255);
4782 (float) pd_mesh_node->mesh_node.properties.ambient.g / 255, 4737 evas_canvas3d_material_shininess_set(material, pd_mesh_node->mesh_node.properties.shininess);
4783 (float) pd_mesh_node->mesh_node.properties.ambient.b / 255,
4784 (float) pd_mesh_node->mesh_node.properties.ambient.a / 255),
4785 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE,
4786 (float) pd_mesh_node->mesh_node.properties.diffuse.r / 255,
4787 (float) pd_mesh_node->mesh_node.properties.diffuse.g / 255,
4788 (float) pd_mesh_node->mesh_node.properties.diffuse.b / 255,
4789 (float) pd_mesh_node->mesh_node.properties.diffuse.a / 255),
4790 evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR,
4791 (float) pd_mesh_node->mesh_node.properties.specular.r / 255,
4792 (float) pd_mesh_node->mesh_node.properties.specular.g / 255,
4793 (float) pd_mesh_node->mesh_node.properties.specular.b / 255,
4794 (float) pd_mesh_node->mesh_node.properties.specular.a / 255),
4795 evas_canvas3d_material_shininess_set(pd_mesh_node->mesh_node.properties.shininess));
4796 4738
4797 switch(pd_mesh_node->mesh_node.mesh.primitive) 4739 switch(pd_mesh_node->mesh_node.mesh.primitive)
4798 { 4740 {
@@ -4801,18 +4743,14 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4801 { 4743 {
4802 Eo *primitive = NULL; 4744 Eo *primitive = NULL;
4803 primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas); 4745 primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas);
4804 eo_do(primitive, 4746 evas_canvas3d_primitive_form_set(primitive, pd_mesh_node->mesh_node.mesh.primitive);
4805 evas_canvas3d_primitive_form_set(pd_mesh_node->mesh_node.mesh.primitive));
4806 4747
4807 eo_do(mesh, 4748 frame_exist = evas_canvas3d_mesh_frame_exist(mesh, pf->type.node.frame);
4808 frame_exist = evas_canvas3d_mesh_frame_exist(pf->type.node.frame));
4809 if (!frame_exist) 4749 if (!frame_exist)
4810 { 4750 {
4811 eo_do(mesh, 4751 evas_canvas3d_mesh_frame_material_set(mesh, pf->type.node.frame, material);
4812 evas_canvas3d_mesh_frame_material_set(pf->type.node.frame, material));
4813 } 4752 }
4814 eo_do(mesh, 4753 evas_canvas3d_mesh_from_primitive_set(mesh, 0, primitive);
4815 evas_canvas3d_mesh_from_primitive_set(0, primitive));
4816 break; 4754 break;
4817 } 4755 }
4818 default: 4756 default:
@@ -4823,8 +4761,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4823 { 4761 {
4824 proxy = NULL; 4762 proxy = NULL;
4825 4763
4826 eo_do(material, 4764 texture = evas_canvas3d_material_texture_get(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE);
4827 texture = evas_canvas3d_material_texture_get(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE));
4828 4765
4829 //proxy = _edje_image_name_find(ed, pd_mesh_node->mesh_node.texture.id); 4766 //proxy = _edje_image_name_find(ed, pd_mesh_node->mesh_node.texture.id);
4830 /*FIXME Conflict with function _edje_image_name_find (two places in edje_utils and edje_edit.c, 4767 /*FIXME Conflict with function _edje_image_name_find (two places in edje_utils and edje_edit.c,
@@ -4832,31 +4769,21 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4832 proxy = ed->file->image_dir->entries[pd_mesh_node->mesh_node.texture.id].entry; 4769 proxy = ed->file->image_dir->entries[pd_mesh_node->mesh_node.texture.id].entry;
4833 if (proxy) 4770 if (proxy)
4834 { 4771 {
4835 eo_do(texture, 4772 evas_canvas3d_texture_file_set(texture, eina_stringshare_add(proxy), NULL);
4836 evas_canvas3d_texture_file_set(eina_stringshare_add(proxy), NULL), 4773 evas_canvas3d_texture_filter_set(texture, pd_mesh_node->mesh_node.texture.filter1, pd_mesh_node->mesh_node.texture.filter2);
4837 evas_canvas3d_texture_filter_set(pd_mesh_node->mesh_node.texture.filter1, 4774 evas_canvas3d_texture_wrap_set(texture, pd_mesh_node->mesh_node.texture.wrap1, pd_mesh_node->mesh_node.texture.wrap2);
4838 pd_mesh_node->mesh_node.texture.filter2),
4839 evas_canvas3d_texture_wrap_set(pd_mesh_node->mesh_node.texture.wrap1,
4840 pd_mesh_node->mesh_node.texture.wrap2));
4841 } 4775 }
4842 } 4776 }
4843 4777
4844 eo_do(mesh, 4778 frame_exist = evas_canvas3d_mesh_frame_exist(mesh, pf->type.node.frame);
4845 frame_exist = evas_canvas3d_mesh_frame_exist(pf->type.node.frame));
4846 if (!frame_exist) 4779 if (!frame_exist)
4847 eo_do(mesh, 4780 evas_canvas3d_mesh_frame_add(mesh, pf->type.node.frame);
4848 evas_canvas3d_mesh_frame_add(pf->type.node.frame), 4781 evas_canvas3d_mesh_frame_material_set(mesh, pf->type.node.frame, material);
4849 evas_canvas3d_mesh_frame_material_set(pf->type.node.frame, material)); 4782 evas_canvas3d_mesh_shade_mode_set(mesh, pd_mesh_node->mesh_node.properties.shade);
4850 eo_do(mesh, 4783 evas_canvas3d_mesh_vertex_assembly_set(mesh, pd_mesh_node->mesh_node.mesh.assembly);
4851 evas_canvas3d_mesh_shade_mode_set(pd_mesh_node->mesh_node.properties.shade), 4784 evas_canvas3d_node_mesh_frame_set(ep->node, mesh, pf->type.node.frame);
4852 evas_canvas3d_mesh_vertex_assembly_set(pd_mesh_node->mesh_node.mesh.assembly)); 4785 evas_canvas3d_node_scale_set(ep->node, pf->type.node.scale_3d.x, pf->type.node.scale_3d.y, pf->type.node.scale_3d.z);
4853 eo_do(ep->node, 4786 evas_canvas3d_node_position_set(ep->node, pf->type.node.point.x, pf->type.node.point.y, pf->type.node.point.z);
4854 evas_canvas3d_node_mesh_frame_set(mesh, pf->type.node.frame),
4855 evas_canvas3d_node_scale_set(pf->type.node.scale_3d.x, pf->type.node.scale_3d.y,
4856 pf->type.node.scale_3d.z),
4857 evas_canvas3d_node_position_set(pf->type.node.point.x,
4858 pf->type.node.point.y,
4859 pf->type.node.point.z));
4860 switch (pd_mesh_node->mesh_node.orientation.type) 4787 switch (pd_mesh_node->mesh_node.orientation.type)
4861 { 4788 {
4862 case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE: 4789 case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE:
@@ -4943,10 +4870,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4943 4870
4944 if (ep->part->type == EDJE_PART_TYPE_GROUP) 4871 if (ep->part->type == EDJE_PART_TYPE_GROUP)
4945 vis = evas_object_visible_get(ed->obj); 4872 vis = evas_object_visible_get(ed->obj);
4946 eo_do(ep->typedata.swallow->swallowed_object, 4873 efl_gfx_position_set(ep->typedata.swallow->swallowed_object, ed->x + pf->final.x, ed->y + pf->final.y);
4947 efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y), 4874 efl_gfx_size_set(ep->typedata.swallow->swallowed_object, pf->final.w, pf->final.h);
4948 efl_gfx_size_set(pf->final.w, pf->final.h), 4875 efl_gfx_visible_set(ep->typedata.swallow->swallowed_object, vis);
4949 efl_gfx_visible_set(vis));
4950 } 4876 }
4951 else evas_object_hide(ep->typedata.swallow->swallowed_object); 4877 else evas_object_hide(ep->typedata.swallow->swallowed_object);
4952 mo = ep->typedata.swallow->swallowed_object; 4878 mo = ep->typedata.swallow->swallowed_object;
@@ -4969,9 +4895,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4969 else map_obj = mo; 4895 else map_obj = mo;
4970 if (map_obj) 4896 if (map_obj)
4971 { 4897 {
4972 eo_do(map_obj, 4898 evas_obj_map_set(map_obj, map);
4973 evas_obj_map_set(map), 4899 evas_obj_map_enable_set(map_obj, EINA_TRUE);
4974 evas_obj_map_enable_set(EINA_TRUE));
4975 } 4900 }
4976 } 4901 }
4977 else 4902 else
@@ -4982,9 +4907,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4982 { 4907 {
4983 if (ep->nested_smart) /* Cancel map of smart obj holding nested parts */ 4908 if (ep->nested_smart) /* Cancel map of smart obj holding nested parts */
4984 { 4909 {
4985 eo_do(ep->nested_smart, 4910 evas_obj_map_enable_set(ep->nested_smart, EINA_FALSE);
4986 evas_obj_map_enable_set(EINA_FALSE), 4911 evas_obj_map_set(ep->nested_smart, NULL);
4987 evas_obj_map_set(NULL));
4988 } 4912 }
4989 else 4913 else
4990 { 4914 {
@@ -4993,9 +4917,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4993 { 4917 {
4994#endif 4918#endif
4995 if (mo) 4919 if (mo)
4996 eo_do(mo, 4920 evas_obj_map_enable_set(mo, 0);
4997 evas_obj_map_enable_set(0), 4921 evas_obj_map_set(mo, NULL);
4998 evas_obj_map_set(NULL));
4999#ifdef HAVE_EPHYSICS 4922#ifdef HAVE_EPHYSICS
5000 } 4923 }
5001#endif 4924#endif
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 371675e..b68e8b6 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -19,7 +19,7 @@ static inline void
19part_get_geometry(Edje_Real_Part *rp, Evas_Coord *w, Evas_Coord *h) 19part_get_geometry(Edje_Real_Part *rp, Evas_Coord *w, Evas_Coord *h)
20{ 20{
21 if (!rp->part->use_alternate_font_metrics) 21 if (!rp->part->use_alternate_font_metrics)
22 eo_do(rp->object, efl_gfx_size_get(w, h)); 22 efl_gfx_size_get(rp->object, w, h);
23 else 23 else
24 { 24 {
25 if (w) *w = evas_object_text_horiz_advance_get(rp->object); 25 if (w) *w = evas_object_text_horiz_advance_get(rp->object);
@@ -131,11 +131,10 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
131 131
132 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc)); 132 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
133 133
134 eo_do(ep->object, 134 evas_obj_text_ellipsis_set(ep->object, chosen_desc->text.min_x ? -1 : params->type.text.ellipsis);
135 evas_obj_text_ellipsis_set(chosen_desc->text.min_x ? -1 : params->type.text.ellipsis), 135 efl_text_properties_font_set(ep->object, font, size);
136 efl_text_properties_font_set(font, size), 136 efl_text_set(ep->object, text);
137 efl_text_set(text), 137 efl_gfx_size_set(ep->object, sw, sh);
138 efl_gfx_size_set(sw, sh));
139 138
140 return text; 139 return text;
141} 140}
@@ -321,13 +320,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
321 ep->typedata.text->cache.in_size = size; 320 ep->typedata.text->cache.in_size = size;
322 if (chosen_desc->text.fit_x && (ep->typedata.text->cache.in_str && eina_stringshare_strlen(ep->typedata.text->cache.in_str) > 0)) 321 if (chosen_desc->text.fit_x && (ep->typedata.text->cache.in_str && eina_stringshare_strlen(ep->typedata.text->cache.in_str) > 0))
323 { 322 {
324 if (inlined_font) efl_text_properties_font_source_set(ed->path); 323 if (inlined_font) efl_text_properties_font_source_set(ep->object, ed->path);
325 else efl_text_properties_font_source_set(NULL); 324 else efl_text_properties_font_source_set(ep->object, NULL);
326 325
327 if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc)); 326 if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
328 327
329 efl_text_properties_font_set(font, size); 328 efl_text_properties_font_set(ep->object, font, size);
330 efl_text_set(text); 329 efl_text_set(ep->object, text);
331 330
332 part_get_geometry(ep, &tw, &th); 331 part_get_geometry(ep, &tw, &th);
333 /* Find the wanted font size */ 332 /* Find the wanted font size */
@@ -335,12 +334,12 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
335 { 334 {
336 size = (size * sw) / tw; 335 size = (size * sw) / tw;
337 336
338 if (inlined_font) efl_text_properties_font_source_set(ed->path); 337 if (inlined_font) efl_text_properties_font_source_set(ep->object, ed->path);
339 else efl_text_properties_font_source_set(NULL); 338 else efl_text_properties_font_source_set(ep->object, NULL);
340 339
341 if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc)); 340 if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
342 341
343 efl_text_properties_font_set(font, size); 342 efl_text_properties_font_set(ep->object, font, size);
344 343
345 part_get_geometry(ep, &tw, &th); 344 part_get_geometry(ep, &tw, &th);
346 } 345 }
@@ -357,13 +356,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
357 */ 356 */
358 if (!chosen_desc->text.fit_x) size = sh; 357 if (!chosen_desc->text.fit_x) size = sh;
359 358
360 if (inlined_font) efl_text_properties_font_source_set(ed->path); 359 if (inlined_font) efl_text_properties_font_source_set(ep->object, ed->path);
361 else efl_text_properties_font_source_set(NULL); 360 else efl_text_properties_font_source_set(ep->object, NULL);
362 361
363 if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc)); 362 if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
364 363
365 efl_text_properties_font_set(font, size); 364 efl_text_properties_font_set(ep->object, font, size);
366 efl_text_set(text); 365 efl_text_set(ep->object, text);
367 part_get_geometry(ep, &tw, &th); 366 part_get_geometry(ep, &tw, &th);
368 367
369 /* only grow the font size if we didn't already reach the max size 368 /* only grow the font size if we didn't already reach the max size
@@ -380,11 +379,11 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
380 size += dif; 379 size += dif;
381 if (size <= 0) break; 380 if (size <= 0) break;
382 381
383 if (inlined_font) efl_text_properties_font_source_set(ed->path); 382 if (inlined_font) efl_text_properties_font_source_set(ep->object, ed->path);
384 else efl_text_properties_font_source_set(NULL); 383 else efl_text_properties_font_source_set(ep->object, NULL);
385 384
386 if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc)); 385 if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
387 efl_text_properties_font_set(font, size); 386 efl_text_properties_font_set(ep->object, font, size);
388 387
389 part_get_geometry(ep, &tw, &th); 388 part_get_geometry(ep, &tw, &th);
390 if ((size > 0) && (th == 0)) break; 389 if ((size > 0) && (th == 0)) break;
@@ -395,8 +394,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
395 { 394 {
396 int current; 395 int current;
397 396
398 if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc)); 397 if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
399 efl_text_properties_font_set(font, 10); 398 efl_text_properties_font_set(ep->object, font, 10);
400 399
401 part_get_geometry(ep, &tw, &th); 400 part_get_geometry(ep, &tw, &th);
402 401
@@ -417,8 +416,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
417 { 416 {
418 current = (top + bottom) / 2; 417 current = (top + bottom) / 2;
419 418
420 if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc)); 419 if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
421 efl_text_properties_font_set(font, current); 420 efl_text_properties_font_set(ep->object, font, current);
422 421
423 part_get_geometry(ep, &tw, &th); 422 part_get_geometry(ep, &tw, &th);
424 423
@@ -433,8 +432,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
433 { 432 {
434 current++; 433 current++;
435 434
436 if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc)); 435 if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
437 efl_text_properties_font_set(font, current); 436 efl_text_properties_font_set(ep->object, font, current);
438 437
439 part_get_geometry(ep, &tw, &th); 438 part_get_geometry(ep, &tw, &th);
440 } while (th <= sh); 439 } while (th <= sh);
@@ -454,8 +453,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
454 /* Handle ellipsis */ 453 /* Handle ellipsis */
455 if (!chosen_desc->text.min_x) 454 if (!chosen_desc->text.min_x)
456 { 455 {
457 if (inlined_font) efl_text_properties_font_source_set(ed->path); 456 if (inlined_font) efl_text_properties_font_source_set(ep->object, ed->path);
458 else efl_text_properties_font_source_set(NULL); 457 else efl_text_properties_font_source_set(ep->object, NULL);
459 458
460 text = _edje_text_fit_x(ed, ep, params, chosen_desc, 459 text = _edje_text_fit_x(ed, ep, params, chosen_desc,
461 text, font, size, 460 text, font, size,
@@ -496,13 +495,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
496 ep->typedata.text->cache.fit_y = chosen_desc->text.fit_y; 495 ep->typedata.text->cache.fit_y = chosen_desc->text.fit_y;
497arrange_text: 496arrange_text:
498 497
499 if (inlined_font) efl_text_properties_font_source_set(ed->path); 498 if (inlined_font) efl_text_properties_font_source_set(ep->object, ed->path);
500 else efl_text_properties_font_source_set(NULL); 499 else efl_text_properties_font_source_set(ep->object, NULL);
501 500
502 if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc)); 501 if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
503 502
504 efl_text_properties_font_set(font, size); 503 efl_text_properties_font_set(ep->object, font, size);
505 efl_text_set(text); 504 efl_text_set(ep->object, text);
506 part_get_geometry(ep, &tw, &th); 505 part_get_geometry(ep, &tw, &th);
507 506
508 /* Handle alignment */ 507 /* Handle alignment */
@@ -530,11 +529,8 @@ arrange_text:
530 529
531 if (!calc_only) 530 if (!calc_only)
532 { 531 {
533 eo_do(ep->object, 532 efl_gfx_position_set(ep->object, ed->x + TO_INT(params->eval.x) + ep->typedata.text->offset.x, ed->y + TO_INT(params->eval.y) + ep->typedata.text->offset.y);
534 efl_gfx_position_set(ed->x + TO_INT(params->eval.x) + ep->typedata.text->offset.x, 533 efl_gfx_visible_set(ep->object, params->visible);
535 ed->y + TO_INT(params->eval.y) + ep->typedata.text->offset.y);
536
537 efl_gfx_visible_set(params->visible));
538 } 534 }
539 535
540 { 536 {
@@ -594,28 +590,14 @@ arrange_text:
594 590
595 case EDJE_TEXT_EFFECT_OUTLINE_SHADOW: 591 case EDJE_TEXT_EFFECT_OUTLINE_SHADOW:
596 style = EVAS_TEXT_STYLE_OUTLINE_SHADOW; 592 style = EVAS_TEXT_STYLE_OUTLINE_SHADOW;
597 eo_do(ep->object, 593 evas_obj_text_outline_color_set(ep->object, (params->type.text.color2.r * params->type.text.color2.a) / 255, (params->type.text.color2.g * params->type.text.color2.a) / 255, (params->type.text.color2.b * params->type.text.color2.a) / 255, params->type.text.color2.a);
598 evas_obj_text_outline_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255, 594 evas_obj_text_shadow_color_set(ep->object, (params->type.text.color3.r * params->type.text.color3.a) / 255, (params->type.text.color3.g * params->type.text.color3.a) / 255, (params->type.text.color3.b * params->type.text.color3.a) / 255, params->type.text.color3.a);
599 (params->type.text.color2.g * params->type.text.color2.a) / 255,
600 (params->type.text.color2.b * params->type.text.color2.a) / 255,
601 params->type.text.color2.a),
602 evas_obj_text_shadow_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255,
603 (params->type.text.color3.g * params->type.text.color3.a) / 255,
604 (params->type.text.color3.b * params->type.text.color3.a) / 255,
605 params->type.text.color3.a));
606 break; 595 break;
607 596
608 case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW: 597 case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW:
609 style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW; 598 style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW;
610 eo_do(ep->object, 599 evas_obj_text_outline_color_set(ep->object, (params->type.text.color2.r * params->type.text.color2.a) / 255, (params->type.text.color2.g * params->type.text.color2.a) / 255, (params->type.text.color2.b * params->type.text.color2.a) / 255, params->type.text.color2.a);
611 evas_obj_text_outline_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255, 600 evas_obj_text_shadow_color_set(ep->object, (params->type.text.color3.r * params->type.text.color3.a) / 255, (params->type.text.color3.g * params->type.text.color3.a) / 255, (params->type.text.color3.b * params->type.text.color3.a) / 255, params->type.text.color3.a);
612 (params->type.text.color2.g * params->type.text.color2.a) / 255,
613 (params->type.text.color2.b * params->type.text.color2.a) / 255,
614 params->type.text.color2.a),
615 evas_obj_text_shadow_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255,
616 (params->type.text.color3.g * params->type.text.color3.a) / 255,
617 (params->type.text.color3.b * params->type.text.color3.a) / 255,
618 params->type.text.color3.a));
619 break; 601 break;
620 602
621 case EDJE_TEXT_EFFECT_FAR_SHADOW: 603 case EDJE_TEXT_EFFECT_FAR_SHADOW:
@@ -638,15 +620,8 @@ arrange_text:
638 620
639 case EDJE_TEXT_EFFECT_GLOW: 621 case EDJE_TEXT_EFFECT_GLOW:
640 style = EVAS_TEXT_STYLE_GLOW; 622 style = EVAS_TEXT_STYLE_GLOW;
641 eo_do(ep->object, 623 evas_obj_text_glow_color_set(ep->object, (params->type.text.color2.r * params->type.text.color2.a) / 255, (params->type.text.color2.g * params->type.text.color2.a) / 255, (params->type.text.color2.b * params->type.text.color2.a) / 255, params->type.text.color2.a);
642 evas_obj_text_glow_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255, 624 evas_obj_text_glow2_color_set(ep->object, (params->type.text.color3.r * params->type.text.color3.a) / 255, (params->type.text.color3.g * params->type.text.color3.a) / 255, (params->type.text.color3.b * params->type.text.color3.a) / 255, params->type.text.color3.a);
643 (params->type.text.color2.g * params->type.text.color2.a) / 255,
644 (params->type.text.color2.b * params->type.text.color2.a) / 255,
645 params->type.text.color2.a),
646 evas_obj_text_glow2_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255,
647 (params->type.text.color3.g * params->type.text.color3.a) / 255,
648 (params->type.text.color3.b * params->type.text.color3.a) / 255,
649 params->type.text.color3.a));
650 break; 625 break;
651 626
652 default: 627 default: