pub enum ImeEvent {
Compose {
text: String,
cursor: Option<(usize, usize)>,
},
Commit(String),
ApplyEditingState(EditingState),
Enabled,
Disabled,
}Expand description
An input-method (IME) event delivered down the focus path (never hit-tested).
Desktop drives ImeEvent::Compose/ImeEvent::Commit from winit’s
Ime::Preedit/Ime::Commit; the mobile bridges push whole values via
ImeEvent::ApplyEditingState (state-sync, not op-forwarding).
ImeEvent::Enabled/ImeEvent::Disabled bracket a
composition session.
Variants§
Compose
Preedit / marked text: text is the composing string, cursor its
optional (start, end) selection within that string (byte indices, as
winit reports).
Fields
Commit(String)
Commit finished composition: insert text and clear the composing region.
ApplyEditingState(EditingState)
Replace the whole editing state (mobile state-sync path).
Enabled
The platform enabled IME on the focused field (composition may begin).
Disabled
The platform disabled IME (composition ended / focus left).
Trait Implementations§
impl Eq for ImeEvent
impl StructuralPartialEq for ImeEvent
Auto Trait Implementations§
impl Freeze for ImeEvent
impl RefUnwindSafe for ImeEvent
impl Send for ImeEvent
impl Sync for ImeEvent
impl Unpin for ImeEvent
impl UnsafeUnpin for ImeEvent
impl UnwindSafe for ImeEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.