[][src]Struct pebble_skip::user_interface::window::number_window::NumberWindow

pub struct NumberWindow<'a, T: ?Sized>(_, _, _);

Implementations

impl<'a, T> NumberWindow<'a, T>[src]

pub fn new<I: 'a + FnMut(&NumberWindow<'_, void>, &mut T), D: 'a + FnMut(&NumberWindow<'_, void>, &mut T), S: 'a + FnMut(&NumberWindow<'_, void>, &mut T)>(
    label: &'a CStr<impl NotStack>,
    number_window_data: NumberWindowData<I, D, S, T>
) -> Result<Self, NumberWindowData<I, D, S, T>> where
    T: 'a, 
[src]

Errors

TODO

pub unsafe fn from_raw(
    raw_window: &'a mut sysNumberWindow<'a>,
    number_window_data_wrapper: *mut NumberWindowDataWrapper<'a>
) -> Self
[src]

Assembles a new instance of NumberWindow 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 NumberWindow<T> variant and no other NumberWindow<T> instance has been created from it since.

#[must_use = "Not reassembling the `NumberWindow` later causes a memory leak."]pub fn leak(
    self
) -> (&'a mut sysNumberWindow<'a>, *mut NumberWindowDataWrapper<'a>) where
    T: 'a, 
[src]

Leaks the current NumberWindow instance into a raw Pebble number window handle.

Note that NumberWindow has associated heap instances beyond the raw window, so only destroying that would still leak memory.

impl<'a, T: ?Sized> NumberWindow<'a, T>[src]

#[must_use]pub fn window(&self) -> WindowRef<'_>[src]

#[must_use]pub fn window_mut<'b: 'a>(&'b mut self) -> WindowRefMut<'b>[src]

pub fn set_label(&self, label: &'a CStr<impl NotStack>)[src]

pub fn set_max(&self, max: i32)[src]

pub fn set_min(&self, min: i32)[src]

pub fn set_value(&self, value: i32)[src]

pub fn set_step_size(&self, step_size: i32)[src]

#[must_use]pub fn get_value(&self) -> i32[src]

Methods from Deref<Target = NumberWindow<'a, void>>

#[must_use]pub fn window(&self) -> WindowRef<'_>[src]

#[must_use]pub fn window_mut<'b: 'a>(&'b mut self) -> WindowRefMut<'b>[src]

pub fn set_label(&self, label: &'a CStr<impl NotStack>)[src]

pub fn set_max(&self, max: i32)[src]

pub fn set_min(&self, min: i32)[src]

pub fn set_value(&self, value: i32)[src]

pub fn set_step_size(&self, step_size: i32)[src]

#[must_use]pub fn get_value(&self) -> i32[src]

Trait Implementations

impl<'a, T> Deref for NumberWindow<'a, T>[src]

type Target = NumberWindow<'a, void>

The resulting type after dereferencing.

impl<'a, T> DerefMut for NumberWindow<'a, T>[src]

impl<'a, T: ?Sized> Drop for NumberWindow<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !Send for NumberWindow<'a, T>

impl<'a, T> !Sync for NumberWindow<'a, T>

impl<'a, T: ?Sized> Unpin for NumberWindow<'a, 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.