aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/edje/edje_player.c
diff options
context:
space:
mode:
authorVyacheslav Reutskiy <v.reutskiy@samsung.com>2017-11-13 10:50:44 +0200
committerVyacheslav Reutskiy <v.reutskiy@samsung.com>2017-11-13 10:57:19 +0200
commitd498065cb418ccce53f1cb9f3e62f2cfb671e912 (patch)
tree53798ef0f7405ef9101115abbaaa87c21f2bdbe1 /src/bin/edje/edje_player.c
parenteina: Fix spelling/punctuation errors in docs (quaternion..rectangle) (diff)
downloadefl-d498065cb418ccce53f1cb9f3e62f2cfb671e912.tar.gz
edje: add event for inform about circular dependency
This commit add the event "circular,dependency" for edje object. Given event is called when edje found the circular dependency between parts in object. This event will be usefull and informative paired with Edje_Edit API.
Diffstat (limited to '')
-rw-r--r--src/bin/edje/edje_player.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/bin/edje/edje_player.c b/src/bin/edje/edje_player.c
index a246bf292c..938fabb28d 100644
--- a/src/bin/edje/edje_player.c
+++ b/src/bin/edje/edje_player.c
@@ -835,6 +835,27 @@ _edje_reload(void *data EINA_UNUSED, Evas_Object *obj, const char *emission EINA
_edje_load_or_show_error(obj, file, group);
}
+static void
+_edje_circul(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
+{
+ char buf[1024] = "";
+ Eina_List *parts = event_info;
+ Eina_List *l;
+ char *part_name;
+ char *group = data;
+
+ part_name = eina_list_data_get(eina_list_last(parts));
+ strncat(buf, part_name, strlen(part_name));
+ EINA_LIST_FOREACH(parts, l, part_name)
+ {
+ strncat(buf, " -> ", strlen(" -> "));
+ strncat(buf, part_name, strlen(part_name));
+ }
+
+ fprintf(stderr, "Group '%s' have a circul dependency between parts: %s\n",
+ group, buf);
+}
+
static Eina_Bool
_edje_load_or_show_error(Evas_Object *edje, const char *file, const char *group)
{
@@ -930,6 +951,7 @@ _create_edje(Evas *evas, const struct opts *opts)
edje_file_collection_list_free(groups);
}
}
+ evas_object_smart_callback_add(edje, "circular,dependency", _edje_circul, opts->group);
edje_object_size_max_get(edje, &maxw, &maxh);
edje_object_size_min_get(edje, &minw, &minh);