background: Add the common object documentation
This commit is contained in:
parent
8d6f82f0a3
commit
a5edff396c
|
@ -14,6 +14,7 @@ local color = require("gears.color")
|
||||||
local surface = require("gears.surface")
|
local surface = require("gears.surface")
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
local cairo = require("lgi").cairo
|
local cairo = require("lgi").cairo
|
||||||
|
local util = require("awful.util")
|
||||||
local setmetatable = setmetatable
|
local setmetatable = setmetatable
|
||||||
local type = type
|
local type = type
|
||||||
local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility with Lua 5.1)
|
local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility with Lua 5.1)
|
||||||
|
@ -268,11 +269,7 @@ local function new(widget, bg, shape)
|
||||||
enable_properties = true,
|
enable_properties = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
for k, v in pairs(background) do
|
util.table.crush(ret, background, true)
|
||||||
if type(v) == "function" then
|
|
||||||
ret[k] = v
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
ret._private.shape = shape
|
ret._private.shape = shape
|
||||||
|
|
||||||
|
@ -288,6 +285,8 @@ end
|
||||||
|
|
||||||
--@DOC_widget_COMMON@
|
--@DOC_widget_COMMON@
|
||||||
|
|
||||||
|
--@DOC_object_COMMON@
|
||||||
|
|
||||||
return setmetatable(background, background.mt)
|
return setmetatable(background, background.mt)
|
||||||
|
|
||||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue