WIT package, MoonBit components, Node host and tests (WIP)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
SpriteandClaude Sonnet 5.5 committed 2026-11-24 23:36:35 +00:00
1 parent e5548fc067
commit e0bde1d150
125 files changed
+8681

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
package moonplasma:desktop@0.1.0;
/// Panel layout/chrome contract (the plasmashell "containment" analogue).
interface panel-layout {
use types.{size, rect, draw-op};
enum edge { start, end }
record slot {
id: string,
preferred: size,
min-width: u32,
stretch: bool,
/// Which end of the panel the widget packs towards.
align: edge,
}
record placement { id: string, rect: rect }
record layout {
panel: rect,
placements: list<placement>,
}
/// Decide where the panel sits and where each widget goes.
compute-layout: func(screen: size, slots: list<slot>) -> layout;
/// Panel background/frame (drawn beneath the widgets), in screen coords.
render-panel: func(screen: size, panel: rect) -> list<draw-op>;
/// Place a popup of `popup` size for the widget at `anchor`.
popup-position: func(screen: size, panel: rect, anchor: rect, popup: size) -> rect;
}
/// Desktop surface contract (wallpaper / desktop containment).
interface desktop-surface {
use types.{size, draw-op};
render-background: func(screen: size) -> list<draw-op>;
}