summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_calc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/edje/edje_calc.c')
-rw-r--r--src/lib/edje/edje_calc.c44
1 files changed, 27 insertions, 17 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index f0380e4fef..0619574e93 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -114,6 +114,31 @@ _edje_calc_params_clear(Edje_Calc_Params *p)
114 } 114 }
115} 115}
116 116
117static inline Eo *
118_edje_calc_get_part_object(const Edje_Real_Part *ep)
119{
120 if ((ep->type == EDJE_RP_TYPE_SWALLOW) && ep->typedata.swallow &&
121 ep->typedata.swallow->swallowed_object)
122 return ep->typedata.swallow->swallowed_object;
123 return ep->object;
124}
125
126static inline void
127_edje_calc_handle_state_clip(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *pf)
128{
129 Edje_Real_Part *clip_part = NULL;
130 Eo *clip_obj = ed->base.clipper;
131
132 if ((pf->ext) && (pf->ext->clip_to) && (pf->ext->clip_to->object))
133 clip_part = pf->ext->clip_to;
134 else if (ep->part->clip_to_id >= 0)
135 clip_part = ed->table_parts[ep->part->clip_to_id % ed->table_parts_size];
136
137 if (clip_part)
138 clip_obj = _edje_calc_get_part_object(clip_part);
139 evas_object_clip_set(_edje_calc_get_part_object(ep), clip_obj);
140}
141
117void 142void
118_edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2, FLOAT_T v3, FLOAT_T v4) 143_edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2, FLOAT_T v3, FLOAT_T v4)
119{ 144{
@@ -4761,14 +4786,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4761 4786
4762 /* handle clip overrides */ 4787 /* handle clip overrides */
4763 if (ed->has_state_clip) 4788 if (ed->has_state_clip)
4764 { 4789 _edje_calc_handle_state_clip(ed, ep, pf);
4765 if ((pf->ext) && (pf->ext->clip_to) && (pf->ext->clip_to->object))
4766 evas_object_clip_set(ep->object, pf->ext->clip_to->object);
4767 else if (ep->part->clip_to_id >= 0)
4768 evas_object_clip_set(ep->object, ed->table_parts[ep->part->clip_to_id % ed->table_parts_size]->object);
4769 else
4770 evas_object_clip_set(ep->object, ed->base.clipper);
4771 }
4772 break; 4790 break;
4773 4791
4774 case EDJE_PART_TYPE_TEXT: 4792 case EDJE_PART_TYPE_TEXT:
@@ -5026,15 +5044,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
5026 (ep->typedata.swallow->swallowed_object)) 5044 (ep->typedata.swallow->swallowed_object))
5027 { 5045 {
5028 if (ed->has_state_clip) 5046 if (ed->has_state_clip)
5029 { 5047 _edje_calc_handle_state_clip(ed, ep, pf);
5030 if ((pf->ext) && (pf->ext->clip_to) && (pf->ext->clip_to->object))
5031 evas_object_clip_set(ep->typedata.swallow->swallowed_object, pf->ext->clip_to->object);
5032 else if (ep->part->clip_to_id >= 0)
5033 evas_object_clip_set(ep->typedata.swallow->swallowed_object, ed->table_parts[ep->part->clip_to_id % ed->table_parts_size]->object);
5034 else
5035 evas_object_clip_set(ep->typedata.swallow->swallowed_object, ed->base.clipper);
5036 }
5037
5038 if (pf->visible) 5048 if (pf->visible)
5039 { 5049 {
5040 Eina_Bool vis = EINA_TRUE; 5050 Eina_Bool vis = EINA_TRUE;