forked from enlightenment/efl
elua: update eolian bindings and generator
This commit is contained in:
parent
8631212e45
commit
fc40591f11
|
@ -165,7 +165,7 @@ local Method = Node:clone {
|
|||
local allocs = {}
|
||||
proto.allocs = allocs
|
||||
|
||||
proto.full_name = meth:full_c_name_get(self.parent_node.prefix)
|
||||
proto.full_name = meth:full_c_name_get()
|
||||
|
||||
local dirs = eolian.parameter_dir
|
||||
|
||||
|
@ -259,8 +259,7 @@ local Property = Method:clone {
|
|||
local allocs = {}
|
||||
proto.allocs = allocs
|
||||
|
||||
proto.full_name = prop:full_c_name_get(self.parent_node.prefix)
|
||||
.. proto.suffix
|
||||
proto.full_name = prop:full_c_name_get() .. proto.suffix
|
||||
|
||||
local dirs = eolian.parameter_dir
|
||||
|
||||
|
@ -330,19 +329,17 @@ local Property = Method:clone {
|
|||
}
|
||||
|
||||
local Event = Node:clone {
|
||||
__ctor = function(self, ename, etype, edesc)
|
||||
self.ename = ename
|
||||
self.etype = etype
|
||||
self.edesc = edesc
|
||||
__ctor = function(self, ename, etype, edesc, ecname)
|
||||
self.ename = ename
|
||||
self.etype = etype
|
||||
self.edesc = edesc
|
||||
self.ecname = ecname
|
||||
end,
|
||||
|
||||
gen_ffi_name = function(self)
|
||||
local ffin = self.cached_ffi_name
|
||||
if ffin then return ffin end
|
||||
ffin = table.concat {
|
||||
"_", self.parent_node.klass:name_get():upper(), "_EVENT_",
|
||||
self.ename:gsub("%W", "_"):upper()
|
||||
}
|
||||
ffin = "_" .. self.ecname
|
||||
self.cached_ffi_name = ffin
|
||||
return ffin
|
||||
end,
|
||||
|
@ -621,7 +618,8 @@ local gen_contents = function(klass)
|
|||
local evs = {}
|
||||
local events = klass:events_get():to_array()
|
||||
for i, v in ipairs(events) do
|
||||
evs[#evs + 1] = Event(v:name_get(), v:type_get(), v:description_get())
|
||||
evs[#evs + 1] = Event(v:name_get(), v:type_get(), v:description_get(),
|
||||
v:c_name_get())
|
||||
end
|
||||
return cnt, evs
|
||||
end
|
||||
|
|
|
@ -202,7 +202,7 @@ ffi.cdef [[
|
|||
Eolian_Function_Type eolian_function_type_get(const Eolian_Function *function_id);
|
||||
Eolian_Object_Scope eolian_function_scope_get(const Eolian_Function *function_id);
|
||||
const char *eolian_function_name_get(const Eolian_Function *function_id);
|
||||
const char *eolian_function_full_c_name_get(const Eolian_Function *function_id, const char *prefix);
|
||||
const char *eolian_function_full_c_name_get(const Eolian_Function *function_id);
|
||||
const Eolian_Function *eolian_class_function_get_by_name(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type);
|
||||
const char *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
|
||||
const char *eolian_function_description_get(const Eolian_Function *function_id, Eolian_Function_Type f_type);
|
||||
|
@ -246,6 +246,7 @@ ffi.cdef [[
|
|||
const Eolian_Type *eolian_event_type_get(const Eolian_Event *event);
|
||||
const char *eolian_event_description_get(const Eolian_Event *event);
|
||||
Eolian_Object_Scope eolian_event_scope_get(const Eolian_Event *event);
|
||||
const char *eolian_event_c_name_get(const Eolian_Event *event);
|
||||
Eina_Bool eolian_class_ctor_enable_get(const Eolian_Class *klass);
|
||||
Eina_Bool eolian_class_dtor_enable_get(const Eolian_Class *klass);
|
||||
const Eolian_Type *eolian_type_alias_get_by_name(const char *name);
|
||||
|
@ -608,8 +609,8 @@ M.Function = ffi.metatype("Eolian_Function", {
|
|||
return ffi.string(v)
|
||||
end,
|
||||
|
||||
full_c_name_get = function(self, prefix)
|
||||
local v = eolian.eolian_function_full_c_name_get(self, prefix)
|
||||
full_c_name_get = function(self)
|
||||
local v = eolian.eolian_function_full_c_name_get(self)
|
||||
if v == nil then return nil end
|
||||
return ffi_stringshare(v)
|
||||
end,
|
||||
|
@ -829,6 +830,12 @@ ffi.metatype("Eolian_Event", {
|
|||
|
||||
scope_get = function(self)
|
||||
return eolian.eolian_event_scope_get(self)
|
||||
end,
|
||||
|
||||
c_name_get = function(self)
|
||||
local v = eolian.eolian_event_c_name_get(self)
|
||||
if v == nil then return nil end
|
||||
return ffi_stringshare(v)
|
||||
end
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue