Struct riddle_platform_winit::WindowHandle[][src]

pub struct WindowHandle { /* fields omitted */ }

Implementations

impl WindowHandle[src]

pub fn downgrade(this: &WindowHandle) -> WindowWeak[src]

Downgrade this handle to a weak handle

pub fn eq(a: &WindowHandle, b: &WindowHandle) -> bool[src]

Test whether two handles point to the same location in memory

Methods from Deref<Target = Window>

pub fn physical_size(&self) -> (u32, u32)[src]

Get the size of the drawable area of the window in pixels

pub fn logical_size(&self) -> LogicalSize[src]

Get the size of the drawable area of the window in logical units.

pub fn scale_factor(&self) -> f64[src]

Get the scale factor of the window, based on how the window manager configures hidpi scaling

pub fn set_title(&self, title: &str)[src]

Set the window title

pub fn subscribe_to_events(&self, sub: &EventSub<PlatformEvent>)[src]

Attach a subscriber to the subset of platform events that relate to this window

Example

let rdl =  RiddleLib::new()?;
let subscriber: EventSub<PlatformEvent> = EventSub::new();

let window = WindowBuilder::new().build(rdl.context())?;
window.subscribe_to_events(&subscriber);

pub fn id(&self) -> WindowId[src]

The window id which is used to identify this window in PlatformEvents

Trait Implementations

impl Clone for WindowHandle[src]

impl Deref for WindowHandle[src]

type Target = Window

The resulting type after dereferencing.

Auto Trait Implementations

impl !RefUnwindSafe for WindowHandle

impl Send for WindowHandle

impl Sync for WindowHandle

impl Unpin for WindowHandle

impl !UnwindSafe for WindowHandle

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.