Tryst::UI::AppContract
The exact subset of Tryst::App's surface Realizer (and, later,
Handle) actually calls - a real interface type, not just
documentation: Realizer holds its app as @app : AppContract,
dispatched dynamically to whatever concrete class is actually
given, so a plain recorder (FakeApp, spec/support/fake_app.cr) can
stand in for a real Tryst::App with zero Tk interpreter involved.
Included by both the real Tryst::App (reopened below) and FakeApp.
Crystal statically enforces that every class including a module implements each abstract def with a compatible parameter/splat/ keyword shape - a missing *subs, a renamed required keyword arg, or a dropped method all fail to compile. If Tryst::App's real methods ever drift from what FakeApp implements, THIS FILE stops compiling - on every build, not just when a dedicated test file happens to run.
Return types are deliberately left off every abstract def here, matching ruby's own check (which only ever compares keyword_names/ positional_shape, never return values) - Fake classes legitimately return Fake-shaped objects (FakeWindow) instead of the real Tk-backed ones, and Crystal's return-type conformance requires an exact/subtype match, which would make that impossible.