docs: ignore awful/widget/init.lua, not common

This commit is contained in:
Daniel Hahler 2015-02-26 16:05:47 +01:00
parent 2930c0ab4a
commit 65ad83ac30
3 changed files with 16 additions and 3 deletions

View File

@ -47,7 +47,7 @@ file = {
'../lib/awful/startup_notification.lua',
-- Ignore some parts of the widget library
'../lib/awful/widget/common.lua',
'../lib/awful/widget/init.lua',
-- exclude layout, but we need an extra bit of documentation elsewhere.
'../lib/awful/layout/suit/'

View File

@ -2,6 +2,7 @@
-- @author Julien Danjou <julien@danjou.info>
-- @copyright 2008-2009 Julien Danjou
-- @release @AWESOME_VERSION@
-- @classmod awful.widget.common
---------------------------------------------------------------------------
-- Grab environment we need
@ -20,6 +21,10 @@ local textbox = require("wibox.widget.textbox")
--- Common utilities for awful widgets
local common = {}
--- Common method to create buttons.
-- @tab buttons
-- @param object
-- @treturn table
function common.create_buttons(buttons, object)
if buttons then
local btns = {}
@ -38,6 +43,14 @@ function common.create_buttons(buttons, object)
end
end
--- Common update method.
-- @param w The widget.
-- @tab buttons
-- @func label Function to generate label parameters from an object.
-- The function gets passed an object from `objects`, and
-- has to return `text`, `bg`, `bg_image`, `icon`.
-- @tab data Current data/cache, indexed by objects.
-- @tab objects Objects to be displayed / updated.
function common.list_update(w, buttons, label, data, objects)
-- update the widgets, creating them if needed
w:reset()
@ -75,7 +88,7 @@ function common.list_update(w, buttons, label, data, objects)
end
local text, bg, bg_image, icon = label(o)
-- The text might be invalid, so use pcall
-- The text might be invalid, so use pcall.
if text == nil or text == "" then
m:set_margins(0)
else

View File

@ -4,7 +4,7 @@
-- @author Julien Danjou <julien@danjou.info>
-- @copyright 2008-2009 Julien Danjou
-- @release @AWESOME_VERSION@
-- @module awful.widget
-- @classmod awful.widget
---------------------------------------------------------------------------
return