You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
677 B
Lua
23 lines
677 B
Lua
local base = string.match(..., "(.-)[^%.]+%.[^%.]+$")
|
|
local ff_effect = require(base.."ev_api.ff_effect").new
|
|
local ffi = require("ffi")
|
|
local fh = require(base.."helper.ffi_struct")
|
|
|
|
local format = string.format
|
|
|
|
local mt, index = {}, {}
|
|
|
|
fh.gen_raw_accessor(index, "request_id")
|
|
fh.gen_raw_accessor(index, "retval")
|
|
fh.gen_wrap_accessor(index, "effect", ff_effect)
|
|
fh.gen_wrap_accessor(index, "old", ff_effect)
|
|
|
|
function index:tostring()
|
|
return format(
|
|
"ff_upload{request_id=%d, retval=%d, effect=%s, old=%s}",
|
|
self.request_id, self.retval, self.effect, self.old)
|
|
end
|
|
mt.__tostring = index.tostring
|
|
|
|
return fh.base(mt, index, ffi.typeof("struct uinput_ff_upload"))
|