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§
sourcefn handle(&self) -> WindowHandle
fn handle(&self) -> WindowHandle
Returns a handle for the window.
sourcefn kludgine_id(&self) -> KludgineId
fn kludgine_id(&self) -> KludgineId
Returns the unique id of the [Kludgine
] instance used by this window.
sourcefn focused(&self) -> &Dynamic<bool>
fn focused(&self) -> &Dynamic<bool>
Returns the dynamic that is synchronized with the window’s focus.
sourcefn occluded(&self) -> &Dynamic<bool>
fn occluded(&self) -> &Dynamic<bool>
Returns the dynamic that is synchronized with the window’s occlusion status.
sourcefn inner_size(&self) -> &Dynamic<Size<UPx>>
fn inner_size(&self) -> &Dynamic<Size<UPx>>
Returns the current inner size of the window.
sourcefn outer_size(&self) -> Size<UPx>
fn outer_size(&self) -> Size<UPx>
Returns the current outer size of the window.
sourcefn set_needs_redraw(&mut self)
fn set_needs_redraw(&mut self)
Sets the window to redraw as soon as possible.
sourcefn elapsed(&self) -> Duration
fn elapsed(&self) -> Duration
Returns the amount of time that has elapsed since the last redraw.
sourcefn set_cursor(&mut self, cursor: Cursor)
fn set_cursor(&mut self, cursor: Cursor)
Sets the current cursor icon to cursor
.
sourcefn set_ime_location(&self, location: Rect<Px>)
fn set_ime_location(&self, location: Rect<Px>)
Sets the location of the cursor.
sourcefn set_ime_allowed(&self, allowed: bool)
fn set_ime_allowed(&self, allowed: bool)
Sets whether [Ime
] events should be enabled.
sourcefn set_ime_purpose(&self, purpose: ImePurpose)
fn set_ime_purpose(&self, purpose: ImePurpose)
Sets the current [Ime
] purpose.
sourcefn request_inner_size(&mut self, inner_size: Size<UPx>) -> Option<Size<UPx>>
fn request_inner_size(&mut self, inner_size: Size<UPx>) -> Option<Size<UPx>>
Requests that the window change its inner size.
sourcefn set_min_inner_size(&self, min_size: Option<Size<UPx>>)
fn set_min_inner_size(&self, min_size: Option<Size<UPx>>)
Sets the window’s minimum inner size.
sourcefn set_max_inner_size(&self, max_size: Option<Size<UPx>>)
fn set_max_inner_size(&self, max_size: Option<Size<UPx>>)
Sets the window’s maximum inner size.