Files
sx/library/modules/platform
agra 327c8af9b7 platform: protocol skeleton (types + api, no backend yet)
First commit of the Phase 8 platform abstraction (see current/PLATFORM_PLAN.md):

- `library/modules/platform/types.sx` — `FrameContext` (viewport_w/h,
  pixel_w/h, dpi_scale, delta_time) and `KeyboardState` (visible, height
  + `zero()`). `EdgeInsets`/`Point`/`Size` and `Event` are reused from
  `modules/ui/types.sx` / `modules/ui/events.sx`.
- `library/modules/platform/api.sx` — `Platform :: protocol { init,
  run_frame_loop, poll_events, begin_frame, end_frame, safe_insets,
  keyboard, show_keyboard, hide_keyboard, shutdown }`. Protocol bodies
  omit `self` (matches the `View`/`Allocator` convention).
- `run_frame_loop` takes `Closure()` so backends own the run loop:
  SDL drives a `while !quit`, UIKit hands it to a `CADisplayLink` tick,
  Emscripten hands it to `emscripten_set_main_loop`.

No backend yet. Regression suite still 50/50; game build still green.
2026-05-17 14:39:08 +03:00
..