Draft input_method support
This commit is contained in:
parent
599d8b560b
commit
7db5256b72
13 changed files with 420 additions and 27 deletions
24
core/src/input_method.rs
Normal file
24
core/src/input_method.rs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
//! Listen to input method events.
|
||||
|
||||
/// A input method event.
|
||||
///
|
||||
/// _**Note:** This type is largely incomplete! If you need to track
|
||||
/// additional events, feel free to [open an issue] and share your use case!_
|
||||
///
|
||||
/// [open an issue]: https://github.com/iced-rs/iced/issues
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum Event {
|
||||
// These events correspond to underlying winit ime events.
|
||||
// https://docs.rs/winit/latest/winit/event/enum.Ime.html
|
||||
/// the IME was enabled.
|
||||
Enabled,
|
||||
|
||||
/// new composing text should be set at the cursor position.
|
||||
Preedit(String, Option<(usize, usize)>),
|
||||
|
||||
/// text should be inserted into the editor widget.
|
||||
Commit(String),
|
||||
|
||||
/// the IME was disabled.
|
||||
Disabled,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue