summaryrefslogtreecommitdiff
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-09-25 14:58:53 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-09-25 14:58:53 +0100
commita1552fe6a9f8fc07929a68dafc0413c5338bcd61 (patch)
treedc99ea5d04e06acb11a8f869e37b0826ab57fbf4 /src/bin/eolian
parent88843b73776b8351c5c92606f56027595422b9ef (diff)
eolian: new API: eolian_event_c_name_get
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/eo_generator.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index 84ae94ff20..e1a7bfe1a7 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -265,7 +265,7 @@ eo_header_generate(const Eolian_Class *class, Eina_Strbuf *buf)
265 itr = eolian_class_events_get(class); 265 itr = eolian_class_events_get(class);
266 EINA_ITERATOR_FOREACH(itr, event) 266 EINA_ITERATOR_FOREACH(itr, event)
267 { 267 {
268 const char *evname = eolian_event_name_get(event); 268 const char *evname = eolian_event_c_name_get(event);
269 const char *evdesc = eolian_event_description_get(event); 269 const char *evdesc = eolian_event_description_get(event);
270 Eolian_Object_Scope scope = eolian_event_scope_get(event); 270 Eolian_Object_Scope scope = eolian_event_scope_get(event);
271 271
@@ -288,7 +288,8 @@ eo_header_generate(const Eolian_Class *class, Eina_Strbuf *buf)
288 eina_strbuf_append_printf(str_ev, "/**\n%s\n */\n", eina_strbuf_string_get(tmpbuf)); 288 eina_strbuf_append_printf(str_ev, "/**\n%s\n */\n", eina_strbuf_string_get(tmpbuf));
289 289
290 eina_strbuf_reset(tmpbuf); 290 eina_strbuf_reset(tmpbuf);
291 eina_strbuf_append_printf(tmpbuf, "%s_EVENT_%s", class_env.upper_classname, evname); 291 eina_strbuf_append(tmpbuf, evname);
292 eina_stringshare_del(evname);
292 eina_strbuf_replace_all(tmpbuf, ",", "_"); 293 eina_strbuf_replace_all(tmpbuf, ",", "_");
293 char* s = (char *)eina_strbuf_string_get(tmpbuf); 294 char* s = (char *)eina_strbuf_string_get(tmpbuf);
294 eina_str_toupper(&s); 295 eina_str_toupper(&s);
@@ -667,21 +668,22 @@ eo_source_beginning_generate(const Eolian_Class *class, Eina_Strbuf *buf)
667 itr = eolian_class_events_get(class); 668 itr = eolian_class_events_get(class);
668 EINA_ITERATOR_FOREACH(itr, event) 669 EINA_ITERATOR_FOREACH(itr, event)
669 { 670 {
670 const char *evname = eolian_event_name_get(event); 671 const char *evname = eolian_event_c_name_get(event);
671 const char *evdesc = eolian_event_description_get(event); 672 const char *evdesc = eolian_event_description_get(event);
672 char *evdesc_line1; 673 char *evdesc_line1;
673 char *p; 674 char *p;
674 675
675 eina_strbuf_reset(str_ev); 676 eina_strbuf_reset(str_ev);
676 evdesc_line1 = _source_desc_get(evdesc); 677 evdesc_line1 = _source_desc_get(evdesc);
677 eina_strbuf_append_printf(str_ev, "%s_EVENT_%s", class_env.upper_classname, evname); 678 eina_strbuf_append(str_ev, evname);
679 eina_stringshare_del(evname);
678 p = (char *)eina_strbuf_string_get(str_ev); 680 p = (char *)eina_strbuf_string_get(str_ev);
679 eina_str_toupper(&p); 681 eina_str_toupper(&p);
680 eina_strbuf_replace_all(str_ev, ",", "_"); 682 eina_strbuf_replace_all(str_ev, ",", "_");
681 683
682 eina_strbuf_append_printf(tmpbuf, 684 eina_strbuf_append_printf(tmpbuf,
683 "EOAPI const Eo_Event_Description _%s =\n EO_EVENT_DESCRIPTION(\"%s\", \"%s\");\n", 685 "EOAPI const Eo_Event_Description _%s =\n EO_EVENT_DESCRIPTION(\"%s\", \"%s\");\n",
684 eina_strbuf_string_get(str_ev), evname, evdesc_line1); 686 eina_strbuf_string_get(str_ev), eolian_event_name_get(event), evdesc_line1);
685 free(evdesc_line1); 687 free(evdesc_line1);
686 } 688 }
687 eina_iterator_free(itr); 689 eina_iterator_free(itr);
@@ -878,11 +880,12 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
878 itr = eolian_class_events_get(class); 880 itr = eolian_class_events_get(class);
879 EINA_ITERATOR_FOREACH(itr, event) 881 EINA_ITERATOR_FOREACH(itr, event)
880 { 882 {
881 const char *evname = eolian_event_name_get(event); 883 const char *evname = eolian_event_c_name_get(event);
882 char *p; 884 char *p;
883 885
884 eina_strbuf_reset(tmpbuf); 886 eina_strbuf_reset(tmpbuf);
885 eina_strbuf_append_printf(tmpbuf, "%s_EVENT_%s", class_env.upper_classname, evname); 887 eina_strbuf_append(tmpbuf, evname);
888 eina_stringshare_del(evname);
886 p = (char *)eina_strbuf_string_get(tmpbuf); 889 p = (char *)eina_strbuf_string_get(tmpbuf);
887 eina_str_toupper(&p); 890 eina_str_toupper(&p);
888 eina_strbuf_replace_all(tmpbuf, ",", "_"); 891 eina_strbuf_replace_all(tmpbuf, ",", "_");