pub struct InputMethod { /* private fields */ }Implementations§
Source§impl InputMethod
impl InputMethod
pub fn new() -> Result<Self, MaliitError>
pub fn show(&mut self) -> Result<(), MaliitError>
pub fn hide(&mut self) -> Result<(), MaliitError>
pub fn reset(&mut self) -> Result<(), MaliitError>
pub fn set_language(&mut self, lang: &str) -> Result<(), MaliitError>
pub fn rotate(&mut self, orientation: Orientation) -> Result<(), MaliitError>
Sourcepub fn update_widget_information(
&mut self,
info: &WidgetInfo,
focus_changed: bool,
) -> Result<(), MaliitError>
pub fn update_widget_information( &mut self, info: &WidgetInfo, focus_changed: bool, ) -> Result<(), MaliitError>
Update widget information on the Maliit server.
Should be called when the text widget state changes (focus, cursor position,
surrounding text, etc.). Call with focus_changed = true when the widget
gains or loses focus.
Sourcepub fn show_with_info(&mut self, info: &WidgetInfo) -> Result<(), MaliitError>
pub fn show_with_info(&mut self, info: &WidgetInfo) -> Result<(), MaliitError>
Show the keyboard after sending the current widget information.
This is the recommended way to open the keyboard when a text widget gains focus — it tells Maliit about the widget state before showing.
Sourcepub fn add_event_handler<F>(&mut self, handler: F) -> Result<(), MaliitError>
pub fn add_event_handler<F>(&mut self, handler: F) -> Result<(), MaliitError>
Register a callback that will be called for every IME event.
The first call spawns a background thread that polls D-Bus. Subsequent calls add more handlers. All handlers receive the same event.
Sourcepub fn clear_event_handlers(&mut self)
pub fn clear_event_handlers(&mut self)
Remove all event handlers and stop the background thread.
Auto Trait Implementations§
impl Freeze for InputMethod
impl !RefUnwindSafe for InputMethod
impl Send for InputMethod
impl Sync for InputMethod
impl Unpin for InputMethod
impl UnsafeUnpin for InputMethod
impl !UnwindSafe for InputMethod
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