[][src]Trait kludgine::window::Window

pub trait Window: InteractiveComponent + Send + Sync + 'static {
#[must_use]    fn close_requested<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = KludgineResult<CloseResponse>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn target_fps(&self) -> Option<u16> { ... } }

Trait to implement a Window

Provided methods

#[must_use]fn close_requested<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = KludgineResult<CloseResponse>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

The window was requested to be closed, most likely from the Close Button. Override this implementation if you want logic in place to prevent a window from closing.

fn target_fps(&self) -> Option<u16>

Specify a target frames per second, which will force your window to redraw at this rate. If None is returned, the Window will only redraw when requested via methods on Context.

Loading content...

Implementors

Loading content...