refactor(gui): drop setFullscreen now that chrome is a Lua node

Fullscreen was the firmware surrendering a strip it clipped apps out of.
The strip is a sibling node now, so an app that wants the panel is chrome
choosing not to build itself.
This commit is contained in:
2026-08-04 20:58:56 -04:00
parent 2fc3abc487
commit 25b576a3d9
5 changed files with 3 additions and 23 deletions
-4
View File
@@ -107,10 +107,6 @@ function gui.fillCircle(x, y, radius, color, background) end
---@param border? GuiColor Omitted for no border.
function gui.roundRect(x, y, w, h, radius, background, top, bottom, border) end
---Temporarily gives the app the full panel, including firmware chrome.
---@param on boolean
function gui.setFullscreen(on) end
---Fills a polygon.
---@param xs integer[]
---@param ys integer[]
-3
View File
@@ -136,9 +136,6 @@ public:
virtual void roundRect(int32_t x, int32_t y, int32_t w, int32_t h,
int32_t radius, int32_t background, const int32_t* top,
const int32_t* bottom, const int32_t* border) = 0;
// Hands the app the whole panel, including whatever chrome the firmware
// paints.
virtual void setFullscreen(bool on) = 0;
// Applies everything drawn since the last commit. The runtime supplies only
// the timing -- the end of a callback batch -- because that is the one fact a
// driver cannot know; which region to touch, which waveform, and whether to
-9
View File
@@ -125,12 +125,6 @@ int roundRect(lua_State* state) {
return 0;
}
int setFullscreen(lua_State* state) {
luaL_checkany(state, 1);
provider(state).setFullscreen(lua_toboolean(state, 1) != 0);
return 0;
}
void readIntegers(lua_State* state, int index, std::vector<int32_t>& out) {
const lua_Integer count = luaL_len(state, index);
for (lua_Integer at = 1; at <= count; at++) {
@@ -291,9 +285,6 @@ const luaL_Reg FUNCTIONS[] = {
// without a gradient use top.
// @param border GuiColor|nil Omitted for no border.
{"roundRect", roundRect},
// ---Temporarily gives the app the full panel, including firmware chrome.
// @param on boolean
{"setFullscreen", setFullscreen},
// --- Fills a polygon.
// @param xs integer[]
// @param ys integer[]
-2
View File
@@ -154,7 +154,6 @@ struct Fs : FsProvider {
struct Gui : GuiProvider {
std::string trace;
int32_t degrees = 0;
bool fullscreen = false;
bool gradient = false;
FontIds fonts() const override {
@@ -195,7 +194,6 @@ struct Gui : GuiProvider {
trace += border ? ",border" : ",-";
trace += ");";
}
void setFullscreen(bool on) override { fullscreen = on; }
// Stands in for an e-ink panel, where a second commit is a second visible
// refresh.
void commit() override { commits++; }
+3 -5
View File
@@ -129,12 +129,10 @@ int main() {
"'confirm')");
assert(bench.touch.calibration[3] == 400);
// Chrome control and gradients are core: an e-ink provider flattens what it
// cannot show.
run(state, "gui.setFullscreen(true)\n"
"gui.roundRect(0, 0, 10, 10, 4, 0, 0xFF, 0x00)\n"
// Gradients are core: an e-ink provider flattens what it cannot show.
run(state, "gui.roundRect(0, 0, 10, 10, 4, 0, 0xFF, 0x00)\n"
"gui.roundRect(0, 0, 10, 10, 4, 0, nil, nil, 0xFF)");
assert(bench.gui.fullscreen && bench.gui.gradient);
assert(bench.gui.gradient);
assert(bench.gui.trace.find("roundRect(-,border);") != std::string::npos);
bench.gui.trace.clear();