Files
esp32-lua-api/lua/api/core/sys.lua
T

65 lines
2.0 KiB
Lua

---@meta
-- Generated from native/src/bindings/core/sys.cpp. Do not edit.
---@alias Feature "touch"|"buttons"
---@class SysLib
sys = {}
---Returns the implemented API contract version.
---@return integer
function sys.getAPIVersion() end
---Whether the firmware implements a complete optional feature contract.
---@param feature Feature
---@return boolean
function sys.hasFeature(feature) end
---Returns monotonic milliseconds since boot.
---@return integer
function sys.getMillis() end
---Returns the immutable first path component of the running app.
---@return string
function sys.getAppID() end
---Returns the running app title, initially the app ID.
---@return string
function sys.getAppTitle() end
---Returns the current app's guaranteed-existing persistent data directory.
---@return string Absolute path under /.lua/data, preserved across app updates.
function sys.getAppDataPath() end
---Changes the running app's display title.
---@param title string
function sys.setAppTitle(title) end
---Launches a route, which main.lua resolves, and pushes the current one.
---@param path string App-relative route; traversal is rejected.
---@param arg? string Passed to main.start(route, arg).
function sys.launch(path, arg) end
---Launches a route without retaining the current one.
---@param path string App-relative route; traversal is rejected.
---@param arg? string Passed to main.start(route, arg).
function sys.replace(path, arg) end
---Returns to the previous app, or the launcher when history is empty.
function sys.back() end
---Whether sys.back() would return somewhere rather than land on the launcher, which is what chrome needs to decide whether to offer a back control.
---@return boolean
function sys.canGoBack() end
---Returns heap statistics.
---@return integer freeBytes
---@return integer totalBytes
---@return integer largestFreeBlock
function sys.getMemory() end
---Whether network time synchronization has completed.
---@return boolean
function sys.isClockSynced() end