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:
@@ -4,7 +4,7 @@ CC ?= cc
|
||||
CXX ?= c++
|
||||
AR ?= ar
|
||||
|
||||
CONTRACTS := $(sort $(wildcard lua/api/core/*.lua lua/api/features/*.lua))
|
||||
CONTRACTS := $(sort $(wildcard lua/api/core/*.lua lua/api/features/*.lua lua/api/features/*/*.lua))
|
||||
LUA_C := $(sort $(wildcard native/src/vendor/lua/*.c))
|
||||
LUA_OBJECTS := $(patsubst native/src/vendor/lua/%.c,_build/lua/%.o,$(LUA_C))
|
||||
LUA_LIBRARY := _build/liblua.a
|
||||
@@ -12,7 +12,7 @@ LUA_SMOKE := _build/lua-smoke
|
||||
RUNTIME_TEST := _build/runtime-test
|
||||
LUAC32 := _build/luac32
|
||||
RUNTIME_CPP := $(sort $(wildcard native/src/runtime/*.cpp native/src/bindings/core/*.cpp \
|
||||
native/src/bindings/features/*.cpp) native/src/embedded_modules.cpp)
|
||||
native/src/bindings/features/*.cpp native/src/bindings/features/*/*.cpp) native/src/embedded_modules.cpp)
|
||||
|
||||
.PHONY: api test embed compiledb format
|
||||
|
||||
|
||||
Reference in New Issue
Block a user