53 lines
1.4 KiB
Lua
53 lines
1.4 KiB
Lua
---@meta
|
|
|
|
-- Generated from native/src/bindings/features/touch.cpp. Do not edit.
|
|
|
|
---@class SettingsLib
|
|
settings = settings or {}
|
|
|
|
---Persists the panel's touch calibration.
|
|
---@param x0 integer Raw reading at the left edge.
|
|
---@param y0 integer Raw reading at the top edge.
|
|
---@param x1 integer Raw reading at the right edge.
|
|
---@param y1 integer Raw reading at the bottom edge.
|
|
---@return true? ok
|
|
---@return string? error
|
|
function settings.setCalibration(x0, y0, x1, y1) end
|
|
|
|
---@class InputLib
|
|
input = input or {}
|
|
|
|
---Returns the calibrated touch point, or nothing when the panel is not touched.
|
|
---@return integer? x
|
|
---@return integer? y
|
|
function input.getTouch() end
|
|
|
|
---Returns the uncalibrated touch reading, or nothing when the panel is not touched.
|
|
---@return integer? x
|
|
---@return integer? y
|
|
function input.getRawTouch() end
|
|
|
|
---Whether the panel is currently touched.
|
|
---@return boolean
|
|
function input.isTouched() end
|
|
|
|
---Fired when the finger lands.
|
|
---@param x integer
|
|
---@param y integer
|
|
function on_touch_down(x, y) end
|
|
|
|
---Fired when the finger moves while down, after the firmware's jitter filter.
|
|
---@param x integer
|
|
---@param y integer
|
|
function on_touch_move(x, y) end
|
|
|
|
---Fired when the finger lifts.
|
|
---@param x integer
|
|
---@param y integer
|
|
function on_touch_up(x, y) end
|
|
|
|
---Tap alias, fired on release like a click, after on_touch_up.
|
|
---@param x integer
|
|
---@param y integer
|
|
function on_touch(x, y) end
|