pub struct Window { /* private fields */ }Expand description
A window Windows::open opened.
Implementations§
Source§impl Window
impl Window
Source§impl Window
impl Window
Sourcepub fn place(&self, placement: Placement) -> Result<(), Error>
pub fn place(&self, placement: Placement) -> Result<(), Error>
Maximizes, minimizes, or makes the window fullscreen, or returns it
to Placement::Normal.
On a window that is already closed, it does nothing and returns
Ok(()), as each method below does.
§Errors
Fails when the application is closing, as each method below does.
Sourcepub fn layer(&self, layer: Layer) -> Result<(), Error>
pub fn layer(&self, layer: Layer) -> Result<(), Error>
Keeps the window above the windows of every other application, or returns it among them.
§Errors
Fails when the application is closing.
Sourcepub fn move_to(&self, x: i32, y: i32) -> Result<(), Error>
pub fn move_to(&self, x: i32, y: i32) -> Result<(), Error>
Moves the window’s top-left corner to x, y logical pixels from
the top left of the primary screen.
Wayland lets no application place its windows, so on Linux under Wayland the window stays where the compositor put it.
§Errors
Fails when the application is closing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Window
impl RefUnwindSafe for Window
impl Send for Window
impl Sync for Window
impl Unpin for Window
impl UnsafeUnpin for Window
impl UnwindSafe for Window
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.