pub struct ScreenGeometry {
pub size: Size2D<i32, DevicePixel>,
pub available_size: Size2D<i32, DevicePixel>,
pub window_rect: Box2D<i32, DevicePixel>,
}
Expand description
Information about a WebView
’s screen geometry and offset. This is used
for the Screen CSSOM APIs
and window.screenLeft
/ window.screenX
/ window.screenTop
/ window.screenY
/
window.moveBy
/ window.resizeBy
/ window.outerWidth
/ window.outerHeight
/
window.screen.availHeight
/ window.screen.availWidth
.
Fields§
§size: Size2D<i32, DevicePixel>
The size of the screen in device pixels. This will be converted to
CSS pixels based on the pixel scaling of the WebView
.
available_size: Size2D<i32, DevicePixel>
The available size of the screen in device pixels for the purposes of
the window.screen.availHeight
/ window.screen.availWidth
. This is the size
available for web content on the screen, and should be size
minus any system
toolbars, docks, and interface elements. This will be converted to
CSS pixels based on the pixel scaling of the WebView
.
window_rect: Box2D<i32, DevicePixel>
The rectangle the WebView
’s containing window (including OS decorations)
in device pixels for the purposes of the
window.screenLeft
, window.outerHeight
and similar APIs.
This will be converted to CSS pixels based on the pixel scaling of the WebView
.
Trait Implementations§
Source§impl Clone for ScreenGeometry
impl Clone for ScreenGeometry
Source§fn clone(&self) -> ScreenGeometry
fn clone(&self) -> ScreenGeometry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ScreenGeometry
impl Debug for ScreenGeometry
Source§impl Default for ScreenGeometry
impl Default for ScreenGeometry
Source§fn default() -> ScreenGeometry
fn default() -> ScreenGeometry
impl Copy for ScreenGeometry
Auto Trait Implementations§
impl Freeze for ScreenGeometry
impl RefUnwindSafe for ScreenGeometry
impl Send for ScreenGeometry
impl Sync for ScreenGeometry
impl Unpin for ScreenGeometry
impl UnwindSafe for ScreenGeometry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.