PlatformDisplay

Trait PlatformDisplay 

Source
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§

Source

fn id(&self) -> DisplayId

Get the ID for this display

Source

fn uuid(&self) -> Result<Uuid>

Returns a stable identifier for this display that can be persisted and used across system restarts.

Source

fn bounds(&self) -> Bounds<Pixels>

Get the bounds for this display

Provided Methods§

Source

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.

Source

fn default_bounds(&self) -> Bounds<Pixels>

Get the default bounds for this display to place a window

Implementors§