Files
chandra/wit/compositor/surface.wit
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

38 lines
1.0 KiB
Plaintext

package chandra:compositor@0.2.0;
interface surface {
use chandra:desktop/types@0.1.0.{size, rect, draw-op};
/// Unforgeable host handle to a committed client buffer (SHM or DMA-BUF).
/// Components cannot read pixels; they can only inspect metadata and
/// reference the handle in a `draw-surface` op.
resource buffer-surface {
id: func() -> u64;
size: func() -> size;
/// True if the buffer contains an alpha channel requiring blending.
has-alpha: func() -> bool;
}
record surface-draw {
surface: borrow<buffer-surface>,
dst: rect,
src: option<rect>,
radius: u32,
}
/// Extended render-list op for compositing foreign surfaces & cached layers.
variant composite-op {
draw(draw-op),
draw-surface(surface-draw),
push-opacity(u8),
pop-opacity,
}
/// Revision-keyed display list to avoid copying unchanged draw-ops across WIT.
record render-frame {
revision: u64,
/// `none` means identical to `revision` — host reuses cached display list.
ops: option<list<draw-op>>,
}
}