raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=432b9b1dcde17af826ba336c00f18643a3fd6232

commit 432b9b1dcde17af826ba336c00f18643a3fd6232
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sat Aug 5 14:47:25 2017 +0900

    edje - add embryo echo command for debugging
    
    finally add one...
    
    @feature
---
 data/edje/include/edje.inc |  2 ++
 src/lib/edje/edje_embryo.c | 21 +++++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/data/edje/include/edje.inc b/data/edje/include/edje.inc
index bc60a83c3e..ef2c31433a 100644
--- a/data/edje/include/edje.inc
+++ b/data/edje/include/edje.inc
@@ -337,3 +337,5 @@ enum Anim_Param
 native       set_tween_state_anim  (part_id, state1[], Float:state1_val, 
state2[], Float:state2_val, Anim_Param:p, Float:tween, ...);
 native       set_state_anim  (part_id, state[], Float:state1_val, 
Anim_Param:p, Float:tween, ...);
 native       swallow_has_content (part_id);
+
+native       echo(string[])
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index 081fe0e620..4f6812f71b 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -4500,6 +4500,26 @@ _edje_embryo_fn_swallow_has_content(Embryo_Program *ep, 
Embryo_Cell *params)
    return 1;
 }
 
+/* get_part_id(part[]) */
+static Embryo_Cell
+_edje_embryo_fn_echo(Embryo_Program *ep, Embryo_Cell *params)
+{
+   Edje *ed;
+   char *p;
+
+   CHKPARAM(1);
+   ed = embryo_program_data_get(ep);
+   GETSTR(p, params[1]);
+   if (!p) return -1;
+   fprintf(stderr,
+           "<EDJE ECHO> [%llx | %s:%s]: %s\n",
+           (unsigned long long)((uintptr_t)ed),
+           ed->path,
+           ed->group,
+           p);
+   return 0;
+}
+
 void
 _edje_embryo_script_init(Edje_Part_Collection *edc)
 {
@@ -4631,6 +4651,7 @@ _edje_embryo_script_init(Edje_Part_Collection *edc)
 #endif
 
    embryo_program_native_call_add(ep, "swallow_has_content", 
_edje_embryo_fn_swallow_has_content);
+   embryo_program_native_call_add(ep, "echo", _edje_embryo_fn_echo);
 }
 
 void

-- 


Reply via email to