Expand description
Backend trait definitions for compositors, input, and capture.
Structs§
- Pipe
Wire Stream - A live PipeWire stream the backend is keeping open on behalf of a caller.
Callers must explicitly call
CaptureBackend::stop_stream— dropping does not stop the stream. - Stream
Token - Backend-private state attached to a
PipeWireStream.
Enums§
- Pointer
Axis - Direction of a discrete (notched) pointer-wheel scroll.
- Pointer
Button - Pointer button.
Traits§
- Capture
Backend - Screen capture. Backends either return a PipeWire node id (the common path
on mutter/KWin) that the default
take_screenshotpipes through GStreamer, or overridetake_screenshotdirectly if they can produce a PNG without PipeWire (e.g. a future wlr-screencopy backend). - Compositor
Runtime - Lifecycle of a headless compositor instance. A backend owns its compositor’s child processes (the compositor binary itself plus any supporting daemons like pipewire) and exposes the Wayland display name and runtime dir that client applications and sibling backends use.
- Input
Backend - Keyboard and pointer injection. Decoupled from the compositor trait so alternative implementations (e.g. libei) can drive the same compositor alongside a mutter/KWin/wlroots backend.
Functions§
- cancellable_
tail - Sleep up to
dur, waking immediately ifcanceltrips. Returns unconditionally — the sleep is a courtesy throttle, not a critical section, so callers don’t distinguish “slept full time” from “cancel cut the sleep short.” Use for post-event tail delays in input backends; usetokio::select+ an explicitErr(crate::Error::Cancelled)arm when cancelling must propagate.