feat(k-ui): text_input (label above, app owns text via on_change, caret, erase, submit, secret, placeholder); keys Left/Right/Space/Char/Erase; settings app filter; apps 8-page stack (k-ui overflowed 16K), args page -> 0x1000

This commit is contained in:
2026-10-28 13:48:08 +01:00
parent 2b82f052ae
commit e952a149ec
12 changed files with 322 additions and 44 deletions

View File

@@ -10,8 +10,11 @@ const PAGE_SIZE: usize = 4096;
const USER_CODE_BASE: usize = 0x10000;
/// A program's stack, below its image, unless its manifest says more.
pub(crate) const STACK_PAGES: usize = 4;
/// The most there is room for under the image (page 0 stays unmapped).
const MAX_STACK_PAGES: usize = USER_CODE_BASE / PAGE_SIZE - 1;
/// An app's: drawing (tiny-skia, fontdue) takes more than 16 KiB.
pub(crate) const APP_STACK_PAGES: usize = 8;
/// The most there is room for under the image, above the arguments page
/// (page 0 stays unmapped).
const MAX_STACK_PAGES: usize = (USER_CODE_BASE - types::start_arg::ARGS_VA) / PAGE_SIZE - 1;
const CREATE_CAP: CapSlot = CapSlot::const_new(0);
/// Where a program file is read through on its way into a process, a
/// chunk at a time, so a program may be any size.