input docs: no backend names in core
This commit is contained in:
parent
87da57fdfe
commit
bd4df8d000
1 changed files with 7 additions and 7 deletions
|
|
@ -7,19 +7,19 @@
|
||||||
/// One thing the user did, in the order the host saw it.
|
/// One thing the user did, in the order the host saw it.
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
pub enum InputEvent {
|
pub enum InputEvent {
|
||||||
/// A key press or auto-repeat (`repeat: true`). A release never enters: crossterm reports
|
/// A key press or auto-repeat (`repeat: true`). A release never enters: a terminal
|
||||||
/// Release on Windows and the TUI drops it, and the web host drops keyup. `Char` is the
|
/// reports Release on Windows and the TUI drops it, and the web host drops keyup. `Char` is the
|
||||||
/// character the keyboard layout produced (Shift+a is `Char('A')` with `shift` set;
|
/// character the keyboard layout produced (Shift+a is `Char('A')` with `shift` set;
|
||||||
/// Shift+Tab is `Tab` with `shift`). A typing key emits `Key` then `Text`, in that order (DOM
|
/// Shift+Tab is `Tab` with `shift`). A typing key emits `Key` then `Text`, in that order (DOM
|
||||||
/// keydown precedes beforeinput; winit's KeyEvent carries text beside the key; egui emits
|
/// keydown precedes beforeinput; a window system's key event carries text beside the key; egui emits
|
||||||
/// Event::Key then Event::Text); a Ctrl or Alt chord emits `Key` only. Commands bind to `Key`.
|
/// Event::Key then Event::Text); a Ctrl or Alt chord emits `Key` only. Commands bind to `Key`.
|
||||||
Key { key: Key, modifiers: Modifiers, repeat: bool },
|
Key { key: Key, modifiers: Modifiers, repeat: bool },
|
||||||
/// Committed text to insert; a paste is `Text`. Text inserts only from `Text`, so nothing
|
/// Committed text to insert; a paste is `Text`. Text inserts only from `Text`, so nothing
|
||||||
/// inserts twice.
|
/// inserts twice.
|
||||||
Text(String),
|
Text(String),
|
||||||
/// The IME preedit, replacing any earlier one; empty `text` ends it without commit, and the
|
/// The IME preedit, replacing any earlier one; empty `text` ends it without commit, and the
|
||||||
/// commit arrives as `Text` (winit Ime::Preedit/Commit; DOM compositionupdate/compositionend).
|
/// commit arrives as `Text` (DOM compositionupdate/compositionend; a window system's IME preedit and commit).
|
||||||
/// `cursor` is UTF-8 byte offsets into `text`, winit's convention; the web host converts the
|
/// `cursor` is UTF-8 byte offsets into `text`, the window-system convention; the web host converts the
|
||||||
/// DOM's UTF-16 offsets.
|
/// DOM's UTF-16 offsets.
|
||||||
Compose { text: String, cursor: Option<(u32, u32)> },
|
Compose { text: String, cursor: Option<(u32, u32)> },
|
||||||
/// `at` is in the space `Placed` is in: logical px, or cells where a terminal cell
|
/// `at` is in the space `Placed` is in: logical px, or cells where a terminal cell
|
||||||
|
|
@ -33,8 +33,8 @@ pub enum InputEvent {
|
||||||
/// an up outside the canvas still arrives): a pending press is dropped and no up follows.
|
/// an up outside the canvas still arrives): a pending press is dropped and no up follows.
|
||||||
PointerCancel,
|
PointerCancel,
|
||||||
/// `delta` positive y moves content toward its end (the scroll offset grows), positive x
|
/// `delta` positive y moves content toward its end (the scroll offset grows), positive x
|
||||||
/// right: the DOM WheelEvent sign. crossterm ScrollDown is `(0, 1)` `Lines`; winit's
|
/// right: the DOM WheelEvent sign. a terminal's ScrollDown is `(0, 1)` `Lines`; a
|
||||||
/// LineDelta has the opposite sign and a winit host negates it. `Units` are logical px or
|
/// window system whose line delta has the opposite sign is negated by its host. `Units` are logical px or
|
||||||
/// cells; `Lines` are converted by core.
|
/// cells; `Lines` are converted by core.
|
||||||
Wheel { at: (f32, f32), delta: (f32, f32), unit: WheelUnit, modifiers: Modifiers },
|
Wheel { at: (f32, f32), delta: (f32, f32), unit: WheelUnit, modifiers: Modifiers },
|
||||||
/// The host window or terminal gained (`true`) or lost focus.
|
/// The host window or terminal gained (`true`) or lost focus.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue