summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2016-03-06 11:13:12 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2016-03-06 11:13:12 +0200
commitf0b708378c0bf71b4c97523c27d2bd0f7a390e28 (patch)
tree4b9ea47e2e9ccb87fd12c6df3d496dbb376424ba
parentf0b9eeb9b0a3a18cef1ee5a802c70d2667c124c9 (diff)
Generate code according to Eo4HEADmaster
-rw-r--r--src/bin/ea_cgen/ea_cgen.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/bin/ea_cgen/ea_cgen.c b/src/bin/ea_cgen/ea_cgen.c
index 978edf6..b1b82a1 100644
--- a/src/bin/ea_cgen/ea_cgen.c
+++ b/src/bin/ea_cgen/ea_cgen.c
@@ -215,7 +215,7 @@ _params_generate(Eina_Iterator *pitr, const Object_Context *obj_ctx)
215 EINA_ITERATOR_FOREACH(pitr, ea_par) 215 EINA_ITERATOR_FOREACH(pitr, ea_par)
216 { 216 {
217 if (!buf) buf = eina_strbuf_new(); 217 if (!buf) buf = eina_strbuf_new();
218 else eina_strbuf_append_printf(buf, ", "); 218 eina_strbuf_append_printf(buf, ", ");
219 if (obj_ctx->inside_cb && 219 if (obj_ctx->inside_cb &&
220 ea_parameter_type_get(ea_par) == EA_PARAM_OBJECT) 220 ea_parameter_type_get(ea_par) == EA_PARAM_OBJECT)
221 { 221 {
@@ -269,10 +269,9 @@ _prop_apply(const Ea *ea_obj, const Ea *ea_func, const Ea *ea_ret_obj, int space
269 sprintf(menu_get, "elm_toolbar_item_menu_get(%s)", obj_name); 269 sprintf(menu_get, "elm_toolbar_item_menu_get(%s)", obj_name);
270 obj_name = menu_get; 270 obj_name = menu_get;
271 } 271 }
272 eina_strbuf_append_printf(obj_ctx->c_buf, "%*seo_do(%s, %s%s%s(%s));\n", spaces, " ", 272 eina_strbuf_append_printf(obj_ctx->c_buf, "%*s%s%s%s(%s%s);\n", spaces, " ",
273 obj_name,
274 ea_ret_obj ? ea_object_name_get(ea_ret_obj) : "", 273 ea_ret_obj ? ea_object_name_get(ea_ret_obj) : "",
275 ea_ret_obj ? " = " : "", foo_name, 274 ea_ret_obj ? " = " : "", foo_name, obj_name,
276 params_buf ? eina_strbuf_string_get(params_buf) : ""); 275 params_buf ? eina_strbuf_string_get(params_buf) : "");
277 if (params_buf) eina_strbuf_free(params_buf); 276 if (params_buf) eina_strbuf_free(params_buf);
278 277
@@ -331,12 +330,12 @@ _ctor_apply(const Ea *ea_obj, int spaces, Object_Context *obj_ctx)
331 Eina_Strbuf *params = NULL; 330 Eina_Strbuf *params = NULL;
332 if (!ctor_buf) ctor_buf = eina_strbuf_new(); 331 if (!ctor_buf) ctor_buf = eina_strbuf_new();
333 else eina_strbuf_append_printf(ctor_buf, ", "); 332 else eina_strbuf_append_printf(ctor_buf, ", ");
334 eina_strbuf_append_printf(ctor_buf, "%s(", 333 eina_strbuf_append_printf(ctor_buf, "%s(eoid",
335 eolian_function_full_c_name_get(func, ftype == EOLIAN_PROPERTY ? EOLIAN_PROP_SET : ftype, EINA_FALSE)); 334 eolian_function_full_c_name_get(func, ftype == EOLIAN_PROPERTY ? EOLIAN_PROP_SET : ftype, EINA_FALSE));
336 EINA_ITERATOR_FOREACH(pitr, ea_par) 335 EINA_ITERATOR_FOREACH(pitr, ea_par)
337 { 336 {
338 if (!params) params = eina_strbuf_new(); 337 if (!params) params = eina_strbuf_new();
339 else eina_strbuf_append_printf(params, ", "); 338 eina_strbuf_append_printf(params, ", ");
340 _param_append(ea_par, params); 339 _param_append(ea_par, params);
341 } 340 }
342 if (params) 341 if (params)
@@ -391,7 +390,7 @@ _callback_generate(const Ea *ea_obj, const Ea *ea_cb, Object_Context *obj_ctx)
391 eina_strbuf_replace_all(_obj_cb_type, ",", "_"); 390 eina_strbuf_replace_all(_obj_cb_type, ",", "_");
392 const char *_obj_cb_type_str = eina_strbuf_string_get(_obj_cb_type); 391 const char *_obj_cb_type_str = eina_strbuf_string_get(_obj_cb_type);
393 392
394 eina_strbuf_append_printf(obj_ctx->c_buf, " eo_do(%s, eo_event_callback_add(%s, %s, NULL));\n", 393 eina_strbuf_append_printf(obj_ctx->c_buf, " eo_event_callback_add(%s, %s, %s, NULL);\n",
395 obj_name, event_name, _obj_cb_type_str); 394 obj_name, event_name, _obj_cb_type_str);
396 395
397 eina_strbuf_append_printf(_obj_cb_type_foo, 396 eina_strbuf_append_printf(_obj_cb_type_foo,