awful.screen: Merge screen and awful.screen API doc
This commit is contained in:
parent
16fe91d5f3
commit
a4bc49b540
|
@ -0,0 +1,6 @@
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
--- This module is deprecated, use `screen`
|
||||||
|
-- ===============================
|
||||||
|
--
|
||||||
|
-- @module awful.screen
|
||||||
|
---------------------------------------------------------------------------
|
|
@ -4,7 +4,7 @@
|
||||||
-- @author Julien Danjou <julien@danjou.info>
|
-- @author Julien Danjou <julien@danjou.info>
|
||||||
-- @copyright 2008 Julien Danjou
|
-- @copyright 2008 Julien Danjou
|
||||||
-- @release @AWESOME_VERSION@
|
-- @release @AWESOME_VERSION@
|
||||||
-- @module awful.screen
|
-- @module screen
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
-- Grab environment we need
|
-- Grab environment we need
|
||||||
|
@ -24,7 +24,7 @@ end
|
||||||
-- we use require("awful.client") inside functions to prevent circular dependencies.
|
-- we use require("awful.client") inside functions to prevent circular dependencies.
|
||||||
local client
|
local client
|
||||||
|
|
||||||
local screen = {}
|
local screen = {object={}}
|
||||||
|
|
||||||
local data = {}
|
local data = {}
|
||||||
data.padding = {}
|
data.padding = {}
|
||||||
|
@ -44,6 +44,7 @@ local function apply_geometry_ajustments(geo, delta)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Get the square distance between a `screen` and a point
|
||||||
-- @param s Screen
|
-- @param s Screen
|
||||||
-- @param x X coordinate of point
|
-- @param x X coordinate of point
|
||||||
-- @param y Y coordinate of point
|
-- @param y Y coordinate of point
|
||||||
|
@ -69,6 +70,7 @@ end
|
||||||
-- Return screen number corresponding to the given (pixel) coordinates.
|
-- Return screen number corresponding to the given (pixel) coordinates.
|
||||||
-- The number returned can be used as an index into the global
|
-- The number returned can be used as an index into the global
|
||||||
-- `screen` table/object.
|
-- `screen` table/object.
|
||||||
|
-- @function awful.screen.getbycoord
|
||||||
-- @param x The x coordinate
|
-- @param x The x coordinate
|
||||||
-- @param y The y coordinate
|
-- @param y The y coordinate
|
||||||
function screen.getbycoord(x, y)
|
function screen.getbycoord(x, y)
|
||||||
|
@ -85,6 +87,7 @@ end
|
||||||
|
|
||||||
--- Give the focus to a screen, and move pointer to last known position on this
|
--- Give the focus to a screen, and move pointer to last known position on this
|
||||||
-- screen, or keep position relative to the current focused screen
|
-- screen, or keep position relative to the current focused screen
|
||||||
|
-- @function awful.screen.focus
|
||||||
-- @param _screen Screen number (defaults / falls back to mouse.screen).
|
-- @param _screen Screen number (defaults / falls back to mouse.screen).
|
||||||
function screen.focus(_screen)
|
function screen.focus(_screen)
|
||||||
client = client or require("awful.client")
|
client = client or require("awful.client")
|
||||||
|
@ -123,6 +126,7 @@ end
|
||||||
|
|
||||||
--- Give the focus to a screen, and move pointer to last known position on this
|
--- Give the focus to a screen, and move pointer to last known position on this
|
||||||
-- screen, or keep position relative to the current focused screen
|
-- screen, or keep position relative to the current focused screen
|
||||||
|
-- @function awful.screen.focus_bydirection
|
||||||
-- @param dir The direction, can be either "up", "down", "left" or "right".
|
-- @param dir The direction, can be either "up", "down", "left" or "right".
|
||||||
-- @param _screen Screen.
|
-- @param _screen Screen.
|
||||||
function screen.focus_bydirection(dir, _screen)
|
function screen.focus_bydirection(dir, _screen)
|
||||||
|
@ -141,6 +145,7 @@ end
|
||||||
|
|
||||||
--- Give the focus to a screen, and move pointer to last known position on this
|
--- Give the focus to a screen, and move pointer to last known position on this
|
||||||
-- screen, or keep position relative to the current focused screen
|
-- screen, or keep position relative to the current focused screen
|
||||||
|
-- @function awful.screen.focus_relative
|
||||||
-- @param i Value to add to the current focused screen index. 1 will focus next
|
-- @param i Value to add to the current focused screen index. 1 will focus next
|
||||||
-- screen, -1 would focus the previous one.
|
-- screen, -1 would focus the previous one.
|
||||||
function screen.focus_relative(i)
|
function screen.focus_relative(i)
|
||||||
|
@ -180,14 +185,19 @@ function screen.padding(_screen, padding)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- The defaults arguments for `awful.screen.focused`
|
||||||
|
-- @tfield[opt=nil] table awful.screen.default_focused_args
|
||||||
|
|
||||||
--- Get the focused screen.
|
--- Get the focused screen.
|
||||||
--
|
--
|
||||||
-- It is possible to set `awful.screen.default_focused_args` to override the
|
-- It is possible to set `awful.screen.default_focused_args` to override the
|
||||||
-- default settings.
|
-- default settings.
|
||||||
--
|
--
|
||||||
|
-- @function awful.screen.focused
|
||||||
-- @tparam[opt] table args
|
-- @tparam[opt] table args
|
||||||
-- @tparam[opt=false] table args.client Use the client screen instead of the
|
-- @tparam[opt=false] boolean args.client Use the client screen instead of the
|
||||||
-- mouse screen.
|
-- mouse screen.
|
||||||
|
-- @tparam[opt=true] boolean args.screen Use the mouse screen
|
||||||
-- @treturn ?screen The focused screen object, or `nil` in case no screen is
|
-- @treturn ?screen The focused screen object, or `nil` in case no screen is
|
||||||
-- present currently.
|
-- present currently.
|
||||||
function screen.focused(args)
|
function screen.focused(args)
|
||||||
|
|
Loading…
Reference in New Issue