Skip to main content

WindowChange

Enum WindowChange 

Source
pub enum WindowChange {
Show 14 variants State(WindowState), ContentProtected(bool), Frame { origin: Option<Point>, size: Option<Size>, }, Limits { min: Option<Size>, max: Option<Size>, }, Level(WindowLevel), OnAllWorkspaces(bool), SkipTaskbar(bool), Resizable(bool), Minimizable(bool), Maximizable(bool), Closable(bool), Visible(bool), Appearance(Option<bool>), RequestAttention(Attention),
}
Expand description

One change to one window (docs/windows.md “Window properties”), carried by Toolkit::apply_window. Each variant names the Cap that reports whether the running toolkit makes it.

Variants§

§

State(WindowState)

Minimize, zoom, take fullscreen, or return to normal. Cap::WindowStates for the first two, Cap::WindowFullscreen for fullscreen. The outcome comes back as Event::WindowStateChanged.

§

ContentProtected(bool)

Keep the window’s content out of screenshots, recordings and screen sharing. Cap::ContentProtection.

§

Frame

Move and/or resize. origin is the outer frame’s top-left corner in points on the desktop’s coordinate space (top-left origin, Cap::WindowPosition); size is the size Day lays the content out at, in points, the same size WindowResized reports (Cap::WindowGeometry): the backend adds its own chrome around it.

Fields

§origin: Option<Point>
§size: Option<Size>
§

Limits

The content size the user can resize the window to. None lifts that bound. Cap::WindowGeometry.

Fields

§

Level(WindowLevel)

Stacking against other apps’ windows. Cap::WindowLevel.

§

OnAllWorkspaces(bool)

Show the window on every virtual desktop / Space. Cap::WindowLevel.

§

SkipTaskbar(bool)

Leave the window out of the taskbar and the window switcher. Cap::WindowLevel.

§

Resizable(bool)

Whether the user can resize the window. Cap::WindowGeometry.

§

Minimizable(bool)

Whether the window offers a minimize control. Cap::WindowStates.

§

Maximizable(bool)

Whether the window offers a maximize / zoom control. Cap::WindowStates.

§

Closable(bool)

Whether the window offers a close control. Cap::WindowStates.

§

Visible(bool)

Hide the window without closing it, or show it again. Cap::WindowStates.

§

Appearance(Option<bool>)

This window’s light/dark override over the app-wide Toolkit::set_appearance. Cap::WindowAppearance.

§

RequestAttention(Attention)

Bounce the Dock icon, flash the taskbar button. Cap::RequestAttention.

Trait Implementations§

Source§

impl Clone for WindowChange

Source§

fn clone(&self) -> WindowChange

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WindowChange

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for WindowChange

Source§

fn eq(&self, other: &WindowChange) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WindowChange

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Day API ↩ Guides· daybrite.dev