API Reference Plushie v#0.7.0

Copy Markdown View Source

Modules

Native desktop GUIs from Elixir, powered by iced.

Animation system for Plushie.

Easing function catalogue for animations and transitions.

Renderer-side sequential animation chain.

Renderer-side physics-based spring descriptor.

Renderer-side timed transition descriptor.

SDK-side stateful interpolator for model-level animation.

Behaviour for Plushie apps following the Elm architecture.

Runtime automation for Plushie apps.

Represents a widget element found in the UI tree during automation.

Parser for .plushie automation files.

Executes parsed .plushie automation files.

Pixel screenshot for automation and renderer inspection.

Selector helpers for automation against a normalized Plushie tree.

An automation client attached to a running Plushie app.

Resolves the path to the plushie binary.

Bridge to the plushie renderer process.

Angle type for canvas rotation and arc parameters.

Canvas circle element with center, radius, and optional styling.

Clip rectangle for canvas groups. Children are clipped to this region.

Dash pattern for canvas shape strokes.

Drag constraint bounds for interactive canvas shapes.

Behaviour for canvas elements.

Linear gradient descriptor usable as a canvas fill value.

Canvas group: a structural container for transforms, clips, and visual grouping.

Explicit hit test rectangle override for interactive canvas shapes.

Canvas raster image element with position, size, and optional rotation.

Interactive canvas element.

Canvas layer: a named container that groups shapes for independent caching on the renderer side.

Canvas line element between two points with optional stroke and opacity.

Canvas arbitrary path element built from a list of drawing commands.

Canvas rectangle element with position, size, and optional styling.

Pure builder functions returning typed canvas shape structs.

Style overrides for interactive canvas shape states (hover, pressed).

Canvas stroke descriptor with color, width, and optional cap/join/dash.

Canvas SVG element with position and size.

Canvas text element with position, content, and optional font styling.

Rotation transform for canvas groups. Stores degrees (wire protocol convention).

Scale transform for canvas groups.

Translation transform for canvas groups.

Commands describe side effects that update/2 wants the runtime to perform.

In-memory image commands: create, update, delete, list, and clear.

Scroll commands: absolute, relative, and snap positioning.

Text input commands: selection and cursor movement.

Window operation commands.

Window query commands. Results arrive as %Plushie.Event.SystemEvent{} in update/2.

Query pipeline for in-memory record collections. Pure functions supporting filter, search, sort, group, and pagination.

File watcher and recompiler for dev-mode live reload.

Native platform effect requests.

Typed results for platform effect responses.

The user dismissed a dialog.

Clipboard HTML was read. alt_text may be nil.

Clipboard text was read.

Clipboard write completed.

Multiple directories were selected from a multi-directory picker.

A directory was selected from a directory picker.

A platform error occurred. message is renderer-supplied.

A file was selected from an open-file dialog.

A file path was chosen in a save dialog.

Multiple files were selected from a multi-file open dialog.

An OS notification was shown.

The renderer restarted while this effect was in flight.

The effect did not receive a response within its timeout.

The backend does not support this effect.

Event types delivered to update/2.

Canonical event specs for all built-in widget event types.

Renderer error for a command.

Typed diagnostic variants emitted by the renderer.

A cross-widget a11y reference did not resolve to any declared widget.

A single wire message exceeded the protocol's 64 MiB per-message size cap.

A text-like content prop exceeded its per-widget byte cap and was truncated.

The leaked dash-segment cache reached its entry cap.

The runtime's command dispatch chain exceeded the configured depth limit, indicating an update loop that keeps returning a command whose delivered event produces another command.

A widget ID collided with one already declared within the same window scope.

The renderer-lib event coalesce map hit its cap and was force-flushed.

A view declared a widget with an empty ID where a non-empty one was expected.

The leaked font-family-name cache reached its entry cap.

Inline fonts declared in Settings exceeded the process-wide cap.

A font family from default_font or its fallback chain did not resolve.

The Settings payload failed typed deny_unknown_fields validation.

A widget that requires a screen-reader-announcable name was declared without one.

The tree holds more than one top-level window child.

A numeric prop was outside its declared range and was clamped.

A prop value had an unexpected JSON type.

A widget carried a prop name not in its declared schema.

The Settings handshake declared native widget names the renderer does not know about.

SVG decode exceeded its wall-clock budget.

SVG decode returned a parse error.

Duplicate-ID collection stopped at the configured cap.

Tree traversal reached the global depth cap; the subtree was skipped.

A wire message carried a type field the SDK does not recognise.

A subscription was declared for a window not present in the tree.

A widget placeholder in the tree had no registered expander.

The update function panicked and was caught by the runtime. The model is reverted to the last-good snapshot so the app keeps running; the consecutive counter is shared with ViewPanicked so the frozen-UI overlay surfaces after enough total panics across either callback.

The view function panicked and was caught by the runtime's safety net.

A user-authored widget ID violated the canonical ID ruleset.

A composite widget ID was registered against two different widget types.

A non-trusted widget panicked inside the registry's catch_unwind firewall.

A structured diagnostic delivered through the renderer's diagnostic wire channel.

Platform effect responses (file dialogs, clipboard, notifications).

Input Method Editor events from subscriptions.

Keyboard press and release events.

Keyboard modifier state change event.

Intermediate values from Plushie.Command.stream/2 tasks.

System query responses and platform events.

Events from interactive widgets (buttons, inputs, sliders, etc.).

Window lifecycle events.

Keyboard modifier state at the time of a key event.

Wire protocol between the Elixir runtime and the Rust renderer.

Wire protocol decoding.

Raised when the renderer sends a protocol message the SDK considers invalid.

Named keyboard key mappings and validation.

Raised when the renderer's advertised protocol version differs from the version the SDK was built against.

Builds a safe, whitelisted environment for the renderer binary.

Structured renderer exit reason for handle_renderer_exit/2.

Client-side routing for multi-view apps. Pure data structure maintaining a navigation stack of {path, params} entries.

Core lifecycle GenServer for Plushie applications.

Command execution engine for the Plushie runtime.

Subscription lifecycle management for the Plushie runtime.

Runtime support for widget handler event dispatch and state management.

Window lifecycle management for the Plushie runtime.

Structured representation of a scoped widget ID.

Selection state for lists and tables. Pure data structure supporting single, multi, and range selection modes.

Path-based state management with revision tracking and transactions.

Declarative subscription specifications for Plushie apps.

Behaviour for table structural elements.

A row inside a table widget.

Test helpers for Plushie applications.

Test backend that starts a real Plushie app (Runtime + Bridge).

ExUnit case template for testing Plushie apps.

Test helper functions imported by Plushie.Test.Case.

Iostream adapter that connects a Bridge to one SessionPool session.

Test helpers for screenshot golden-file assertions.

A test session wrapping a running Plushie app.

Session manager for concurrent test renderer sessions.

State and business logic for the shared-renderer session pool modes.

State and business logic for the :windowed session pool mode.

Structural tree hash and golden-file assertions for tests.

ExUnit case template for testing stateful widgets.

Behaviour for renderer transport backends.

Raised when a single wire frame exceeds the protocol's per-message size cap (64 MiB).

Frame encoding and decoding for the plushie wire protocol.

Transport implementation for iostream adapter connections.

Transport implementation for Erlang Port-based connections.

Utilities for working with Plushie UI trees.

Protocol for converting typed structs to ui_node() maps.

Types for widget fields and events.

Accessibility annotation type for widget nodes.

Alignment values for align_x and align_y widget props.

Anchor values for the scrollbar alignment prop.

Accepts any value without validation. No guard is generated.

Atom type. Accepts any atom (including nil).

Boolean type. Accepts true and false only.

Border specification for container and widget styling.

Color type for iced widget properties.

Behaviour for composite type modules.

Composite type for a fixed set of values.

Composite type for typed lists.

Composite type for typed maps.

Composite type for fixed-size typed tuples.

Composite type for unions.

Scaling mode for the content_fit prop on image and SVG widgets.

Orientation for the scrollable direction prop and rule widget.

Interpolation mode for the image filter_method prop.

Numeric type. Accepts both integers and floats (any number()).

Font specification with family, weight, style, and stretch.

Gradient type for container and style backgrounds.

Integer type. Accepts Elixir integers only.

Event field type for keyboard key names.

Event field type for keyboard modifier state.

Size value for the width and height props on most widgets.

Line height for text widgets.

Untyped map. Accepts any map without validating keys or values.

Event field type for mouse buttons.

Padding specification with per-side values.

Event field types for unified pointer events.

Placement value for the tooltip position prop.

Validates {min, max} numeric range tuples.

Shadow type for widget styling.

Text shaping strategy for the text shaping prop.

String type. Accepts binaries and atoms (atoms are coerced to strings via Atom.to_string/1).

Union type for widget styling: a preset atom or a StyleMap struct.

Per-instance widget styling that crosses the IPC boundary as a plain map.

Built-in iced themes and custom palette support.

Line-break strategy for the text wrapping prop.

Ergonomic builder layer for Plushie UI trees.

Macro for creating widget set modules that override built-in widget macros.

Undo/redo stack for reversible commands. Pure data structure, no processes.

Macro-based DSL for declaring Plushie widgets.

Internal helpers for widget to_node/1 implementations.

Button, clickable widget that emits %WidgetEvent{type: :click} events.

Canvas for drawing shapes, organized into named layers.

Checkbox, toggleable boolean input.

Column layout, arranges children vertically.

Combo box, searchable dropdown with free-form text input.

Container layout, wraps a single child with padding, sizing, and styling.

Floating overlay, positions child with optional translation and scaling.

Grid layout, arranges children in a fixed-column grid.

Runtime support for stateful widgets.

Image display, renders a raster image from a file path or an in-memory handle.

Keyed column layout, arranges children vertically with stable identity keys.

Markdown display, renders parsed markdown content.

Overlay container, positions the second child as a floating overlay relative to the first child (anchor).

Pane grid, resizable tiled panes.

Pick list, dropdown selection.

Pin layout, positions child at absolute coordinates.

Pointer area, captures mouse events on child content.

Progress bar, displays progress within a range.

QR Code, renders a QR code from a data string.

Radio button, one-of-many selection.

Responsive layout, adapts to available size by reporting resize events.

Rich text display with individually styled spans.

Row layout, arranges children horizontally.

Horizontal or vertical rule (divider line).

Scrollable container, wraps child content in a scrollable viewport.

Sensor, detects visibility and size changes on child content.

Slider, horizontal range input.

Empty space, invisible spacer widget.

Stack layout, layers children on top of each other.

SVG display, renders a vector image from a file path.

Data table with children-based rows for efficient diffing.

Text display, renders static text.

Text editor, multi-line editable text area.

Text input field, single-line editable text.

Per-subtree theme override, applies a different theme to a single child widget.

Toggler, on/off switch.

Tooltip, shows a popup tip over child content on hover.

Vertical slider, vertical range input.

Top-level window container node.

Discovers widgets via Plushie.Widget protocol consolidation.

Mix Tasks

Mix compiler that checks for the plushie binary.

Build the plushie renderer binary and/or WASM renderer from source.

Runs a Plushie application that connects to an already-listening renderer via a Unix domain socket or TCP port.

Download precompiled plushie artifacts for the current platform.

Starts a Plushie GUI application.

Inspect a Plushie app's UI tree.

Replay a .plushie automation file with real timing and windows.

Run .plushie automation files.

Runs all CI checks locally. Exits with a non-zero status on first failure.