pub struct WindowHandle(/* private fields */);
Expand description

A handle that exposes all windowing functionality.

Implementations§

source§

impl WindowHandle

source

pub fn content_dimensions(&self) -> Dims2D

source

pub fn opacity(&self) -> u8

source

pub fn position(&self) -> Pos2D

source

pub fn title(&self) -> String

source

pub fn window_dimensions(&self) -> Dims2D

source

pub fn hide(&self)

Hides the window. Keep in mind that hiding the window is not the same as closing it. Hiding the window will keep it’s resources alive. If the window is hidden, and all window handles are gone, the memory is effectively leaked.

source

pub fn set_content_dimensions(&self, dimensions: Dims2D)

source

pub fn set_opacity(&self, opacity: u8)

source

pub fn set_position(&self, position: Pos2D)

source

pub fn set_title(&self, title: &str)

source

pub fn set_window_dimensions(&self, dimensions: Dims2D)

source

pub fn show(&self)

Shows a window if it was hidden. Windows that were just created are hidden to start. This method is necessary to show it to the user.

Trait Implementations§

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<H> HasHandle<H> for H

source§

fn handle(&self) -> &H

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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V