Add Window::set_ime_purpose
This adds a way to set the purpose for the IME input, implemented only on Wayland for now.
This commit is contained in:
parent
8f8da0f8bb
commit
1b4045dcb2
15 changed files with 160 additions and 22 deletions
|
|
@ -21,8 +21,8 @@ use crate::platform_impl::{
|
|||
OsError, PlatformSpecificWindowBuilderAttributes as PlatformAttributes,
|
||||
};
|
||||
use crate::window::{
|
||||
CursorGrabMode, CursorIcon, ResizeDirection, Theme, UserAttentionType, WindowAttributes,
|
||||
WindowButtons,
|
||||
CursorGrabMode, CursorIcon, ImePurpose, ResizeDirection, Theme, UserAttentionType,
|
||||
WindowAttributes, WindowButtons,
|
||||
};
|
||||
|
||||
use super::env::WindowingFeatures;
|
||||
|
|
@ -623,6 +623,11 @@ impl Window {
|
|||
self.send_request(WindowRequest::AllowIme(allowed));
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_ime_purpose(&self, purpose: ImePurpose) {
|
||||
self.send_request(WindowRequest::ImePurpose(purpose));
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn display(&self) -> &Display {
|
||||
&self.display
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue