summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2018-01-16 18:21:48 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2018-01-16 19:35:54 +0900
commitdf1900b9bdd9a78eb8d7fb4e4de8b9ed354ec078 (patch)
tree95a9645141c1442307fe4331dfa6578ccc8ed922
parenteb9f35bcb9bab02a822cd1eae1351de72fbef3e7 (diff)
edje: Add beta event when an invalid part is used
This can be used for debugging, by listening to EFL_LAYOUT_EVENT_PART_INVALID Or just use EINA_LOG_LEVELS=edje:2 if you just need the logs.
-rw-r--r--src/lib/edje/edje_part_invalid.c4
-rw-r--r--src/lib/edje/efl_canvas_layout.eo5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/edje/edje_part_invalid.c b/src/lib/edje/edje_part_invalid.c
index d14022d1f5..057a54a91a 100644
--- a/src/lib/edje/edje_part_invalid.c
+++ b/src/lib/edje/edje_part_invalid.c
@@ -10,9 +10,9 @@ _edje_part_invalid_call(Eo *proxy, const char *function)
10{ 10{
11 PROXY_DATA_GET(proxy, pd); 11 PROXY_DATA_GET(proxy, pd);
12 12
13 // FIXME: Add if (!optional) 13 WRN("No such part '%s' in group '%s' in call to %s(). Ignored.",
14 WRN("No such part '%s' in group '%s' in call to %s().",
15 pd->part, pd->ed ? pd->ed->group : NULL, function); 14 pd->part, pd->ed ? pd->ed->group : NULL, function);
15 efl_event_callback_call(pd->obj, EFL_LAYOUT_EVENT_PART_INVALID, (void *) pd->part);
16} 16}
17 17
18#pragma GCC diagnostic push 18#pragma GCC diagnostic push
diff --git a/src/lib/edje/efl_canvas_layout.eo b/src/lib/edje/efl_canvas_layout.eo
index 75fb272c49..b1596e77ac 100644
--- a/src/lib/edje/efl_canvas_layout.eo
+++ b/src/lib/edje/efl_canvas_layout.eo
@@ -10,6 +10,7 @@ class Efl.Canvas.Layout (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
10{ 10{
11 [[Edje object class]] 11 [[Edje object class]]
12 legacy_prefix: edje_object; 12 legacy_prefix: edje_object;
13 event_prefix: efl_layout;
13 data: Edje; 14 data: Edje;
14 methods { 15 methods {
15 @property animation { 16 @property animation {
@@ -90,6 +91,10 @@ class Efl.Canvas.Layout (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
90 } 91 }
91 } 92 }
92 } 93 }
94 events {
95 part,invalid @beta: string; [[Emitted when trying to use an invalid part.
96 The value passed is the part name.]]
97 }
93 implements { 98 implements {
94 Efl.Gfx.visible { set; } 99 Efl.Gfx.visible { set; }
95 Efl.Gfx.position { set; } 100 Efl.Gfx.position { set; }