2008-11-14 16:16:09 +01:00
|
|
|
---------------------------------------------------------------------------
|
2014-05-20 13:02:39 +02:00
|
|
|
--- Mouse module for awful
|
|
|
|
--
|
2008-11-14 16:16:09 +01:00
|
|
|
-- @author Julien Danjou <julien@danjou.info>
|
|
|
|
-- @copyright 2008 Julien Danjou
|
|
|
|
-- @release @AWESOME_VERSION@
|
2016-04-25 04:09:14 +02:00
|
|
|
-- @module mouse
|
2008-11-14 16:16:09 +01:00
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
-- Grab environment we need
|
|
|
|
local layout = require("awful.layout")
|
2016-04-21 07:51:34 +02:00
|
|
|
local aplace = require("awful.placement")
|
2008-12-14 14:38:48 +01:00
|
|
|
local util = require("awful.util")
|
2008-12-03 23:03:44 +01:00
|
|
|
local type = type
|
2008-11-14 16:16:09 +01:00
|
|
|
local ipairs = ipairs
|
|
|
|
local capi =
|
|
|
|
{
|
2009-04-03 17:15:14 +02:00
|
|
|
root = root,
|
2008-11-14 16:16:09 +01:00
|
|
|
mouse = mouse,
|
|
|
|
screen = screen,
|
|
|
|
client = client,
|
|
|
|
mousegrabber = mousegrabber,
|
|
|
|
}
|
|
|
|
|
2016-04-21 10:03:20 +02:00
|
|
|
local mouse = {
|
2016-04-22 07:59:02 +02:00
|
|
|
resize = require("awful.mouse.resize"),
|
|
|
|
snap = require("awful.mouse.snap"),
|
2016-04-28 05:20:00 +02:00
|
|
|
drag_to_tag = require("awful.mouse.drag_to_tag")
|
2016-04-21 10:03:20 +02:00
|
|
|
}
|
2008-11-14 16:16:09 +01:00
|
|
|
|
2016-04-25 03:00:38 +02:00
|
|
|
mouse.object = {}
|
2012-06-14 01:33:27 +02:00
|
|
|
mouse.client = {}
|
|
|
|
mouse.wibox = {}
|
2008-11-14 16:16:09 +01:00
|
|
|
|
2016-04-22 08:16:59 +02:00
|
|
|
--- The default snap distance.
|
|
|
|
-- @tfield integer awful.mouse.snap.default_distance
|
|
|
|
-- @tparam[opt=8] integer default_distance
|
|
|
|
-- @see awful.mouse.snap
|
|
|
|
|
2016-04-28 03:16:20 +02:00
|
|
|
--- Enable screen edges snapping.
|
|
|
|
-- @tfield[opt=true] boolean awful.mouse.snap.edge_enabled
|
|
|
|
|
|
|
|
--- Enable client to client snapping.
|
|
|
|
-- @tfield[opt=true] boolean awful.mouse.snap.client_enabled
|
|
|
|
|
|
|
|
--- Enable changing tag when a client is dragged to the edge of the screen.
|
2016-04-28 05:20:00 +02:00
|
|
|
-- @tfield[opt=false] integer awful.mouse.drag_to_tag.enabled
|
2016-04-28 03:16:20 +02:00
|
|
|
|
2016-04-23 08:14:01 +02:00
|
|
|
--- The snap outline background color.
|
|
|
|
-- @beautiful beautiful.snap_bg
|
|
|
|
-- @tparam color|string|gradient|pattern color
|
|
|
|
|
|
|
|
--- The snap outline width.
|
|
|
|
-- @beautiful beautiful.snap_border_width
|
|
|
|
-- @param integer
|
|
|
|
|
2016-04-28 03:16:20 +02:00
|
|
|
--- The snap outline shape.
|
2016-04-23 08:14:01 +02:00
|
|
|
-- @beautiful beautiful.snap_shape
|
|
|
|
-- @tparam function shape A `gears.shape` compatible function
|
|
|
|
|
2009-02-15 20:12:45 +01:00
|
|
|
--- Get the client object under the pointer.
|
2016-04-25 04:09:14 +02:00
|
|
|
-- @deprecated awful.mouse.client_under_pointer
|
2009-02-15 20:12:45 +01:00
|
|
|
-- @return The client object under the pointer, if one can be found.
|
2016-04-25 04:33:44 +02:00
|
|
|
-- @see current_client
|
2012-06-14 01:33:27 +02:00
|
|
|
function mouse.client_under_pointer()
|
2016-07-30 21:49:46 +02:00
|
|
|
util.deprecate("Use mouse.current_client instead of awful.mouse.client_under_pointer()")
|
2008-12-03 23:03:44 +01:00
|
|
|
|
2016-04-25 04:33:44 +02:00
|
|
|
return mouse.object.get_current_client()
|
2008-12-03 23:03:44 +01:00
|
|
|
end
|
|
|
|
|
2008-11-14 16:16:09 +01:00
|
|
|
--- Move a client.
|
2016-04-25 04:09:14 +02:00
|
|
|
-- @function awful.mouse.client.move
|
2008-11-14 16:16:09 +01:00
|
|
|
-- @param c The client to move, or the focused one if nil.
|
|
|
|
-- @param snap The pixel to snap clients.
|
2016-04-22 06:50:28 +02:00
|
|
|
-- @param finished_cb Deprecated, do not use
|
|
|
|
function mouse.client.move(c, snap, finished_cb) --luacheck: no unused args
|
|
|
|
if finished_cb then
|
2016-07-30 21:49:46 +02:00
|
|
|
util.deprecate("The mouse.client.move `finished_cb` argument is no longer"..
|
2016-04-22 06:50:28 +02:00
|
|
|
" used, please use awful.mouse.resize.add_leave_callback(f, 'mouse.move')")
|
|
|
|
end
|
|
|
|
|
2016-02-07 15:24:08 +01:00
|
|
|
c = c or capi.client.focus
|
2008-11-14 16:16:09 +01:00
|
|
|
|
2009-02-07 15:40:50 +01:00
|
|
|
if not c
|
|
|
|
or c.fullscreen
|
2008-11-14 16:16:09 +01:00
|
|
|
or c.type == "desktop"
|
|
|
|
or c.type == "splash"
|
|
|
|
or c.type == "dock" then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2016-04-22 06:50:28 +02:00
|
|
|
-- Compute the offset
|
|
|
|
local coords = capi.mouse.coords()
|
|
|
|
local geo = aplace.centered(capi.mouse,{parent=c, pretend=true})
|
2008-11-14 16:16:09 +01:00
|
|
|
|
2016-04-22 06:50:28 +02:00
|
|
|
local offset = {
|
|
|
|
x = geo.x - coords.x,
|
|
|
|
y = geo.y - coords.y,
|
|
|
|
}
|
|
|
|
|
2016-04-22 09:04:28 +02:00
|
|
|
mouse.resize(c, "mouse.move", {
|
|
|
|
placement = aplace.under_mouse,
|
|
|
|
offset = offset,
|
|
|
|
snap = snap
|
|
|
|
})
|
2008-11-14 16:16:09 +01:00
|
|
|
end
|
|
|
|
|
2012-06-14 01:33:27 +02:00
|
|
|
mouse.client.dragtotag = { }
|
2008-12-14 14:38:48 +01:00
|
|
|
|
2016-04-25 04:09:14 +02:00
|
|
|
--- Move a client to a tag by dragging it onto the left / right side of the screen.
|
2016-04-28 05:20:00 +02:00
|
|
|
-- @deprecated awful.mouse.client.dragtotag.border
|
2008-12-14 14:38:48 +01:00
|
|
|
-- @param c The client to move
|
2012-06-14 01:33:27 +02:00
|
|
|
function mouse.client.dragtotag.border(c)
|
2016-07-30 21:49:46 +02:00
|
|
|
util.deprecate("Use awful.mouse.snap.drag_to_tag_enabled = true instead "..
|
2016-04-28 05:20:00 +02:00
|
|
|
"of awful.mouse.client.dragtotag.border(c). It will now be enabled.")
|
|
|
|
|
|
|
|
-- Enable drag to border
|
|
|
|
mouse.snap.drag_to_tag_enabled = true
|
|
|
|
|
|
|
|
return mouse.client.move(c)
|
2008-12-14 14:38:48 +01:00
|
|
|
end
|
|
|
|
|
2016-04-25 04:09:14 +02:00
|
|
|
--- Move the wibox under the cursor.
|
|
|
|
-- @function awful.mouse.wibox.move
|
2016-05-08 08:25:19 +02:00
|
|
|
--@tparam wibox w The wibox to move, or none to use that under the pointer
|
2012-06-14 01:33:27 +02:00
|
|
|
function mouse.wibox.move(w)
|
2016-02-07 15:24:08 +01:00
|
|
|
w = w or mouse.wibox_under_pointer()
|
2008-12-10 19:57:58 +01:00
|
|
|
if not w then return end
|
|
|
|
|
2016-05-08 08:25:19 +02:00
|
|
|
if not w
|
|
|
|
or w.type == "desktop"
|
|
|
|
or w.type == "splash"
|
|
|
|
or w.type == "dock" then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Compute the offset
|
|
|
|
local coords = capi.mouse.coords()
|
|
|
|
local geo = aplace.centered(capi.mouse,{parent=w, pretend=true})
|
|
|
|
|
2008-12-10 19:57:58 +01:00
|
|
|
local offset = {
|
2016-05-08 08:25:19 +02:00
|
|
|
x = geo.x - coords.x,
|
|
|
|
y = geo.y - coords.y,
|
2008-12-10 19:57:58 +01:00
|
|
|
}
|
|
|
|
|
2016-05-08 08:25:19 +02:00
|
|
|
mouse.resize(w, "mouse.move", {
|
|
|
|
placement = aplace.under_mouse,
|
|
|
|
offset = offset
|
|
|
|
})
|
2008-12-10 19:57:58 +01:00
|
|
|
end
|
|
|
|
|
2008-11-17 17:12:54 +01:00
|
|
|
--- Get a client corner coordinates.
|
2016-04-25 04:09:14 +02:00
|
|
|
-- @deprecated awful.mouse.client.corner
|
2016-04-21 07:51:34 +02:00
|
|
|
-- @tparam[opt=client.focus] client c The client to get corner from, focused one by default.
|
|
|
|
-- @tparam string corner The corner to use: auto, top_left, top_right, bottom_left,
|
|
|
|
-- bottom_right, left, right, top bottom. Default is auto, and auto find the
|
|
|
|
-- nearest corner.
|
|
|
|
-- @treturn string The corner name
|
|
|
|
-- @treturn number x The horizontal position
|
|
|
|
-- @treturn number y The vertical position
|
2012-06-14 01:33:27 +02:00
|
|
|
function mouse.client.corner(c, corner)
|
2016-07-30 21:49:46 +02:00
|
|
|
util.deprecate(
|
2016-04-21 07:51:34 +02:00
|
|
|
"Use awful.placement.closest_corner(mouse) or awful.placement[corner](mouse)"..
|
|
|
|
" instead of awful.mouse.client.corner"
|
|
|
|
)
|
|
|
|
|
2016-02-07 15:24:08 +01:00
|
|
|
c = c or capi.client.focus
|
2008-11-17 17:12:54 +01:00
|
|
|
if not c then return end
|
|
|
|
|
2016-04-21 07:51:34 +02:00
|
|
|
local ngeo = nil
|
2008-11-17 17:12:54 +01:00
|
|
|
|
2016-04-21 07:51:34 +02:00
|
|
|
if (not corner) or corner == "auto" then
|
|
|
|
ngeo, corner = aplace.closest_corner(mouse, {parent = c})
|
|
|
|
elseif corner and aplace[corner] then
|
|
|
|
ngeo = aplace[corner](mouse, {parent = c})
|
2008-11-17 17:12:54 +01:00
|
|
|
end
|
|
|
|
|
2016-04-21 07:51:34 +02:00
|
|
|
return corner, ngeo and ngeo.x or nil, ngeo and ngeo.y or nil
|
2008-11-17 17:12:54 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
--- Resize a client.
|
2016-04-25 04:09:14 +02:00
|
|
|
-- @function awful.mouse.client.resize
|
2008-11-17 17:12:54 +01:00
|
|
|
-- @param c The client to resize, or the focused one by default.
|
2016-04-21 11:01:35 +02:00
|
|
|
-- @tparam string corner The corner to grab on resize. Auto detected by default.
|
|
|
|
-- @tparam[opt={}] table args A set of `awful.placement` arguments
|
2016-04-28 03:01:44 +02:00
|
|
|
-- @treturn string The corner (or side) name
|
2016-04-21 11:01:35 +02:00
|
|
|
function mouse.client.resize(c, corner, args)
|
2016-02-07 15:24:08 +01:00
|
|
|
c = c or capi.client.focus
|
2008-11-17 17:12:54 +01:00
|
|
|
|
|
|
|
if not c then return end
|
|
|
|
|
|
|
|
if c.fullscreen
|
|
|
|
or c.type == "desktop"
|
|
|
|
or c.type == "splash"
|
|
|
|
or c.type == "dock" then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2016-09-11 05:56:10 +02:00
|
|
|
-- Set some default arguments
|
|
|
|
local new_args = setmetatable(
|
|
|
|
{
|
|
|
|
include_sides = (not args) or args.include_sides ~= false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
__index = args or {}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2016-04-21 11:01:35 +02:00
|
|
|
-- Move the mouse to the corner
|
|
|
|
if corner and aplace[corner] then
|
|
|
|
aplace[corner](capi.mouse, {parent=c})
|
2016-04-28 03:01:44 +02:00
|
|
|
else
|
|
|
|
local _
|
2016-09-11 05:56:10 +02:00
|
|
|
_, corner = aplace.closest_corner(capi.mouse, {
|
|
|
|
parent = c,
|
|
|
|
include_sides = new_args.include_sides ~= false,
|
|
|
|
})
|
2016-04-21 11:01:35 +02:00
|
|
|
end
|
|
|
|
|
2016-09-11 05:56:10 +02:00
|
|
|
new_args.corner = corner
|
|
|
|
|
|
|
|
mouse.resize(c, "mouse.resize", new_args)
|
2016-04-28 03:01:44 +02:00
|
|
|
|
|
|
|
return corner
|
2016-04-21 11:01:35 +02:00
|
|
|
end
|
2008-11-17 17:12:54 +01:00
|
|
|
|
2016-05-03 12:06:50 +02:00
|
|
|
--- Default handler for `request::geometry` signals with "mouse.resize" context.
|
2016-04-25 04:42:32 +02:00
|
|
|
-- @signalhandler awful.mouse.resize_handler
|
2016-04-21 11:01:35 +02:00
|
|
|
-- @tparam client c The client
|
|
|
|
-- @tparam string context The context
|
|
|
|
-- @tparam[opt={}] table hints The hints to pass to the handler
|
|
|
|
function mouse.resize_handler(c, context, hints)
|
|
|
|
if hints and context and context:find("mouse.*") then
|
|
|
|
-- This handler only handle the floating clients. If the client is tiled,
|
|
|
|
-- then it let the layouts handle it.
|
2016-06-27 08:15:32 +02:00
|
|
|
local t = c.screen.selected_tag
|
|
|
|
local lay = t and t.layout or nil
|
2016-04-21 11:01:35 +02:00
|
|
|
|
2016-06-27 08:15:32 +02:00
|
|
|
if (lay and lay == layout.suit.floating) or c.floating then
|
2016-04-21 11:01:35 +02:00
|
|
|
c:geometry {
|
2016-05-15 09:26:58 +02:00
|
|
|
x = hints.x,
|
|
|
|
y = hints.y,
|
|
|
|
width = hints.width,
|
|
|
|
height = hints.height,
|
2016-04-21 11:01:35 +02:00
|
|
|
}
|
2016-06-27 08:15:32 +02:00
|
|
|
elseif lay and lay.resize_handler then
|
2016-04-21 11:01:35 +02:00
|
|
|
lay.resize_handler(c, context, hints)
|
|
|
|
end
|
2008-11-17 17:12:54 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-04-30 07:47:41 +02:00
|
|
|
-- Older layouts implement their own mousegrabber.
|
|
|
|
-- @tparam client c The client
|
|
|
|
-- @tparam table args Additional arguments
|
|
|
|
-- @treturn boolean This return false when the resize need to be aborted
|
|
|
|
mouse.resize.add_enter_callback(function(c, args) --luacheck: no unused args
|
|
|
|
if c.floating then return end
|
|
|
|
|
|
|
|
local l = c.screen.selected_tag and c.screen.selected_tag.layout or nil
|
|
|
|
if l == layout.suit.floating then return end
|
|
|
|
|
|
|
|
if l ~= layout.suit.floating and l.mouse_resize_handler then
|
|
|
|
capi.mousegrabber.stop()
|
|
|
|
|
|
|
|
local geo, corner = aplace.closest_corner(capi.mouse, {parent=c})
|
|
|
|
|
|
|
|
l.mouse_resize_handler(c, corner, geo.x, geo.y)
|
|
|
|
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
end, "mouse.resize")
|
|
|
|
|
2016-04-25 04:33:44 +02:00
|
|
|
--- Get the client currently under the mouse cursor.
|
|
|
|
-- @property current_client
|
|
|
|
-- @tparam client|nil The client
|
|
|
|
|
|
|
|
function mouse.object.get_current_client()
|
|
|
|
local obj = capi.mouse.object_under_pointer()
|
|
|
|
if type(obj) == "client" then
|
|
|
|
return obj
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Get the wibox currently under the mouse cursor.
|
|
|
|
-- @property current_wibox
|
|
|
|
-- @tparam wibox|nil The wibox
|
|
|
|
|
|
|
|
function mouse.object.get_current_wibox()
|
|
|
|
local obj = capi.mouse.object_under_pointer()
|
2016-05-03 06:01:55 +02:00
|
|
|
if type(obj) == "drawin" and obj.get_wibox then
|
|
|
|
return obj:get_wibox()
|
2016-04-25 04:33:44 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-05-03 06:32:58 +02:00
|
|
|
--- Get the widgets currently under the mouse cursor.
|
|
|
|
--
|
|
|
|
-- @property current_widgets
|
|
|
|
-- @tparam nil|table list The widget list
|
|
|
|
-- @treturn table The list of widgets.The first element is the biggest
|
|
|
|
-- container while the last is the topmost widget. The table contains *x*, *y*,
|
|
|
|
-- *width*, *height* and *widget*.
|
|
|
|
-- @see wibox.find_widgets
|
|
|
|
|
|
|
|
function mouse.object.get_current_widgets()
|
|
|
|
local w = mouse.object.get_current_wibox()
|
|
|
|
if w then
|
|
|
|
local geo, coords = w:geometry(), capi.mouse:coords()
|
|
|
|
|
|
|
|
local list = w:find_widgets(coords.x - geo.x, coords.y - geo.y)
|
|
|
|
|
|
|
|
local ret = {}
|
|
|
|
|
|
|
|
for k, v in ipairs(list) do
|
|
|
|
ret[k] = v.widget
|
|
|
|
end
|
|
|
|
|
|
|
|
return ret, list
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-05-03 07:21:39 +02:00
|
|
|
--- Get the topmost widget currently under the mouse cursor.
|
|
|
|
-- @property current_widget
|
|
|
|
-- @tparam widget|nil widget The widget
|
|
|
|
-- @treturn ?widget The widget
|
|
|
|
-- @see wibox.find_widgets
|
2016-05-29 04:08:47 +02:00
|
|
|
-- @see current_widget_geometry
|
2016-05-03 07:21:39 +02:00
|
|
|
|
|
|
|
function mouse.object.get_current_widget()
|
|
|
|
local wdgs, geos = mouse.object.get_current_widgets()
|
|
|
|
|
|
|
|
if wdgs then
|
|
|
|
return wdgs[#wdgs], geos[#geos]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-05-29 04:08:47 +02:00
|
|
|
--- Get the current widget geometry.
|
|
|
|
-- @property current_widget_geometry
|
|
|
|
-- @tparam ?table The geometry.
|
|
|
|
-- @see current_widget
|
|
|
|
|
|
|
|
function mouse.object.get_current_widget_geometry()
|
|
|
|
local _, ret = mouse.object.get_current_widget()
|
|
|
|
|
|
|
|
return ret
|
|
|
|
end
|
|
|
|
|
|
|
|
--- Get the current widget geometries.
|
|
|
|
-- @property current_widget_geometries
|
|
|
|
-- @tparam ?table A list of geometry tables.
|
|
|
|
-- @see current_widgets
|
|
|
|
|
|
|
|
function mouse.object.get_current_widget_geometries()
|
|
|
|
local _, ret = mouse.object.get_current_widgets()
|
|
|
|
|
|
|
|
return ret
|
|
|
|
end
|
|
|
|
|
2016-04-25 04:51:36 +02:00
|
|
|
--- True if the left mouse button is pressed.
|
|
|
|
-- @property is_left_mouse_button_pressed
|
|
|
|
-- @param boolean
|
|
|
|
|
|
|
|
--- True if the right mouse button is pressed.
|
|
|
|
-- @property is_right_mouse_button_pressed
|
|
|
|
-- @param boolean
|
|
|
|
|
|
|
|
--- True if the middle mouse button is pressed.
|
|
|
|
-- @property is_middle_mouse_button_pressed
|
|
|
|
-- @param boolean
|
|
|
|
|
|
|
|
for _, b in ipairs {"left", "right", "middle"} do
|
|
|
|
mouse.object["is_".. b .."_mouse_button_pressed"] = function()
|
|
|
|
return capi.mouse.coords().buttons[1]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-04-21 11:01:35 +02:00
|
|
|
capi.client.connect_signal("request::geometry", mouse.resize_handler)
|
|
|
|
|
2009-04-03 17:15:14 +02:00
|
|
|
-- Set the cursor at startup
|
|
|
|
capi.root.cursor("left_ptr")
|
|
|
|
|
2016-04-25 03:00:38 +02:00
|
|
|
-- Implement the custom property handler
|
|
|
|
local props = {}
|
|
|
|
|
|
|
|
capi.mouse.set_newindex_miss_handler(function(_,key,value)
|
|
|
|
if mouse.object["set_"..key] then
|
|
|
|
mouse.object["set_"..key](value)
|
2016-06-04 15:51:58 +02:00
|
|
|
elseif not mouse.object["get_"..key] then
|
2016-04-25 03:00:38 +02:00
|
|
|
props[key] = value
|
2016-06-04 15:51:58 +02:00
|
|
|
else
|
|
|
|
-- If there is a getter, but no setter, then the property is read-only
|
|
|
|
error("Cannot set '" .. tostring(key) .. " because it is read-only")
|
2016-04-25 03:00:38 +02:00
|
|
|
end
|
|
|
|
end)
|
|
|
|
|
|
|
|
capi.mouse.set_index_miss_handler(function(_,key)
|
|
|
|
if mouse.object["get_"..key] then
|
|
|
|
return mouse.object["get_"..key]()
|
|
|
|
else
|
|
|
|
return props[key]
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
|
2016-04-25 04:21:35 +02:00
|
|
|
--- Get or set the mouse coords.
|
|
|
|
--
|
|
|
|
--@DOC_awful_mouse_coords_EXAMPLE@
|
|
|
|
--
|
|
|
|
-- @tparam[opt=nil] table coords_table None or a table with x and y keys as mouse
|
|
|
|
-- coordinates.
|
|
|
|
-- @tparam[opt=nil] integer coords_table.x The mouse horizontal position
|
|
|
|
-- @tparam[opt=nil] integer coords_table.y The mouse vertical position
|
|
|
|
-- @tparam[opt=false] boolean silent Disable mouse::enter or mouse::leave events that
|
|
|
|
-- could be triggered by the pointer when moving.
|
|
|
|
-- @treturn integer table.x The horizontal position
|
|
|
|
-- @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
|
|
|
|
|
|
|
|
|
2012-06-14 01:33:27 +02:00
|
|
|
return mouse
|
|
|
|
|
2011-09-11 16:50:01 +02:00
|
|
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|