pub struct TextInputMethodComposition(/* private fields */);Expand description
A platform composition bound to one connection and one accepted client state. Clones refer to the same session. Late callbacks fail after reset, focus handoff, external edits, or a newer native composition.
Implementations§
Source§impl TextInputMethodComposition
impl TextInputMethodComposition
pub fn is_current(&self) -> bool
pub fn update( &self, text: &str, cursor: Option<i32>, ) -> Result<(), TextInputMethodError>
Sourcepub fn apply_edit(
&self,
edit: &TextInputMethodEdit,
) -> Result<bool, TextInputMethodError>
pub fn apply_edit( &self, edit: &TextInputMethodEdit, ) -> Result<bool, TextInputMethodError>
Applies the platform’s delta to the current preview without committing history. The resulting selection is part of this operation.
pub fn select_exact( &self, selection: TextSelection, ) -> Result<(), TextInputMethodError>
Sourcepub fn complete(&self, timestamp: u64) -> Result<bool, TextInputMethodError>
pub fn complete(&self, timestamp: u64) -> Result<bool, TextInputMethodError>
Commits exactly the accepted preview, including empty deletions and arbitrary directed selection, as one undo transaction.
pub fn commit( &self, text: &str, timestamp: u64, ) -> Result<bool, TextInputMethodError>
pub fn cancel(&self) -> Result<bool, TextInputMethodError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TextInputMethodComposition
impl !Send for TextInputMethodComposition
impl !Sync for TextInputMethodComposition
impl !UnwindSafe for TextInputMethodComposition
impl Freeze for TextInputMethodComposition
impl Unpin for TextInputMethodComposition
impl UnsafeUnpin for TextInputMethodComposition
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more