truce-gui-types
Lightweight GUI types for the truce audio plugin framework.
Overview
truce-gui-types carries the trait + data surface that GUI
backends build on - GridLayout, RenderBackend (the trait -
not its impl), WidgetType, WidgetRegion, InteractionState,
Theme / Color, ParamSnapshot, the grid! and layout!
macros. Crates that only need to describe layouts and react
to platform-translated input events depend on this crate; the
heavy machinery (tiny-skia rasterisation, baseview windowing,
truce-font / fontdue) stays in the renderer crates (truce-cpu,
truce-gpu) and truce-gui.
Crate split
truce-core ← AudioBuffer, Editor trait, EventList, ...
↓
truce-gui-types ← this crate - light data + traits
↓
truce-plugin ← PluginLogic / PluginLogic64 / PluginLogicCore
↓ ↘
truce-gui truce-egui / truce-iced / truce-slint ← alt GUI backends
(BuiltinEditor, each depends on truce-gui-types but not truce-gui
baseview)
↓ ↘
truce-cpu truce-gpu ← RenderBackend impls, pulled by truce-gui's
(tiny-skia, (wgpu) cpu (default) / gpu features
fontdue)
A slint-only plugin's dep tree contains truce-plugin → truce-gui-types → truce-core - tiny-skia, baseview,
fontdue, truce-font don't appear unless the plugin also
depends on truce-gui.
Key types
GridLayout/PluginLayout- declarative widget layoutsRenderBackend- trait the renderer backends implement (theCpuBackendintruce-cpuis one impl;truce_gpu::WgpuBackendis another)WidgetType/WidgetKind/WidgetRegion- widget enumeration + hit-test regionsInteractionState/InputEvent- input dispatch primitives (theBaseviewTranslatorthat maps baseview events into these lives intruce-gui)Theme/Color- visual theme (tiny-skia conversions live onColorExtintruce-cpu)ParamSnapshot- per-frame view of params for widget code
Macros
layout!- declarative DSL forPluginLayoutgrid!- declarative DSL forGridLayout