pub enum ImeEvent {
Compose {
text: String,
cursor: Option<(usize, usize)>,
},
Commit(String),
ApplyEditingState(EditingState),
Enabled,
Disabled,
}Expand description
The event-pass/IME-surface EditingState — see this module’s own docs
for the split against text::EditingState,
frust_text::editor’s distinct, byte-indexed type. ImeContentType is
the input-purpose hint an editable widget publishes on its ImeState so
a shell can lock a secret field’s keyboard down.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
key and return true if they are equal.