pub enum WindowEvent {
CloseRequested,
FocusChanged {
focused: bool,
},
Moved {
x: f32,
y: f32,
width: f32,
height: f32,
},
Drag {
phase: WindowDragPhase,
screen_x: f32,
screen_y: f32,
over_window: u32,
},
DragOver {
kind: WindowDragOverKind,
window: u32,
x: f32,
y: f32,
},
Unavailable,
Closed,
}Expand description
What a window reports to the handler registered for it.
Variants§
CloseRequested
The user asked to close the window. Nothing closes until the application removes
the Window node.
FocusChanged
The window became the key window, or lost that place.
Moved
The window’s outer frame moved or changed size, in screen dp.
Drag
A torn-off window is being dragged. over_window is the id of the window under the
pointer, or 0.
DragOver
A dragged window is passing over a node with a drag-over handler. The position is inside that node, in dp.
The window could not be opened on this platform.
Closed
The system closed the window without asking.
Trait Implementations§
Source§impl Clone for WindowEvent
impl Clone for WindowEvent
impl Copy for WindowEvent
Source§impl Debug for WindowEvent
impl Debug for WindowEvent
Source§impl PartialEq for WindowEvent
impl PartialEq for WindowEvent
impl StructuralPartialEq for WindowEvent
Auto Trait Implementations§
impl Freeze for WindowEvent
impl RefUnwindSafe for WindowEvent
impl Send for WindowEvent
impl Sync for WindowEvent
impl Unpin for WindowEvent
impl UnsafeUnpin for WindowEvent
impl UnwindSafe for WindowEvent
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