From 432b9b1dcde17af826ba336c00f18643a3fd6232 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sat, 5 Aug 2017 14:47:25 +0900 Subject: [PATCH] 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 bc60a83..ef2c314 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 081fe0e..4f6812f 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, + " [%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 -- 2.7.4