Public Access
Add widget kit, input layer with Compose Key, Launcher and demo apps
Steps 5 and 6 of M0. - lib/ui (host-tested): ListModel, LineEditor (UTF-8, byte-limited), wrapText, ToastQueue, DialogModel - lib/input (host-tested): KeyMapper turns keyboard state into logical keys (Fn arrows, ` Back, Fn+` Home) and composes accents with opt - src/ui: off-screen 16-bit frame pushed in one transfer (fixes the flicker), Status Bar, list, text, line editor, dialog, Toast widgets, Notifier (Toast + beep + LED), vendored public-domain Latin-1 fonts - Apps: minimal Launcher, Widget demo, Diagnostics (SD erase now behind a confirmation dialog) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
@@ -18,7 +18,9 @@ struct FakeApp : App {
|
||||
keys.push_back(e);
|
||||
return handles;
|
||||
}
|
||||
void update(uint32_t nowMs) override { lastUpdate = nowMs; }
|
||||
void draw(Canvas&) override {}
|
||||
uint32_t lastUpdate = 0;
|
||||
std::vector<KeyEvent> keys;
|
||||
bool handles = false;
|
||||
|
||||
@@ -145,6 +147,14 @@ void test_app_can_request_its_own_redraw() {
|
||||
TEST_ASSERT_FALSE(f.manager.takeRedraw());
|
||||
}
|
||||
|
||||
void test_update_reaches_only_the_foreground_app() {
|
||||
Fixture f;
|
||||
f.manager.open("notes");
|
||||
f.manager.update(42);
|
||||
TEST_ASSERT_EQUAL(42, f.notes.lastUpdate);
|
||||
TEST_ASSERT_EQUAL(0, f.launcher.lastUpdate);
|
||||
}
|
||||
|
||||
int main() {
|
||||
UNITY_BEGIN();
|
||||
RUN_TEST(test_launcher_is_in_foreground_after_begin);
|
||||
@@ -159,5 +169,6 @@ int main() {
|
||||
RUN_TEST(test_visible_apps_exclude_hidden_ones_and_keep_registration_order);
|
||||
RUN_TEST(test_switching_apps_requests_a_redraw);
|
||||
RUN_TEST(test_app_can_request_its_own_redraw);
|
||||
RUN_TEST(test_update_reaches_only_the_foreground_app);
|
||||
return UNITY_END();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user