pub struct ScreenImpl { /* private fields */ }Expand description
The screens implementation of the macOS backend.
Implementations§
Source§impl ScreenImpl
impl ScreenImpl
Sourcepub fn new(
factory: impl FnOnce(&IFrnScreenEvents) -> Option<ComPtr<IFrnScreens>>,
) -> Rc<ScreenImpl>
pub fn new( factory: impl FnOnce(&IFrnScreenEvents) -> Option<ComPtr<IFrnScreens>>, ) -> Rc<ScreenImpl>
Creates the screens; factory creates the native screens object for
the events callback it is given.
Trait Implementations§
Source§impl ScreensBaseImpl for ScreenImpl
impl ScreensBaseImpl for ScreenImpl
Source§type Screen = NativeScreen
type Screen = NativeScreen
The screen type of the backend.
Source§fn screens_base(&self) -> &ScreensBase<u32, NativeScreen>
fn screens_base(&self) -> &ScreensBase<u32, NativeScreen>
The state embedded in the implementation.
Source§fn get_screen_count(&self) -> i32
fn get_screen_count(&self) -> i32
The number of screens.
Source§fn get_all_screen_keys(&self) -> Vec<u32>
fn get_all_screen_keys(&self) -> Vec<u32>
The keys of all screens that currently exist.
Source§fn create_screen_from_key(&self, key: &u32) -> Rc<NativeScreen>
fn create_screen_from_key(&self, key: &u32) -> Rc<NativeScreen>
Creates the screen for a key that was not known before.
Source§fn screen_changed(&self, screen: &Rc<NativeScreen>)
fn screen_changed(&self, screen: &Rc<NativeScreen>)
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>>
fn screen_from_top_level_core( &self, top_level: &dyn ITopLevelImpl, ) -> Option<Rc<Screen>>
The screen that
top_level is on.Source§fn screen_added(&self, screen: &Rc<Self::Screen>)
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>)
fn screen_removed(&self, screen: &Rc<Self::Screen>)
Called for a screen whose key disappeared.
Source§fn request_screen_details_core(&self) -> Pin<Box<dyn Future<Output = bool>>>
fn request_screen_details_core(&self) -> Pin<Box<dyn Future<Output = bool>>>
See
IScreenImpl::request_screen_details; the outcome is cached.Source§fn screen_from_point_core(&self, point: PixelPoint) -> Option<Rc<Screen>>
fn screen_from_point_core(&self, point: PixelPoint) -> Option<Rc<Screen>>
The screen that contains
point.Auto Trait Implementations§
impl !Freeze for ScreenImpl
impl !RefUnwindSafe for ScreenImpl
impl !Send for ScreenImpl
impl !Sync for ScreenImpl
impl !UnwindSafe for ScreenImpl
impl Unpin for ScreenImpl
impl UnsafeUnpin for ScreenImpl
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
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
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 moreSource§impl<T> IScreenImpl for Twhere
T: ScreensBaseImpl + ?Sized,
impl<T> IScreenImpl for Twhere
T: ScreensBaseImpl + ?Sized,
Source§fn screen_count(&self) -> i32
fn screen_count(&self) -> i32
Gets the total number of screens available on the device.
Source§fn all_screens(&self) -> Vec<Rc<Screen>>
fn all_screens(&self) -> Vec<Rc<Screen>>
Gets the list of all screens available on the device.
Source§fn set_changed(&self, value: Option<Rc<dyn Fn()>>)
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>>
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>>
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>>
fn screen_from_point(&self, point: PixelPoint) -> Option<Rc<Screen>>
The screen that contains
point.impl<T> IUnknownImpl for Twhere
T: ?Sized,
Source§impl<T> ScreensBaseImplExt for Twhere
T: ScreensBaseImpl + ?Sized,
impl<T> ScreensBaseImplExt for Twhere
T: ScreensBaseImpl + ?Sized,
Source§fn on_changed(self: &Rc<T>)
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>>
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>>
fn all_platform_screens(&self) -> Vec<Rc<<T as ScreensBaseImpl>::Screen>>
All current screens, as the screen type of the backend.