Docs: Fix headers for the wibox module
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
This commit is contained in:
parent
00f558ff92
commit
e4fa6effe2
|
@ -1,7 +1,10 @@
|
|||
---------------------------------------------------------------------------
|
||||
--- Handling of drawables. A drawable is something that can be drawn to.
|
||||
--
|
||||
-- @author Uli Schlachter
|
||||
-- @copyright 2012 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.drawable
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local drawable = {}
|
||||
|
@ -82,7 +85,7 @@ end
|
|||
-- @param x X coordinate of the point
|
||||
-- @param y Y coordinate of the point
|
||||
-- @return A sorted table with all widgets that contain the given point. The
|
||||
-- widgets are sorted by relevance.
|
||||
-- widgets are sorted by relevance.
|
||||
function drawable:find_widgets(x, y)
|
||||
local matches = {}
|
||||
-- Find all widgets that contain the point
|
||||
|
@ -126,7 +129,7 @@ end
|
|||
|
||||
--- Set the background of the drawable
|
||||
-- @param c The background to use. This must either be a cairo pattern object,
|
||||
-- nil or a string that gears.color() understands.
|
||||
-- nil or a string that gears.color() understands.
|
||||
function drawable:set_bg(c)
|
||||
local c = c or "#000000"
|
||||
if type(c) == "string" or type(c) == "table" then
|
||||
|
@ -156,7 +159,7 @@ end
|
|||
|
||||
--- Set the foreground of the drawable
|
||||
-- @param c The foreground to use. This must either be a cairo pattern object,
|
||||
-- nil or a string that gears.color() understands.
|
||||
-- nil or a string that gears.color() understands.
|
||||
function drawable:set_fg(c)
|
||||
local c = c or "#FFFFFF"
|
||||
if type(c) == "string" or type(c) == "table" then
|
||||
|
@ -299,10 +302,6 @@ capi.awesome.connect_signal("wallpaper_changed", function()
|
|||
end
|
||||
end)
|
||||
|
||||
--- Handling of drawables. A drawable is something that can be drawn to.
|
||||
-- @class table
|
||||
-- @name drawable
|
||||
|
||||
return setmetatable(drawable, { __call = function(_, ...) return drawable.new(...) end })
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local capi = {
|
||||
|
@ -36,14 +37,14 @@ end
|
|||
|
||||
--- Set the background of the wibox
|
||||
-- @param c The background to use. This must either be a cairo pattern object,
|
||||
-- nil or a string that gears.color() understands.
|
||||
-- nil or a string that gears.color() understands.
|
||||
function wibox:set_bg(c)
|
||||
self._drawable:set_bg(c)
|
||||
end
|
||||
|
||||
--- Set the foreground of the wibox
|
||||
-- @param c The foreground to use. This must either be a cairo pattern object,
|
||||
-- nil or a string that gears.color() understands.
|
||||
-- nil or a string that gears.color() understands.
|
||||
function wibox:set_fg(c)
|
||||
self._drawable:set_fg(c)
|
||||
end
|
||||
|
@ -140,16 +141,14 @@ end
|
|||
--- Redraw a wibox. You should never have to call this explicitely because it is
|
||||
-- automatically called when needed.
|
||||
-- @param wibox
|
||||
-- @name draw
|
||||
-- @class function
|
||||
-- @function draw
|
||||
|
||||
--- Widget box object.
|
||||
-- Every wibox "inherits" from a drawin and you can use all of drawin's
|
||||
-- functions directly on this as well. When creating a wibox, you can specify a
|
||||
-- "fg" and a "bg" color as keys in the table that is passed to the constructor.
|
||||
-- All other arguments will be passed to drawin's constructor.
|
||||
-- @class table
|
||||
-- @name drawin
|
||||
-- @table drawin
|
||||
|
||||
function wibox.mt:__call(...)
|
||||
return new(...)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.layout.align
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local setmetatable = setmetatable
|
||||
|
@ -12,7 +13,6 @@ local floor = math.floor
|
|||
local base = require("wibox.layout.base")
|
||||
local widget_base = require("wibox.widget.base")
|
||||
|
||||
-- wibox.layout.align
|
||||
local align = {}
|
||||
|
||||
--- Draw an align layout.
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.layout.base
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local pairs = pairs
|
||||
|
@ -10,7 +11,6 @@ local print = print
|
|||
local min = math.min
|
||||
local max = math.max
|
||||
|
||||
-- wibox.layout.base
|
||||
local base = {}
|
||||
|
||||
--- Figure out the geometry in device coordinate space. This gives only tight
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author Lukáš Hrázký
|
||||
-- @copyright 2012 Lukáš Hrázký
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.layout.constraint
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local pairs = pairs
|
||||
|
@ -11,7 +12,6 @@ local base = require("wibox.layout.base")
|
|||
local widget_base = require("wibox.widget.base")
|
||||
local math = math
|
||||
|
||||
-- wibox.layout.constraint
|
||||
local constraint = { mt = {} }
|
||||
|
||||
--- Draw a constraint layout
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.layout.fixed
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local base = require("wibox.layout.base")
|
||||
|
@ -9,7 +10,6 @@ local widget_base = require("wibox.widget.base")
|
|||
local table = table
|
||||
local pairs = pairs
|
||||
|
||||
-- wibox.layout.fixed
|
||||
local fixed = {}
|
||||
|
||||
--- Draw a fixed layout. Each widget gets just the space it asks for.
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.layout.flex
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local base = require("wibox.layout.base")
|
||||
|
@ -10,7 +11,6 @@ local table = table
|
|||
local pairs = pairs
|
||||
local floor = math.floor
|
||||
|
||||
-- wibox.layout.flex
|
||||
local flex = {}
|
||||
|
||||
local function round(x)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
---------------------------------------------------------------------------
|
||||
--- Collection of layouts that can be used in widget boxes
|
||||
--
|
||||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.layout
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
--- Collection of layouts that can be used in widget boxes
|
||||
-- wibox.layout
|
||||
|
||||
return
|
||||
{
|
||||
base = require("wibox.layout.base");
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.layout.margin
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local pairs = pairs
|
||||
|
@ -12,7 +13,6 @@ local widget_base = require("wibox.widget.base")
|
|||
local gcolor = require("gears.color")
|
||||
local cairo = require("lgi").cairo
|
||||
|
||||
-- wibox.layout.margin
|
||||
local margin = { mt = {} }
|
||||
|
||||
--- Draw a margin layout
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author dodo
|
||||
-- @copyright 2012 dodo
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.layout.mirror
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local type = type
|
||||
|
@ -12,7 +13,6 @@ local setmetatable = setmetatable
|
|||
local base = require("wibox.layout.base")
|
||||
local widget_base = require("wibox.widget.base")
|
||||
|
||||
-- wibox.layout.mirror
|
||||
local mirror = { mt = {} }
|
||||
|
||||
--- Draw this layout
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.layout.rotate
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local error = error
|
||||
|
@ -13,7 +14,6 @@ local tostring = tostring
|
|||
local base = require("wibox.layout.base")
|
||||
local widget_base = require("wibox.widget.base")
|
||||
|
||||
-- wibox.layout.rotate
|
||||
local rotate = { mt = {} }
|
||||
|
||||
local function transform(layout, width, height)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.widget.background
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local base = require("wibox.widget.base")
|
||||
|
@ -13,7 +14,6 @@ local setmetatable = setmetatable
|
|||
local pairs = pairs
|
||||
local type = type
|
||||
|
||||
-- wibox.widget.background
|
||||
local background = { mt = {} }
|
||||
|
||||
--- Draw this widget
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.widget.base
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local debug = require("gears.debug")
|
||||
|
@ -11,7 +12,6 @@ local pairs = pairs
|
|||
local type = type
|
||||
local table = table
|
||||
|
||||
-- wibox.widget.base
|
||||
local base = {}
|
||||
|
||||
--- Set/get a widget's buttons
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.widget.imagebox
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local base = require("wibox.widget.base")
|
||||
|
@ -12,7 +13,6 @@ local type = type
|
|||
local pcall = pcall
|
||||
local print = print
|
||||
|
||||
-- wibox.widget.imagebox
|
||||
local imagebox = { mt = {} }
|
||||
|
||||
--- Draw an imagebox with the given cairo context in the given geometry.
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.widget
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
--- wibox.widget
|
||||
|
||||
return
|
||||
{
|
||||
base = require("wibox.widget.base");
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- @author Uli Schlachter
|
||||
-- @copyright 2010 Uli Schlachter
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.widget.systray
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local wbase = require("wibox.widget.base")
|
||||
|
@ -12,7 +13,6 @@ local setmetatable = setmetatable
|
|||
local error = error
|
||||
local abs = math.abs
|
||||
|
||||
--- wibox.widget.systray
|
||||
local systray = { mt = {} }
|
||||
|
||||
local horizontal = true
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
-- @author dodo
|
||||
-- @copyright 2010, 2011 Uli Schlachter, dodo
|
||||
-- @release @AWESOME_VERSION@
|
||||
-- @module wibox.widget.textbox
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local base = require("wibox.widget.base")
|
||||
|
@ -16,7 +17,6 @@ local setmetatable = setmetatable
|
|||
local pairs = pairs
|
||||
local error = error
|
||||
|
||||
-- wibox.widget.textbox
|
||||
local textbox = { mt = {} }
|
||||
|
||||
-- Setup a pango layout for the given textbox and cairo context
|
||||
|
|
Loading…
Reference in New Issue