Docs: Fix headers for the wibox module

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
This commit is contained in:
Ignas Anikevicius (gns_ank) 2014-05-20 12:02:13 +01:00 committed by Daniel Hahler
parent 00f558ff92
commit e4fa6effe2
17 changed files with 28 additions and 31 deletions

View File

@ -1,7 +1,10 @@
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
--- Handling of drawables. A drawable is something that can be drawn to.
--
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2012 Uli Schlachter -- @copyright 2012 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.drawable
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local drawable = {} local drawable = {}
@ -82,7 +85,7 @@ end
-- @param x X coordinate of the point -- @param x X coordinate of the point
-- @param y Y coordinate of the point -- @param y Y coordinate of the point
-- @return A sorted table with all widgets that contain the given point. The -- @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) function drawable:find_widgets(x, y)
local matches = {} local matches = {}
-- Find all widgets that contain the point -- Find all widgets that contain the point
@ -126,7 +129,7 @@ end
--- Set the background of the drawable --- Set the background of the drawable
-- @param c The background to use. This must either be a cairo pattern object, -- @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) function drawable:set_bg(c)
local c = c or "#000000" local c = c or "#000000"
if type(c) == "string" or type(c) == "table" then if type(c) == "string" or type(c) == "table" then
@ -156,7 +159,7 @@ end
--- Set the foreground of the drawable --- Set the foreground of the drawable
-- @param c The foreground to use. This must either be a cairo pattern object, -- @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) function drawable:set_fg(c)
local c = c or "#FFFFFF" local c = c or "#FFFFFF"
if type(c) == "string" or type(c) == "table" then if type(c) == "string" or type(c) == "table" then
@ -299,10 +302,6 @@ capi.awesome.connect_signal("wallpaper_changed", function()
end end
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 }) return setmetatable(drawable, { __call = function(_, ...) return drawable.new(...) end })
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -2,6 +2,7 @@
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local capi = { local capi = {
@ -36,14 +37,14 @@ end
--- Set the background of the wibox --- Set the background of the wibox
-- @param c The background to use. This must either be a cairo pattern object, -- @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) function wibox:set_bg(c)
self._drawable:set_bg(c) self._drawable:set_bg(c)
end end
--- Set the foreground of the wibox --- Set the foreground of the wibox
-- @param c The foreground to use. This must either be a cairo pattern object, -- @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) function wibox:set_fg(c)
self._drawable:set_fg(c) self._drawable:set_fg(c)
end end
@ -140,16 +141,14 @@ end
--- Redraw a wibox. You should never have to call this explicitely because it is --- Redraw a wibox. You should never have to call this explicitely because it is
-- automatically called when needed. -- automatically called when needed.
-- @param wibox -- @param wibox
-- @name draw -- @function draw
-- @class function
--- Widget box object. --- Widget box object.
-- Every wibox "inherits" from a drawin and you can use all of drawin's -- 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 -- 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. -- "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. -- All other arguments will be passed to drawin's constructor.
-- @class table -- @table drawin
-- @name drawin
function wibox.mt:__call(...) function wibox.mt:__call(...)
return new(...) return new(...)

View File

@ -2,6 +2,7 @@
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.layout.align
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local setmetatable = setmetatable local setmetatable = setmetatable
@ -12,7 +13,6 @@ local floor = math.floor
local base = require("wibox.layout.base") local base = require("wibox.layout.base")
local widget_base = require("wibox.widget.base") local widget_base = require("wibox.widget.base")
-- wibox.layout.align
local align = {} local align = {}
--- Draw an align layout. --- Draw an align layout.

View File

@ -2,6 +2,7 @@
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.layout.base
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local pairs = pairs local pairs = pairs
@ -10,7 +11,6 @@ local print = print
local min = math.min local min = math.min
local max = math.max local max = math.max
-- wibox.layout.base
local base = {} local base = {}
--- Figure out the geometry in device coordinate space. This gives only tight --- Figure out the geometry in device coordinate space. This gives only tight

View File

@ -2,6 +2,7 @@
-- @author Lukáš Hrázký -- @author Lukáš Hrázký
-- @copyright 2012 Lukáš Hrázký -- @copyright 2012 Lukáš Hrázký
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.layout.constraint
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local pairs = pairs local pairs = pairs
@ -11,7 +12,6 @@ local base = require("wibox.layout.base")
local widget_base = require("wibox.widget.base") local widget_base = require("wibox.widget.base")
local math = math local math = math
-- wibox.layout.constraint
local constraint = { mt = {} } local constraint = { mt = {} }
--- Draw a constraint layout --- Draw a constraint layout

View File

@ -2,6 +2,7 @@
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.layout.fixed
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local base = require("wibox.layout.base") local base = require("wibox.layout.base")
@ -9,7 +10,6 @@ local widget_base = require("wibox.widget.base")
local table = table local table = table
local pairs = pairs local pairs = pairs
-- wibox.layout.fixed
local fixed = {} local fixed = {}
--- Draw a fixed layout. Each widget gets just the space it asks for. --- Draw a fixed layout. Each widget gets just the space it asks for.

View File

@ -2,6 +2,7 @@
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.layout.flex
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local base = require("wibox.layout.base") local base = require("wibox.layout.base")
@ -10,7 +11,6 @@ local table = table
local pairs = pairs local pairs = pairs
local floor = math.floor local floor = math.floor
-- wibox.layout.flex
local flex = {} local flex = {}
local function round(x) local function round(x)

View File

@ -1,12 +1,12 @@
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
--- Collection of layouts that can be used in widget boxes
--
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.layout
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
--- Collection of layouts that can be used in widget boxes
-- wibox.layout
return return
{ {
base = require("wibox.layout.base"); base = require("wibox.layout.base");

View File

@ -2,6 +2,7 @@
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.layout.margin
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local pairs = pairs local pairs = pairs
@ -12,7 +13,6 @@ local widget_base = require("wibox.widget.base")
local gcolor = require("gears.color") local gcolor = require("gears.color")
local cairo = require("lgi").cairo local cairo = require("lgi").cairo
-- wibox.layout.margin
local margin = { mt = {} } local margin = { mt = {} }
--- Draw a margin layout --- Draw a margin layout

View File

@ -2,6 +2,7 @@
-- @author dodo -- @author dodo
-- @copyright 2012 dodo -- @copyright 2012 dodo
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.layout.mirror
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local type = type local type = type
@ -12,7 +13,6 @@ local setmetatable = setmetatable
local base = require("wibox.layout.base") local base = require("wibox.layout.base")
local widget_base = require("wibox.widget.base") local widget_base = require("wibox.widget.base")
-- wibox.layout.mirror
local mirror = { mt = {} } local mirror = { mt = {} }
--- Draw this layout --- Draw this layout

View File

@ -2,6 +2,7 @@
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.layout.rotate
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local error = error local error = error
@ -13,7 +14,6 @@ local tostring = tostring
local base = require("wibox.layout.base") local base = require("wibox.layout.base")
local widget_base = require("wibox.widget.base") local widget_base = require("wibox.widget.base")
-- wibox.layout.rotate
local rotate = { mt = {} } local rotate = { mt = {} }
local function transform(layout, width, height) local function transform(layout, width, height)

View File

@ -2,6 +2,7 @@
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.widget.background
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local base = require("wibox.widget.base") local base = require("wibox.widget.base")
@ -13,7 +14,6 @@ local setmetatable = setmetatable
local pairs = pairs local pairs = pairs
local type = type local type = type
-- wibox.widget.background
local background = { mt = {} } local background = { mt = {} }
--- Draw this widget --- Draw this widget

View File

@ -2,6 +2,7 @@
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.widget.base
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local debug = require("gears.debug") local debug = require("gears.debug")
@ -11,7 +12,6 @@ local pairs = pairs
local type = type local type = type
local table = table local table = table
-- wibox.widget.base
local base = {} local base = {}
--- Set/get a widget's buttons --- Set/get a widget's buttons

View File

@ -2,6 +2,7 @@
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.widget.imagebox
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local base = require("wibox.widget.base") local base = require("wibox.widget.base")
@ -12,7 +13,6 @@ local type = type
local pcall = pcall local pcall = pcall
local print = print local print = print
-- wibox.widget.imagebox
local imagebox = { mt = {} } local imagebox = { mt = {} }
--- Draw an imagebox with the given cairo context in the given geometry. --- Draw an imagebox with the given cairo context in the given geometry.

View File

@ -2,10 +2,9 @@
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.widget
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
--- wibox.widget
return return
{ {
base = require("wibox.widget.base"); base = require("wibox.widget.base");

View File

@ -2,6 +2,7 @@
-- @author Uli Schlachter -- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter -- @copyright 2010 Uli Schlachter
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.widget.systray
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local wbase = require("wibox.widget.base") local wbase = require("wibox.widget.base")
@ -12,7 +13,6 @@ local setmetatable = setmetatable
local error = error local error = error
local abs = math.abs local abs = math.abs
--- wibox.widget.systray
local systray = { mt = {} } local systray = { mt = {} }
local horizontal = true local horizontal = true

View File

@ -3,6 +3,7 @@
-- @author dodo -- @author dodo
-- @copyright 2010, 2011 Uli Schlachter, dodo -- @copyright 2010, 2011 Uli Schlachter, dodo
-- @release @AWESOME_VERSION@ -- @release @AWESOME_VERSION@
-- @module wibox.widget.textbox
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
local base = require("wibox.widget.base") local base = require("wibox.widget.base")
@ -16,7 +17,6 @@ local setmetatable = setmetatable
local pairs = pairs local pairs = pairs
local error = error local error = error
-- wibox.widget.textbox
local textbox = { mt = {} } local textbox = { mt = {} }
-- Setup a pango layout for the given textbox and cairo context -- Setup a pango layout for the given textbox and cairo context