From: Daniel Kolesa Date: Tue, 22 Apr 2014 13:09:17 +0000 (+0100) Subject: elua: event ffi generation X-Git-Tag: upstream/1.10.0+1149+ga3a15b1~644^2~180 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92f6397b9676815d93e0bcb25db3af2b472f9287;p=platform%2Fupstream%2Fefl.git elua: event ffi generation --- diff --git a/src/bin/elua/modules/lualian.lua b/src/bin/elua/modules/lualian.lua index 84c8e067cb..b0bf1a8df4 100644 --- a/src/bin/elua/modules/lualian.lua +++ b/src/bin/elua/modules/lualian.lua @@ -335,14 +335,19 @@ local Property = Method:clone { } local Event = Node:clone { - __ctor = function(self, event) - self.event = event + __ctor = function(self, ename, etype, edesc) + self.ename = ename + self.etype = etype + self.edesc = edesc end, generate = function(self, s, last) end, gen_ffi = function(self, s) + s:write(" extern const Eo_Event_Description _", + self.parent_node.cname:upper(), "_EVENT_", + self.ename:gsub("%W", "_"):upper(), ";\n") end, gen_ctor = function(self, s) @@ -507,7 +512,8 @@ local gen_contents = function(classn) -- events local events = eolian.class_events_list_get(classn) for i, v in ipairs(events) do - cnt[#cnt + 1] = Event(v) + local en, et, ed = v:information_get() + cnt[#cnt + 1] = Event(en, et, ed) end return cnt end