From e4fa6effe222ab833246208afa9b8f16fb02d954 Mon Sep 17 00:00:00 2001 From: "Ignas Anikevicius (gns_ank)" Date: Tue, 20 May 2014 12:02:13 +0100 Subject: [PATCH] Docs: Fix headers for the wibox module Signed-off-by: Ignas Anikevicius (gns_ank) --- lib/wibox/drawable.lua.in | 13 ++++++------- lib/wibox/init.lua.in | 11 +++++------ lib/wibox/layout/align.lua.in | 2 +- lib/wibox/layout/base.lua.in | 2 +- lib/wibox/layout/constraint.lua.in | 2 +- lib/wibox/layout/fixed.lua.in | 2 +- lib/wibox/layout/flex.lua.in | 2 +- lib/wibox/layout/init.lua.in | 6 +++--- lib/wibox/layout/margin.lua.in | 2 +- lib/wibox/layout/mirror.lua.in | 2 +- lib/wibox/layout/rotate.lua.in | 2 +- lib/wibox/widget/background.lua.in | 2 +- lib/wibox/widget/base.lua.in | 2 +- lib/wibox/widget/imagebox.lua.in | 2 +- lib/wibox/widget/init.lua.in | 3 +-- lib/wibox/widget/systray.lua.in | 2 +- lib/wibox/widget/textbox.lua.in | 2 +- 17 files changed, 28 insertions(+), 31 deletions(-) diff --git a/lib/wibox/drawable.lua.in b/lib/wibox/drawable.lua.in index 48282771..6291ab9f 100644 --- a/lib/wibox/drawable.lua.in +++ b/lib/wibox/drawable.lua.in @@ -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 diff --git a/lib/wibox/init.lua.in b/lib/wibox/init.lua.in index aa93996b..00ab405c 100644 --- a/lib/wibox/init.lua.in +++ b/lib/wibox/init.lua.in @@ -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(...) diff --git a/lib/wibox/layout/align.lua.in b/lib/wibox/layout/align.lua.in index c0f2339c..a47d29a6 100644 --- a/lib/wibox/layout/align.lua.in +++ b/lib/wibox/layout/align.lua.in @@ -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. diff --git a/lib/wibox/layout/base.lua.in b/lib/wibox/layout/base.lua.in index 69c55510..190df936 100644 --- a/lib/wibox/layout/base.lua.in +++ b/lib/wibox/layout/base.lua.in @@ -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 diff --git a/lib/wibox/layout/constraint.lua.in b/lib/wibox/layout/constraint.lua.in index 0870f8b2..7ed2aba6 100644 --- a/lib/wibox/layout/constraint.lua.in +++ b/lib/wibox/layout/constraint.lua.in @@ -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 diff --git a/lib/wibox/layout/fixed.lua.in b/lib/wibox/layout/fixed.lua.in index 343a4150..09793eb3 100644 --- a/lib/wibox/layout/fixed.lua.in +++ b/lib/wibox/layout/fixed.lua.in @@ -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. diff --git a/lib/wibox/layout/flex.lua.in b/lib/wibox/layout/flex.lua.in index 51293eb9..95612ba3 100644 --- a/lib/wibox/layout/flex.lua.in +++ b/lib/wibox/layout/flex.lua.in @@ -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) diff --git a/lib/wibox/layout/init.lua.in b/lib/wibox/layout/init.lua.in index c89297e0..84ee0291 100644 --- a/lib/wibox/layout/init.lua.in +++ b/lib/wibox/layout/init.lua.in @@ -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"); diff --git a/lib/wibox/layout/margin.lua.in b/lib/wibox/layout/margin.lua.in index 79b42d3c..102a86d3 100644 --- a/lib/wibox/layout/margin.lua.in +++ b/lib/wibox/layout/margin.lua.in @@ -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 diff --git a/lib/wibox/layout/mirror.lua.in b/lib/wibox/layout/mirror.lua.in index 758e9f86..3b3ec8ac 100644 --- a/lib/wibox/layout/mirror.lua.in +++ b/lib/wibox/layout/mirror.lua.in @@ -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 diff --git a/lib/wibox/layout/rotate.lua.in b/lib/wibox/layout/rotate.lua.in index 9895da84..1be30abf 100644 --- a/lib/wibox/layout/rotate.lua.in +++ b/lib/wibox/layout/rotate.lua.in @@ -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) diff --git a/lib/wibox/widget/background.lua.in b/lib/wibox/widget/background.lua.in index 02f217d2..86c5f0a4 100644 --- a/lib/wibox/widget/background.lua.in +++ b/lib/wibox/widget/background.lua.in @@ -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 diff --git a/lib/wibox/widget/base.lua.in b/lib/wibox/widget/base.lua.in index 11e978cb..cebe6f00 100644 --- a/lib/wibox/widget/base.lua.in +++ b/lib/wibox/widget/base.lua.in @@ -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 diff --git a/lib/wibox/widget/imagebox.lua.in b/lib/wibox/widget/imagebox.lua.in index fa4010b6..18401db7 100644 --- a/lib/wibox/widget/imagebox.lua.in +++ b/lib/wibox/widget/imagebox.lua.in @@ -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. diff --git a/lib/wibox/widget/init.lua.in b/lib/wibox/widget/init.lua.in index aedd5a19..4357183d 100644 --- a/lib/wibox/widget/init.lua.in +++ b/lib/wibox/widget/init.lua.in @@ -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"); diff --git a/lib/wibox/widget/systray.lua.in b/lib/wibox/widget/systray.lua.in index f0ae9a82..5f93ecd9 100644 --- a/lib/wibox/widget/systray.lua.in +++ b/lib/wibox/widget/systray.lua.in @@ -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 diff --git a/lib/wibox/widget/textbox.lua.in b/lib/wibox/widget/textbox.lua.in index 17bc8531..3cd1aac8 100644 --- a/lib/wibox/widget/textbox.lua.in +++ b/lib/wibox/widget/textbox.lua.in @@ -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