summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2015-03-03 15:43:02 +0000
committerDaniel Kolesa <d.kolesa@samsung.com>2015-03-03 15:43:02 +0000
commitc0e20c0c3d00faa8989ad8dfe2ecb7e1d8109996 (patch)
tree1e424f2063fa2b61443c52782d3549c6b86666d4 /src
parentc9c13bd650aca974631969a636ffc525c359032b (diff)
elua: callback stubs for basic event handling
Diffstat (limited to 'src')
-rw-r--r--src/bindings/luajit/eo.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/bindings/luajit/eo.lua b/src/bindings/luajit/eo.lua
index e54a747f4e..f889c2107a 100644
--- a/src/bindings/luajit/eo.lua
+++ b/src/bindings/luajit/eo.lua
@@ -109,6 +109,7 @@ ffi.cdef [[
109 109
110 extern const Eo_Event_Description _EO_BASE_EVENT_CALLBACK_ADD; 110 extern const Eo_Event_Description _EO_BASE_EVENT_CALLBACK_ADD;
111 extern const Eo_Event_Description _EO_BASE_EVENT_CALLBACK_DEL; 111 extern const Eo_Event_Description _EO_BASE_EVENT_CALLBACK_DEL;
112 extern const Eo_Event_Description _EO_BASE_EVENT_DEL;
112]] 113]]
113 114
114local addr_d = ffi.typeof("union { double d; const Eo_Class *p; }") 115local addr_d = ffi.typeof("union { double d; const Eo_Class *p; }")
@@ -128,6 +129,26 @@ local eo
128local classes = {} 129local classes = {}
129local eo_classes = {} 130local eo_classes = {}
130 131
132-- event system
133
134local callbacks = {}
135
136local eo_event_cb_add, eo_event_cb_del, eo_event_del, eo_event_cb
137
138eo_event_cb_add = ffi.cast("Eo_Event_Cb", function(data, obj, desc, einfo)
139 local acb = ffi.cast("Eo_Callback_Array_Item *", data)
140end)
141
142eo_event_cb_del = ffi.cast("Eo_Event_Cb", function(data, obj, desc, einfo)
143 local dcb = ffi.cast("Eo_Callback_Array_Item *", data)
144end)
145
146eo_event_del = ffi.cast("Eo_Event_Cb", function(data, obj, desc, einfo)
147end)
148
149eo_event_cb = ffi.cast("Eo_Event_Cb", function(data, obj, desc, einfo)
150end)
151
131local connect = function(self, ename, func, priority) 152local connect = function(self, ename, func, priority)
132 local ev = self.__events[ename] 153 local ev = self.__events[ename]
133 if not ev then 154 if not ev then