pub struct WinitWindow { /* private fields */ }
Expand description
A wrapper around a winit::window::Window
that implements the KhoraWindow
trait.
This struct provides a concrete window implementation for desktop platforms,
abstracting the engine’s core logic from the specifics of the winit
crate.
It uses an Arc
internally to allow for cheap cloning and shared ownership.
Trait Implementations§
Source§impl Clone for WinitWindow
impl Clone for WinitWindow
Source§fn clone(&self) -> WinitWindow
fn clone(&self) -> WinitWindow
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for WinitWindow
impl Debug for WinitWindow
Source§impl HasDisplayHandle for WinitWindow
impl HasDisplayHandle for WinitWindow
Source§fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>
fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>
Provides the raw display handle required by graphics backends.
Source§impl HasWindowHandle for WinitWindow
impl HasWindowHandle for WinitWindow
Source§fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>
fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>
Provides the raw window handle required by graphics backends.
Source§impl KhoraWindow for WinitWindow
impl KhoraWindow for WinitWindow
Source§fn inner_size(&self) -> (u32, u32)
fn inner_size(&self) -> (u32, u32)
Returns the physical dimensions (width, height) of the window’s inner area.
Source§fn scale_factor(&self) -> f64
fn scale_factor(&self) -> f64
Returns the display’s scale factor, used for HiDPI rendering.
Source§fn request_redraw(&self)
fn request_redraw(&self)
Requests that the window be redrawn.
Source§fn clone_handle_arc(&self) -> KhoraWindowHandle
fn clone_handle_arc(&self) -> KhoraWindowHandle
Clones a thread-safe, reference-counted handle to the window.
Auto Trait Implementations§
impl Freeze for WinitWindow
impl !RefUnwindSafe for WinitWindow
impl Send for WinitWindow
impl Sync for WinitWindow
impl Unpin for WinitWindow
impl !UnwindSafe for WinitWindow
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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> HasRawDisplayHandle for Twhere
T: HasDisplayHandle + ?Sized,
impl<T> HasRawDisplayHandle for Twhere
T: HasDisplayHandle + ?Sized,
§fn raw_display_handle(&self) -> Result<RawDisplayHandle, HandleError>
fn raw_display_handle(&self) -> Result<RawDisplayHandle, HandleError>
👎Deprecated: Use
HasDisplayHandle
instead§impl<T> HasRawWindowHandle for Twhere
T: HasWindowHandle + ?Sized,
impl<T> HasRawWindowHandle for Twhere
T: HasWindowHandle + ?Sized,
§fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>
fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>
👎Deprecated: Use
HasWindowHandle
instead