summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/edje/edje_util.c')
-rw-r--r--src/lib/edje/edje_util.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 450015f..f699f83 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -4,6 +4,20 @@
4#include "../evas/canvas/evas_line_eo.h" 4#include "../evas/canvas/evas_line_eo.h"
5#include "../evas/canvas/evas_text_eo.h" 5#include "../evas/canvas/evas_text_eo.h"
6 6
7//In implementations that gets properties for user-created edje,
8//edje calculation should be performed regardless of the size of edje.
9#define EDJE_RECALC_DO(ed) \
10 do { \
11 Eina_Bool calc_flag = EINA_FALSE; \
12 if (!ed->has_size) \
13 { \
14 ed->has_size = EINA_TRUE; \
15 calc_flag = EINA_TRUE; \
16 } \
17 _edje_recalc_do(ed); \
18 if (calc_flag) ed->has_size = EINA_FALSE; \
19 } while (0)
20
7typedef struct _Edje_Box_Layout Edje_Box_Layout; 21typedef struct _Edje_Box_Layout Edje_Box_Layout;
8struct _Edje_Box_Layout 22struct _Edje_Box_Layout
9{ 23{
@@ -1945,7 +1959,7 @@ edje_object_part_object_get(const Eo *obj, const char *part)
1945 if ((!ed) || (!part)) return NULL; 1959 if ((!ed) || (!part)) return NULL;
1946 1960
1947 /* Need to recalc before providing the object. */ 1961 /* Need to recalc before providing the object. */
1948 if (!ed->freeze) _edje_recalc_do(ed); 1962 if (!ed->freeze) EDJE_RECALC_DO(ed);
1949 1963
1950 rp = _edje_real_part_recursive_get(&ed, part); 1964 rp = _edje_real_part_recursive_get(&ed, part);
1951 if (!rp) return NULL; 1965 if (!rp) return NULL;
@@ -2029,6 +2043,8 @@ _edje_object_part_text_raw_generic_set(Edje *ed, Evas_Object *obj, Edje_Real_Par
2029 _edje_recalc(ed); 2043 _edje_recalc(ed);
2030 if (ed->text_change.func) 2044 if (ed->text_change.func)
2031 ed->text_change.func(ed->text_change.data, obj, part); 2045 ed->text_change.func(ed->text_change.data, obj, part);
2046 edje_object_signal_emit(ed->obj, "edje,text,changed", "edje");
2047
2032 return EINA_TRUE; 2048 return EINA_TRUE;
2033} 2049}
2034 2050
@@ -2187,7 +2203,7 @@ _edje_efl_text_text_get(const Eo *obj EINA_UNUSED, Edje *ed, const char *part,
2187#else 2203#else
2188 if (ed->dirty) 2204 if (ed->dirty)
2189#endif 2205#endif
2190 _edje_recalc_do(ed); 2206 EDJE_RECALC_DO(ed);
2191 entry = evas_object_textblock_text_markup_get(rp->object); 2207 entry = evas_object_textblock_text_markup_get(rp->object);
2192 } 2208 }
2193 } 2209 }
@@ -2200,7 +2216,7 @@ _edje_efl_text_text_get(const Eo *obj EINA_UNUSED, Edje *ed, const char *part,
2200#else 2216#else
2201 if (ed->dirty) 2217 if (ed->dirty)
2202#endif 2218#endif
2203 _edje_recalc_do(ed); 2219 EDJE_RECALC_DO(ed);
2204 entry = efl_text_markup_get(rp->object); 2220 entry = efl_text_markup_get(rp->object);
2205 } 2221 }
2206 else 2222 else
@@ -3088,7 +3104,8 @@ _edje_efl_content_content_set(Edje *ed, const char *part, Efl_Gfx_Entity *obj_sw
3088 eud->u.swallow.child = obj_swallow; 3104 eud->u.swallow.child = obj_swallow;
3089 } 3105 }
3090 } 3106 }
3091 efl_event_callback_call(ed->obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, obj_swallow); 3107 if (ed->has_content_change_event_cb)
3108 efl_event_callback_call(ed->obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, obj_swallow);
3092 return EINA_TRUE; 3109 return EINA_TRUE;
3093} 3110}
3094 3111
@@ -3579,7 +3596,7 @@ _efl_canvas_layout_efl_layout_group_group_size_max_get(const Eo *obj EINA_UNUSED
3579 return EINA_SIZE2D(0, 0); 3596 return EINA_SIZE2D(0, 0);
3580 3597
3581 /* Need to recalc before providing the object. */ 3598 /* Need to recalc before providing the object. */
3582 if (!ed->freeze) _edje_recalc_do(ed); 3599 if (!ed->freeze) EDJE_RECALC_DO(ed);
3583 3600
3584 sz = ed->collection->prop.max; 3601 sz = ed->collection->prop.max;
3585 3602