pub enum SyntheticInput {
Key(Key),
Shortcut(Shortcut),
Text(String),
Compose(String),
Scroll {
dx: f32,
dy: f32,
},
Click(Point),
PointerEnter,
PointerLeave,
DoubleClick,
DragFiles(Vec<PathBuf>),
DragLeave,
DropFiles(Vec<PathBuf>),
}Expand description
Raw input for Backend::synthesize.
Variants§
Key(Key)
A key pressed and released, on its own.
Shortcut(Shortcut)
A key pressed and released with modifiers held: what a node’s keys
(Prop::Keys) take, where the focused control doesn’t use it.
Text(String)
An input method commits this text on a GpuSurface that takes
text, as a composition ends.
Compose(String)
An input method’s composition on a GpuSurface that takes text
shows this text so far (empty: it ends without committing).
Scroll
Scroll-wheel / trackpad scroll over a ScrollView or List, in logical units
(positive = towards the end of the content).
Click(Point)
A primary-button click (down, then up) at this point, in the node’s coordinates. Backends support it on drawn custom widgets, whose pointer handling is ours.
PointerEnter
The pointer comes over a node with a Prop::Hover, through the
platform’s own hover handling where it can be reached.
PointerLeave
The pointer leaves a node with a Prop::Hover.
DoubleClick
A double click on a node with a Prop::DoubleClick, through the
platform’s own handling where it can be reached.
DragFiles(Vec<PathBuf>)
Files dragged from the file manager, over a node with a
Prop::FileDrop: what the platform’s drag handling does when they
enter it, through the same path.
DragLeave
The drag leaves the node without dropping.
DropFiles(Vec<PathBuf>)
The files are dropped on the node (having entered it first, as a real drop does).