Struct xpcom::interfaces::nsIScreen
[−]
[src]
#[repr(C)]pub struct nsIScreen { /* fields omitted */ }
interface nsIScreen : nsISupports
Methods
impl nsIScreen
[src]
pub fn coerce<T: nsIScreenCoerce>(&self) -> &T
[src]
Cast this nsIScreen
to one of its base interfaces.
impl nsIScreen
[src]
pub unsafe fn GetRect(
&self,
left: *mut int32_t,
top: *mut int32_t,
width: *mut int32_t,
height: *mut int32_t
) -> nsresult
[src]
&self,
left: *mut int32_t,
top: *mut int32_t,
width: *mut int32_t,
height: *mut int32_t
) -> nsresult
/**
* These report screen dimensions in (screen-specific) device pixels
*/
void GetRect (out long left, out long top, out long width, out long height);
pub unsafe fn GetAvailRect(
&self,
left: *mut int32_t,
top: *mut int32_t,
width: *mut int32_t,
height: *mut int32_t
) -> nsresult
[src]
&self,
left: *mut int32_t,
top: *mut int32_t,
width: *mut int32_t,
height: *mut int32_t
) -> nsresult
void GetAvailRect (out long left, out long top, out long width, out long height);
pub unsafe fn GetRectDisplayPix(
&self,
left: *mut int32_t,
top: *mut int32_t,
width: *mut int32_t,
height: *mut int32_t
) -> nsresult
[src]
&self,
left: *mut int32_t,
top: *mut int32_t,
width: *mut int32_t,
height: *mut int32_t
) -> nsresult
/**
* And these report in desktop pixels
*/
void GetRectDisplayPix (out long left, out long top, out long width, out long height);
pub unsafe fn GetAvailRectDisplayPix(
&self,
left: *mut int32_t,
top: *mut int32_t,
width: *mut int32_t,
height: *mut int32_t
) -> nsresult
[src]
&self,
left: *mut int32_t,
top: *mut int32_t,
width: *mut int32_t,
height: *mut int32_t
) -> nsresult
void GetAvailRectDisplayPix (out long left, out long top, out long width, out long height);
pub unsafe fn GetPixelDepth(&self, aPixelDepth: *mut int32_t) -> nsresult
[src]
readonly attribute long pixelDepth;
pub unsafe fn GetColorDepth(&self, aColorDepth: *mut int32_t) -> nsresult
[src]
readonly attribute long colorDepth;
pub unsafe fn GetContentsScaleFactor(
&self,
aContentsScaleFactor: *mut c_double
) -> nsresult
[src]
&self,
aContentsScaleFactor: *mut c_double
) -> nsresult
/**
* 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;
pub unsafe fn GetDefaultCSSScaleFactor(
&self,
aDefaultCSSScaleFactor: *mut c_double
) -> nsresult
[src]
&self,
aDefaultCSSScaleFactor: *mut c_double
) -> nsresult
/**
* 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;
pub unsafe fn GetDpi(&self, aDpi: *mut c_float) -> nsresult
[src]
/**
* The DPI of the screen.
*/
readonly attribute float dpi;
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIScreen
[src]
const IID: nsIID
IID: nsIID = nsID(2188280008, 55055, 17122, [138, 169, 130, 192, 95, 42, 55, 10])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[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]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIScreen
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.