pub enum Event {
Opened {
position: Option<Point>,
size: Size,
},
Closed,
Moved(Point),
Resized(Size),
RedrawRequested(Instant),
CloseRequested,
Focused,
Unfocused,
FileHovered(PathBuf),
FileDropped(PathBuf),
FilesHoveredLeft,
}
Expand description
A window-related event.
Variants§
Opened
A window was opened.
Fields
Closed
A window was closed.
Moved(Point)
A window was moved.
Resized(Size)
A window was resized.
RedrawRequested(Instant)
A window redraw was requested.
The Instant
contains the current time.
CloseRequested
The user has requested for the window to close.
Focused
A window was focused.
Unfocused
A window was unfocused.
FileHovered(PathBuf)
A file is being hovered over the window.
When the user hovers multiple files at once, this event will be emitted for each file separately.
§Platform-specific
- Wayland: Not implemented.
FileDropped(PathBuf)
A file has been dropped into the window.
When the user drops multiple files at once, this event will be emitted for each file separately.
§Platform-specific
- Wayland: Not implemented.
FilesHoveredLeft
A file was hovered, but has exited the window.
There will be a single FilesHoveredLeft
event triggered even if
multiple files were hovered.
§Platform-specific
- Wayland: Not implemented.
Trait Implementations§
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more