[][src]Struct pel::Config

pub struct Config { /* fields omitted */ }

Pel configuration.

Methods

impl Config[src]

pub fn vsync(self, vsync: bool) -> Self[src]

Request pel window to have vsync enabled.

By default, vsync is enabled.

pub fn srgb(self, srgb: bool) -> Self[src]

Request pel window to have sRGB enabled.

By default, sRGB is enabled.

pub fn window_size(self, width: u32, height: u32) -> Self[src]

Requests pel window client area to be of specific size in logical pixels.

By default, platform defaults are used.

pub fn min_window_size(self, width: u32, height: u32) -> Self[src]

Requests minimum pel window client area to be no less than specified in logical pixels.

By default, platform defaults are used.

pub fn max_window_size(self, width: u32, height: u32) -> Self[src]

Requests maximum pel window client area to be no more than specified in logical pixels.

By default, platform defaults are used.

pub fn resizable(self, resizable: bool) -> Self[src]

Requests pel window to be resizable.

By default, window is resizable.

pub fn maximized(self, maximized: bool) -> Self[src]

Requests pel window to appear maximized when created.

By default, window isn't maximized.

pub fn decorations(self, decorations: bool) -> Self[src]

Requests pel window to have border.

By default, window does have a border.

pub fn icon<S: Into<Surface>>(self, icon: S) -> Self[src]

Requests pel window to use given icon.

By default, window has no icon.

pub fn title<T: Into<String>>(self, title: T) -> Self[src]

Requests pel window to have a specific title.

By default, window title is "pel window".

pub fn fullscreen(self, fullscreen: bool) -> Self[src]

Requests pel window to be created in fullscreen mode.

By default, window is not in fullscreen mode.

pub fn always_on_top(self, always_on_top: bool) -> Self[src]

Requests pel window to be in always on top mode.

By default, window isn't in always on top mode.

pub fn texture_size(self, width: usize, height: usize) -> Self[src]

Requests window pel texture to be of specific size in logical pixels.

This is the "resolution" of your application, in which you will be working in, and it is independent of physical window size.

By default, texture size is None and it must be set manually or builder will panic.

pub fn run<E>(self, event_handler: E) -> ! where
    E: Events + 'static, 
[src]

Starts pel event loop.

Due to cross-platform limitations, this method should only be called in the main thread.

See documentation of Events for more information.

Trait Implementations

impl Default for Config[src]

Auto Trait Implementations

impl RefUnwindSafe for Config

impl !Send for Config

impl !Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.