Skip to main content

Crate oxiui_iced

Crate oxiui_iced 

Source
Expand description

iced backend adapter for OxiUI.

Bridges OxiUI’s UiCtx trait (immediate-mode) to iced’s retained-mode widget tree (best-effort mapping at M2).

§Architecture note

iced is a retained-mode framework (Elm-style update/view loop), whereas OxiUI’s UiCtx is immediate-mode (per-frame closure). IcedUiCtx bridges the gap by collecting widget operations from a content closure and building an iced Column from the collected elements. The mapping is one-way and best-effort at M2; M3 wired the full message round-trip.

§IME CJK note (M4)

iced 0.14 does not expose a public per-widget IME injection API at the level of UiEvent. IME events are surfaced as UiEvent::ImePreedit / UiEvent::ImeCommit through the oxiui-core event sink, but no direct iced widget action is generated for them at this milestone. See forward_ime_event for the stub that documents the gap.

Re-exports§

pub use adapter::apply_message;
pub use adapter::map_iced_key;
pub use adapter::map_iced_keyboard_event;
pub use adapter::map_iced_modifiers;
pub use adapter::oxi_widget;
pub use adapter::spec_fingerprint;
pub use adapter::IcedConfig;
pub use adapter::IcedNullCtx;
pub use adapter::IcedSpan;
pub use adapter::IcedUiCtx;
pub use adapter::Message;
pub use adapter::OxiIcedWidget;
pub use adapter::SpecCache;
pub use adapter::ThemeCache;
pub use adapter::WidgetSpec;
pub use adapter::WidgetState;
pub use theme::palette_and_tokens_to_iced_theme;
pub use theme::palette_to_iced_theme;
pub use theme::palette_to_iced_theme_ext;
pub use theme::scrollable_style_from_palette;
pub use theme::scrollable_style_from_theme;
pub use theme::text_input_style_from_palette;
pub use theme::text_input_style_from_theme;
pub use theme::DesignTokensAdapter;

Modules§

adapter
iced application adapter for OxiUI.
theme
COOLJAPAN palette → iced theme conversion.

Functions§

forward_ime_event
Forward an OxiUI UiEvent to the iced backend.