Merge pull request #2949 from Elv13/more_trivial_doc

More trivial doc fixes
This commit is contained in:
Emmanuel Lepage Vallée 2019-12-28 12:29:19 -08:00 committed by GitHub
commit b8c83fdf9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 209 additions and 106 deletions

View File

@ -1,12 +1,9 @@
--- Border width. --- Border width.
-- --
-- **Signal:**
--
-- * *property::border_width*
--
-- @baseclass wibox -- @baseclass wibox
-- @property border_width -- @property border_width
-- @param integer -- @param integer
-- @propemits false false
--- Border color. --- Border color.
-- --
@ -26,178 +23,146 @@
-- T‾ ‾T -- T‾ ‾T
-- Green Alpha -- Green Alpha
-- --
-- **Signal:**
--
-- * *property::border_color*
--
-- @baseclass wibox -- @baseclass wibox
-- @property border_color -- @property border_color
-- @param string -- @param string
-- @propemits false false
--- On top of other windows. --- On top of other windows.
-- --
-- **Signal:**
--
-- * *property::ontop*
--
-- @baseclass wibox -- @baseclass wibox
-- @property ontop -- @property ontop
-- @param boolean -- @param boolean
-- @propemits false false
--- The mouse cursor. --- The mouse cursor.
-- --
-- **Signal:**
--
-- * *property::cursor*
--
-- @baseclass wibox -- @baseclass wibox
-- @property cursor -- @property cursor
-- @param string -- @param string
-- @see mouse -- @see mouse
-- @propemits false false
--- Visibility. --- Visibility.
-- --
-- **Signal:**
--
-- * *property::visible*
--
-- @baseclass wibox -- @baseclass wibox
-- @property visible -- @property visible
-- @param boolean -- @param boolean
-- @propemits false false
--- The opacity of the wibox, between 0 and 1. --- The opacity of the wibox, between 0 and 1.
-- --
-- **Signal:**
--
-- * *property::opacity*
--
-- @baseclass wibox -- @baseclass wibox
-- @property opacity -- @property opacity
-- @tparam number opacity (between 0 and 1) -- @tparam number opacity (between 0 and 1)
-- @propemits false false
--- The window type (desktop, normal, dock, ...). --- The window type (desktop, normal, dock, ...).
-- --
-- **Signal:**
--
-- * *property::type*
--
-- @baseclass wibox -- @baseclass wibox
-- @property type -- @property type
-- @param string -- @param string
-- @see client.type -- @see client.type
-- @propemits false false
--- The x coordinates. --- The x coordinates.
-- --
-- **Signal:**
--
-- * *property::x*
--
-- @baseclass wibox -- @baseclass wibox
-- @property x -- @property x
-- @param integer -- @param integer
-- @propemits false false
--- The y coordinates. --- The y coordinates.
-- --
-- **Signal:**
--
-- * *property::y*
--
-- @baseclass wibox -- @baseclass wibox
-- @property y -- @property y
-- @param integer -- @param integer
-- @propemits false false
--- The width of the wibox. --- The width of the wibox.
-- --
-- **Signal:**
--
-- * *property::width*
--
-- @baseclass wibox -- @baseclass wibox
-- @property width -- @property width
-- @param width -- @param width
-- @propemits false false
--- The height of the wibox. --- The height of the wibox.
-- --
-- **Signal:**
--
-- * *property::height*
--
-- @baseclass wibox -- @baseclass wibox
-- @property height -- @property height
-- @param height -- @param height
-- @propemits false false
--- The wibox screen. --- The wibox screen.
-- --
-- @baseclass wibox -- @baseclass wibox
-- @property screen -- @property screen
-- @param screen -- @param screen
-- @propemits true false
--- The wibox's `drawable`. --- The wibox's `drawable`.
-- --
-- **Signal:**
--
-- * *property::drawable*
--
-- @baseclass wibox -- @baseclass wibox
-- @property drawable -- @property drawable
-- @tparam drawable drawable -- @tparam drawable drawable
-- @propemits false false
--- The widget that the `wibox` displays. --- The widget that the `wibox` displays.
-- @baseclass wibox -- @baseclass wibox
-- @property widget -- @property widget
-- @param widget -- @param widget
-- @propemits true false
--- The X window id. --- The X window id.
-- --
-- **Signal:**
--
-- * *property::window*
--
-- @baseclass wibox -- @baseclass wibox
-- @property window -- @property window
-- @param string -- @param string
-- @see client.window -- @see client.window
-- @propemits false false
--- The wibox's bounding shape as a (native) cairo surface. --- The wibox's bounding shape as a (native) cairo surface.
-- --
-- **Signal:** -- If you want to set a shape, let say some rounded corners, use
-- -- the `shape` property rather than this. If you want something
-- * *property::shape_bounding* -- very complex, for example, holes, then use this.
-- --
-- @baseclass wibox -- @baseclass wibox
-- @property shape_bounding -- @property shape_bounding
-- @param surface._native -- @param surface._native
-- @propemits false false
-- @see shape
--- The wibox's clip shape as a (native) cairo surface. --- The wibox's clip shape as a (native) cairo surface.
-- --
-- **Signal:** -- The clip shape is the shape of the window *content* rather
-- -- than the outer window shape.
-- * *property::shape_clip*
-- --
-- @baseclass wibox -- @baseclass wibox
-- @property shape_clip -- @property shape_clip
-- @param surface._native -- @param surface._native
-- @propemits false false
-- @see shape
--- The wibox's input shape as a (native) cairo surface. --- The wibox's input shape as a (native) cairo surface.
-- --
-- **Signal:** -- The input shape allows to disable clicks and mouse events
-- -- on part of the window. This is how `input_passthrough` is
-- * *property::shape_input* -- implemented.
-- --
-- @baseclass wibox -- @baseclass wibox
-- @property shape_input -- @property shape_input
-- @param surface._native -- @param surface._native
-- @propemits false false
-- @see input_passthrough
--- The wibar's shape. --- The wibar's shape.
-- --
-- **Signal:**
--
-- * *property::shape*
--
-- @baseclass wibox -- @baseclass wibox
-- @property shape -- @property shape
-- @tparam gears.shape shape -- @tparam gears.shape shape
-- @propemits true false
-- @see gears.shape
--- Forward the inputs to the client below the wibox. --- Forward the inputs to the client below the wibox.
-- --
@ -207,20 +172,18 @@
-- a subtle transparent wibox on top a fullscreen client to display important -- a subtle transparent wibox on top a fullscreen client to display important
-- data such as a low battery warning. -- data such as a low battery warning.
-- --
-- **Signal:**
--
-- * *property::input_passthrough*
--
-- @baseclass wibox -- @baseclass wibox
-- @property input_passthrough -- @property input_passthrough
-- @param[opt=false] boolean -- @param[opt=false] boolean
-- @see shape_input -- @see shape_input
-- @propemits true false
--- Get or set mouse buttons bindings to a wibox. --- Get or set mouse buttons bindings to a wibox.
-- --
-- @baseclass wibox -- @baseclass wibox
-- @property buttons
-- @param buttons_table A table of buttons objects, or nothing. -- @param buttons_table A table of buttons objects, or nothing.
-- @method buttons -- @propemits false false
--- Get or set wibox geometry. That's the same as accessing or setting the x, --- Get or set wibox geometry. That's the same as accessing or setting the x,
-- y, width or height properties of a wibox. -- y, width or height properties of a wibox.
@ -229,16 +192,33 @@
-- @param A table with coordinates to modify. -- @param A table with coordinates to modify.
-- @return A table with wibox coordinates and geometry. -- @return A table with wibox coordinates and geometry.
-- @method geometry -- @method geometry
-- @emits property::geometry When the geometry change.
-- @emitstparam property::geometry table geo The geometry table.
--- Get or set wibox struts. --- Get or set wibox struts.
-- --
-- Struts are the area which should be reserved on each side of
-- the screen for this wibox. This is used to make bars and
-- docked displays. Note that `awful.wibar` implements all the
-- required boilerplate code to make bar. Only use this if you
-- want special type of bars (like bars not fully attached to
-- the side of the screen).
--
-- @baseclass wibox -- @baseclass wibox
-- @param strut A table with new strut, or nothing -- @param strut A table with new strut, or nothing
-- @return The wibox strut in a table. -- @return The wibox strut in a table.
-- @method struts -- @method struts
-- @see client.struts -- @see client.struts
-- @emits property::struts
--- The default background color. --- The default background color.
--
-- The background color can be transparent. If there is a
-- compositing manager such as compton, then it will be
-- real transparency and may include blur (provided by the
-- compositor). When there is no compositor, it will take
-- a picture of the wallpaper and blend it.
--
-- @baseclass wibox -- @baseclass wibox
-- @beautiful beautiful.bg_normal -- @beautiful beautiful.bg_normal
-- @param color -- @param color
@ -257,28 +237,41 @@
-- @method setup -- @method setup
--- The background of the wibox. --- The background of the wibox.
--
-- The background color can be transparent. If there is a
-- compositing manager such as compton, then it will be
-- real transparency and may include blur (provided by the
-- compositor). When there is no compositor, it will take
-- a picture of the wallpaper and blend it.
--
-- @baseclass wibox -- @baseclass wibox
-- @param c The background to use. This must either be a cairo pattern object,
-- nil or a string that gears.color() understands.
-- @property bg -- @property bg
-- @param color -- @tparam c The background to use. This must either be a cairo pattern object,
-- nil or a string that gears.color() understands.
-- @see gears.color -- @see gears.color
-- @propemits true false
-- @usebeautiful beautiful.bg_normal The default (fallback) bg color.
--- The background image of the drawable. --- The background image of the drawable.
--
-- If `image` is a function, it will be called with `(context, cr, width, height)` -- If `image` is a function, it will be called with `(context, cr, width, height)`
-- as arguments. Any other arguments passed to this method will be appended. -- as arguments. Any other arguments passed to this method will be appended.
-- @param image A background image or a function --
-- @tparam gears.suface|string|function image A background image or a function.
-- @baseclass wibox -- @baseclass wibox
-- @property bgimage -- @property bgimage
-- @see gears.surface -- @see gears.surface
-- @propemits true false
--- The foreground (text) of the wibox. --- The foreground (text) of the wibox.
-- @param c The foreground to use. This must either be a cairo pattern object, -- @tparam color 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.
-- @baseclass wibox -- @baseclass wibox
-- @property fg -- @property fg
-- @param color -- @param color
-- @see gears.color -- @see gears.color
-- @propemits true false
-- @usebeautiful beautiful.fg_normal The default (fallback) fg color.
--- Find a widget by a point. --- Find a widget by a point.
-- The wibox must have drawn itself at least once for this to work. -- The wibox must have drawn itself at least once for this to work.

View File

@ -406,7 +406,7 @@ end
-- poluting the original object of having extra boilerplate code. -- poluting the original object of having extra boilerplate code.
-- --
-- @tfield keygrabber current_instance -- @tfield keygrabber current_instance
-- @see property::current_instance -- @emits property::current_instance
--- The global signal used to track the `current_instance`. --- The global signal used to track the `current_instance`.
-- --
@ -422,6 +422,8 @@ end
-- --
-- @method start -- @method start
-- @treturn boolean If the keygrabber was successfully started. -- @treturn boolean If the keygrabber was successfully started.
-- @emits started
-- @emits property::current_instance
function keygrabber:start() function keygrabber:start()
if self.grabber or keygrab.current_instance then if self.grabber or keygrab.current_instance then
return false return false
@ -473,6 +475,8 @@ end
--- Stop the keygrabber. --- Stop the keygrabber.
-- @method stop -- @method stop
-- @emits stopped
-- @emits property::current_instance
function keygrabber:stop(_stop_key, _stop_mods) -- (at)function disables ldoc params function keygrabber:stop(_stop_key, _stop_mods) -- (at)function disables ldoc params
keygrab.stop(self.grabber) keygrab.stop(self.grabber)

View File

@ -125,6 +125,7 @@ function main_widget:set_widget(widget)
end end
self._private.widget = widget self._private.widget = widget
self:emit_signal("widget::layout_changed") self:emit_signal("widget::layout_changed")
self:emit_signal("property::widget")
end end
function main_widget:get_widget() function main_widget:get_widget()
@ -164,10 +165,12 @@ local popup = {}
-- table of positions -- table of positions
-- @see awful.placement.next_to -- @see awful.placement.next_to
-- @see awful.popup.preferred_anchors -- @see awful.popup.preferred_anchors
-- @propemits true false
function popup:set_preferred_positions(pref_pos) function popup:set_preferred_positions(pref_pos)
self._private.preferred_directions = pref_pos self._private.preferred_directions = pref_pos
set_position(self) set_position(self)
self:emit_signal("property::preferred_positions", pref_pos)
end end
--- Set the preferred popup anchors relative to the parent. --- Set the preferred popup anchors relative to the parent.
@ -188,12 +191,14 @@ end
-- @property preferred_anchors -- @property preferred_anchors
-- @tparam table|string preferred_anchors Either a single anchor name or a table -- @tparam table|string preferred_anchors Either a single anchor name or a table
-- ordered by priority. -- ordered by priority.
-- @propemits true false
-- @see awful.placement.next_to -- @see awful.placement.next_to
-- @see awful.popup.preferred_positions -- @see awful.popup.preferred_positions
function popup:set_preferred_anchors(pref_anchors) function popup:set_preferred_anchors(pref_anchors)
self._private.preferred_anchors = pref_anchors self._private.preferred_anchors = pref_anchors
set_position(self) set_position(self)
self:emit_signal("property::preferred_anchors", pref_anchors)
end end
--- The current position relative to the parent object. --- The current position relative to the parent object.
@ -278,34 +283,49 @@ end
-- --
-- @property hide_on_right_click -- @property hide_on_right_click
-- @tparam[opt=false] boolean hide_on_right_click -- @tparam[opt=false] boolean hide_on_right_click
-- @propemits true false
function popup:set_hide_on_right_click(value) function popup:set_hide_on_right_click(value)
self[value and "connect_signal" or "disconnect_signal"]( self[value and "connect_signal" or "disconnect_signal"](
self, "button::press", self._private.hide_fct self, "button::press", self._private.hide_fct
) )
self:emit_signal("property::hide_on_right_click", value)
end end
--- The popup minimum width. --- The popup minimum width.
--
-- @property minimum_width -- @property minimum_width
-- @tparam[opt=1] number The minimum width -- @tparam[opt=1] number minimum_width The minimum width.
-- @propemits true false
--- The popup minimum height. --- The popup minimum height.
--
-- @property minimum_height -- @property minimum_height
-- @tparam[opt=1] number The minimum height -- @tparam[opt=1] number minimum_height The minimum height.
-- @propemits true false
--- The popup maximum width. --- The popup maximum width.
--
-- @property maximum_width -- @property maximum_width
-- @tparam[opt=1] number The maximum width -- @tparam[opt=1] number maximum_width The maximum width.
-- @propemits true false
--- The popup maximum height. --- The popup maximum height.
--
-- @property maximum_height -- @property maximum_height
-- @tparam[opt=1] number The maximum height -- @tparam[opt=1] number maximum_height The maximum height.
-- @propemits true false
for _, orientation in ipairs {"_width", "_height"} do for _, orientation in ipairs {"_width", "_height"} do
for _, limit in ipairs {"minimum", "maximum"} do for _, limit in ipairs {"minimum", "maximum"} do
popup["set_"..limit..orientation] = function(self, value) local prop = limit..orientation
self._private[limit..orientation] = value popup["set_"..prop] = function(self, value)
self._private[prop] = value
self._private.container:emit_signal("widget::layout_changed") self._private.container:emit_signal("widget::layout_changed")
self:emit_signal("property::"..prop, value)
end
popup["get_"..prop] = function(self)
return self._private[prop]
end end
end end
end end
@ -320,6 +340,7 @@ end
-- @tparam table|number offset An integer value or a `{x=, y=}` table. -- @tparam table|number offset An integer value or a `{x=, y=}` table.
-- @tparam[opt=offset] number offset.x The horizontal distance. -- @tparam[opt=offset] number offset.x The horizontal distance.
-- @tparam[opt=offset] number offset.y The vertical distance. -- @tparam[opt=offset] number offset.y The vertical distance.
-- @propemits true false
function popup:set_offset(offset) function popup:set_offset(offset)
@ -339,13 +360,18 @@ function popup:set_offset(offset)
self._private.offset = offset self._private.offset = offset
self:_apply_size_now(false) self:_apply_size_now(false)
self:emit_signal("property::offset", offset)
end end
--- Set the placement function. --- Set the placement function.
--
-- @tparam[opt=next_to] function|string|boolean The placement function or name -- @tparam[opt=next_to] function|string|boolean The placement function or name
-- (or false to disable placement) -- (or false to disable placement)
-- @property placement -- @property placement
-- @param function -- @param function
-- @propemits true false
-- @see awful.placement
function popup:set_placement(f) function popup:set_placement(f)
if type(f) == "string" then if type(f) == "string" then
@ -354,6 +380,7 @@ function popup:set_placement(f)
self._private.placement = f self._private.placement = f
self:_apply_size_now(false) self:_apply_size_now(false)
self:emit_signal("property::placement")
end end
-- For the tests and the race condition when 2 popups are placed next to each -- For the tests and the race condition when 2 popups are placed next to each
@ -382,6 +409,7 @@ end
function popup:set_widget(wid) function popup:set_widget(wid)
self._private.widget = wid self._private.widget = wid
self._private.container:set_widget(wid) self._private.container:set_widget(wid)
self:emit_signal("property::widget", wid)
end end
function popup:get_widget() function popup:get_widget()

View File

@ -200,7 +200,7 @@ end
--- The wibox containing the tooltip widgets. --- The wibox containing the tooltip widgets.
-- @property wibox -- @property wibox
-- @param `wibox` -- @param wibox
function tooltip:get_wibox() function tooltip:get_wibox()
if self._private.wibox then if self._private.wibox then
@ -224,6 +224,7 @@ end
--- Is the tooltip visible? --- Is the tooltip visible?
-- @property visible -- @property visible
-- @param boolean -- @param boolean
-- @propemits true false
function tooltip:get_visible() function tooltip:get_visible()
return self._private.visible return self._private.visible
@ -237,6 +238,8 @@ function tooltip:set_visible(value)
else else
hide(self) hide(self)
end end
self:emit_signal("property::visible", value)
end end
--- The horizontal alignment. --- The horizontal alignment.
@ -261,9 +264,10 @@ end
-- --
-- @property align -- @property align
-- @param string -- @param string
-- @see beautiful.tooltip_align
-- @see mode -- @see mode
-- @see preferred_positions -- @see preferred_positions
-- @propemits true false
-- @propbeautiful
--- The default tooltip alignment. --- The default tooltip alignment.
-- @beautiful beautiful.tooltip_align -- @beautiful beautiful.tooltip_align
@ -282,7 +286,7 @@ function tooltip:set_align(value)
self._private.align = value self._private.align = value
set_geometry(self) set_geometry(self)
self:emit_signal("property::align") self:emit_signal("property::align", value)
end end
--- The shape of the tooltip window. --- The shape of the tooltip window.
@ -292,10 +296,13 @@ end
-- @property shape -- @property shape
-- @tparam gears.shape shape -- @tparam gears.shape shape
-- @see gears.shape -- @see gears.shape
-- @see beautiful.tooltip_shape -- @propemits true false
-- @propbeautiful
function tooltip:set_shape(s) function tooltip:set_shape(s)
self.backgroundbox:set_shape(s) self.backgroundbox:set_shape(s)
self:emit_signal("property::shape", s)
end end
--- Set the tooltip positioning mode. --- Set the tooltip positioning mode.
@ -318,12 +325,13 @@ end
-- --
-- @property mode -- @property mode
-- @param string -- @param string
-- @propemits true false
function tooltip:set_mode(mode) function tooltip:set_mode(mode)
self._private.mode = mode self._private.mode = mode
set_geometry(self) set_geometry(self)
self:emit_signal("property::mode") self:emit_signal("property::mode", mode)
end end
function tooltip:get_mode() function tooltip:get_mode()
@ -350,6 +358,7 @@ end
-- --
-- @property preferred_positions -- @property preferred_positions
-- @tparam table preferred_positions The position, ordered by priorities -- @tparam table preferred_positions The position, ordered by priorities
-- @propemits true false
-- @see align -- @see align
-- @see mode -- @see mode
-- @see preferred_alignments -- @see preferred_alignments
@ -363,6 +372,8 @@ function tooltip:set_preferred_positions(value)
self._private.preferred_positions = value self._private.preferred_positions = value
set_geometry(self) set_geometry(self)
self:emit_signal("property::preferred_positions", value)
end end
--- The preferred alignment when using the `outside` mode. --- The preferred alignment when using the `outside` mode.
@ -394,6 +405,7 @@ end
-- --
-- @property preferred_alignments -- @property preferred_alignments
-- @param string -- @param string
-- @propemits true false
-- @see preferred_positions -- @see preferred_positions
function tooltip:get_preferred_alignments() function tooltip:get_preferred_alignments()
@ -405,14 +417,16 @@ function tooltip:set_preferred_alignments(value)
self._private.preferred_alignments = value self._private.preferred_alignments = value
set_geometry(self) set_geometry(self)
self:emit_signal("property::preferred_alignments", value)
end end
--- Change displayed text. --- Change displayed text.
-- --
-- @property text -- @property text
-- @tparam tooltip self The tooltip object.
-- @tparam string text New tooltip text, passed to -- @tparam string text New tooltip text, passed to
-- `wibox.widget.textbox.set_text`. -- `wibox.widget.textbox.set_text`.
-- @propemits true false
-- @see wibox.widget.textbox -- @see wibox.widget.textbox
function tooltip:set_text(text) function tooltip:set_text(text)
@ -420,14 +434,16 @@ function tooltip:set_text(text)
if self._private.visible then if self._private.visible then
set_geometry(self) set_geometry(self)
end end
self:emit_signal("property::text", text)
end end
--- Change displayed markup. --- Change displayed markup.
-- --
-- @property markup -- @property markup
-- @tparam tooltip self The tooltip object.
-- @tparam string text New tooltip markup, passed to -- @tparam string text New tooltip markup, passed to
-- `wibox.widget.textbox.set_markup`. -- `wibox.widget.textbox.set_markup`.
-- @propemits true false
-- @see wibox.widget.textbox -- @see wibox.widget.textbox
function tooltip:set_markup(text) function tooltip:set_markup(text)
@ -435,18 +451,21 @@ function tooltip:set_markup(text)
if self._private.visible then if self._private.visible then
set_geometry(self) set_geometry(self)
end end
self:emit_signal("property::markup", text)
end end
--- Change the tooltip's update interval. --- Change the tooltip's update interval.
-- --
-- @property timeout -- @property timeout
-- @tparam tooltip self A tooltip object.
-- @tparam number timeout The timeout value. -- @tparam number timeout The timeout value.
-- @propemits true false
function tooltip:set_timeout(timeout) function tooltip:set_timeout(timeout)
if self.timer then if self.timer then
self.timer.timeout = timeout self.timer.timeout = timeout
end end
self:emit_signal("property::timeout", timeout)
end end
--- Set all margins around the tooltip textbox --- Set all margins around the tooltip textbox
@ -454,11 +473,12 @@ end
-- @DOC_awful_tooltip_margins_EXAMPLE@ -- @DOC_awful_tooltip_margins_EXAMPLE@
-- --
-- @property margins -- @property margins
-- @tparam tooltip self A tooltip object -- @tparam number|table New margins value
-- @tparam number New margins value -- @propemits true false
function tooltip:set_margins(val) function tooltip:set_margins(val)
self.marginbox:set_margins(val) self.marginbox:set_margins(val)
self:emit_signal("property::margins", val)
end end
--- The border width. --- The border width.
@ -467,9 +487,12 @@ end
-- --
-- @property border_width -- @property border_width
-- @param number -- @param number
-- @propemits true false
-- @propbeautiful
function tooltip:set_border_width(val) function tooltip:set_border_width(val)
self.widget.border_width = val self.widget.border_width = val
self:emit_signal("property::border_width", val)
end end
--- The border color. --- The border color.
@ -478,10 +501,11 @@ end
-- --
-- @property border_color -- @property border_color
-- @param color -- @param color
-- @param gears.color -- @propemits true false
function tooltip:set_border_color(val) function tooltip:set_border_color(val)
self.widget.border_color = val self.widget.border_color = val
self:emit_signal("property::border_color", val)
end end
--- Set the margins around the left and right of the tooltip textbox --- Set the margins around the left and right of the tooltip textbox
@ -489,12 +513,13 @@ end
-- @DOC_awful_tooltip_margins_leftright_EXAMPLE@ -- @DOC_awful_tooltip_margins_leftright_EXAMPLE@
-- --
-- @property margins_leftright -- @property margins_leftright
-- @tparam tooltip self A tooltip object
-- @tparam number New margins value -- @tparam number New margins value
-- @propemits true false
function tooltip:set_margin_leftright(val) function tooltip:set_margin_leftright(val)
self.marginbox:set_left(val) self.marginbox:set_left(val)
self.marginbox:set_right(val) self.marginbox:set_right(val)
self:emit_signal("property::margin_leftright", val)
end end
--TODO v5 deprecate this --TODO v5 deprecate this
@ -507,12 +532,13 @@ end
-- @DOC_awful_tooltip_margins_topbottom_EXAMPLE@ -- @DOC_awful_tooltip_margins_topbottom_EXAMPLE@
-- --
-- @property margins_topbottom -- @property margins_topbottom
-- @tparam tooltip self A tooltip object
-- @tparam number New margins value -- @tparam number New margins value
-- @propemits true false
function tooltip:set_margin_topbottom(val) function tooltip:set_margin_topbottom(val)
self.marginbox:set_top(val) self.marginbox:set_top(val)
self.marginbox:set_bottom(val) self.marginbox:set_bottom(val)
self:emit_signal("property::margin_topbottom", val)
end end
--TODO v5 deprecate this --TODO v5 deprecate this
@ -727,6 +753,8 @@ function tooltip.mt:__call(...)
return tooltip.new(...) return tooltip.new(...)
end end
--@DOC_object_COMMON@
return setmetatable(tooltip, tooltip.mt) return setmetatable(tooltip, tooltip.mt)
-- 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

@ -36,14 +36,8 @@ local wiboxes = setmetatable({}, {__mode = "v"})
--- If the wibar needs to be stretched to fill the screen. --- If the wibar needs to be stretched to fill the screen.
-- @property stretch -- @property stretch
-- @tparam boolean stretch -- @tparam boolean stretch
-- @propbeautiful
--- The wibar's width. -- @propemits true false
-- @property width
-- @tparam integer width
--- The wibar's height.
-- @property height
-- @tparam integer height
--- If the wibar needs to be stretched to fill the screen. --- If the wibar needs to be stretched to fill the screen.
-- @beautiful beautiful.wibar_stretch -- @beautiful beautiful.wibar_stretch
@ -165,8 +159,17 @@ local function reattach(wb)
end end
--- The wibox position. --- The wibox position.
--
-- The valid values are:
--
-- * left
-- * right
-- * top
-- * bottom
--
-- @property position -- @property position
-- @param string Either "left", right", "top" or "bottom" -- @tparam string position Either "left", right", "top" or "bottom"
-- @propemits true false
local function get_position(wb) local function get_position(wb)
return wb._position or "top" return wb._position or "top"
@ -215,6 +218,8 @@ local function set_position(wb, position, skip_reattach)
-- or right wibars. To solve, this, they need to be re-attached. -- or right wibars. To solve, this, they need to be re-attached.
reattach(wb) reattach(wb)
end end
wb:emit_signal("property::position", position)
end end
local function get_stretch(w) local function get_stretch(w)
@ -225,6 +230,8 @@ local function set_stretch(w, value)
w._stretch = value w._stretch = value
attach(w, w.position) attach(w, w.position)
w:emit_signal("property::stretch", value)
end end
--- Remove a wibar. --- Remove a wibar.
@ -444,6 +451,8 @@ end
--@DOC_wibox_COMMON@ --@DOC_wibox_COMMON@
--@DOC_object_COMMON@
return setmetatable(awfulwibar, awfulwibar.mt) return setmetatable(awfulwibar, awfulwibar.mt)
-- 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

@ -84,6 +84,7 @@ end
-- --
-- @property client -- @property client
-- @param client -- @param client
-- @propemits true false
function clienticon:get_client() function clienticon:get_client()
return self._private.client return self._private.client
@ -94,6 +95,7 @@ function clienticon:set_client(c)
self._private.client = c self._private.client = c
self:emit_signal("widget::layout_changed") self:emit_signal("widget::layout_changed")
self:emit_signal("widget::redraw_needed") self:emit_signal("widget::redraw_needed")
self:emit_signal("property::client", c)
end end
--- Returns a new clienticon. --- Returns a new clienticon.

View File

@ -310,6 +310,10 @@ function keyboardlayout.mt:__call(...)
return _instance return _instance
end end
--@DOC_widget_COMMON@
--@DOC_object_COMMON@
return setmetatable(keyboardlayout, keyboardlayout.mt) return setmetatable(keyboardlayout, keyboardlayout.mt)
-- 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

@ -50,6 +50,10 @@ function launcher.mt:__call(...)
return launcher.new(...) return launcher.new(...)
end end
--@DOC_widget_COMMON@
--@DOC_object_COMMON@
return setmetatable(launcher, launcher.mt) return setmetatable(launcher, launcher.mt)
-- 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

@ -178,12 +178,14 @@ local layoutlist = {}
-- automatically. -- automatically.
-- @property base_layout -- @property base_layout
-- @param widget -- @param widget
-- @propemits true false
-- @see wibox.layout.fixed.vertical -- @see wibox.layout.fixed.vertical
-- @see base_layout -- @see base_layout
--- The delegate widget template. --- The delegate widget template.
-- @property widget_template -- @property widget_template
-- @param table -- @param table
-- @propemits true false
--- The layoutlist screen. --- The layoutlist screen.
-- @property screen -- @property screen
@ -329,6 +331,7 @@ function layoutlist:set_base_layout(layout)
self:emit_signal("widget::layout_changed") self:emit_signal("widget::layout_changed")
self:emit_signal("widget::redraw_needed") self:emit_signal("widget::redraw_needed")
self:emit_signal("property::base_layout", layout)
end end
function layoutlist:set_widget_template(widget_template) function layoutlist:set_widget_template(widget_template)
@ -345,6 +348,7 @@ function layoutlist:set_widget_template(widget_template)
self:emit_signal("widget::layout_changed") self:emit_signal("widget::layout_changed")
self:emit_signal("widget::redraw_needed") self:emit_signal("widget::redraw_needed")
self:emit_signal("property::widget_template", widget_template)
end end
function layoutlist:layout(_, width, height) function layoutlist:layout(_, width, height)

View File

@ -158,6 +158,10 @@ function widgetprompt.mt:__call(...)
return widgetprompt.new(...) return widgetprompt.new(...)
end end
--@DOC_widget_COMMON@
--@DOC_object_COMMON@
return setmetatable(widgetprompt, widgetprompt.mt) return setmetatable(widgetprompt, widgetprompt.mt)
-- 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

@ -607,6 +607,10 @@ function taglist.mt:__call(...)
return taglist.new(...) return taglist.new(...)
end end
--@DOC_widget_COMMON@
--@DOC_object_COMMON@
return setmetatable(taglist, taglist.mt) return setmetatable(taglist, taglist.mt)
-- 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

@ -739,6 +739,10 @@ function tasklist.mt:__call(...)
return tasklist.new(...) return tasklist.new(...)
end end
--@DOC_widget_COMMON@
--@DOC_object_COMMON@
return setmetatable(tasklist, tasklist.mt) return setmetatable(tasklist, tasklist.mt)
-- 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

@ -88,6 +88,10 @@ function watch.mt.__call(_, ...)
return watch.new(...) return watch.new(...)
end end
--@DOC_widget_COMMON@
--@DOC_object_COMMON@
return setmetatable(watch, watch.mt) return setmetatable(watch, watch.mt)
-- 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

@ -85,6 +85,7 @@ local timer = { mt = {} }
--- Start the timer. --- Start the timer.
-- @method start -- @method start
-- @emits start
function timer:start() function timer:start()
if self.data.source_id ~= nil then if self.data.source_id ~= nil then
gdebug.print_error(traceback("timer already started")) gdebug.print_error(traceback("timer already started"))
@ -99,6 +100,7 @@ end
--- Stop the timer. --- Stop the timer.
-- @method stop -- @method stop
-- @emits stop
function timer:stop() function timer:stop()
if self.data.source_id == nil then if self.data.source_id == nil then
gdebug.print_error(traceback("timer not started")) gdebug.print_error(traceback("timer not started"))
@ -113,6 +115,8 @@ end
-- This is equivalent to stopping the timer if it is running and then starting -- This is equivalent to stopping the timer if it is running and then starting
-- it. -- it.
-- @method again -- @method again
-- @emits start
-- @emits stop
function timer:again() function timer:again()
if self.data.source_id ~= nil then if self.data.source_id ~= nil then
self:stop() self:stop()
@ -128,6 +132,7 @@ end
-- **Signal:** property::timeout -- **Signal:** property::timeout
-- @property timeout -- @property timeout
-- @param number -- @param number
-- @propemits true false
local timer_instance_mt = { local timer_instance_mt = {
__index = function(self, property) __index = function(self, property)
@ -143,7 +148,7 @@ local timer_instance_mt = {
__newindex = function(self, property, value) __newindex = function(self, property, value)
if property == "timeout" then if property == "timeout" then
self.data.timeout = tonumber(value) self.data.timeout = tonumber(value)
self:emit_signal("property::timeout") self:emit_signal("property::timeout", value)
end end
end end
} }

View File

@ -41,6 +41,7 @@ local force_forward = {
function wibox:set_widget(widget) function wibox:set_widget(widget)
local w = base.make_widget_from_value(widget) local w = base.make_widget_from_value(widget)
self._drawable:set_widget(w) self._drawable:set_widget(w)
self:emit_signal("property::widget", widget)
end end
function wibox:get_widget() function wibox:get_widget()
@ -51,14 +52,17 @@ wibox.setup = base.widget.setup
function wibox:set_bg(c) function wibox:set_bg(c)
self._drawable:set_bg(c) self._drawable:set_bg(c)
self:emit_signal("property::bg", c)
end end
function wibox:set_bgimage(image, ...) function wibox:set_bgimage(image, ...)
self._drawable:set_bgimage(image, ...) self._drawable:set_bgimage(image, ...)
self:emit_signal("property::bgimage", ...)
end end
function wibox:set_fg(c) function wibox:set_fg(c)
self._drawable:set_fg(c) self._drawable:set_fg(c)
self:emit_signal("property::fg", c)
end end
function wibox:find_widgets(x, y) function wibox:find_widgets(x, y)
@ -149,6 +153,7 @@ end
function wibox:set_shape(shape) function wibox:set_shape(shape)
self._shape = shape self._shape = shape
self:_apply_shape() self:_apply_shape()
self:emit_signal("property::shape", shape)
end end
function wibox:get_shape() function wibox:get_shape()
@ -199,6 +204,7 @@ function wibox:set_screen(s)
-- (x,y) is not enough to figure out the correct screen. -- (x,y) is not enough to figure out the correct screen.
self.screen_assigned = s self.screen_assigned = s
self._drawable:_force_screen(s) self._drawable:_force_screen(s)
self:emit_signal("property::screen", s)
end end
function wibox:get_children_by_id(name) function wibox:get_children_by_id(name)