pub trait PlatformDisplay:
Send
+ Sync
+ Debug {
// Required methods
fn id(&self) -> DisplayId;
fn uuid(&self) -> Result<Uuid>;
fn bounds(&self) -> Bounds<Pixels>;
// Provided methods
fn visible_bounds(&self) -> Bounds<Pixels> { ... }
fn default_bounds(&self) -> Bounds<Pixels> { ... }
}Expand description
A handle to a platform’s display, e.g. a monitor or laptop screen.
Required Methods§
Provided Methods§
Sourcefn visible_bounds(&self) -> Bounds<Pixels>
fn visible_bounds(&self) -> Bounds<Pixels>
Get the visible bounds for this display, excluding taskbar/dock areas. This is the usable area where windows can be placed without being obscured. Defaults to the full display bounds if not overridden.
Sourcefn default_bounds(&self) -> Bounds<Pixels>
fn default_bounds(&self) -> Bounds<Pixels>
Get the default bounds for this display to place a window