From 575b0f12dc02d24b9d85aafc89d215d2d863994b Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage-Vallee Date: Mon, 30 Dec 2019 22:09:39 -0800 Subject: [PATCH] doc: Remove all type aliases. They render poorly and serve no purpose. #!/bin/bash for FILE in $(git ls-files | grep -E "\.(h|c|lua)" | grep -v tests | grep -v spec); do sed -i 's/^[ ]*--*[ ]*@client /-- @tparam client /g' $FILE done --- docs/02-contributing.md | 5 --- docs/common/rules_index.ldoc | 1 + docs/config.ld | 8 ----- lib/awful/client.lua | 66 +++++++++++++++++----------------- lib/awful/client/focus.lua | 12 +++---- lib/awful/client/shape.lua | 8 ++--- lib/awful/client/urgent.lua | 4 +-- lib/awful/permissions/init.lua | 6 ++-- lib/awful/placement.lua | 2 +- lib/awful/screen.lua | 8 ++--- lib/awful/spawn.lua | 6 ++-- lib/awful/tag.lua | 2 +- lib/awful/widget/common.lua | 8 ++--- lib/naughty/core.lua | 2 +- lib/naughty/notification.lua | 2 +- lib/ruled/client.lua | 28 +++++++-------- lib/wibox/widget/base.lua | 10 +++--- objects/client.c | 6 ++-- objects/screen.c | 2 +- objects/tag.c | 4 +-- 20 files changed, 89 insertions(+), 101 deletions(-) diff --git a/docs/02-contributing.md b/docs/02-contributing.md index ceb31e37d..dcde71447 100644 --- a/docs/02-contributing.md +++ b/docs/02-contributing.md @@ -83,11 +83,6 @@ Parameters of functions should be documented using For a more comprehensive description of the available tags see the [LDoc documentation](https://stevedonovan.github.io/ldoc/manual/doc.md.html). -In addition to the regular tags provided by LDoc there are also some aliases -for typed parameters defined in `docs/config.ld`, e.g. `@client` for -`@tparam client.object`, `@tag` for `@tparam tag` and `@tab` for -`@tparam table`). - ## Patches If you plan to submit patches, you should follow the following guidelines. diff --git a/docs/common/rules_index.ldoc b/docs/common/rules_index.ldoc index eeecdbda3..207e562e6 100644 --- a/docs/common/rules_index.ldoc +++ b/docs/common/rules_index.ldoc @@ -25,6 +25,7 @@ -- dockableIf the client is dockable -- requests\_no\_titlebarIf the client requests not to be decorated with a titlebar -- shapeSet the client shape +-- activeReturn true if the client is active (has focus) -- windowThe X window id -- nameThe client title -- skip\_taskbarTrue if the client does not want to be in taskbar diff --git a/docs/config.ld b/docs/config.ld index afceff201..8e1c9f0b3 100644 --- a/docs/config.ld +++ b/docs/config.ld @@ -44,14 +44,6 @@ topics={ '89-NEWS.md', } --- Setup @client to be an alias for "@tparam client.object" -tparam_alias('client', 'client.object') -tparam_alias('tag', 'tag') --- Should be default, but is not. Sets up "@tab" => "@tparam table". -tparam_alias('tab', 'table') -tparam_alias('screen', 'screen') -tparam_alias('screen_or_idx', 'screen|int') - -- The first stereotype are the constructors. new_type("constructorfct", "Constructors", false, "Parameters") new_type("constructorfct2", "ldoc_skip", false, "Parameters") diff --git a/lib/awful/client.lua b/lib/awful/client.lua index 246b7f245..1bf8a6593 100644 --- a/lib/awful/client.lua +++ b/lib/awful/client.lua @@ -157,7 +157,7 @@ client.focus = require("awful.client.focus") -- -- @deprecated awful.client.jumpto -- @see client.jump_to --- @client c the client to jump to +-- @tparam client c the client to jump to -- @tparam bool|function merge If true then merge tags (select the client's -- first tag additionally) when the client is not visible. -- If it is a function, it will be called with the client and its first @@ -251,7 +251,7 @@ end -- -- @staticfct awful.client.next -- @tparam int i The index. Use 1 to get the next, -1 to get the previous. --- @client[opt] sel The client. +-- @tparam[opt] client sel The client. -- @tparam[opt=false] boolean stacked Use stacking order? (top to bottom) -- @treturn[opt] client|nil A client, or nil if no client is available. -- @@ -287,7 +287,7 @@ end -- -- @staticfct awful.client.swap.bydirection -- @tparam string dir The direction, can be either "up", "down", "left" or "right". --- @client[opt=focused] c The client. +-- @tparam[opt=focused] client c The client. -- @tparam[opt=false] boolean stacked Use stacking order? (top to bottom) -- @see swap -- @see swapped @@ -316,7 +316,7 @@ end -- Swaps across screens. -- @staticfct awful.client.swap.global_bydirection -- @tparam string dir The direction, can be either "up", "down", "left" or "right". --- @client[opt] sel The client. +-- @tparam[opt] client sel The client. -- @request client activate client.swap.global_bydirection granted When a client -- could be activated because `awful.client.swap.global_bydirection` was called. -- @see swap @@ -357,7 +357,7 @@ end -- -- @staticfct awful.client.swap.byidx -- @tparam integer i The index. --- @client[opt] c The client, otherwise focused one is used. +-- @tparam[opt] client c The client, otherwise focused one is used. -- @see swap -- @see swapped -- @see awful.client.swap.bydirection @@ -429,7 +429,7 @@ end --- Get the master window. -- -- @legacylayout awful.client.getmaster --- @screen_or_idx[opt=awful.screen.focused()] s The screen. +-- @tparam[opt=awful.screen.focused()] screen s The screen. -- @treturn client The master client. function client.getmaster(s) s = s or screen.focused() @@ -439,7 +439,7 @@ end --- Set the client as master: put it at the beginning of other windows. -- -- @legacylayout awful.client.setmaster --- @client c The window to set as master. +-- @tparam client c The window to set as master. function client.setmaster(c) local cls = gtable.reverse(capi.client.get(c.screen)) for _, v in pairs(cls) do @@ -449,7 +449,7 @@ end --- Set the client as slave: put it at the end of other windows. -- @legacylayout awful.client.setslave --- @client c The window to set as slave. +-- @tparam client c The window to set as slave. function client.setslave(c) local cls = capi.client.get(c.screen) for _, v in pairs(cls) do @@ -463,7 +463,7 @@ end -- @tparam integer y The relative y coordinate. -- @tparam integer w The relative width. -- @tparam integer h The relative height. --- @client[opt] c The client, otherwise focused one is used. +-- @tparam[opt] client c The client, otherwise focused one is used. -- @see client.relative_move function client.moveresize(x, y, w, h, c) gdebug.deprecate("Use c:relative_move(x, y, w, h) instead of awful.client.moveresize", {deprecated_in=4}) @@ -489,7 +489,7 @@ end --- Move a client to a tag. -- @deprecated awful.client.movetotag -- @tparam tag target The tag to move the client to. --- @client[opt] c The client to move, otherwise the focused one is used. +-- @tparam[opt] client c The client to move, otherwise the focused one is used. -- @see client.move_to_tag function client.movetotag(target, c) gdebug.deprecate("Use c:move_to_tag(target) instead of awful.client.movetotag", {deprecated_in=4}) @@ -519,7 +519,7 @@ end -- -- @deprecated awful.client.toggletag -- @tparam tag target The tag to toggle. --- @client[opt] c The client to toggle, otherwise the focused one is used. +-- @tparam[opt] client c The client to toggle, otherwise the focused one is used. -- @see client.toggle_tag -- @see tags function client.toggletag(target, c) @@ -556,7 +556,7 @@ end --- Move a client to a screen. Default is next screen, cycling. -- @deprecated awful.client.movetoscreen --- @client c The client to move. +-- @tparam client c The client to move. -- @tparam screen s The screen, default to current + 1. -- @see screen -- @see client.move_to_screen @@ -660,7 +660,7 @@ end --- Mark a client, and then call 'marked' hook. -- @deprecated awful.client.mark --- @client c The client to mark, the focused one if not specified. +-- @tparam client c The client to mark, the focused one if not specified. function client.mark(c) gdebug.deprecate("Use c.marked = true instead of awful.client.mark", {deprecated_in=4}) client.object.set_marked(c or capi.client.focus, true) @@ -668,7 +668,7 @@ end --- Unmark a client and then call 'unmarked' hook. -- @deprecated awful.client.unmark --- @client c The client to unmark, or the focused one if not specified. +-- @tparam client c The client to unmark, or the focused one if not specified. function client.unmark(c) gdebug.deprecate("Use c.marked = false instead of awful.client.unmark", {deprecated_in=4}) client.object.set_marked(c or capi.client.focus, false) @@ -676,7 +676,7 @@ end --- Check if a client is marked. -- @deprecated awful.client.ismarked --- @client c The client to check, or the focused one otherwise. +-- @tparam client c The client to check, or the focused one otherwise. function client.ismarked(c) gdebug.deprecate("Use c.marked instead of awful.client.ismarked", {deprecated_in=4}) return client.object.get_marked(c or capi.client.focus) @@ -684,7 +684,7 @@ end --- Toggle a client as marked. -- @deprecated awful.client.togglemarked --- @client c The client to toggle mark. +-- @tparam client c The client to toggle mark. function client.togglemarked(c) gdebug.deprecate("Use c.marked = not c.marked instead of awful.client.togglemarked", {deprecated_in=4}) c = c or capi.client.focus @@ -712,7 +712,7 @@ end --- Set a client floating state, overriding auto-detection. -- Floating client are not handled by tiling layouts. -- @deprecated awful.client.floating.set --- @client c A client. +-- @tparam client c A client. -- @tparam boolean s True or false. function client.floating.set(c, s) gdebug.deprecate("Use c.floating = true instead of awful.client.floating.set", {deprecated_in=4}) @@ -721,7 +721,7 @@ end -- Set a client floating state, overriding auto-detection. -- Floating client are not handled by tiling layouts. --- @client c A client. +-- @tparam client c A client. -- @tparam boolan s True or false. function client.object.set_floating(c, s) c = c or capi.client.focus @@ -760,7 +760,7 @@ capi.client.connect_signal("property::geometry", store_floating_geometry) --- Return if a client has a fixed size or not. -- This function is deprecated, use `c.is_fixed` --- @client c The client. +-- @tparam client c The client. -- @deprecated awful.client.isfixed -- @see is_fixed -- @see size_hints_honor @@ -826,7 +826,7 @@ function client.object.is_immobilized_vertical(c) end --- Get a client floating state. --- @client c A client. +-- @tparam client c A client. -- @see floating -- @deprecated awful.client.floating.get -- @treturn boolean True or false. Note that some windows might be floating even if you @@ -910,7 +910,7 @@ capi.client.connect_signal("request::manage", update_implicitly_floating) --- Toggle the floating state of a client between 'auto' and 'true'. -- Use `c.floating = not c.floating` -- @deprecated awful.client.floating.toggle --- @client c A client. +-- @tparam client c A client. -- @see floating function client.floating.toggle(c) c = c or capi.client.focus @@ -919,7 +919,7 @@ function client.floating.toggle(c) end -- Remove the floating information on a client. --- @client c The client. +-- @tparam client c The client. function client.floating.delete(c) client.object.set_floating(c, nil) end @@ -1026,7 +1026,7 @@ end -- number of visible clients in this column. -- -- @legacylayout awful.client.idx --- @client c the client +-- @tparam client c the client -- @treturn integer col The column number. -- @treturn integer idx Index of the client in the column. -- @treturn integer num The number of visible clients in the column. @@ -1088,7 +1088,7 @@ end -- -- @legacylayout awful.client.setwfact -- @tparam number wfact the window factor value --- @client c the client +-- @tparam client c the client -- @emits property::windowfact function client.setwfact(wfact, c) -- get the currently selected window @@ -1144,7 +1144,7 @@ end -- @tparam number add Amount to increase/decrease the client's window factor. -- Should be between `-current_window_factor` and something close to -- infinite. The normalisation then ensures that the sum of all factors is 1. --- @client c the client. +-- @tparam client c the client. -- @emits property::windowfact function client.incwfact(add, c) c = c or capi.client.focus @@ -1167,7 +1167,7 @@ end --- Get a client's dockable state. -- --- @client c A client. +-- @tparam client c A client. -- @treturn bool -- @deprecated awful.client.dockable.get function client.dockable.get(c) @@ -1207,7 +1207,7 @@ end -- With this enabled you can dock windows by moving them from the center -- to the edge of the workarea. -- --- @client c A client. +-- @tparam client c A client. -- @tparam boolean value True or false. -- @deprecated awful.client.dockable.set function client.dockable.set(c, value) @@ -1249,7 +1249,7 @@ end) -- -- This method is deprecated. It is now possible to use `c.value` directly. -- --- @client c The client. +-- @tparam client c The client. -- @tparam string prop The property name. -- @return The property value. -- @deprecated awful.client.property.get @@ -1273,7 +1273,7 @@ end -- This method is deprecated. It is now possible to use `c.value = value` -- directly. -- --- @client c The client. +-- @tparam client c The client. -- @tparam string prop The property name. -- @param value The property value. -- @deprecated awful.client.property.set @@ -1377,7 +1377,7 @@ end --- Get a matching transient_for client (if any). -- @deprecated awful.client.get_transient_for_matching -- @see client.get_transient_for_matching --- @client c The client. +-- @tparam client c The client. -- @tparam function matcher A function that should return true, if -- a matching parent client is found. -- @treturn client|nil The matching parent client or nil. @@ -1411,8 +1411,8 @@ end -- -- @deprecated awful.client.is_transient_for -- @see client.is_transient_for --- @client c The child client (having transient_for). --- @client c2 The parent client to check. +-- @tparam client c The child client (having transient_for). +-- @tparam client c2 The parent client to check. -- @treturn client|nil The parent client or nil. function client.is_transient_for(c, c2) gdebug.deprecate("Use c:is_transient_for(c2) instead of".. @@ -1430,7 +1430,7 @@ end -- likely return values. -- -- @method is_transient_for --- @client c2 The parent client to check. +-- @tparam client c2 The parent client to check. -- @treturn client|nil The parent client or nil. -- @see transient_for -- @see modal diff --git a/lib/awful/client/focus.lua b/lib/awful/client/focus.lua index 4ba75221a..f9dbb0ecc 100644 --- a/lib/awful/client/focus.lua +++ b/lib/awful/client/focus.lua @@ -44,7 +44,7 @@ end --- Remove a client from the focus history -- --- @client c The client that must be removed. +-- @tparam client c The client that must be removed. -- @function awful.client.focus.history.delete function focus.history.delete(c) for k, v in ipairs(focus.history.list) do @@ -59,7 +59,7 @@ end -- -- @function awful.client.focus.byidx -- @param i The index. --- @client[opt] c The client. +-- @tparam[opt] client c The client. -- @request client activate client.focus.byidx granted When `awful.focus.byidx` -- is called. function focus.byidx(i, c) @@ -74,7 +74,7 @@ end -- This usually means that desktop, dock and splash windows are -- not registered and cannot get focus. -- --- @client c A client. +-- @tparam client c A client. -- @return The same client if it's ok, nil otherwise. -- @function awful.client.focus.filter function focus.filter(c) @@ -89,7 +89,7 @@ end --- Update client focus history. -- --- @client c The client that has been focused. +-- @tparam client c The client that has been focused. -- @function awful.client.focus.history.add function focus.history.add(c) -- Remove the client if its in stack @@ -159,7 +159,7 @@ end -- -- @tparam string dir The direction, can be either -- `"up"`, `"down"`, `"left"` or `"right"`. --- @client[opt] c The client. +-- @tparam[opt] client c The client. -- @tparam[opt=false] boolean stacked Use stacking order? (top to bottom) -- @function awful.client.focus.bydirection -- @request client activate client.focus.bydirection granted When @@ -186,7 +186,7 @@ end --- Focus a client by the given direction. Moves across screens. -- -- @param dir The direction, can be either "up", "down", "left" or "right". --- @client[opt] c The client. +-- @tparam[opt] client c The client. -- @tparam[opt=false] boolean stacked Use stacking order? (top to bottom) -- @function awful.client.focus.global_bydirection -- @request client activate client.focus.global_bydirection granted When diff --git a/lib/awful/client/shape.lua b/lib/awful/client/shape.lua index 6dcb563e4..ec0fd3db2 100644 --- a/lib/awful/client/shape.lua +++ b/lib/awful/client/shape.lua @@ -19,7 +19,7 @@ shape.update = {} --- Get one of a client's shapes and transform it to include window decorations. -- @function awful.client.shape.get_transformed --- @client c The client whose shape should be retrieved +-- @tparam client c The client whose shape should be retrieved -- @tparam string shape_name Either "bounding" or "clip" function shape.get_transformed(c, shape_name) local border = shape_name == "bounding" and c.border_width or 0 @@ -91,7 +91,7 @@ end --- Update all of a client's shapes from the shapes the client set itself. -- @function awful.client.shape.update.all --- @client c The client to act on +-- @tparam client c The client to act on function shape.update.all(c) shape.update.bounding(c) shape.update.clip(c) @@ -99,7 +99,7 @@ end --- Update a client's bounding shape from the shape the client set itself. -- @function awful.client.shape.update.bounding --- @client c The client to act on +-- @tparam client c The client to act on function shape.update.bounding(c) local res = shape.get_transformed(c, "bounding") c.shape_bounding = res and res._native @@ -111,7 +111,7 @@ end --- Update a client's clip shape from the shape the client set itself. -- @function awful.client.shape.update.clip --- @client c The client to act on +-- @tparam client c The client to act on function shape.update.clip(c) local res = shape.get_transformed(c, "clip") c.shape_clip = res and res._native diff --git a/lib/awful/client/urgent.lua b/lib/awful/client/urgent.lua index dd1602d7a..49cf36470 100644 --- a/lib/awful/client/urgent.lua +++ b/lib/awful/client/urgent.lua @@ -60,7 +60,7 @@ end --- Adds client to urgent stack. -- -- @function awful.urgent.add --- @client c The client object. +-- @tparam client c The client object. -- @param prop The property which is updated. -- @request client border active granted When a client becomes active and is no -- longer urgent. @@ -91,7 +91,7 @@ end --- Remove client from urgent stack. -- -- @function awful.urgent.delete --- @client c The client object. +-- @tparam client c The client object. function urgent.delete(c) for k, cl in ipairs(data) do if c == cl then diff --git a/lib/awful/permissions/init.lua b/lib/awful/permissions/init.lua index cf4fcab65..1a2fc3c02 100644 --- a/lib/awful/permissions/init.lua +++ b/lib/awful/permissions/init.lua @@ -137,7 +137,7 @@ end -- It is the default signal handler for `request::activate` on a `client`. -- -- @signalhandler awful.permissions.activate --- @client c A client to use +-- @tparam client c A client to use -- @tparam string context The context where this signal was used. -- @tparam[opt] table hints A table with additional hints: -- @tparam[opt=false] boolean hints.raise should the client be raised? @@ -283,7 +283,7 @@ end -- It is the default signal handler for `request::tag` on a `client`. -- -- @signalhandler awful.permissions.tag --- @client c A client to tag +-- @tparam client c A client to tag -- @tparam[opt] tag|boolean t A tag to use. If true, then the client is made sticky. -- @tparam[opt={}] table hints Extra information function permissions.tag(c, t, hints) --luacheck: no unused @@ -310,7 +310,7 @@ end --- Handle client urgent request -- @signalhandler awful.permissions.urgent --- @client c A client +-- @tparam client c A client -- @tparam boolean urgent If the client should be urgent function permissions.urgent(c, urgent) if c ~= client.focus and not aclient.property.get(c,"ignore_urgent") then diff --git a/lib/awful/placement.lua b/lib/awful/placement.lua index 354c81a41..fc79d5b9b 100644 --- a/lib/awful/placement.lua +++ b/lib/awful/placement.lua @@ -849,7 +849,7 @@ end --- Place the client so no part of it will be outside the screen (workarea). --@DOC_awful_placement_no_offscreen_EXAMPLE@ --- @client c The client. +-- @tparam client c The client. -- @tparam[opt={}] table args The arguments -- @tparam[opt=client's screen] integer args.screen The screen. -- @treturn table The new client geometry. diff --git a/lib/awful/screen.lua b/lib/awful/screen.lua index a1dfda78c..06ec07359 100644 --- a/lib/awful/screen.lua +++ b/lib/awful/screen.lua @@ -88,7 +88,7 @@ end -- This moves the mouse pointer to the last known position on the new screen, -- or keeps its position relative to the current focused screen. -- @staticfct awful.screen.focus --- @screen _screen Screen number (defaults / falls back to mouse.screen). +-- @tparam screen _screen Screen number (defaults / falls back to mouse.screen). -- @request client activate screen.focus granted The most recent focused client -- for this screen should be re-activated. function screen.focus(_screen) @@ -361,9 +361,9 @@ end -- @tparam[opt] int|table args.margins Apply some margins on the output. -- This can either be a number or a table with *left*, *right*, *top* -- and *bottom* keys. --- @tag[opt] args.tag Use this tag's screen. +-- @tparam[opt] tag args.tag Use this tag's screen. -- @tparam[opt] drawable args.parent A parent drawable to use as base geometry. --- @tab[opt] args.bounding_rect A bounding rectangle. This parameter is +-- @tparam[opt] table args.bounding_rect A bounding rectangle. This parameter is -- incompatible with `honor_workarea`. -- @treturn table A table with *x*, *y*, *width* and *height*. -- @usage local geo = screen:get_bounding_geometry { @@ -516,7 +516,7 @@ end -- -- @staticfct awful.screen.connect_for_each_screen -- @tparam function func The function to call. --- @screen func.screen The screen. +-- @tparam screen func.screen The screen. function screen.connect_for_each_screen(func) for s in capi.screen do func(s) diff --git a/lib/awful/spawn.lua b/lib/awful/spawn.lua index ff41e0ea0..2ba1903f9 100644 --- a/lib/awful/spawn.lua +++ b/lib/awful/spawn.lua @@ -374,7 +374,7 @@ end --- Spawn a program and asynchronously capture its output line by line. -- @tparam string|table cmd The command. --- @tab callbacks Table containing callbacks that should be invoked on +-- @tparam table callbacks Table containing callbacks that should be invoked on -- various conditions. -- @tparam[opt] function callbacks.stdout Function that is called with each -- line of output on stdout, e.g. `stdout(line)`. @@ -428,7 +428,7 @@ end --- Asynchronously spawn a program and capture its output. -- (wraps `spawn.with_line_callback`). -- @tparam string|table cmd The command. --- @tab callback Function with the following arguments +-- @tparam table callback Function with the following arguments -- @tparam string callback.stdout Output on stdout. -- @tparam string callback.stderr Output on stderr. -- @tparam string callback.exitreason Exit reason ("exit" or "signal"). @@ -479,7 +479,7 @@ end --- Call `spawn.easy_async` with a shell. -- This calls `cmd` with `$SHELL -c` (via `awful.util.shell`). -- @tparam string cmd The command. --- @tab callback Function with the following arguments +-- @tparam table callback Function with the following arguments -- @tparam string callback.stdout Output on stdout. -- @tparam string callback.stderr Output on stderr. -- @tparam string callback.exitreason Exit reason ("exit" or "signal"). diff --git a/lib/awful/tag.lua b/lib/awful/tag.lua index 05f199f20..4bedff293 100644 --- a/lib/awful/tag.lua +++ b/lib/awful/tag.lua @@ -1670,7 +1670,7 @@ end -- future. When a tag is detached from the screen, its signal is removed. -- -- @staticfct awful.tag.attached_connect_signal --- @screen screen The screen concerned, or all if nil. +-- @tparam screen screen The screen concerned, or all if nil. -- @tparam[opt] string signal The signal name. -- @tparam[opt] function Callback function tag.attached_connect_signal(screen, ...) diff --git a/lib/awful/widget/common.lua b/lib/awful/widget/common.lua index db67b0629..138a8c6bb 100644 --- a/lib/awful/widget/common.lua +++ b/lib/awful/widget/common.lua @@ -17,7 +17,7 @@ local base = require("wibox.widget.base") local common = {} --- Common method to create buttons. --- @tab buttons +-- @tparam table buttons -- @param object -- @treturn table function common.create_buttons(buttons, object) @@ -112,12 +112,12 @@ end --- Common update method. -- @param w The widget. --- @tab buttons +-- @tparam table 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. +-- @tparam table data Current data/cache, indexed by objects. +-- @tparam table objects Objects to be displayed / updated. -- @tparam[opt={}] table args function common.list_update(w, buttons, label, data, objects, args) -- update the widgets, creating them if needed diff --git a/lib/naughty/core.lua b/lib/naughty/core.lua index 92342f9e3..497528790 100644 --- a/lib/naughty/core.lua +++ b/lib/naughty/core.lua @@ -611,7 +611,7 @@ end -- -- local notif = naughty.notification(args) -- --- @tab args The argument table containing any of the arguments below. +-- @tparam table args The argument table containing any of the arguments below. -- @string[opt=""] args.text Text of the notification. -- @string[opt] args.title Title of the notification. -- @int[opt=5] args.timeout Time in seconds after which popup expires. diff --git a/lib/naughty/notification.lua b/lib/naughty/notification.lua index 5edb45e70..4d2fba6d7 100644 --- a/lib/naughty/notification.lua +++ b/lib/naughty/notification.lua @@ -757,7 +757,7 @@ end --- Create a notification. -- --- @tab args The argument table containing any of the arguments below. +-- @tparam table args The argument table containing any of the arguments below. -- @string[opt=""] args.text Text of the notification. -- @string[opt] args.title Title of the notification. -- @int[opt=5] args.timeout Time in seconds after which popup expires. diff --git a/lib/ruled/client.lua b/lib/ruled/client.lua index f8b13331e..c0cca1433 100644 --- a/lib/ruled/client.lua +++ b/lib/ruled/client.lua @@ -123,8 +123,8 @@ local module = {} local crules = gmatcher() --- Check if a client matches a rule. --- @client c The client. --- @tab rule The rule to check. +-- @tparam client c The client. +-- @tparam table rule The rule to check. -- @treturn bool True if it matches, false otherwise. -- @staticfct ruled.client.match function module.match(c, rule) @@ -132,8 +132,8 @@ function module.match(c, rule) end --- Check if a client matches any part of a rule. --- @client c The client. --- @tab rule The rule to check. +-- @tparam client c The client. +-- @tparam table rule The rule to check. -- @treturn bool True if at least one rule is matched, false otherwise. -- @staticfct ruled.client.match_any function module.match_any(c, rule) @@ -141,8 +141,8 @@ function module.match_any(c, rule) end --- Does a given rule entry match a client? --- @client c The client. --- @tab entry Rule entry (with keys `rule`, `rule_any`, `except` and/or +-- @tparam client c The client. +-- @tparam table entry Rule entry (with keys `rule`, `rule_any`, `except` and/or -- `except_any`). -- @treturn bool -- @staticfct ruled.client.matches @@ -151,8 +151,8 @@ function module.matches(c, entry) end --- Get list of matching rules for a client. --- @client c The client. --- @tab _rules The rules to check. List with "rule", "rule_any", "except" and +-- @tparam client c The client. +-- @tparam table _rules The rules to check. List with "rule", "rule_any", "except" and -- "except_any" keys. -- @treturn table The list of matched rules. -- @staticfct ruled.client.matching_rules @@ -161,8 +161,8 @@ function module.matching_rules(c, _rules) end --- Check if a client matches a given set of rules. --- @client c The client. --- @tab _rules The rules to check. List of tables with `rule`, `rule_any`, +-- @tparam client c The client. +-- @tparam table _rules The rules to check. List of tables with `rule`, `rule_any`, -- `except` and `except_any` keys. -- @treturn bool True if at least one rule is matched, false otherwise. -- @staticfct ruled.client.matches_list @@ -179,7 +179,7 @@ function module.remove_rule_source(name) end --- Apply ruled.client.rules to a client. --- @client c The client. +-- @tparam client c The client. -- @staticfct ruled.client.apply function module.apply(c) return crules:apply(c) @@ -525,9 +525,9 @@ function module.high_priority_properties.tags(c, value, props) end --- Apply properties and callbacks to a client. --- @client c The client. --- @tab props Properties to apply. --- @tab[opt] callbacks Callbacks to apply. +-- @tparam client c The client. +-- @tparam table props Properties to apply. +-- @tparam[opt] table callbacks Callbacks to apply. -- @staticfct ruled.client.execute -- @request client titlebars rules granted The `titlebars_enabled` is set in the -- rules. diff --git a/lib/wibox/widget/base.lua b/lib/wibox/widget/base.lua index ec4a491ef..37f450e5c 100644 --- a/lib/wibox/widget/base.lua +++ b/lib/wibox/widget/base.lua @@ -150,7 +150,7 @@ end -- -- The default implementation does nothing, this must be re-implemented by -- all layout and container widgets. --- @tab children A table composed of valid widgets. +-- @tparam table children A table composed of valid widgets. -- @method set_children function base.widget:set_children(children) -- luacheck: no unused -- Nothing on purpose @@ -309,7 +309,7 @@ end -- This calls the widget's `:fit` callback and caches the result for later use. -- Never call `:fit` directly, but always through this function! -- @tparam widget parent The parent widget which requests this information. --- @tab context The context in which we are fit. +-- @tparam table context The context in which we are fit. -- @tparam widget widget The widget to fit (this uses -- `widget:fit(context, width, height)`). -- @tparam number width The available width for the widget. @@ -358,7 +358,7 @@ end -- However, normally there shouldn't be any reason why you need to use this -- function. -- @tparam widget parent The parent widget which requests this information. --- @tab context The context in which we are laid out. +-- @tparam table context The context in which we are laid out. -- @tparam widget widget The widget to layout (this uses -- `widget:layout(context, width, height)`). -- @tparam number width The available width for the widget. @@ -574,7 +574,7 @@ end --- Set a declarative widget hierarchy description. -- -- See [The declarative layout system](../documentation/03-declarative-layout.md.html). --- @tab args A table containing the widget's disposition. +-- @tparam table args A table containing the widget's disposition. -- @method setup function base.widget:setup(args) local f,ids = self.set_widget or self.add or self.set_first,{} @@ -601,7 +601,7 @@ end --- Create a widget from a declarative description. -- -- See [The declarative layout system](../documentation/03-declarative-layout.md.html). --- @tab args A table containing the widgets disposition. +-- @tparam table args A table containing the widgets disposition. -- @constructorfct wibox.widget.base.make_widget_declarative function base.make_widget_declarative(args) local ids = {} diff --git a/objects/client.c b/objects/client.c index 7bd1cd359..bde2695b9 100644 --- a/objects/client.c +++ b/objects/client.c @@ -364,7 +364,7 @@ /** When a client gets tagged. * @signal tagged - * @tag t The tag object. + * @tparam tag t The tag object. */ /** When a client gets unfocused. @@ -373,7 +373,7 @@ /** When a client gets untagged. * @signal untagged - * @tag t The tag object. + * @tparam tag t The tag object. */ /** @@ -2940,7 +2940,7 @@ luaA_client_kill(lua_State *L) } /** Swap a client with another one in global client list. - * @client c A client to swap with. + * @tparam client c A client to swap with. * @method swap * @emits swapped * @emitstparam swapped client The other client. diff --git a/objects/screen.c b/objects/screen.c index 230683684..5fd2b501b 100644 --- a/objects/screen.c +++ b/objects/screen.c @@ -1803,7 +1803,7 @@ luaA_screen_fake_resize(lua_State *L) * * @DOC_sequences_screen_swap_EXAMPLE@ * - * @client s A screen to swap with. + * @tparam client s A screen to swap with. * @method swap */ static int diff --git a/objects/tag.c b/objects/tag.c index f4747071b..a0050cc2a 100644 --- a/objects/tag.c +++ b/objects/tag.c @@ -240,12 +240,12 @@ /** When a client gets tagged with this tag. * @signal tagged - * @client c The tagged client. + * @tparam client c The tagged client. */ /** When a client gets untagged with this tag. * @signal untagged - * @client c The untagged client. + * @tparam client c The untagged client. */ /**