pub struct WindowTextInputSnapshot {
pub focus_is_text_input: bool,
pub is_composing: bool,
pub text_len_utf16: u32,
pub selection_utf16: Option<(u32, u32)>,
pub marked_utf16: Option<(u32, u32)>,
pub ime_cursor_area: Option<Rect>,
pub surrounding_text: Option<WindowImeSurroundingText>,
}Expand description
Window-scoped platform text-input snapshots published by the UI runtime.
This is a data-only integration seam for platform/runner layers that need to interop with editor-grade text input (IME, accessibility).
Indices are expressed in UTF-16 code units over the widget’s composed view: base buffer text with the active IME preedit spliced at the caret.
Fields§
§focus_is_text_input: bool§is_composing: bool§text_len_utf16: u32Total length (UTF-16 code units) of the composed view.
selection_utf16: Option<(u32, u32)>Anchor/focus selection offsets in UTF-16 code units (composed view).
marked_utf16: Option<(u32, u32)>Marked (preedit) range in UTF-16 code units (composed view).
ime_cursor_area: Option<Rect>Best-effort IME cursor area in window logical coordinates.
On Windows/winit this is the primary hook for positioning the candidate window.
surrounding_text: Option<WindowImeSurroundingText>Best-effort surrounding text excerpt for IME backends that support it.
Trait Implementations§
Source§impl Clone for WindowTextInputSnapshot
impl Clone for WindowTextInputSnapshot
Source§fn clone(&self) -> WindowTextInputSnapshot
fn clone(&self) -> WindowTextInputSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowTextInputSnapshot
impl Debug for WindowTextInputSnapshot
Source§impl Default for WindowTextInputSnapshot
impl Default for WindowTextInputSnapshot
Source§fn default() -> WindowTextInputSnapshot
fn default() -> WindowTextInputSnapshot
Returns the “default value” for a type. Read more
Source§impl PartialEq for WindowTextInputSnapshot
impl PartialEq for WindowTextInputSnapshot
impl StructuralPartialEq for WindowTextInputSnapshot
Auto Trait Implementations§
impl Freeze for WindowTextInputSnapshot
impl RefUnwindSafe for WindowTextInputSnapshot
impl Send for WindowTextInputSnapshot
impl Sync for WindowTextInputSnapshot
impl Unpin for WindowTextInputSnapshot
impl UnsafeUnpin for WindowTextInputSnapshot
impl UnwindSafe for WindowTextInputSnapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more