[][src]Struct pugl_sys::PuglView

pub struct PuglView<T: PuglViewTrait> { /* fields omitted */ }

A struct for a pugl UI object T is struct implementing the PuglViewTrait, representing the UI's state

Implementations

impl<T: PuglViewTrait> PuglView<T>[src]

pub fn new<F>(parent_window: *mut c_void, new: F) -> Box<Self> where
    F: FnOnce(PuglViewFFI) -> T, 
[src]

Sets up a new PuglView for a heap allocated object of T implementing PuglViewTrait.

Can be called with a closure taking a PuglViewFFI returning an PuglViewTrait object.

The trait object should retain the PuglViewFFI pointer to implement PuglViewTrait:view().

pub fn handle(&mut self) -> &mut T[src]

Returns a handle to the object T

pub fn view(&self) -> PuglViewFFI[src]

Returns a handle to the window system's view

pub fn native_window(&self) -> usize[src]

Retuns a handle to the native window

Trait Implementations

impl<T: PuglViewTrait> Drop for PuglView<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for PuglView<T> where
    T: RefUnwindSafe
[src]

impl<T> !Send for PuglView<T>[src]

impl<T> !Sync for PuglView<T>[src]

impl<T> Unpin for PuglView<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for PuglView<T> where
    T: UnwindSafe
[src]

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.