awesome/tests/examples/shims/drawin.lua

24 lines
663 B
Lua
Raw Normal View History

2016-05-03 05:56:08 +02:00
local gears_obj = require("gears.object")
local drawin, meta = awesome._shim_fake_class()
local function new_drawin(_, args)
local ret = gears_obj()
2017-05-29 10:53:49 +02:00
ret.data = {drawable = gears_obj()}
2016-05-03 05:56:08 +02:00
for k, v in pairs(args) do
rawset(ret, k, v)
end
return setmetatable(ret, {
__index = function(...) return meta.__index(...) end,
__newindex = function(...) return meta.__newindex(...) end
})
2016-05-03 05:56:08 +02:00
end
return setmetatable(drawin, {
__call = new_drawin,
})
2016-05-03 05:56:08 +02:00
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80