doc: Document that wibox have class-level signals.

This commit is contained in:
Emmanuel Lepage Vallee 2020-01-25 19:27:18 -05:00
parent 973671b081
commit 68a6c978f5
1 changed files with 26 additions and 0 deletions

View File

@ -399,6 +399,32 @@ end
-- @param wibox
-- @method draw
--- Connect a global signal on the wibox class.
--
-- Functions connected to this signal source will be executed when any
-- wibox object emits the signal.
--
-- It is also used for some generic wibox signals such as
-- `request::geometry`.
--
-- @tparam string name The name of the signal
-- @tparam function func The function to attach
-- @staticfct wibox.connect_signal
-- @usage wibox.connect_signal("added", function(notif)
-- -- do something
-- end)
--- Emit a wibox signal.
-- @tparam string name The signal name.
-- @param ... The signal callback arguments
-- @staticfct wibox.emit_signal
--- Disconnect a signal from a source.
-- @tparam string name The name of the signal
-- @tparam function func The attached function
-- @staticfct wibox.disconnect_signal
-- @treturn boolean If the disconnection was successful
function wibox.mt:__call(...)
return new(...)
end