Struct xpcom::interfaces::nsIScreen [] [src]

#[repr(C)]
pub struct nsIScreen { /* fields omitted */ }

interface nsIScreen : nsISupports

Methods

impl nsIScreen
[src]

[src]

Cast this nsIScreen to one of its base interfaces.

impl nsIScreen
[src]

[src]

/**
   * These report screen dimensions in (screen-specific) device pixels
   */

void GetRect (out long left, out long top, out long width, out long height);

[src]

void GetAvailRect (out long left, out long top, out long width, out long height);

[src]

/**
   * And these report in desktop pixels
   */

void GetRectDisplayPix (out long left, out long top, out long width, out long height);

[src]

void GetAvailRectDisplayPix (out long left, out long top, out long width, out long height);

[src]

readonly attribute long pixelDepth;

[src]

readonly attribute long colorDepth;

[src]

/**
   * The number of device pixels per desktop pixel for this screen (for
   * hidpi configurations where there may be multiple device pixels per
   * desktop px and/or per CSS px).
   *
   * This seems poorly named (something like devicePixelsPerDesktopPixel
   * would be more accurate/explicit), but given that it is exposed to
   * front-end code and may also be used by add-ons, it's probably not
   * worth the disruption of changing it.
   *
   * Returns 1.0 if HiDPI mode is disabled or unsupported, or if the
   * host OS uses device pixels as its desktop pixel units (e.g. Windows 7 or
   * GTK/X11). Per-monitor DPI is available in Windows 8.1+, GTK/Wayland or
   * macOS.
   */

readonly attribute double contentsScaleFactor;

[src]

/**
   * The default number of device pixels per unscaled CSS pixel for this
   * screen. This is probably what contentsScaleFactor originally meant
   * to be, prior to confusion between CSS pixels and desktop pixel units.
   */

readonly attribute double defaultCSSScaleFactor;

[src]

/**
   * The DPI of the screen.
   */

readonly attribute float dpi;

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIScreen
[src]

IID: nsIID = nsID(2188280008, 55055, 17122, [138, 169, 130, 192, 95, 42, 55, 10])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsIScreen
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIScreen
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.