Struct Window

Source
pub struct Window<T: ?Sized>(/* private fields */);

Implementations§

Source§

impl<T> Window<T>

Source

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,

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.

Source

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

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.

Source

pub fn leak(self) -> &'static mut sysWindow
where T: 'static,

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.

Source§

impl<T: ?Sized> Window<T>

Source

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

Source

pub fn is_loaded(&self) -> bool

Source

pub fn show(&self, animated: bool)

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.

Source

pub fn set_background_color(&self, background_color: Color8)

Trait Implementations§

Source§

impl<T: ?Sized> Drop for Window<T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Window<T>
where T: ?Sized,

§

impl<T> !RefUnwindSafe for Window<T>

§

impl<T> !Send for Window<T>

§

impl<T> !Sync for Window<T>

§

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

§

impl<T> !UnwindSafe for Window<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.