summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehwan Kim <jae.hwan.kim@samsung.com>2015-10-21 21:51:54 +0900
committerJaehwan Kim <jae.hwan.kim@samsung.com>2015-10-21 21:57:04 +0900
commitb1fa1c5aadc71881cb1e4e264d680ea5efa79a69 (patch)
treef06bd44f29f2261be451cdd0411f7ede3317b3ec
parentec4dbd88a6317a52f10a418fa4991994987bbc44 (diff)
edje: add edje signal emit about swallow, text
Add the edje signal "swallow", "unswallow", "text,set", "text,unset". In edc file, the part name take a role of source. If the layout should be changed when any object is swallowed or any text is set, use this signal. @feature
-rw-r--r--src/lib/edje/edje_util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index aa77208228..6ef5d60b87 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -1442,6 +1442,10 @@ _edje_object_part_text_raw_set(Edje *ed, Evas_Object *obj, Edje_Real_Part *rp, c
1442 _edje_recalc(ed); 1442 _edje_recalc(ed);
1443 if (ed->text_change.func) 1443 if (ed->text_change.func)
1444 ed->text_change.func(ed->text_change.data, obj, part); 1444 ed->text_change.func(ed->text_change.data, obj, part);
1445 if (text)
1446 _edje_emit(ed, "text,set", rp->part->name);
1447 else
1448 _edje_emit(ed, "text,unset", rp->part->name);
1445 return EINA_TRUE; 1449 return EINA_TRUE;
1446} 1450}
1447 1451
@@ -2886,6 +2890,7 @@ _edje_object_part_swallow(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Evas_
2886 eud->u.swallow.child = obj_swallow; 2890 eud->u.swallow.child = obj_swallow;
2887 } 2891 }
2888 } 2892 }
2893 _edje_emit(ed, "swallow", rp->part->name);
2889 2894
2890 return EINA_TRUE; 2895 return EINA_TRUE;
2891} 2896}
@@ -3162,6 +3167,7 @@ _edje_object_part_unswallow(Eo *obj EINA_UNUSED, Edje *ed, Evas_Object *obj_swal
3162 if (eud->type == EDJE_USER_SWALLOW && eud->u.swallow.child == obj_swallow) 3167 if (eud->type == EDJE_USER_SWALLOW && eud->u.swallow.child == obj_swallow)
3163 { 3168 {
3164 _edje_user_definition_free(eud); 3169 _edje_user_definition_free(eud);
3170 _edje_emit(ed, "unswallow", rp->part->name);
3165 return; 3171 return;
3166 } 3172 }
3167 } 3173 }
@@ -3182,6 +3188,7 @@ _edje_object_part_unswallow(Eo *obj EINA_UNUSED, Edje *ed, Evas_Object *obj_swal
3182 * -zmike, 6 April 2015 3188 * -zmike, 6 April 2015
3183 */ 3189 */
3184 //_edje_recalc_do(ed); 3190 //_edje_recalc_do(ed);
3191 _edje_emit(ed, "unswallow", rp->part->name);
3185 return; 3192 return;
3186 } 3193 }
3187} 3194}