Skip to main content

BrowserScreens

Struct BrowserScreens 

Source
pub struct BrowserScreens { /* private fields */ }
Expand description

The screens of the page: the screen of the window, and every screen once the page has been given the details of the screens.

Implementations§

Source§

impl BrowserScreens

Source

pub fn instance() -> Rc<BrowserScreens>

The screens of the page, created on first use.

Trait Implementations§

Source§

impl ScreensBaseImpl for BrowserScreens

Source§

type Key = BrowserScreenKey

What identifies a screen for the platform.
Source§

type Screen = BrowserScreen

The screen type of the backend.
Source§

fn screens_base(&self) -> &ScreensBase<BrowserScreenKey, BrowserScreen>

The state embedded in the implementation.
Source§

fn get_all_screen_keys(&self) -> Vec<BrowserScreenKey>

The keys of all screens that currently exist.
Source§

fn create_screen_from_key(&self, key: &BrowserScreenKey) -> Rc<BrowserScreen>

Creates the screen for a key that was not known before.
Source§

fn screen_changed(&self, screen: &Rc<BrowserScreen>)

Called for a known screen each time the screens are refreshed.
Source§

fn screen_from_top_level_core( &self, _top_level: &dyn ITopLevelImpl, ) -> Option<Rc<Screen>>

The screen that top_level is on.
Source§

fn screen_from_point_core(&self, point: PixelPoint) -> Option<Rc<Screen>>

The screen that contains point.
Source§

fn screen_from_rect_core(&self, rect: PixelRect) -> Option<Rc<Screen>>

The screen that the largest part of rect is on.
Source§

fn request_screen_details_core(&self) -> Pin<Box<dyn Future<Output = bool>>>

See IScreenImpl::request_screen_details; the outcome is cached.
Source§

fn screen_added(&self, screen: &Rc<Self::Screen>)

Called for a screen that was just created.
Source§

fn screen_removed(&self, screen: &Rc<Self::Screen>)

Called for a screen whose key disappeared.
Source§

fn get_screen_count(&self) -> i32

The number of screens.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> IScreenImpl for T
where T: ScreensBaseImpl + ?Sized,

Source§

fn screen_count(&self) -> i32

Gets the total number of screens available on the device.
Source§

fn all_screens(&self) -> Vec<Rc<Screen>>

Gets the list of all screens available on the device.
Source§

fn changed(&self) -> Option<Rc<dyn Fn()>>

Gets the method called when the screens change.
Source§

fn set_changed(&self, value: Option<Rc<dyn Fn()>>)

Sets a method called when the screens change.
Source§

fn screen_from_window(&self, window: &dyn IWindowBaseImpl) -> Option<Rc<Screen>>

The screen that window is on.
Source§

fn screen_from_top_level( &self, top_level: &dyn ITopLevelImpl, ) -> Option<Rc<Screen>>

The screen that top_level is on.
Source§

fn screen_from_point(&self, point: PixelPoint) -> Option<Rc<Screen>>

The screen that contains point.
Source§

fn screen_from_rect(&self, rect: PixelRect) -> Option<Rc<Screen>>

The screen that the largest part of rect is on.
Source§

fn request_screen_details(&self) -> Pin<Box<dyn Future<Output = bool>>>

Asks the platform for the permission to access the details of all screens; resolves to whether it was granted. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ScreensBaseImplExt for T
where T: ScreensBaseImpl + ?Sized,

Source§

fn on_changed(self: &Rc<T>)

Invalidates the cached screens and schedules the changed notification, so that multiple continuous platform events are accumulated into one. Read more
Source§

fn try_get_screen( &self, key: &<T as ScreensBaseImpl>::Key, ) -> Option<Rc<<T as ScreensBaseImpl>::Screen>>

The screen of a key, if the key is one of the current screen keys.
Source§

fn all_platform_screens(&self) -> Vec<Rc<<T as ScreensBaseImpl>::Screen>>

All current screens, as the screen type of the backend.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more