summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-09-22 16:59:28 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-10-07 11:54:23 +0200
commit56cd773836278bbb78708fd526c1f0fda7e801c8 (patch)
tree87f0ff9f1ac772ed9c31fc82780994b18b7c5a49
parent34c2bf66ce0c08def79f905841376a5ab0c8e957 (diff)
eolian gen2: add event generation
-rw-r--r--src/bin/eolian2/sources.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bin/eolian2/sources.c b/src/bin/eolian2/sources.c
index f50db7b927..abfd6a5c19 100644
--- a/src/bin/eolian2/sources.c
+++ b/src/bin/eolian2/sources.c
@@ -6,4 +6,24 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
6{ 6{
7 if (!cl) 7 if (!cl)
8 return; 8 return;
9
10 /* event section, they come first */
11 {
12 Eina_Iterator *itr = eolian_class_events_get(cl);
13 Eolian_Event *ev;
14 EINA_ITERATOR_FOREACH(itr, ev)
15 {
16 Eina_Stringshare *evn = eolian_event_c_name_get(ev);
17 eina_strbuf_append(buf, "EOAPI const Efl_Event_Description _");
18 eina_strbuf_append(buf, evn);
19 eina_strbuf_append(buf, " =\n EFL_EVENT_DESCRIPTION");
20 if (eolian_event_is_hot(ev))
21 eina_strbuf_append(buf, "_HOT");
22 if (eolian_event_is_restart(ev))
23 eina_strbuf_append(buf, "_RESTART");
24 eina_strbuf_append_printf(buf, "(\"%s\");\n", eolian_event_name_get(ev));
25 eina_stringshare_del(evn);
26 }
27 eina_iterator_free(itr);
28 }
9} 29}