Skip to main content

Crate plushie_widget_sdk

Crate plushie_widget_sdk 

Source
Expand description

§plushie-widget-sdk

The public SDK for plushie. Widget authors depend on this crate to implement the PlushieWidget trait and build custom native widgets. The prelude module re-exports everything a widget author needs; iced is re-exported so widgets don’t need a direct iced dependency.

Beyond the public widget-author surface, this crate also re-exports the widget infrastructure that the renderer crates and the Rust SDK direct-mode runner need internally. Those re-exports live in runtime and are not part of the widget-author API.

§Dependencies

Widget crates need both plushie-widget-sdk and plushie-core as direct dependencies. The widget derive macros (#[derive(WidgetEvent)], #[derive(WidgetCommand)], #[derive(WidgetProps)], #[derive(PlushieWidget)]) emit code that references ::plushie_core::* paths.

§iced stability

iced is re-exported as a transitive dependency. iced surfaces may change on any plushie minor release. For stable semantics, prefer prelude names and iced_convert conversions; reach into plushie_widget_sdk::iced::* only for iced-specific constructs that are not in the prelude.

§Module guide

Widget-author API:

Renderer-internal support API:

The renderer state engine, retained tree, and wire codec live in the sibling crate plushie-renderer-engine; widget authors do not depend on it.

Private implementation modules: message, widget, and theming

Re-exports§

pub use iced;

Modules§

animation
Animation system: renderer-side transitions, springs, sequences, and exit ghosts.
app
Application builder for registering widgets.
canvas_engine
Reusable canvas rendering engine for PlushieWidget composition.
diagnostics
Re-export of plushie_core::diagnostics for convenience so widget crates that already depend on plushie-widget-sdk don’t need a second direct dep on plushie-core just for diagnostic emission. Diagnostic emission hook.
fonts
Loaded-font registry.
iced_convert
Conversion layer from plushie-core types to iced types.
image_registry
In-memory image handle storage.
prelude
Common re-exports for widget authors.
prop_helpers
Public prop extraction helpers for widget authors.
protocol
Wire protocol types for host-renderer communication.
registry
Unified widget dispatch: PlushieWidget trait, WidgetRegistry, WidgetSet.
render_ctx
Core rendering context passed through the widget dispatch pipeline.
runtime
Renderer-internal support surface.
shared_state
Shared renderer state and cross-cutting cache management.
testing
Test factory helpers for widget authors.

Constants§

BUILTIN_TYPE_NAMES
Sorted list of every built-in widget type name reserved by the stock renderer’s iced widget set.

Traits§

PlushieRenderer
Trait alias for renderer types that can be used with the plushie widget pipeline.

Type Aliases§

PlushieElement
Convenience alias for the Element type returned by PlushieWidget::render.

Derive Macros§

PlushieWidget
Generate type_names and fresh_for_session for a PlushieWidget impl, and re-declare the impl block with those methods injected.
WidgetCommand
Typed command declarations for widget operations.
WidgetEvent
Typed event declarations for composite widgets.
WidgetProps
Define your widget’s properties and get typed extraction.