Enum tauri_runtime::window::WindowEvent
source · [−]pub enum WindowEvent {
Resized(PhysicalSize<u32>),
Moved(PhysicalPosition<i32>),
CloseRequested {
signal_tx: Sender<bool>,
},
Destroyed,
Focused(bool),
ScaleFactorChanged {
scale_factor: f64,
new_inner_size: PhysicalSize<u32>,
},
FileDrop(FileDropEvent),
}
Expand description
An event from a window.
Variants
Resized(PhysicalSize<u32>)
The size of the window has changed. Contains the client area’s new dimensions.
Moved(PhysicalPosition<i32>)
The position of the window has changed. Contains the window’s new position.
CloseRequested
Fields
The window has been requested to close.
Destroyed
The window has been destroyed.
Focused(bool)
The window gained or lost focus.
The parameter is true if the window has gained focus, and false if it has lost focus.
ScaleFactorChanged
Fields
scale_factor: f64
The new scale factor.
new_inner_size: PhysicalSize<u32>
The window inner size.
The window’s scale factor has changed.
The following user actions can cause DPI changes:
- Changing the display’s resolution.
- Changing the display’s scale factor (e.g. in Control Panel on Windows).
- Moving the window to a display with a different scale factor.
FileDrop(FileDropEvent)
An event associated with the file drop action.
Trait Implementations
sourceimpl Clone for WindowEvent
impl Clone for WindowEvent
sourcefn clone(&self) -> WindowEvent
fn clone(&self) -> WindowEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for WindowEvent
impl Send for WindowEvent
impl !Sync for WindowEvent
impl Unpin for WindowEvent
impl !UnwindSafe for WindowEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more