#[repr(transparent)]pub struct Window(_);
Expand description
This type represents a window towards the windowing system, that’s used to render the scene of a component. It provides API to control windowing system specific aspects such as the position on the screen.
Implementations
impl Window
impl Window
pub fn show(&self)
pub fn show(&self)
Registers the window with the windowing system in order to make it visible on the screen.
pub fn hide(&self)
pub fn hide(&self)
De-registers the window from the windowing system, therefore hiding it.
pub fn set_rendering_notifier(
&self,
callback: impl FnMut(RenderingState, &GraphicsAPI<'_>) + 'static
) -> Result<(), SetRenderingNotifierError>
pub fn set_rendering_notifier(
&self,
callback: impl FnMut(RenderingState, &GraphicsAPI<'_>) + 'static
) -> Result<(), SetRenderingNotifierError>
This function allows registering a callback that’s invoked during the different phases of rendering. This allows custom rendering on top or below of the scene.
pub fn request_redraw(&self)
pub fn request_redraw(&self)
This function issues a request to the windowing system to redraw the contents of the window.
Trait Implementations
impl WindowHandleAccess for Window
impl WindowHandleAccess for Window
fn window_handle(&self) -> &Rc<Window>
fn window_handle(&self) -> &Rc<Window>
Returns a reference to the window implementation.
Auto Trait Implementations
impl !RefUnwindSafe for Window
impl !Send for Window
impl !Sync for Window
impl Unpin for Window
impl !UnwindSafe for Window
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more