edje: add edje signal emit about swallow, text
authorJaehwan Kim <jae.hwan.kim@samsung.com>
Wed, 21 Oct 2015 12:51:54 +0000 (21:51 +0900)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Wed, 21 Oct 2015 12:57:04 +0000 (21:57 +0900)
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

src/lib/edje/edje_util.c

index aa77208..6ef5d60 100644 (file)
@@ -1442,6 +1442,10 @@ _edje_object_part_text_raw_set(Edje *ed, Evas_Object *obj, Edje_Real_Part *rp, c
    _edje_recalc(ed);
    if (ed->text_change.func)
      ed->text_change.func(ed->text_change.data, obj, part);
+   if (text)
+     _edje_emit(ed, "text,set", rp->part->name);
+   else
+     _edje_emit(ed, "text,unset", rp->part->name);
    return EINA_TRUE;
 }
 
@@ -2886,6 +2890,7 @@ _edje_object_part_swallow(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Evas_
              eud->u.swallow.child = obj_swallow;
           }
      }
+   _edje_emit(ed, "swallow", rp->part->name);
 
    return EINA_TRUE;
 }
@@ -3162,6 +3167,7 @@ _edje_object_part_unswallow(Eo *obj EINA_UNUSED, Edje *ed, Evas_Object *obj_swal
                     if (eud->type == EDJE_USER_SWALLOW && eud->u.swallow.child == obj_swallow)
                       {
                          _edje_user_definition_free(eud);
+                         _edje_emit(ed, "unswallow", rp->part->name);
                          return;
                       }
                }
@@ -3182,6 +3188,7 @@ _edje_object_part_unswallow(Eo *obj EINA_UNUSED, Edje *ed, Evas_Object *obj_swal
          * -zmike, 6 April 2015
          */
         //_edje_recalc_do(ed);
+        _edje_emit(ed, "unswallow", rp->part->name);
         return;
      }
 }