[][src]Struct pebble_skip::user_interface::window::Window

#[repr(transparent)]pub struct Window<T: ?Sized>(_, _);

Implementations

impl<T> Window<T>[src]

pub fn new<'a, L: 'a + FnMut() -> T, A: 'a + FnMut(&mut T), D: 'a + FnMut(&mut T), U: 'a + FnMut(T)>(
    window_handlers: WindowHandlers<L, A, D, U, T>
) -> Result<Self, WindowCreationError<L, A, D, U, T>> where
    T: 'a, 
[src]

Creates a new Window<T> instance with the specified window handlers.

Errors

This function errors if associated data can't be allocated on the heap or if the window can't be created for another reason.

pub unsafe fn from_raw(raw_window: &'static mut sysWindow) -> Self[src]

Assembles a new instance of Window<T> from the given raw window handle.

Safety

This function is only safe if raw_window is a raw window handle that was previously .leak()ed from the same Window<T> variant and no other Window<T> instance has been created from it since.

#[must_use = "Not reassembling the `Window` later causes a memory leak."]pub fn leak(self) -> &'static mut sysWindow where
    T: 'static, 
[src]

Leaks the current Window<T> instance into a raw Pebble window handle.

Note that Window<T> has associated heap instances beyond the raw window, so only destroying that would still leak memory.

impl<T: ?Sized> Window<T>[src]

pub fn hide(&self, animated: bool) -> bool[src]

#[must_use]pub fn is_loaded(&self) -> bool[src]

pub fn show(&self, animated: bool)[src]

Pushes this window onto the window navidation stack, as topmost window of the app.

Arguments

animated: Whether to animate the push using a sliding animation.

pub fn set_background_color(&self, background_color: Color8)[src]

Trait Implementations

impl<T: ?Sized> Drop for Window<T>[src]

Auto Trait Implementations

impl<T> !Send for Window<T>

impl<T> !Sync for Window<T>

impl<T: ?Sized> Unpin for Window<T> where
    T: Unpin

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.