Files
chandra/wit/plasmoid.wit
T
VandClaude Opus 5.5 af774d76fe
CI / test (push) Failing after 16s
Rename the project to Chandra
moon-plasma / moonplasma / MoonPlasma / Moon Plasma become chandra / Chandra
everywhere: the WIT package (chandra:desktop, chandra:host, chandra:wm), the
MoonBit module (chandra/desktop) and generated bindings, the Rust host,
identifiers (ChandraCompositor), the session script (chandra-session) and
desktop entry (chandra.desktop), config and data paths
($XDG_CONFIG_HOME/chandra, share/chandra/modules), env vars (CHANDRA_*),
UI strings, docs and tests. The test fixture components are rebuilt against
the renamed WIT.

Saved panel.edn and state.edn are still read from the old
$XDG_CONFIG_HOME/moon-plasma until the first save writes the new copy.

The remote repository keeps its experiments/moon-plasma name for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hi3L9oVBoRd373Qr4n
2026-11-25 17:12:57 +00:00

32 lines
887 B
Plaintext

package chandra:desktop@0.1.0;
/// The widget (plasmoid) contract.
interface plasmoid {
use types.{size, draw-op, input-event};
record plasmoid-info {
/// Stable machine id, e.g. "org.chandra.clock.digital".
id: string,
name: string,
preferred: size,
min-width: u32,
/// Whether the panel may grow this widget beyond `preferred`.
stretch: bool,
}
record popup-surface {
size: size,
ops: list<draw-op>,
}
enum surface { widget, popup }
info: func() -> plasmoid-info;
/// Draw the widget into a `size` box (local coordinates).
render: func(size: size) -> list<draw-op>;
/// Present when the widget wants a popup surface (e.g. a launcher menu).
popup: func() -> option<popup-surface>;
/// Returns true when the widget's visuals changed and a redraw is needed.
on-event: func(target: surface, event: input-event) -> bool;
}