initial commit

This commit is contained in:
2026-08-03 16:09:07 -04:00
commit 95fa512047
109 changed files with 35023 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
---@meta
-- Generated from native/src/bindings/features/buttons.cpp. Do not edit.
---@alias Button "up"|"down"|"left"|"right"|"confirm"|"back"
-- Roles, not physical buttons: a device maps whatever hardware it has onto them, and
-- up/down/left/right are the directions node.moveFocus already takes.
---@class InputLib
input = input or {}
---Returns the roles this device reports, so an app can label only the actions it has.
---@return Button[]
function input.getButtons() end
---Whether any button is held.
---@return boolean
function input.isAnyPressed() end
---Whether a button is held.
---@param button Button
---@return boolean
function input.isPressed(button) end
---Whether a button went down since the last poll.
---@param button Button
---@return boolean
function input.wasPressed(button) end
---Whether a button came up since the last poll.
---@param button Button
---@return boolean
function input.wasReleased(button) end
---Fired when a button goes down.
---@param button Button
function on_button_down(button) end
---Fired when a button comes up.
---@param button Button
function on_button_up(button) end
---Tap alias, fired on release like a click, after on_button_up.
---@param button Button
function on_button(button) end
+52
View File
@@ -0,0 +1,52 @@
---@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