cushy::window

Trait PlatformWindow

source
pub trait PlatformWindow {
Show 22 methods // Required methods fn close(&mut self); fn handle(&self) -> WindowHandle; fn kludgine_id(&self) -> KludgineId; fn focused(&self) -> &Dynamic<bool>; fn occluded(&self) -> &Dynamic<bool>; fn inner_size(&self) -> &Dynamic<Size<UPx>>; fn outer_size(&self) -> Size<UPx>; fn cushy(&self) -> &Cushy; fn app(&self) -> Option<&App>; fn set_needs_redraw(&mut self); fn redraw_in(&mut self, duration: Duration); fn redraw_at(&mut self, moment: Instant); fn modifiers(&self) -> Modifiers; fn elapsed(&self) -> Duration; fn set_cursor(&mut self, cursor: Cursor); fn set_ime_location(&self, location: Rect<Px>); fn set_ime_allowed(&self, allowed: bool); fn set_ime_purpose(&self, purpose: ImePurpose); fn request_inner_size(&mut self, inner_size: Size<UPx>) -> Option<Size<UPx>>; fn set_min_inner_size(&self, min_size: Option<Size<UPx>>); fn set_max_inner_size(&self, max_size: Option<Size<UPx>>); fn winit(&self) -> Option<&Arc<Window>>;
}
Expand description

A platform-dependent window.

Required Methods§

source

fn close(&mut self)

Marks the window to close as soon as possible.

source

fn handle(&self) -> WindowHandle

Returns a handle for the window.

source

fn kludgine_id(&self) -> KludgineId

Returns the unique id of the [Kludgine] instance used by this window.

source

fn focused(&self) -> &Dynamic<bool>

Returns the dynamic that is synchronized with the window’s focus.

source

fn occluded(&self) -> &Dynamic<bool>

Returns the dynamic that is synchronized with the window’s occlusion status.

source

fn inner_size(&self) -> &Dynamic<Size<UPx>>

Returns the current inner size of the window.

source

fn outer_size(&self) -> Size<UPx>

Returns the current outer size of the window.

source

fn cushy(&self) -> &Cushy

Returns the shared application resources.

source

fn app(&self) -> Option<&App>

Returns the app managing this window’s event loop.

source

fn set_needs_redraw(&mut self)

Sets the window to redraw as soon as possible.

source

fn redraw_in(&mut self, duration: Duration)

Sets the window to redraw after a duration.

source

fn redraw_at(&mut self, moment: Instant)

Sets the window to redraw at a specified instant.

source

fn modifiers(&self) -> Modifiers

Returns the current keyboard modifiers.

source

fn elapsed(&self) -> Duration

Returns the amount of time that has elapsed since the last redraw.

source

fn set_cursor(&mut self, cursor: Cursor)

Sets the current cursor icon to cursor.

source

fn set_ime_location(&self, location: Rect<Px>)

Sets the location of the cursor.

source

fn set_ime_allowed(&self, allowed: bool)

Sets whether [Ime] events should be enabled.

source

fn set_ime_purpose(&self, purpose: ImePurpose)

Sets the current [Ime] purpose.

source

fn request_inner_size(&mut self, inner_size: Size<UPx>) -> Option<Size<UPx>>

Requests that the window change its inner size.

source

fn set_min_inner_size(&self, min_size: Option<Size<UPx>>)

Sets the window’s minimum inner size.

source

fn set_max_inner_size(&self, max_size: Option<Size<UPx>>)

Sets the window’s maximum inner size.

source

fn winit(&self) -> Option<&Arc<Window>>

Returns a handle to the underlying winit window, if available.

Implementors§