1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! 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.
pub use ;
pub use ;
use UiEvent;
/// Forward an OxiUI [`UiEvent`] to the iced backend.
///
/// # IME support (M4 — best-effort)
///
/// iced 0.14 does not expose a public API for injecting IME composition events
/// directly into a text-input widget. This function no-ops on IME events and
/// logs a debug message for diagnostics. Full IME support requires iced to
/// expose a `TextInput::ime_preedit` / `ime_commit` API, which is tracked as a
/// future enhancement.
///
/// All other event variants are silently ignored.