pub struct PlatformWindow { /* private fields */ }Expand description
A native window. Cheap to clone; implements the raw window handle traits so the renderer can create a surface for it.
Implementations§
Source§impl PlatformWindow
impl PlatformWindow
pub fn id(&self) -> PlatformWindowId
Sourcepub fn physical_size(&self) -> (u32, u32)
pub fn physical_size(&self) -> (u32, u32)
Inner size in physical pixels.
pub fn scale_factor(&self) -> f32
Sourcepub fn logical_size(&self) -> Size
pub fn logical_size(&self) -> Size
Inner size in logical pixels.
pub fn request_redraw(&self)
Sourcepub fn pre_present_notify(&self)
pub fn pre_present_notify(&self)
Must be called right before presenting a frame (lets the compositor schedule the next frame callback optimally on some platforms).
pub fn set_title(&self, title: &str)
pub fn set_visible(&self, visible: bool)
pub fn set_cursor(&self, cursor: CursorStyle)
pub fn set_ime_allowed(&self, allowed: bool)
Sourcepub fn set_ime_cursor_area(&self, area: Bounds)
pub fn set_ime_cursor_area(&self, area: Bounds)
Tells the IME where the caret is (logical pixels) so candidate windows appear next to it.
pub fn focus(&self)
pub fn minimize(&self)
pub fn set_maximized(&self, maximized: bool)
pub fn is_maximized(&self) -> bool
Trait Implementations§
Source§impl Clone for PlatformWindow
impl Clone for PlatformWindow
Source§impl HasDisplayHandle for PlatformWindow
impl HasDisplayHandle for PlatformWindow
Source§fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>
fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>
Get a handle to the display controller of the windowing system.
Source§impl HasWindowHandle for PlatformWindow
impl HasWindowHandle for PlatformWindow
Source§fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>
fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>
Get a handle to the window.
Auto Trait Implementations§
impl !RefUnwindSafe for PlatformWindow
impl !UnwindSafe for PlatformWindow
impl Freeze for PlatformWindow
impl Send for PlatformWindow
impl Sync for PlatformWindow
impl Unpin for PlatformWindow
impl UnsafeUnpin for PlatformWindow
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> HasRawDisplayHandle for Twhere
T: HasDisplayHandle + ?Sized,
impl<T> HasRawDisplayHandle for Twhere
T: HasDisplayHandle + ?Sized,
Source§fn raw_display_handle(&self) -> Result<RawDisplayHandle, HandleError>
fn raw_display_handle(&self) -> Result<RawDisplayHandle, HandleError>
👎Deprecated:
Use HasDisplayHandle instead
Source§impl<T> HasRawWindowHandle for Twhere
T: HasWindowHandle + ?Sized,
impl<T> HasRawWindowHandle for Twhere
T: HasWindowHandle + ?Sized,
Source§fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>
fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>
👎Deprecated:
Use HasWindowHandle instead