-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add android ime support #2993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add android ime support #2993
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ use crate::{ | |
| monitor::{MonitorHandle, VideoMode}, | ||
| platform_impl, | ||
| }; | ||
| use crate::event::TextInputState; | ||
|
|
||
| pub use crate::icon::{BadIcon, Icon}; | ||
|
|
||
|
|
@@ -1111,6 +1112,23 @@ impl Window { | |
| self.window.set_ime_purpose(purpose); | ||
| } | ||
|
|
||
| /// Opens the IME input (soft keyboard) if the platform supports it. | ||
| /// Currently only supported on Android. | ||
| #[inline] | ||
| pub fn begin_ime_input(&self) { | ||
| self.window.begin_ime_input(); | ||
| } | ||
|
|
||
| /// Hides the IME input (soft keyboard). | ||
| #[inline] | ||
| pub fn end_ime_input(&self) { | ||
| self.window.end_ime_input(); | ||
| } | ||
|
||
|
|
||
| pub fn set_text_input_state(&self, state: TextInputState) { | ||
| self.window.set_text_input_state(state); | ||
| } | ||
|
||
|
|
||
| /// Brings the window to the front and sets input focus. Has no effect if the window is | ||
| /// already in focus, minimized, or not visible. | ||
| /// | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.