refactor(api)!: one namespace per feature, screen split out
Namespaces were shared across features: `settings` was written by core, the
panel and touch, and `input` by touch and buttons. That made "does this
firmware implement the whole feature?" a question no pointer could answer.
Each namespace now belongs to exactly one feature or to core, so a feature is
a provider pointer and the compiler validates completeness:
gui, node -> screen, tree, under the screen feature
settings -> screen (rotation, theme), sys (timezone),
touch (calibration)
input -> touch, buttons
Runtime::open() no longer requires a GuiProvider; a firmware without one runs
with no screen/tree globals and reports sys.hasFeature("screen") false.
Rotation is one value again: GuiProvider::setRotation applies and persists, so
an app rotating the panel transiently puts the old value back itself.
This commit is contained in:
+11
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
-- Generated from native/src/bindings/core/sys.cpp. Do not edit.
|
||||
|
||||
---@alias Feature "touch"|"buttons"
|
||||
---@alias Feature "screen"|"touch"|"buttons"
|
||||
|
||||
---@class SysLib
|
||||
sys = {}
|
||||
@@ -62,3 +62,13 @@ function sys.getMemory() end
|
||||
---Whether network time synchronization has completed.
|
||||
---@return boolean
|
||||
function sys.isClockSynced() end
|
||||
|
||||
---Returns the active POSIX timezone rule.
|
||||
---@return string
|
||||
function sys.getTimezone() end
|
||||
|
||||
---Applies and persists a POSIX timezone rule.
|
||||
---@param timezone string
|
||||
---@return true? ok
|
||||
---@return string? error
|
||||
function sys.setTimezone(timezone) end
|
||||
|
||||
Reference in New Issue
Block a user