mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
feat: support pre-edit text display for IME (#35535)
* feat: support pre-edit text display for IME Signed-off-by: DK Liao <dklassic@gmail.com> * enable ime by show_ime Signed-off-by: DK Liao <dklassic@gmail.com> --------- Signed-off-by: DK Liao <dklassic@gmail.com>
This commit is contained in:
parent
42e873e9d9
commit
720bc725b0
6 changed files with 91 additions and 4 deletions
|
@ -527,6 +527,22 @@ impl WebViewDelegate for RunningAppState {
|
|||
};
|
||||
let _ = haptic_stop_sender.send(stopped);
|
||||
}
|
||||
fn show_ime(
|
||||
&self,
|
||||
_webview: WebView,
|
||||
input_type: servo::InputMethodType,
|
||||
text: Option<(String, i32)>,
|
||||
multiline: bool,
|
||||
position: servo::webrender_api::units::DeviceIntRect,
|
||||
) {
|
||||
self.inner()
|
||||
.window
|
||||
.show_ime(input_type, text, multiline, position);
|
||||
}
|
||||
|
||||
fn hide_ime(&self, _webview: WebView) {
|
||||
self.inner().window.hide_ime();
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue