Enum tauri_runtime::window::WindowEvent [−][src]
#[non_exhaustive] pub enum WindowEvent { Resized(PhysicalSize<u32>), Moved(PhysicalPosition<i32>), CloseRequested, Destroyed, Focused(bool), ScaleFactorChanged { scale_factor: f64, new_inner_size: PhysicalSize<u32>, }, }
Expand description
An event from a window.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Resized(PhysicalSize<u32>)
Expand description
The size of the window has changed. Contains the client area’s new dimensions.
Moved(PhysicalPosition<i32>)
Expand description
The position of the window has changed. Contains the window’s new position.
Expand description
The window has been requested to close.
Expand description
The window has been destroyed.
Focused(bool)
Expand description
The window gained or lost focus.
The parameter is true if the window has gained focus, and false if it has lost focus.
Expand description
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.
Show fields
Fields of ScaleFactorChanged
scale_factor: f64
Expand description
The new scale factor.
new_inner_size: PhysicalSize<u32>
Expand description
The window inner size.
Trait Implementations
impl Clone for WindowEvent
[src]
impl Clone for WindowEvent
[src]fn clone(&self) -> WindowEvent
[src]
fn clone(&self) -> WindowEvent
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more