diff --git a/docs/common/cobject.ldoc b/docs/common/cobject.ldoc index dcacb3a8c..b8bf3d6f2 100644 --- a/docs/common/cobject.ldoc +++ b/docs/common/cobject.ldoc @@ -3,7 +3,7 @@ /** Disconnect from a signal. * @tparam string name The name of the signal. * @tparam function func The callback that should be disconnected. - * @function disconnect_signal + * @staticfct disconnect_signal */ /** Emit a signal. @@ -12,13 +12,13 @@ * @param ... Extra arguments for the callback functions. Each connected * function receives the object as first argument and then any extra * arguments that are given to emit_signal(). - * @function emit_signal + * @staticfct emit_signal */ /** Connect to a signal. * @tparam string name The name of the signal. * @tparam function func The callback to call when the signal is emitted. - * @function connect_signal + * @staticfct connect_signal */ /* diff --git a/docs/config.ld b/docs/config.ld index 8a0494569..764989faa 100644 --- a/docs/config.ld +++ b/docs/config.ld @@ -56,6 +56,9 @@ tparam_alias('screen_or_idx', 'screen|int') new_type("constructorfct", "Constructors", false, "Parameters") -- Hack to get the functions on top of the signals and properties new_type("function", "Functions", false, "Parameters") +-- For "classes", use an explicit type for static functions. This allows +-- @function and its implicit cousin to be banned in the CI. +new_type("staticfct", "Static module functions", false, "Parameters") -- Documentation for objects properties new_type("property", "Object properties", false, "Type") -- Documentation for objects deprecated properties @@ -141,6 +144,7 @@ file = { '../lib/wibox/container/init.lua', '../lib/naughty/constants.lua', '../lib/naughty/dbus.lua', + '../lib/beautiful/gtk.lua', -- Ignore some parts of the widget library '../lib/awful/widget/init.lua', @@ -189,7 +193,23 @@ local coreclassmap = { mouse = "mouse and awful.mouse", } +-- Add the full module name in front. +local add_mod = { + ["function"] = true, + constructorfct = true, + staticfct = true, + deprecated = true, +} + +-- Add the arguments. +local add_args = { + constructorfct = true, + staticfct = true, +} + custom_display_name_handler = function(item, default_handler) + local ret = default_handler(item) + -- Remove the "namespace" from the signals and properties if no_prefix[item.type] then local name = item.name:match("%.([^.]+)$") @@ -201,15 +221,22 @@ custom_display_name_handler = function(item, default_handler) return coreclassmap[item.name] end + -- Undocumented API to make the libraries and classmod "function" section + -- more consistent. Right now some have their full awful.foo.bar while other + -- have "just" `bar`. Given we use constructors from metatables, we have no + -- choice but to use the full function name. It also makes copy/paste easier. + if add_mod[item.type] and (not ret:find(".", 1, true)) and (not ret:find(":", 1, true)) then + ret = item.module.name .. "." .. ret + end + if item.type == "deprecated" or item.type == "deprecatedproperty" then - return default_handler(item) .. " [deprecated]" + return ret .. " [deprecated]" end if item.type == "method" then return render_methods(item) end - local ret = default_handler(item) -- Get rid of the "module:" in front of method names. It is either wrong or -- just redundant. @@ -221,17 +248,8 @@ custom_display_name_handler = function(item, default_handler) return ret:gsub("^module", item.module.name) end - -- Undocumented API to make the libraries and classmod "function" section - -- more consistent. Right now some have their full awful.foo.bar while other - -- have "just" `bar`. Given we use constructors from metatables, we have no - -- choice but to use the full function name. It also makes copy/paste easier. - if (item.type == "function" or item.type == "constructorfct") - and (not ret:find(".", 1, true)) and (not ret:find(":", 1, true)) then - ret = item.module.name .. "." .. ret - end - -- It isn't there by default. - if item.type == "constructorfct" then + if add_args[item.type] then ret = ret .. " " .. item.args end diff --git a/lib/awful/client.lua b/lib/awful/client.lua index e45381dee..c4ff1f005 100644 --- a/lib/awful/client.lua +++ b/lib/awful/client.lua @@ -239,7 +239,7 @@ end --- Get a client by its relative index to another client. -- If no client is passed, the focused client will be used. -- --- @function awful.client.next +-- @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=false] boolean stacked Use stacking order? (top to bottom) @@ -274,7 +274,7 @@ function client.next(i, sel, stacked) end --- Swap a client with another client in the given direction. --- @function awful.client.swap.bydirection +-- @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=false] boolean stacked Use stacking order? (top to bottom) @@ -295,8 +295,9 @@ function client.swap.bydirection(dir, c, stacked) end end ---- Swap a client with another client in the given direction. Swaps across screens. --- @function awful.client.swap.global_bydirection +--- Swap a client with another client in the given direction. +-- Swaps across screens. +-- @staticfct awful.client.swap.global_bydirection -- @param dir The direction, can be either "up", "down", "left" or "right". -- @client[opt] sel The client. function client.swap.global_bydirection(dir, sel) @@ -329,7 +330,7 @@ function client.swap.global_bydirection(dir, sel) end --- Swap a client by its relative index. --- @function awful.client.swap.byidx +-- @staticfct awful.client.swap.byidx -- @param i The index. -- @client[opt] c The client, otherwise focused one is used. function client.swap.byidx(i, c) @@ -342,7 +343,7 @@ end --- Cycle clients. -- --- @function awful.client.cycle +-- @staticfct awful.client.cycle -- @param clockwise True to cycle clients clockwise. -- @param[opt] s The screen where to cycle clients. -- @tparam[opt=false] boolean stacked Use stacking order? (top to bottom) @@ -886,7 +887,7 @@ end --- Restore (=unminimize) a random client. --- @function awful.client.restore +-- @staticfct awful.client.restore -- @param s The screen to use. -- @return The restored client if some client was restored, otherwise nil. function client.restore(s) @@ -907,7 +908,7 @@ function client.restore(s) return nil end ---- Normalize a set of numbers to 1 +--- Normalize a set of numbers to 1. -- @param set the set of numbers to normalize -- @param num the number of numbers to normalize local function normalize(set, num) @@ -1204,7 +1205,7 @@ end --- Set a client property to be persistent across restarts (via X properties). -- --- @function awful.client.property.persist +-- @staticfct awful.client.property.persist -- @param prop The property name. -- @param kind The type (used for register_xproperty). -- One of "string", "number" or "boolean". @@ -1221,16 +1222,17 @@ function client.property.persist(prop, kind) end end ---- --- Returns an iterator to cycle through, starting from the client in focus or --- the given index, all clients that match a given criteria. +--- Returns an iterator to cycle through clients. +-- +-- Starting from the client in focus or the given index, all clients that match +-- a given criteria. -- -- @param filter a function that returns true to indicate a positive match -- @param start what index to start iterating from. Defaults to using the -- index of the currently focused client. -- @param s which screen to use. nil means all screens. -- --- @function awful.client.iterate +-- @staticfct awful.client.iterate -- @usage -- un-minimize all urxvt instances -- local urxvt = function (c) -- return awful.rules.match(c, {class = "URxvt"}) @@ -1387,7 +1389,7 @@ do -- See `awful.client.focus.history.enable_tracking` to enable it again. -- @treturn int The internal value of `disabled_count` (calls to this -- function without calling `awful.client.focus.history.enable_tracking`). - -- @function awful.client.focus.history.disable_tracking + -- @staticfct awful.client.focus.history.disable_tracking function client.focus.history.disable_tracking() disabled_count = disabled_count + 1 if disabled_count == 1 then @@ -1401,7 +1403,7 @@ do -- This is the default, but can be disabled -- through `awful.client.focus.history.disable_tracking`. -- @treturn boolean True if history tracking has been enabled. - -- @function awful.client.focus.history.enable_tracking + -- @staticfct awful.client.focus.history.enable_tracking function client.focus.history.enable_tracking() assert(disabled_count > 0) disabled_count = disabled_count - 1 @@ -1414,7 +1416,7 @@ do --- Is history tracking enabled? -- @treturn bool True if history tracking is enabled. -- @treturn int The number of times that tracking has been disabled. - -- @function awful.client.focus.history.is_enabled + -- @staticfct awful.client.focus.history.is_enabled function client.focus.history.is_enabled() return disabled_count == 0, disabled_count end diff --git a/lib/awful/completion.lua b/lib/awful/completion.lua index 4fd14840b..f374c9094 100644 --- a/lib/awful/completion.lua +++ b/lib/awful/completion.lua @@ -32,6 +32,7 @@ local bashcomp_src = "@SYSCONFDIR@/bash_completion" --- Enable programmable bash completion in awful.completion.bash at the price of -- a slight overhead. -- @param src The bash completion source file, /etc/bash_completion by default. +-- @staticfct awful.completion.bashcomp_load function completion.bashcomp_load(src) if src then bashcomp_src = src end local c, err = io.popen("/usr/bin/env bash -c 'source " .. bashcomp_src .. "; complete -p'") @@ -70,6 +71,7 @@ completion.default_shell = nil -- @treturn string The new command. -- @treturn number The new cursor position. -- @treturn table The table with all matches. +-- @staticfct awful.completion.shell function completion.shell(command, cur_pos, ncomp, shell) local wstart = 1 local wend = 1 @@ -192,6 +194,7 @@ end -- @param ncomp The number of yet requested completion using current text. -- @param keywords The keywords table uised for completion. -- @return The new match, the new cursor position, the table of all matches. +-- @staticfct awful.completion.generic function completion.generic(text, cur_pos, ncomp, keywords) -- luacheck: no unused args -- The keywords table may be empty if #keywords == 0 then diff --git a/lib/awful/ewmh.lua b/lib/awful/ewmh.lua index 139e8e1a5..d98f62ac8 100644 --- a/lib/awful/ewmh.lua +++ b/lib/awful/ewmh.lua @@ -54,6 +54,7 @@ local ewmh = { --- Update a client's settings when its geometry changes, skipping signals -- resulting from calls within. local repair_geometry_lock = false + local function repair_geometry(window) if repair_geometry_lock then return end repair_geometry_lock = true @@ -166,6 +167,7 @@ end -- @see generic_activate_filters -- @see contextual_activate_filters -- @see remove_activate_filter +-- @staticfct awful.ewmh.add_activate_filter function ewmh.add_activate_filter(f, context) if not context then table.insert(ewmh.generic_activate_filters, f) @@ -185,6 +187,7 @@ end -- @see generic_activate_filters -- @see contextual_activate_filters -- @see add_activate_filter +-- @staticfct awful.ewmh.remove_activate_filter function ewmh.remove_activate_filter(f, context) local tab = context and (ewmh.contextual_activate_filters[context] or {}) or ewmh.generic_activate_filters diff --git a/lib/awful/hotkeys_popup/init.lua b/lib/awful/hotkeys_popup/init.lua index 182fe5abc..8aaa75445 100644 --- a/lib/awful/hotkeys_popup/init.lua +++ b/lib/awful/hotkeys_popup/init.lua @@ -24,7 +24,7 @@ local hotkeys_popup = { -- @tparam[opt] screen s The screen. -- @tparam[opt=true] boolean show_args.show_awesome_keys Show AwesomeWM hotkeys. -- When set to `false` only app-specific hotkeys will be shown. --- @function awful.hotkeys_popup.show_help +-- @staticfct awful.hotkeys_popup.show_help -- @see awful.hotkeys_popup.widget.show_help hotkeys_popup.show_help = hotkeys_popup.widget.show_help diff --git a/lib/awful/hotkeys_popup/widget.lua b/lib/awful/hotkeys_popup/widget.lua index a92787451..1068c16ed 100644 --- a/lib/awful/hotkeys_popup/widget.lua +++ b/lib/awful/hotkeys_popup/widget.lua @@ -490,6 +490,7 @@ function widget.new(args) -- @tparam[opt] table show_args Additional arguments. -- @tparam[opt=true] boolean show_args.show_awesome_keys Show AwesomeWM hotkeys. -- When set to `false` only app-specific hotkeys will be shown. + -- @method show_help function widget_instance:show_help(c, s, show_args) show_args = show_args or {} local show_awesome_keys = show_args.show_awesome_keys ~= false @@ -549,6 +550,7 @@ function widget.new(args) --- Add hotkey descriptions for third-party applications. -- @tparam table hotkeys Table with bindings, -- see `awful.hotkeys_popup.key.vim` as an example. + -- @method add_hotkeys function widget_instance:add_hotkeys(hotkeys) for group, bindings in pairs(hotkeys) do for _, binding in ipairs(bindings) do @@ -571,6 +573,7 @@ function widget.new(args) -- @tparam string group hotkeys group name, -- @tparam table data rule data for the group -- see `awful.hotkeys_popup.key.vim` as an example. + -- @method add_group_rules function widget_instance:add_group_rules(group, data) self.group_rules[group] = data end @@ -591,6 +594,7 @@ end -- @tparam[opt] table args Additional arguments. -- @tparam[opt=true] boolean args.show_awesome_keys Show AwesomeWM hotkeys. -- When set to `false` only app-specific hotkeys will be shown. +-- @staticfct awful.hotkeys_popup.widget.show_help function widget.show_help(...) return get_default_widget():show_help(...) end @@ -599,6 +603,7 @@ end -- (default widget instance will be used). -- @tparam table hotkeys Table with bindings, -- see `awful.hotkeys_popup.key.vim` as an example. +-- @staticfct awful.hotkeys_popup.widget.add_hotkeys function widget.add_hotkeys(...) return get_default_widget():add_hotkeys(...) end @@ -608,6 +613,7 @@ end -- @tparam string group rule group name, -- @tparam table data rule data for the group -- see `awful.hotkeys_popup.key.vim` as an example. +-- @staticfct awful.hotkeys_popup.widget.add_group_rules function widget.add_group_rules(group, data) return get_default_widget():add_group_rules(group, data) end diff --git a/lib/awful/key.lua b/lib/awful/key.lua index ee4b5148a..6e0a56919 100644 --- a/lib/awful/key.lua +++ b/lib/awful/key.lua @@ -3,7 +3,7 @@ -- -- @author Julien Danjou <julien@danjou.info> -- @copyright 2009 Julien Danjou --- @module awful.key +-- @classmod awful.key --------------------------------------------------------------------------- -- Grab environment we need @@ -59,6 +59,7 @@ capi.awesome.connect_signal("xkb::map_changed" , function() conversion = nil en -- @tparam table mod A modified table. Valid modifiers are: Any, Mod1, -- Mod2, Mod3, Mod4, Mod5, Shift, Lock and Control. -- @tparam string k The key +-- @staticfct awful.key.execute function key.execute(mod, k) local modmap = generate_conversion_map() local active = capi.awesome._active_modifiers @@ -111,6 +112,7 @@ end -- @tparam table data User data for key, -- for example {description="select next tag", group="tag"}. -- @treturn table A table with one or several key objects. +-- @constructorfct awful.key function key.new(mod, _key, press, release, data) if type(release)=='table' then data=release @@ -145,6 +147,7 @@ end -- @param _key The key object. -- @param pressed_mod The modifiers to compare with. -- @param pressed_key The key to compare with. +-- @staticfct awful.key.match function key.match(_key, pressed_mod, pressed_key) -- First, compare key. if pressed_key ~= _key.key then return false end diff --git a/lib/awful/keygrabber.lua b/lib/awful/keygrabber.lua index 65b7629cb..4c94e66d6 100644 --- a/lib/awful/keygrabber.lua +++ b/lib/awful/keygrabber.lua @@ -724,16 +724,6 @@ function keygrab.run_with_keybindings(args) return ret end ---- Run a grabbing function. --- --- Calling this is equivalent to `keygrabber.run`. --- --- @param g The key grabber callback that will get the key events until it --- will be deleted or a new grabber is added. --- @return the given callback `g`. --- --- @deprecated awful.keygrabber.run - --- A lower level API to interact with the keygrabber directly. -- -- Grab keyboard input and read pressed keys, calling the least callback @@ -750,7 +740,7 @@ end -- -- Here is the content of the modifier table: -- ---
Modifier name | --Key name | @@ -785,7 +775,7 @@ end -- end -- end) -- end --- @function awful.keygrabber.run +-- @deprecated awful.keygrabber.run function keygrab.run(g) -- Remove the grabber if it is in the stack. keygrab.stop(g) @@ -807,7 +797,7 @@ end local signals = {} --- Connect to a signal for all keygrabbers at once. --- @function awful.keygrabber.connect_signal +-- @staticfct awful.keygrabber.connect_signal -- @tparam string name The signal name. -- @tparam function callback The callback. function keygrab.connect_signal(name, callback) @@ -820,7 +810,7 @@ function keygrab.connect_signal(name, callback) end --- Disconnect to a signal for all keygrabbers at once. --- @function awful.keygrabber.disconnect_signal +-- @staticfct awful.keygrabber.disconnect_signal -- @tparam string name The signal name. -- @tparam function callback The callback. function keygrab.disconnect_signal(name, callback) @@ -840,7 +830,7 @@ end -- `my_keygrabber:emit_signal(name, ...)`. This function works on the whole -- keygrabber module, not one of its instance. -- --- @function awful.keygrabber.emit_signal +-- @staticfct awful.keygrabber.emit_signal -- @tparam string name The signal name. -- @param ... Other arguments for the callbacks. function keygrab.emit_signal(name, ...) diff --git a/lib/awful/layout/init.lua b/lib/awful/layout/init.lua index 6dcfaa412..29c6b8856 100644 --- a/lib/awful/layout/init.lua +++ b/lib/awful/layout/init.lua @@ -73,7 +73,7 @@ layout.layouts = { -- awful.layout.suit.corner.sw, -- awful.layout.suit.corner.se, -- --- @field layout.layouts +-- @field awful.layout.layouts --- Return the tag layout index (from `awful.layout.layouts`). -- @@ -82,6 +82,7 @@ layout.layouts = { -- -- @tparam tag t The tag. -- @treturn nil|number The layout index. +-- @staticfct awful.layout.get_tag_layout_index function layout.get_tag_layout_index(t) return gtable.hasitem(layout.layouts, t.layout) end @@ -95,6 +96,7 @@ local delayed_arrange = {} --- Get the current layout. -- @param screen The screen. -- @return The layout function. +-- @staticfct awful.layout.get function layout.get(screen) screen = screen or capi.mouse.screen local t = get_screen(screen).selected_tag @@ -105,6 +107,7 @@ end -- @param i Relative index. -- @param s The screen. -- @param[opt] layouts A table of layouts. +-- @staticfct awful.layout.inc function layout.inc(i, s, layouts) if type(i) == "table" then -- Older versions of this function had arguments (layouts, i, s), but @@ -150,6 +153,7 @@ end --- Set the layout function of the current tag. -- @param _layout Layout name. -- @tparam[opt=mouse.screen.selected_tag] tag t The tag to modify. +-- @staticfct awful.layout.set function layout.set(_layout, t) t = t or capi.mouse.screen.selected_tag t.layout = _layout @@ -168,6 +172,7 @@ end -- @treturn table A table with the workarea (x, y, width, height), the screen -- geometry (x, y, width, height), the clients, the screen and sometime, a -- "geometries" table with client as keys and geometry as value +-- @staticfct awful.layout.parameters function layout.parameters(t, screen) screen = get_screen(screen) t = t or screen.selected_tag @@ -210,6 +215,7 @@ end --- Arrange a screen using its current layout. -- @param screen The screen to arrange. +-- @staticfct awful.layout.arrange function layout.arrange(screen) screen = get_screen(screen) if not screen or delayed_arrange[screen] then return end @@ -250,6 +256,7 @@ end --- Get the current layout name. -- @param _layout The layout. -- @return The layout name. +-- @staticfct awful.layout.getname function layout.getname(_layout) _layout = _layout or layout.get() return _layout.name @@ -318,6 +325,7 @@ capi.client.connect_signal("list", function() -- @tparam client c The client -- @tparam string context The context -- @tparam table hints Additional hints +-- @signalhandler awful.layout.move_handler function layout.move_handler(c, context, hints) --luacheck: no unused args -- Quit if it isn't a mouse.move on a tiled layout, that's handled elsewhere if c.floating then return end diff --git a/lib/awful/layout/suit/fair.lua b/lib/awful/layout/suit/fair.lua index 161b6edf2..6930a09e7 100644 --- a/lib/awful/layout/suit/fair.lua +++ b/lib/awful/layout/suit/fair.lua @@ -88,21 +88,30 @@ local function do_fair(p, orientation) end end ---- Horizontal fair layout. +-- Horizontal fair layout. -- @param screen The screen to arrange. fair.horizontal = {} fair.horizontal.name = "fairh" + function fair.horizontal.arrange(p) return do_fair(p, "east") end ---- Vertical fair layout. +-- Vertical fair layout. -- @param screen The screen to arrange. fair.name = "fairv" function fair.arrange(p) return do_fair(p, "south") end +--- The fair layout. +-- Try to give all clients the same size. +-- @clientlayout awful.layout.suit.fair + +--- The horizontal fair layout. +-- Try to give all clients the same size. +-- @clientlayout awful.layout.suit.fair.horizontal + return fair -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/lib/awful/layout/suit/floating.lua b/lib/awful/layout/suit/floating.lua index b76943574..9c2e6ea42 100644 --- a/lib/awful/layout/suit/floating.lua +++ b/lib/awful/layout/suit/floating.lua @@ -22,6 +22,7 @@ local capi = local floating = {} --- Jump mouse cursor to the client's corner when resizing it. +-- @field awful.layout.suit.floating.resize_jump_to_corner floating.resize_jump_to_corner = true function floating.mouse_resize_handler(c, corner, x, y) @@ -103,7 +104,7 @@ function floating.arrange() end --- The floating layout. --- @clientlayout awful.layout.suit. +-- @clientlayout awful.layout.suit.floating floating.name = "floating" diff --git a/lib/awful/layout/suit/tile.lua b/lib/awful/layout/suit/tile.lua index 09e95d1cd..335398fb7 100644 --- a/lib/awful/layout/suit/tile.lua +++ b/lib/awful/layout/suit/tile.lua @@ -43,6 +43,7 @@ local tile = {} -- @see gears.surface --- Jump mouse cursor to the client's corner when resizing it. +-- @field awful.layout.suit.tile.resize_jump_to_corner tile.resize_jump_to_corner = true local function mouse_resize_handler(c, _, _, _, orientation) diff --git a/lib/awful/menu.lua b/lib/awful/menu.lua index 78d1e55b8..cc1d29ac5 100644 --- a/lib/awful/menu.lua +++ b/lib/awful/menu.lua @@ -5,7 +5,7 @@ -- @author Julien Danjou <julien@danjou.info> -- @author dodo -- @copyright 2008, 2011 Damien Leone, Julien Danjou, dodo --- @module awful.menu +-- @popupmod awful.menu -------------------------------------------------------------------------------- local wibox = require("wibox") @@ -358,6 +358,7 @@ end --- Show a menu. -- @param args The arguments -- @param args.coords Menu position defaulting to mouse.coords() +-- @method show function menu:show(args) args = args or {} local coords = args.coords or nil @@ -371,6 +372,7 @@ function menu:show(args) end --- Hide a menu popup. +-- @method hide function menu:hide() -- Remove items from screen for i = 1, #self.items do @@ -389,6 +391,7 @@ end --- Toggle menu visibility. -- @param args The arguments -- @param args.coords Menu position {x,y} +-- @method toggle function menu:toggle(args) if self.wibox.visible then self:hide() @@ -397,7 +400,8 @@ function menu:toggle(args) end end ---- Update menu content +--- Update menu content. +-- @method update function menu:update() if self.wibox.visible then self:show({ coords = { x = self.x, y = self.y } }) @@ -407,6 +411,7 @@ end --- Get the elder parent so for example when you kill -- it, it will destroy the whole family. +-- @method get_root function menu:get_root() return self.parent and menu.get_root(self.parent) or self end @@ -417,6 +422,7 @@ end -- @param args.new (Default: awful.menu.entry) The menu entry constructor. -- @param[opt] args.theme The menu entry theme. -- @param[opt] index The index where the new entry will inserted. +-- @method add function menu:add(args, index) if not args then return end local theme = load_theme(args.theme or {}, self.theme) @@ -470,8 +476,9 @@ function menu:add(args, index) return item end ---- Delete menu entry at given position --- @param num The position in the table of the menu entry to be deleted; can be also the menu entry itself +--- Delete menu entry at given position. +-- @param num The position in the table of the menu entry to be deleted; can be also the menu entry itself. +-- @method delete function menu:delete(num) if type(num) == "table" then num = gtable.hasitem(self.items, num) @@ -511,6 +518,7 @@ end -- returning `true` or `false` to indicate whether the client should be -- included in the menu. -- @return The menu. +-- @constructorfct awful.menu.clients function menu.clients(args, item_args, filter) local cls_t = {} for c in client_iterate(filter or function() return true end) do @@ -553,6 +561,7 @@ local clients_menu = nil -- returning `true` or `false` to indicate whether the client should be -- included in the menu. -- @return The menu. +-- @constructorfct awful.menu.client_list function menu.client_list(args, item_args, filter) if clients_menu and clients_menu.wibox.visible then clients_menu:hide() @@ -565,10 +574,11 @@ end -------------------------------------------------------------------------------- ---- Default awful.menu.entry constructor +--- Default awful.menu.entry constructor. -- @param parent The parent menu (TODO: This is apparently unused) -- @param args the item params -- @return table with 'widget', 'cmd', 'akey' and all the properties the user wants to change +-- @constructorfct awful.menu.entry function menu.entry(parent, args) -- luacheck: no unused args args = args or {} args.text = args[1] or args.text or "" @@ -668,6 +678,7 @@ end -- * Key auto_expand controls the submenu auto expand behaviour by setting it to true (default) or false. -- -- @param parent Specify the parent menu if we want to open a submenu, this value should never be set by the user. +-- @constructorfct awful.menu -- @usage -- The following function builds and shows a menu of clients that match -- -- a particular rule. -- -- Bound to a key, it can be used to select from dozens of terminals open on diff --git a/lib/awful/mouse/init.lua b/lib/awful/mouse/init.lua index 662daa068..b94d63eb3 100644 --- a/lib/awful/mouse/init.lua +++ b/lib/awful/mouse/init.lua @@ -72,7 +72,7 @@ function mouse.client_under_pointer() end --- Move a client. --- @function awful.mouse.client.move +-- @staticfct awful.mouse.client.move -- @param c The client to move, or the focused one if nil. -- @param snap The pixel to snap clients. -- @param finished_cb Deprecated, do not use @@ -125,7 +125,7 @@ function mouse.client.dragtotag.border(c) end --- Move the wibox under the cursor. --- @function awful.mouse.wibox.move +-- @staticfct awful.mouse.wibox.move --@tparam wibox w The wibox to move, or none to use that under the pointer function mouse.wibox.move(w) w = w or mouse.current_wibox @@ -183,7 +183,7 @@ function mouse.client.corner(c, corner) end --- Resize a client. --- @function awful.mouse.client.resize +-- @staticfct awful.mouse.client.resize -- @param c The client to resize, or the focused one by default. -- @tparam string corner The corner to grab on resize. Auto detected by default. -- @tparam[opt={}] table args A set of `awful.placement` arguments @@ -417,7 +417,7 @@ end) -- @treturn integer table.y The vertical position -- @treturn table table.buttons Table containing the status of buttons, e.g. field [1] is true -- when button 1 is pressed. --- @function mouse.coords +-- @staticfct mouse.coords return mouse diff --git a/lib/awful/placement.lua b/lib/awful/placement.lua index 73f49360b..e79c9ed22 100644 --- a/lib/awful/placement.lua +++ b/lib/awful/placement.lua @@ -811,7 +811,8 @@ end -- or `wibox`) -- @tparam[opt={}] table args The arguments -- @treturn table The new geometry --- @treturn string The corner name +-- @treturn string The corner name. +-- @staticfct awful.placement.closest_corner function placement.closest_corner(d, args) args = add_context(args, "closest_corner") d = d or capi.client.focus @@ -855,6 +856,7 @@ end -- @tparam[opt={}] table args The arguments -- @tparam[opt=client's screen] integer args.screen The screen. -- @treturn table The new client geometry. +-- @staticfct awful.placement.no_offscreen function placement.no_offscreen(c, args) --compatibility with the old API @@ -897,6 +899,7 @@ end -- @param c The client. -- @tparam[opt={}] table args Other arguments -- @treturn table The new geometry +-- @staticfct awful.placement.no_overlap function placement.no_overlap(c, args) c = c or capi.client.focus args = add_context(args, "no_overlap") @@ -969,6 +972,7 @@ end -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) -- @tparam[opt={}] table args Other arguments -- @treturn table The new geometry +-- @staticfct awful.placement.under_mouse function placement.under_mouse(d, args) args = add_context(args, "under_mouse") d = d or capi.client.focus @@ -993,6 +997,7 @@ end -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) -- @tparam[opt={}] table args Other arguments -- @treturn table The new geometry +-- @staticfct awful.placement.next_to_mouse function placement.next_to_mouse(d, args) if type(args) == "number" then gdebug.deprecate( @@ -1042,6 +1047,7 @@ end -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) -- @tparam[opt={}] table args Other arguments -- @treturn table The new geometry +-- @staticfct awful.placement.resize_to_mouse function placement.resize_to_mouse(d, args) d = d or capi.client.focus args = add_context(args, "resize_to_mouse") @@ -1119,6 +1125,7 @@ end -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) -- @tparam[opt={}] table args Other arguments -- @treturn table The new geometry +-- @staticfct awful.placement.align function placement.align(d, args) args = add_context(args, "align") d = d or capi.client.focus @@ -1193,6 +1200,7 @@ end -- @tparam[opt=client.focus] drawable d A drawable (like `client` or `wibox`) -- @tparam[opt={}] table args The arguments -- @treturn table The new geometry +-- @staticfct awful.placement.stretch function placement.stretch(d, args) args = add_context(args, "stretch") @@ -1265,6 +1273,7 @@ end -- @tparam[opt=client.focus] drawable d A drawable (like `client` or `wibox`) -- @tparam[opt={}] table args The arguments -- @treturn table The new geometry +-- @staticfct awful.placement.maximize function placement.maximize(d, args) args = add_context(args, "maximize") d = d or capi.client.focus @@ -1318,6 +1327,7 @@ end -- @tparam[opt=client.focus] drawable d A drawable (like `client` or `wibox`) -- @tparam[opt={}] table args The arguments -- @treturn table The new geometry +-- @staticfct awful.placement.scale function placement.scale(d, args) args = add_context(args, "scale_to_percent") d = d or capi.client.focus @@ -1400,6 +1410,7 @@ end -- @treturn table The new geometry -- @treturn string The choosen position ("left", "right", "top" or "bottom") -- @treturn string The choosen anchor ("front", "middle" or "back") +-- @staticfct awful.placement.next_to function placement.next_to(d, args) args = add_context(args, "next_to") d = d or capi.client.focus @@ -1527,6 +1538,7 @@ end -- @tparam[opt=client.focus] drawable d A drawable (like `client` or `wibox`) -- @tparam[opt={}] table args The arguments -- @treturn boolean If the geometry was restored +-- @staticfct awful.placement.restore function placement.restore(d, args) if not args or not args.context then return false end d = d or capi.client.focus diff --git a/lib/awful/popup.lua b/lib/awful/popup.lua index c9e97e8f8..fd87a3043 100644 --- a/lib/awful/popup.lua +++ b/lib/awful/popup.lua @@ -234,6 +234,7 @@ end -- @see awful.popup.preferred_positions -- @see awful.popup.preferred_anchors -- @treturn table The new geometry +-- @method move_next_to function popup:move_next_to(obj) if self._private.is_relative == false then return end @@ -256,6 +257,7 @@ end -- -- @tparam widget widget The widget -- @tparam[opt=1] number button The button index +-- @method bind_to_widget function popup:bind_to_widget(widget, button) if not self._private.button_for_widget then self._private.button_for_widget = {} @@ -267,6 +269,7 @@ end --- Unbind the popup from a widget button. -- @tparam widget widget The widget +-- @method unbind_to_widget function popup:unbind_to_widget(widget) widget:disconnect_signal("button::press", self._private.show_fct) end diff --git a/lib/awful/prompt.lua b/lib/awful/prompt.lua index fb49d69ab..de25e8e2b 100644 --- a/lib/awful/prompt.lua +++ b/lib/awful/prompt.lua @@ -454,6 +454,7 @@ end -- with mod table, key and command as arguments when a key was pressed. -- [**DEPRECATED**] -- @see gears.color +-- @staticfct awful.prompt.run function prompt.run(args, textbox, exe_callback, completion_callback, history_path, history_max, done_callback, changed_callback, keypressed_callback) diff --git a/lib/awful/rules.lua b/lib/awful/rules.lua index 9aa9db7d0..4b1e86bbd 100644 --- a/lib/awful/rules.lua +++ b/lib/awful/rules.lua @@ -134,6 +134,7 @@ local crules = gmatcher() -- @client c The client. -- @tab rule The rule to check. -- @treturn bool True if it matches, false otherwise. +-- @staticfct awful.rules.match function rules.match(c, rule) return crules:_match(c, rule) end @@ -142,6 +143,7 @@ end -- @client c The client. -- @tab rule The rule to check. -- @treturn bool True if at least one rule is matched, false otherwise. +-- @staticfct awful.rules.match_any function rules.match_any(c, rule) return crules:_match_any(c, rule) end @@ -151,6 +153,7 @@ end -- @tab entry Rule entry (with keys `rule`, `rule_any`, `except` and/or -- `except_any`). -- @treturn bool +-- @staticfct awful.rules.matches function rules.matches(c, entry) return crules:matches_rule(c, entry) end @@ -160,6 +163,7 @@ end -- @tab _rules The rules to check. List with "rule", "rule_any", "except" and -- "except_any" keys. -- @treturn table The list of matched rules. +-- @staticfct awful.rules.matching_rules function rules.matching_rules(c, _rules) return crules:matching_rules(c, _rules) end @@ -169,13 +173,15 @@ end -- @tab _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 awful.rules.matches_list function rules.matches_list(c, _rules) return crules:matches_rules(c, _rules) end --- Remove a source. -- @tparam string name The source name. --- @treturn boolean If the source was removed, +-- @treturn boolean If the source was removed. +-- @staticfct awful.rules.remove_rule_source function rules.remove_rule_source(name) return crules:remove_matching_source(name) end @@ -183,6 +189,7 @@ end --- Apply awful.rules.rules to a client. -- @client c The client. +-- @staticfct awful.rules.apply function rules.apply(c) return crules:apply(c) end @@ -226,7 +233,7 @@ end -- @tparam[opt={}] table precede A list of names of sources this source have a -- priority over. -- @treturn boolean Returns false if a dependency conflict was found. --- @function awful.rules.add_rule_source +-- @staticfct awful.rules.add_rule_source function rules.add_rule_source(name, cb, ...) local function callback(_, ...) @@ -519,7 +526,7 @@ end -- @client c The client. -- @tab props Properties to apply. -- @tab[opt] callbacks Callbacks to apply. --- @function awful.rules.execute +-- @staticfct awful.rules.execute crules._execute = function(_, c, props, callbacks) -- This has to be done first, as it will impact geometry related props. diff --git a/lib/awful/screen.lua b/lib/awful/screen.lua index ae0a5f84c..b9043f974 100644 --- a/lib/awful/screen.lua +++ b/lib/awful/screen.lua @@ -69,7 +69,7 @@ end -- -- The number returned can be used as an index into the global -- `screen` table/object. --- @function awful.screen.getbycoord +-- @staticfct awful.screen.getbycoord -- @tparam number x The x coordinate -- @tparam number y The y coordinate -- @treturn ?number The screen index @@ -86,7 +86,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. --- @function awful.screen.focus +-- @staticfct awful.screen.focus -- @screen _screen Screen number (defaults / falls back to mouse.screen). function screen.focus(_screen) client = client or require("awful.client") @@ -149,7 +149,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. --- @function awful.screen.focus_bydirection +-- @staticfct awful.screen.focus_bydirection -- @param dir The direction, can be either "up", "down", "left" or "right". -- @param _screen Screen. function screen.focus_bydirection(dir, _screen) @@ -166,7 +166,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. -- --- @function awful.screen.focus_relative +-- @staticfct awful.screen.focus_relative -- @tparam int offset Value to add to the current focused screen index. 1 to -- focus the next one, -1 to focus the previous one. function screen.focus_relative(offset) @@ -242,6 +242,7 @@ end -- focused screen by default. -- @tparam client c A client. -- @treturn screen The preferred screen. +-- @staticfct awful.screen.preferred function screen.preferred(c) return capi.awesome.startup and c.screen or screen.focused() end @@ -254,7 +255,7 @@ end -- It is possible to set `awful.screen.default_focused_args` to override the -- default settings. -- --- @function awful.screen.focused +-- @staticfct awful.screen.focused -- @tparam[opt] table args -- @tparam[opt=false] boolean args.client Use the client screen instead of the -- mouse screen. @@ -272,7 +273,7 @@ end -- -- This method computes the different variants of the "usable" screen geometry. -- --- @function screen.get_bounding_geometry +-- @staticfct screen.get_bounding_geometry -- @tparam[opt={}] table args The arguments -- @tparam[opt=false] boolean args.honor_padding Whether to honor the screen's padding. -- @tparam[opt=false] boolean args.honor_workarea Whether to honor the screen's workarea. @@ -341,7 +342,7 @@ end -- -- This is used by `screen.clients` internally (with `stacked=true`). -- --- @function screen:get_clients +-- @method get_clients -- @tparam[opt=true] boolean stacked Use stacking order? (top to bottom) -- @treturn table The clients list. function screen.object.get_clients(s, stacked) @@ -430,7 +431,7 @@ end --- Call a function for each existing and created-in-the-future screen. -- --- @function awful.screen.connect_for_each_screen +-- @staticfct awful.screen.connect_for_each_screen -- @tparam function func The function to call. -- @screen func.screen The screen. function screen.connect_for_each_screen(func) @@ -441,7 +442,7 @@ function screen.connect_for_each_screen(func) end --- Undo the effect of connect_for_each_screen. --- @function awful.screen.disconnect_for_each_screen +-- @staticfct awful.screen.disconnect_for_each_screen -- @tparam function func The function that should no longer be called. function screen.disconnect_for_each_screen(func) capi.screen.disconnect_signal("added", func) @@ -525,6 +526,7 @@ end -- defaulting to 96. -- -- @tparam boolean enabled Enable or disable automatic DPI support. +-- @staticfct awful.screen.set_auto_dpi_enabled function screen.set_auto_dpi_enabled(enabled) for s in capi.screen do s.data.dpi_cache = nil diff --git a/lib/awful/spawn.lua b/lib/awful/spawn.lua index 3ff8449bd..8b54b4d89 100644 --- a/lib/awful/spawn.lua +++ b/lib/awful/spawn.lua @@ -344,6 +344,7 @@ end -- @treturn[1] ?string The startup notification ID, if `sn` is not false, or -- a `callback` is provided. -- @treturn[2] string Error message. +-- @staticfct awful.spawn function spawn.spawn(cmd, sn_rules, callback) if cmd and cmd ~= "" then local enable_sn = (sn_rules ~= false or callback) @@ -363,6 +364,7 @@ end --- Spawn a program using the shell. -- This calls `cmd` with `$SHELL -c` (via `awful.util.shell`). -- @tparam string cmd The command. +-- @staticfct awful.spawn.with_shell function spawn.with_shell(cmd) if cmd and cmd ~= "" then cmd = { util.shell, "-c", cmd } @@ -389,6 +391,7 @@ end -- termination. -- @treturn[1] Integer the PID of the forked process. -- @treturn[2] string Error message. +-- @staticfct awful.spawn.with_line_callback function spawn.with_line_callback(cmd, callbacks) local stdout_callback, stderr_callback, done_callback, exit_callback = callbacks.stdout, callbacks.stderr, callbacks.output_done, callbacks.exit @@ -434,6 +437,7 @@ end -- @treturn[1] Integer the PID of the forked process. -- @treturn[2] string Error message. -- @see spawn.with_line_callback +-- @staticfct awful.spawn.easy_async function spawn.easy_async(cmd, callback) local stdout = '' local stderr = '' @@ -484,6 +488,7 @@ end -- @treturn[1] Integer the PID of the forked process. -- @treturn[2] string Error message. -- @see spawn.with_line_callback +-- @staticfct awful.spawn.easy_async_with_shell function spawn.easy_async_with_shell(cmd, callback) return spawn.easy_async({ util.shell, "-c", cmd or "" }, callback) end @@ -495,6 +500,7 @@ end -- @tparam[opt] function done_callback Function that is called when the -- operation finishes (e.g. due to end of file). -- @tparam[opt=false] boolean close Should the stream be closed after end-of-file? +-- @staticfct awful.spawn.read_lines function spawn.read_lines(input_stream, line_callback, done_callback, close) local stream = Gio.DataInputStream.new(input_stream) local function done() @@ -644,6 +650,7 @@ end -- multiple time. -- @tparam[opt] function callback A callback function when the client is created. -- @see awful.rules +-- @staticfct awful.spawn.once function spawn.once(cmd, rules, matcher, unique_id, callback) local hash = unique_id or hash_command(cmd, rules) local status = register_common(hash, rules, matcher, callback) @@ -676,6 +683,7 @@ end -- multiple time. -- @tparam[opt] function callback A callback function when the client is created. -- @see awful.rules +-- @staticfct awful.spawn.single_instance function spawn.single_instance(cmd, rules, matcher, unique_id, callback) local hash = unique_id or hash_command(cmd, rules) register_common(hash, rules, matcher, callback) @@ -703,6 +711,7 @@ local raise_rules = {focus = true, switch_to_tags = true, raise = true} -- @tparam[opt] function callback A callback function when the client is created. -- @see awful.rules -- @treturn client The client if it already exists. +-- @staticfct awful.spawn.raise_or_spawn function spawn.raise_or_spawn(cmd, rules, matcher, unique_id, callback) local hash = unique_id or hash_command(cmd, rules) diff --git a/lib/awful/tag.lua b/lib/awful/tag.lua index 9066f5d3f..de66251bc 100644 --- a/lib/awful/tag.lua +++ b/lib/awful/tag.lua @@ -296,7 +296,7 @@ function tag.add(name, props) end --- Create a set of tags and attach it to a screen. --- @function awful.tag.new +-- @staticfct awful.tag.new -- @param names The tag name, in a table -- @param screen The tag screen, or 1 if not set. -- @param layout The layout or layout table to set for this tags by default. @@ -322,7 +322,7 @@ function tag.new(names, screen, layout) end --- Find a suitable fallback tag. --- @function awful.tag.find_fallback +-- @staticfct awful.tag.find_fallback -- @param screen The screen to look for a tag on. [awful.screen.focused()] -- @param invalids A table of tags we consider unacceptable. [selectedlist(scr)] function tag.find_fallback(screen, invalids) @@ -340,7 +340,7 @@ end -- -- mouse.screen.selected_tag:delete() -- --- @function tag.delete +-- @method delete -- @see awful.tag.add -- @see awful.tag.find_fallback -- @tparam[opt=awful.tag.find_fallback()] tag fallback_tag Tag to assign @@ -429,7 +429,7 @@ function tag.delete(target_tag, fallback_tag) end --- Update the tag history. --- @function awful.tag.history.update +-- @staticfct awful.tag.history.update -- @param obj Screen object. function tag.history.update(obj) local s = get_screen(obj) @@ -470,7 +470,7 @@ function tag.history.update(obj) end --- Revert tag history. --- @function awful.tag.history.restore +-- @staticfct awful.tag.history.restore -- @param screen The screen. -- @param idx Index in history. Defaults to "previous" which is a special index -- toggling between last two selected sets of tags. Number (eg 1) will go back @@ -522,6 +522,7 @@ end -- @tparam screen s The screen of the tag -- @tparam string name The name of the tag -- @return The tag found, or `nil` +-- @staticfct awful.tag.find_by_name -- @usage -- For the current screen -- local t = awful.tag.find_by_name(awful.screen.focused(), "name") -- @@ -696,7 +697,7 @@ function tag.setmwfact(mwfact, t) end --- Increase master width factor. --- @function awful.tag.incmwfact +-- @staticfct awful.tag.incmwfact -- @see master_width_factor -- @param add Value to add to master width factor. -- @param t The tag to modify, if null tag.selected() is used. @@ -972,7 +973,7 @@ function tag.setgap(useless_gap, t) end --- Increase the spacing between clients --- @function awful.tag.incgap +-- @staticfct awful.tag.incgap -- @see gap -- @param add Value to add to the spacing between clients -- @param t The tag to modify, if null tag.selected() is used. @@ -1079,7 +1080,7 @@ end --- Toggle size fill policy for the master client(s) -- between "expand" and "master_width_factor". --- @function awful.tag.togglemfpol +-- @staticfct awful.tag.togglemfpol -- @see master_fill_policy -- @tparam tag t The tag to modify, if null tag.selected() is used. function tag.togglemfpol(t) @@ -1160,7 +1161,7 @@ function tag.getnmaster(t) end --- Increase the number of master windows. --- @function awful.tag.incnmaster +-- @staticfct awful.tag.incnmaster -- @see master_count -- @param add Value to add to number of master windows. -- @param[opt] t The tag to modify, if null tag.selected() is used. @@ -1278,7 +1279,7 @@ function tag.getncol(t) end --- Increase number of column windows. --- @function awful.tag.incncol +-- @staticfct awful.tag.incncol -- @param add Value to add to number of column windows. -- @param[opt] t The tag to modify, if null tag.selected() is used. -- @tparam[opt=false] boolean sensible Limit column_count based on the number @@ -1309,7 +1310,7 @@ function tag.incncol(add, t, sensible) end --- View no tag. --- @function awful.tag.viewnone +-- @staticfct awful.tag.viewnone -- @tparam[opt] int|screen screen The screen. function tag.viewnone(screen) screen = screen or ascreen.focused() @@ -1322,7 +1323,7 @@ end --- View a tag by its taglist index. -- -- This is equivalent to `screen.tags[i]:view_only()` --- @function awful.tag.viewidx +-- @staticfct awful.tag.viewidx -- @see screen.tags -- @param i The **relative** index to see. -- @param[opt] screen The screen. @@ -1357,14 +1358,14 @@ function tag.getidx(query_tag) end --- View next tag. This is the same as tag.viewidx(1). --- @function awful.tag.viewnext +-- @staticfct awful.tag.viewnext -- @param screen The screen. function tag.viewnext(screen) return tag.viewidx(1, screen) end --- View previous tag. This is the same a tag.viewidx(-1). --- @function awful.tag.viewprev +-- @staticfct awful.tag.viewprev -- @param screen The screen. function tag.viewprev(screen) return tag.viewidx(-1, screen) @@ -1404,7 +1405,7 @@ end -- selected. The tags already selected do not count. To do nothing if one or -- more of the tags are already selected, set `maximum` to zero. -- --- @function awful.tag.viewmore +-- @staticfct awful.tag.viewmore -- @param tags A table with tags to view only. -- @param[opt] screen The screen of the tags. -- @tparam[opt=#tags] number maximum The maximum number of tags to select. @@ -1437,7 +1438,7 @@ function tag.viewmore(tags, screen, maximum) end --- Toggle selection of a tag --- @function awful.tag.viewtoggle +-- @staticfct awful.tag.viewtoggle -- @see selected -- @tparam tag t Tag to be toggled function tag.viewtoggle(t) @@ -1530,7 +1531,7 @@ end --- Add a signal to all attached tags and all tags that will be attached in the -- future. When a tag is detached from the screen, its signal is removed. -- --- @function awful.tag.attached_connect_signal +-- @staticfct awful.tag.attached_connect_signal -- @screen screen The screen concerned, or all if nil. -- @tparam[opt] string signal The signal name. -- @tparam[opt] function Callback diff --git a/lib/awful/titlebar.lua b/lib/awful/titlebar.lua index 85d318144..60e602c04 100644 --- a/lib/awful/titlebar.lua +++ b/lib/awful/titlebar.lua @@ -431,8 +431,7 @@ local titlebar = { --- Set a declarative widget hierarchy description. -- See [The declarative layout system](../documentation/03-declarative-layout.md.html) -- @param args An array containing the widgets disposition --- @name setup --- @class function +-- @method setup local all_titlebars = setmetatable({}, { __mode = 'k' }) @@ -564,6 +563,7 @@ end -- @param c The client whose titlebar is modified -- @param[opt] position The position of the titlebar. Must be one of "left", -- "right", "top", "bottom". Default is "top". +-- @staticfct awful.titlebar.show function titlebar.show(c, position) position = position or "top" if load_titlebars(c, true, position) then return end @@ -577,6 +577,7 @@ end -- @param c The client whose titlebar is modified -- @param[opt] position The position of the titlebar. Must be one of "left", -- "right", "top", "bottom". Default is "top". +-- @staticfct awful.titlebar.hide function titlebar.hide(c, position) position = position or "top" get_titlebar_function(c, position)(c, 0) @@ -586,6 +587,7 @@ end -- @param c The client whose titlebar is modified -- @param[opt] position The position of the titlebar. Must be one of "left", -- "right", "top", "bottom". Default is "top". +-- @staticfct awful.titlebar.toggle function titlebar.toggle(c, position) position = position or "top" if load_titlebars(c, true, position) then return end @@ -602,6 +604,7 @@ end -- This way, you can e.g. modify the font that is used. -- @param c The client for which a titlewidget should be created. -- @return The title widget. +-- @staticfct awful.titlebar.widget.titlewidget function titlebar.widget.titlewidget(c) local ret = textbox() local function update() @@ -618,6 +621,7 @@ end -- available. This way, you can e.g. disallow resizes. -- @param c The client for which an icon widget should be created. -- @return The icon widget. +-- @staticfct awful.titlebar.widget.iconwidget function titlebar.widget.iconwidget(c) return clienticon(c) end @@ -635,6 +639,7 @@ end -- @param selector A function that selects the image that should be displayed. -- @param action Function that is called when the button is clicked. -- @return The widget +-- @staticfct awful.titlebar.widget.button function titlebar.widget.button(c, name, selector, action) local ret = imagebox() @@ -718,6 +723,7 @@ end --- Create a new float button for a client. -- @param c The client for which the button is wanted. +-- @staticfct awful.titlebar.widget.floatingbutton function titlebar.widget.floatingbutton(c) local widget = titlebar.widget.button(c, "floating", aclient.object.get_floating, aclient.floating.toggle) c:connect_signal("property::floating", widget.update) @@ -726,6 +732,7 @@ end --- Create a new maximize button for a client. -- @param c The client for which the button is wanted. +-- @staticfct awful.titlebar.widget.maximizedbutton function titlebar.widget.maximizedbutton(c) local widget = titlebar.widget.button(c, "maximized", function(cl) return cl.maximized @@ -738,6 +745,7 @@ end --- Create a new minimize button for a client. -- @param c The client for which the button is wanted. +-- @staticfct awful.titlebar.widget.minimizebutton function titlebar.widget.minimizebutton(c) local widget = titlebar.widget.button(c, "minimize", function() return "" end, @@ -748,12 +756,14 @@ end --- Create a new closing button for a client. -- @param c The client for which the button is wanted. +-- @staticfct awful.titlebar.widget.closebutton function titlebar.widget.closebutton(c) return titlebar.widget.button(c, "close", function() return "" end, function(cl) cl:kill() end) end --- Create a new ontop button for a client. -- @param c The client for which the button is wanted. +-- @staticfct awful.titlebar.widget.ontopbutton function titlebar.widget.ontopbutton(c) local widget = titlebar.widget.button(c, "ontop", function(cl) return cl.ontop end, @@ -764,6 +774,7 @@ end --- Create a new sticky button for a client. -- @param c The client for which the button is wanted. +-- @staticfct awful.titlebar.widget.stickybutton function titlebar.widget.stickybutton(c) local widget = titlebar.widget.button(c, "sticky", function(cl) return cl.sticky end, diff --git a/lib/awful/tooltip.lua b/lib/awful/tooltip.lua index 0420eb72c..930010adf 100644 --- a/lib/awful/tooltip.lua +++ b/lib/awful/tooltip.lua @@ -276,20 +276,13 @@ function tooltip:set_align(value) end --- The shape of the tooltip window. --- If the shape require some parameters, use `set_shape`. -- -- @DOC_awful_tooltip_shape_EXAMPLE@ -- -- @property shape -- @see gears.shape --- @see set_shape -- @see beautiful.tooltip_shape ---- Set the tooltip shape. --- All other arguments will be passed to the shape function. --- @tparam gears.shape s The shape --- @see shape --- @see gears.shape function tooltip:set_shape(s) self.backgroundbox:set_shape(s) end @@ -520,7 +513,7 @@ end -- @tparam tooltip self The tooltip. -- @tparam gears.object obj An object with `mouse::enter` and -- `mouse::leave` signals. --- @function add_to_object +-- @method add_to_object function tooltip:add_to_object(obj) if not obj then return end @@ -533,7 +526,7 @@ end -- @tparam tooltip self The tooltip. -- @tparam gears.object obj An object with `mouse::enter` and -- `mouse::leave` signals. --- @function remove_from_object +-- @method remove_from_object function tooltip:remove_from_object(obj) obj:disconnect_signal("mouse::enter", self.show) obj:disconnect_signal("mouse::leave", self.hide) diff --git a/lib/awful/util.lua b/lib/awful/util.lua index 66be0871a..d0a14d1fc 100644 --- a/lib/awful/util.lua +++ b/lib/awful/util.lua @@ -99,6 +99,7 @@ end --- Eval Lua code. -- @return The return value of Lua code. +-- @staticfct awful.util.eval function util.eval(s) return assert(load(s))() end @@ -129,6 +130,7 @@ end -- @param path The file path. -- @return A function if everything is alright, a string with the error -- otherwise. +-- @staticfct awful.util.checkfile function util.checkfile(path) local f, e = loadfile(path) -- Return function if function, otherwise return error. @@ -140,6 +142,7 @@ end -- It checks if the configuration file is valid, and then restart if it's ok. -- If it's not ok, the error will be returned. -- @return Never return if awesome restart, or return a string error. +-- @staticfct awful.util.restart function util.restart() local c = util.checkfile(capi.awesome.conffile) @@ -225,6 +228,7 @@ end -- @param dirs Table of dirs to search, otherwise { '/usr/share/pixmaps/' } -- @tparam[opt] string size The size. If this is specified, subdirectories `x` -- of the dirs are searched first. +-- @staticfct awful.util.geticonpath function util.geticonpath(iconname, exts, dirs, size) exts = exts or { 'png', 'gif' } dirs = dirs or { '/usr/share/pixmaps/', '/usr/share/icons/hicolor/' } diff --git a/lib/awful/wibar.lua b/lib/awful/wibar.lua index 84846be72..b29d6d846 100644 --- a/lib/awful/wibar.lua +++ b/lib/awful/wibar.lua @@ -217,11 +217,6 @@ local function set_position(wb, position, skip_reattach) end end ---- Stretch the wibar. --- --- @property stretch --- @param[opt=true] boolean - local function get_stretch(w) return w._stretch end @@ -233,7 +228,8 @@ local function set_stretch(w, value) end --- Remove a wibar. --- @function remove +-- @method remove + local function remove(self) self.visible = false diff --git a/lib/awful/widget/calendar_popup.lua b/lib/awful/widget/calendar_popup.lua index 566218768..f7e480f03 100644 --- a/lib/awful/widget/calendar_popup.lua +++ b/lib/awful/widget/calendar_popup.lua @@ -203,6 +203,7 @@ end -- @tparam string position Two-character position of the calendar in the screen -- @tparam screen screen Screen where to display the calendar -- @treturn wibox The wibox calendar +-- @method call_calendar function calendar_popup:call_calendar(offset, position, screen) local inc_offset = offset or 0 local pos = position or self.position @@ -230,7 +231,8 @@ function calendar_popup:call_calendar(offset, position, screen) return self end ---- Toggle calendar visibility +--- Toggle calendar visibility. +-- @method toggle function calendar_popup:toggle() self:call_calendar(0) self.visible = not self.visible @@ -247,6 +249,7 @@ end -- @tparam[opt={}] table args Additional options -- @tparam[opt=true] bool args.on_hover Show popup during mouse hover -- @treturn wibox The wibox calendar +-- @method attach function calendar_popup:attach(widget, position, args) position = position or "tr" args = args or {} diff --git a/lib/awful/widget/keyboardlayout.lua b/lib/awful/widget/keyboardlayout.lua index 3c15799c6..a87b556a1 100644 --- a/lib/awful/widget/keyboardlayout.lua +++ b/lib/awful/widget/keyboardlayout.lua @@ -135,6 +135,7 @@ end -- xkb_symbols pattern "vendor/file(section):group_idx". -- @tparam string group_names The string awesome.xkb_get_group_names() returns. -- @treturn table An array of tables whose keys are vendor, file, section, and group_idx. +-- @staticfct awful.keyboardlayout.get_groups_from_group_names function keyboardlayout.get_groups_from_group_names(group_names) if group_names == nil then return nil diff --git a/lib/beautiful/gtk.lua b/lib/beautiful/gtk.lua index 13a8023b8..1ff793838 100644 --- a/lib/beautiful/gtk.lua +++ b/lib/beautiful/gtk.lua @@ -63,54 +63,6 @@ local function read_gtk_color_properties_from_widget(gtk_widget, properties) return result end - --- luacheck: max comment line length 300 - ---- Get GTK+3 theme variables from GtkStyleContext --- @treturn table Key-value table with the following structure: ---
---|
Result key | StyleContext key | StyleContext fallback #1 | StyleContext fallback #2 | GTK Widget fallback |
---|---|---|---|---|
`font_size` | Label font-size | |||
`font_family` | Label font-family | |||
`bg_color` | `theme_bg_color` | Window bg | ||
`fg_color` | `theme_fg_color` | Window fg | ||
`base_color` | `theme_base_color` | Entry bg | ||
`text_color` | `theme_text_color` | Entry fg | ||
`button_bg_color` | `theme_button_bg_color` | `theme_bg_color` | Button bg | |
`button_fg_color` | `theme_button_fg_color` | `theme_fg_color` | Button fg | |
`button_border_color` | Button border-color | |||
`button_border_radius` | Button border-radius | |||
`button_border_width` | Button border-top-width | |||
`selected_bg_color` | `theme_selected_bg_color` | ToggleButton bg | ||
`selected_fg_color` | `theme_selected_fg_color` | ToggleButton fg | ||
`menubar_bg_color` | `menubar_bg_color` | `theme_bg_color` | HeaderBar bg | |
`menubar_fg_color` | `menubar_fg_color` | `theme_fg_color` | HeaderBar fg | |
`header_button_bg_color` | `header_button_bg_color` | `menubar_bg_color` | `theme_bg_color` | HeaderBar > Button bg |
`header_button_fg_color` | `header_button_fg_color` | `menubar_fg_color` | `theme_fg_color` | HeaderBar > Button fg |
`header_button_border_color` | HeaderBar > Button border-color | |||
`error_color` | `error_color` | `error_bg_color` | destructive Button bg | |
`error_bg_color` | `error_bg_color` | `error_color` | destructive Button bg | |
`error_fg_color` | `error_fg_color` | `theme_selected_fg_color` | destructive Button fg | |
`warning_color` | `warning_color` | `warning_bg_color` | ||
`warning_bg_color` | `warning_bg_color` | `warning_color` | ||
`warning_fg_color` | `warning_fg_color` | `theme_selected_fg_color` | ||
`success_color` | `success_color` | `success_bg_color` | ||
`success_bg_color` | `success_bg_color` | `success_color` | ||
`success_fg_color` | `success_fg_color` | `theme_selected_fg_color` | ||
`tooltip_bg_color` | `theme_tooltip_bg_color` | `theme_bg_color` | ||
`tooltip_fg_color` | `theme_tooltip_fg_color` | `theme_fg_color` | ||
`osd_bg_color` | `osd_bg` | `theme_tooltip_bg_color` | `theme_bg_color` | |
`osd_fg_color` | `osd_fg` | `theme_tooltip_fg_color` | `theme_fg_color` | |
`osd_border_color` | `osd_borders_color` | `osd_fg_color` | ||
`wm_bg_color` | `wm_bg` | `menubar_bg_color` | `theme_bg_color` | HeaderBar bg |
`wm_border_focused_color` | `wm_border_focused` | `theme_selected_bg_color` | ToggleButton bg | |
`wm_border_unfocused_color` | `wm_border_unfocused` | `wm_border` | `menubar_bg_color` | HeaderBar bg |
`wm_title_focused_color` | `wm_title_focused` | `wm_title` | `theme_selected_fg_color` | ToggleButton fg |
`wm_title_unfocused_color` | `wm_title_unfocused` | `wm_unfocused_title` | `menubar_fg_color` | HeaderBar fg |
`wm_icons_focused_color` | `wm_icons_focused` | `wm_title_focused` | `theme_selected_fg_color` | ToggleButton fg |
`wm_icons_unfocused_color` | `wm_icons_unfocused` | `wm_title_unfocused` | `menubar_fg_color` | HeaderBar fg |
Result key | StyleContext key | StyleContext fallback #1 | StyleContext fallback #2 | GTK Widget fallback |
---|---|---|---|---|
`font_size` | Label font-size | |||
`font_family` | Label font-family | |||
`bg_color` | `theme_bg_color` | Window bg | ||
`fg_color` | `theme_fg_color` | Window fg | ||
`base_color` | `theme_base_color` | Entry bg | ||
`text_color` | `theme_text_color` | Entry fg | ||
`button_bg_color` | `theme_button_bg_color` | `theme_bg_color` | Button bg | |
`button_fg_color` | `theme_button_fg_color` | `theme_fg_color` | Button fg | |
`button_border_color` | Button border-color | |||
`button_border_radius` | Button border-radius | |||
`button_border_width` | Button border-top-width | |||
`selected_bg_color` | `theme_selected_bg_color` | ToggleButton bg | ||
`selected_fg_color` | `theme_selected_fg_color` | ToggleButton fg | ||
`menubar_bg_color` | `menubar_bg_color` | `theme_bg_color` | HeaderBar bg | |
`menubar_fg_color` | `menubar_fg_color` | `theme_fg_color` | HeaderBar fg | |
`header_button_bg_color` | `header_button_bg_color` | `menubar_bg_color` | `theme_bg_color` | HeaderBar > Button bg |
`header_button_fg_color` | `header_button_fg_color` | `menubar_fg_color` | `theme_fg_color` | HeaderBar > Button fg |
`header_button_border_color` | HeaderBar > Button border-color | |||
`error_color` | `error_color` | `error_bg_color` | destructive Button bg | |
`error_bg_color` | `error_bg_color` | `error_color` | destructive Button bg | |
`error_fg_color` | `error_fg_color` | `theme_selected_fg_color` | destructive Button fg | |
`warning_color` | `warning_color` | `warning_bg_color` | ||
`warning_bg_color` | `warning_bg_color` | `warning_color` | ||
`warning_fg_color` | `warning_fg_color` | `theme_selected_fg_color` | ||
`success_color` | `success_color` | `success_bg_color` | ||
`success_bg_color` | `success_bg_color` | `success_color` | ||
`success_fg_color` | `success_fg_color` | `theme_selected_fg_color` | ||
`tooltip_bg_color` | `theme_tooltip_bg_color` | `theme_bg_color` | ||
`tooltip_fg_color` | `theme_tooltip_fg_color` | `theme_fg_color` | ||
`osd_bg_color` | `osd_bg` | `theme_tooltip_bg_color` | `theme_bg_color` | |
`osd_fg_color` | `osd_fg` | `theme_tooltip_fg_color` | `theme_fg_color` | |
`osd_border_color` | `osd_borders_color` | `osd_fg_color` | ||
`wm_bg_color` | `wm_bg` | `menubar_bg_color` | `theme_bg_color` | HeaderBar bg |
`wm_border_focused_color` | `wm_border_focused` | `theme_selected_bg_color` | ToggleButton bg | |
`wm_border_unfocused_color` | `wm_border_unfocused` | `wm_border` | `menubar_bg_color` | HeaderBar bg |
`wm_title_focused_color` | `wm_title_focused` | `wm_title` | `theme_selected_fg_color` | ToggleButton fg |
`wm_title_unfocused_color` | `wm_title_unfocused` | `wm_unfocused_title` | `menubar_fg_color` | HeaderBar fg |
`wm_icons_focused_color` | `wm_icons_focused` | `wm_title_focused` | `theme_selected_fg_color` | ToggleButton fg |
`wm_icons_unfocused_color` | `wm_icons_unfocused` | `wm_title_unfocused` | `menubar_fg_color` | HeaderBar fg |
Keybinding | +--Description | +--
---|---|
LeftC-j | select an item on the left |
RightC-k | select an item on the right |
Backspace | exit the current category if we are in any |
Escape | exit the current directory or exit menubar |
Home | select the first item |
End | select the last |
Return | execute the entry |
C-Return | execute the command with awful.spawn |
C-M-Return | execute the command in a terminal |
Modifier name | *Key name | @@ -266,7 +266,7 @@ _string_to_key_code(const char *s) * coordinates relatives. * @param x In case of a motion event, this is the X coordinate. * @param y In case of a motion event, this is the Y coordinate. - * @function fake_input + * @staticfct fake_input */ static int luaA_root_fake_input(lua_State *L) @@ -334,7 +334,7 @@ luaA_root_fake_input(lua_State *L) * * @tparam table|nil keys_array An array of key binding objects, or nothing. * @return The array of key bindings objects of this client. - * @function keys + * @staticfct keys */ static int luaA_root_keys(lua_State *L) @@ -374,7 +374,7 @@ luaA_root_keys(lua_State *L) * * @param button_table An array of mouse button bindings objects, or nothing. * @return The array of mouse button bindings objects. - * @function buttons + * @staticfct buttons */ static int luaA_root_buttons(lua_State *L) @@ -413,7 +413,7 @@ luaA_root_buttons(lua_State *L) *@DOC_cursor_c_COMMON@ * * @param cursor_name A X cursor name. - * @function cursor + * @staticfct cursor */ static int luaA_root_cursor(lua_State *L) @@ -439,7 +439,7 @@ luaA_root_cursor(lua_State *L) /** Get the drawins attached to a screen. * * @return A table with all drawins. - * @function drawins + * @staticfct drawins */ static int luaA_root_drawins(lua_State *L) @@ -459,7 +459,7 @@ luaA_root_drawins(lua_State *L) * * @param pattern A cairo pattern as light userdata * @return A cairo surface or nothing. - * @function wallpaper + * @staticfct wallpaper */ static int luaA_root_wallpaper(lua_State *L) @@ -484,7 +484,7 @@ luaA_root_wallpaper(lua_State *L) * * @return Width of the root window. * @return height of the root window. - * @function size + * @staticfct size */ static int luaA_root_size(lua_State *L) @@ -498,7 +498,7 @@ luaA_root_size(lua_State *L) * * @return Width of the root window, in millimeters. * @return height of the root window, in millimeters. - * @function size_mm + * @staticfct size_mm */ static int luaA_root_size_mm(lua_State *L) @@ -510,7 +510,7 @@ luaA_root_size_mm(lua_State *L) /** Get the attached tags. * @return A table with all tags. - * @function tags + * @staticfct tags */ static int luaA_root_tags(lua_State *L) diff --git a/selection.c b/selection.c index ba164c13f..ea9582cd1 100644 --- a/selection.c +++ b/selection.c @@ -38,7 +38,7 @@ /** Get the selection (clipboard) content. * * @return A string with the selection (clipboard) content. - * @function selection + * @staticfct selection */ static xcb_window_t selection_window = XCB_NONE; diff --git a/spawn.c b/spawn.c index 29eede74a..d736d5834 100644 --- a/spawn.c +++ b/spawn.c @@ -426,7 +426,7 @@ spawn_child_exited(pid_t pid, int status) * @treturn[1] integer stdout, if `stdout` is true. * @treturn[1] integer stderr, if `stderr` is true. * @treturn[2] string An error string if an error occurred. - * @function spawn + * @staticfct spawn */ int luaA_spawn(lua_State *L) diff --git a/tests/examples/awful/placement/bottom.lua b/tests/examples/awful/placement/bottom.lua index 75ae8ff90..c70ee710e 100644 --- a/tests/examples/awful/placement/bottom.lua +++ b/tests/examples/awful/placement/bottom.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name bottom --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.bottom --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local awful = {placement = require("awful.placement")} --DOC_HIDE diff --git a/tests/examples/awful/placement/bottom_left.lua b/tests/examples/awful/placement/bottom_left.lua index f4704947d..125a0e648 100644 --- a/tests/examples/awful/placement/bottom_left.lua +++ b/tests/examples/awful/placement/bottom_left.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name bottom_left --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.bottom_left --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local awful = {placement = require("awful.placement")} --DOC_HIDE diff --git a/tests/examples/awful/placement/bottom_right.lua b/tests/examples/awful/placement/bottom_right.lua index 2c00137e8..b0d450821 100644 --- a/tests/examples/awful/placement/bottom_right.lua +++ b/tests/examples/awful/placement/bottom_right.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name bottom_right --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.bottom_right --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local awful = {placement = require("awful.placement")} --DOC_HIDE diff --git a/tests/examples/awful/placement/center_horizontal.lua b/tests/examples/awful/placement/center_horizontal.lua index 44f81b7a2..1ab1eee22 100644 --- a/tests/examples/awful/placement/center_horizontal.lua +++ b/tests/examples/awful/placement/center_horizontal.lua @@ -3,8 +3,8 @@ -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name center_horizontal --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.center_horizontal --DOC_HEADER + screen[1]._resize {width = 128, height = 96} --DOC_HIDE local awful = {placement = require("awful.placement")} --DOC_HIDE local c = client.gen_fake {x = 45, y = 35, width=40, height=30} --DOC_HIDE diff --git a/tests/examples/awful/placement/center_vertical.lua b/tests/examples/awful/placement/center_vertical.lua index 8e71e7701..a867eab20 100644 --- a/tests/examples/awful/placement/center_vertical.lua +++ b/tests/examples/awful/placement/center_vertical.lua @@ -2,8 +2,7 @@ -- Align a client to the vertical center of the parent area. --DOC_HEADER -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER --- @name center_vertical --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.center_vertical --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local awful = {placement = require("awful.placement")} --DOC_HIDE diff --git a/tests/examples/awful/placement/centered.lua b/tests/examples/awful/placement/centered.lua index be9fa5be4..c7af1052d 100644 --- a/tests/examples/awful/placement/centered.lua +++ b/tests/examples/awful/placement/centered.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name centered --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.centered --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local awful = {placement = require("awful.placement")} --DOC_HIDE diff --git a/tests/examples/awful/placement/left.lua b/tests/examples/awful/placement/left.lua index a916b63bb..3621383d7 100644 --- a/tests/examples/awful/placement/left.lua +++ b/tests/examples/awful/placement/left.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name left --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.left --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local awful = {placement = require("awful.placement")} --DOC_HIDE diff --git a/tests/examples/awful/placement/maximize_horizontally.lua b/tests/examples/awful/placement/maximize_horizontally.lua index b862e816d..7fdf965ff 100644 --- a/tests/examples/awful/placement/maximize_horizontally.lua +++ b/tests/examples/awful/placement/maximize_horizontally.lua @@ -2,8 +2,7 @@ -- Horizontally maximize the drawable in the parent area. --DOC_HEADER -- @tparam drawable d A drawable (like `client` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER --- @name maximize_horizontally --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.maximize_horizontally --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local placement = require("awful.placement") --DOC_HIDE diff --git a/tests/examples/awful/placement/maximize_vertically.lua b/tests/examples/awful/placement/maximize_vertically.lua index a8b177bcd..b37581157 100644 --- a/tests/examples/awful/placement/maximize_vertically.lua +++ b/tests/examples/awful/placement/maximize_vertically.lua @@ -2,8 +2,7 @@ -- Vetically maximize the drawable in the parent area. --DOC_HEADER -- @tparam drawable d A drawable (like `client` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER --- @name maximize_vertically --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.maximize_vertically --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local placement = require("awful.placement") --DOC_HIDE diff --git a/tests/examples/awful/placement/right.lua b/tests/examples/awful/placement/right.lua index 40c334843..b1f63b66a 100644 --- a/tests/examples/awful/placement/right.lua +++ b/tests/examples/awful/placement/right.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name right --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.right --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local awful = {placement = require("awful.placement")} --DOC_HIDE diff --git a/tests/examples/awful/placement/stretch_down.lua b/tests/examples/awful/placement/stretch_down.lua index 76101bae8..e22caf5d8 100644 --- a/tests/examples/awful/placement/stretch_down.lua +++ b/tests/examples/awful/placement/stretch_down.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name stretch_down --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.stretch_down --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local placement = require("awful.placement") --DOC_HIDE diff --git a/tests/examples/awful/placement/stretch_left.lua b/tests/examples/awful/placement/stretch_left.lua index d00d511e9..db81f765d 100644 --- a/tests/examples/awful/placement/stretch_left.lua +++ b/tests/examples/awful/placement/stretch_left.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name stretch_left --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.stretch_left --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local placement = require("awful.placement") --DOC_HIDE diff --git a/tests/examples/awful/placement/stretch_right.lua b/tests/examples/awful/placement/stretch_right.lua index 963f67f0b..d217a781d 100644 --- a/tests/examples/awful/placement/stretch_right.lua +++ b/tests/examples/awful/placement/stretch_right.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name stretch_right --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.stretch_right --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local placement = require("awful.placement") --DOC_HIDE diff --git a/tests/examples/awful/placement/stretch_up.lua b/tests/examples/awful/placement/stretch_up.lua index 6cf4f1cbf..67a2bea75 100644 --- a/tests/examples/awful/placement/stretch_up.lua +++ b/tests/examples/awful/placement/stretch_up.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name stretch_up --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.stretch_up --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local placement = require("awful.placement") --DOC_HIDE diff --git a/tests/examples/awful/placement/top.lua b/tests/examples/awful/placement/top.lua index 4d8f9d38c..60fc17006 100644 --- a/tests/examples/awful/placement/top.lua +++ b/tests/examples/awful/placement/top.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name top --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.top --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local awful = {placement = require("awful.placement")} --DOC_HIDE diff --git a/tests/examples/awful/placement/top_left.lua b/tests/examples/awful/placement/top_left.lua index 87ae8472d..339bd9e10 100644 --- a/tests/examples/awful/placement/top_left.lua +++ b/tests/examples/awful/placement/top_left.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name top_left --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.top_left --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local awful = {placement = require("awful.placement")} --DOC_HIDE diff --git a/tests/examples/awful/placement/top_right.lua b/tests/examples/awful/placement/top_right.lua index 952bdfd20..2df7c70a2 100644 --- a/tests/examples/awful/placement/top_right.lua +++ b/tests/examples/awful/placement/top_right.lua @@ -3,8 +3,7 @@ -- @tparam drawable d A drawable (like `client`, `mouse` or `wibox`) --DOC_HEADER -- @tparam[opt={}] table args Other arguments") --DOC_HEADER -- @treturn table The new geometry --DOC_HEADER --- @name top_right --DOC_HEADER --- @class function --DOC_HEADER +-- @staticfct awful.placement.top_right --DOC_HEADER screen[1]._resize {width = 128, height = 96} --DOC_HIDE local awful = {placement = require("awful.placement")} --DOC_HIDE diff --git a/xkb.c b/xkb.c index 04dd3b597..40b98f8e2 100644 --- a/xkb.c +++ b/xkb.c @@ -36,7 +36,7 @@ /** * Switch keyboard layout. * - * @function xkb_set_layout_group + * @staticfct xkb_set_layout_group * @tparam integer num keyboard layout number, integer from 0 to 3 */ int @@ -56,7 +56,7 @@ luaA_xkb_set_layout_group(lua_State *L) /** * Get current layout number. * - * @function xkb_get_layout_group + * @staticfct xkb_get_layout_group * @treturn integer num Current layout number, integer from 0 to 3. */ int @@ -87,7 +87,7 @@ luaA_xkb_get_layout_group(lua_State *L) /** * Get layout short names. * - * @function xkb_get_group_names + * @staticfct xkb_get_group_names * @treturn string A string describing the current layout settings, * e.g.: 'pc+us+de:2+inet(evdev)+group(alt_shift_toggle)+ctrl(nocaps)' */
---|