pub struct TopLevelImpl { /* private fields */ }Expand description
The state and behaviour every top-level of this backend shares.
Deviation (DEVIATIONS.md, Native backend): in the reference the top-level
is its own software (framebuffer) render surface. Here that is
TopLevelFramebufferSurface: a render surface is shared with the thread
that renders, and the top-level is an object of the UI thread.
Implementations§
Source§impl TopLevelImpl
impl TopLevelImpl
Sourcepub fn input_method(&self) -> Option<Rc<FerroNativeTextInputMethod>>
pub fn input_method(&self) -> Option<Rc<FerroNativeTextInputMethod>>
The text input method of the top-level.
pub fn desktop_scaling(&self) -> f64
Sourcepub fn native(&self) -> Option<ComPtr<IFrnTopLevel>>
pub fn native(&self) -> Option<ComPtr<IFrnTopLevel>>
The native top-level; None once it is disposed.
Sourcepub fn mac_os_handle(&self) -> Option<Rc<MacOSTopLevelHandle>>
pub fn mac_os_handle(&self) -> Option<Rc<MacOSTopLevelHandle>>
The platform handle with its concrete type.
pub fn handle(&self) -> Option<Rc<dyn IPlatformHandle>>
pub fn client_size(&self) -> Size
pub fn render_scaling(&self) -> f64
pub fn surfaces(&self) -> Vec<Arc<dyn IPlatformRenderSurface>>
Sourcepub fn render_surfaces(
&self,
) -> Arc<dyn Fn() -> Vec<Arc<dyn IPlatformRenderSurface>> + Send + Sync> ⓘ
pub fn render_surfaces( &self, ) -> Arc<dyn Fn() -> Vec<Arc<dyn IPlatformRenderSurface>> + Send + Sync> ⓘ
The surfaces as the thread that renders asks for them: the function reads the cell the top-level publishes its surfaces in, and never reaches the top-level itself.
Deviation (DEVIATIONS.md, Native backend): Surfaces of the reference
keeps returning the surfaces of a disposed top-level, whose native
object then fails every call. Here the surfaces are gone once the
top-level is disposed: they gave their native top-level back on the
UI thread, and a render target can no longer be created for them.
pub fn transparency_level(&self) -> WindowTransparencyLevel
pub fn acrylic_compensation_levels(&self) -> AcrylicPlatformCompensationLevels
Sourcepub fn get_automation_peer(&self) -> Option<Ref<AutomationPeer>>
pub fn get_automation_peer(&self) -> Option<Ref<AutomationPeer>>
The automation peer of the focus root of the top-level, if it is a control.
pub fn raw_text_input_event(&self, time_stamp: u64, text: &str) -> bool
pub fn raw_key_event( &self, type_: FrnRawKeyEventType, time_stamp: u64, modifiers: FrnInputModifiers, key: FrnKey, physical_key: FrnPhysicalKey, key_symbol: Option<String>, ) -> bool
pub fn invalidate(&self)
pub fn set_input_root(&self, input_root: Rc<dyn IInputRoot>)
pub fn point_to_client(&self, point: PixelPoint) -> Point
pub fn point_to_screen(&self, point: Point) -> PixelPoint
pub fn set_cursor(&self, cursor: Option<Rc<dyn ICursorImpl>>)
pub fn set_transparency_level_hint( &self, transparency_levels: &[WindowTransparencyLevel], )
Sourcepub fn try_get_feature(&self, feature_type: TypeId) -> Option<Rc<dyn Any>>
pub fn try_get_feature(&self, feature_type: TypeId) -> Option<Rc<dyn Any>>
The optional features of every top-level of this backend.
The features whose contracts are not ported yet (native control host, launcher) are absent.
Sourcepub fn native_control_host(&self) -> Option<Rc<dyn INativeControlHostImpl>>
pub fn native_control_host(&self) -> Option<Rc<dyn INativeControlHostImpl>>
The host of native controls of the top-level; None once it is
disposed.
Source§impl TopLevelImpl
impl TopLevelImpl
pub fn input(&self) -> Option<Rc<dyn Fn(Rc<dyn IRawInputEventArgs>)>>
pub fn set_input(&self, value: Option<Rc<dyn Fn(Rc<dyn IRawInputEventArgs>)>>)
pub fn paint(&self) -> Option<Rc<dyn Fn(Rect)>>
pub fn set_paint(&self, value: Option<Rc<dyn Fn(Rect)>>)
pub fn resized(&self) -> Option<Rc<dyn Fn(Size, WindowResizeReason)>>
pub fn set_resized(&self, value: Option<Rc<dyn Fn(Size, WindowResizeReason)>>)
pub fn scaling_changed(&self) -> Option<Rc<dyn Fn(f64)>>
pub fn set_scaling_changed(&self, value: Option<Rc<dyn Fn(f64)>>)
pub fn transparency_level_changed( &self, ) -> Option<Rc<dyn Fn(WindowTransparencyLevel)>>
pub fn set_transparency_level_changed( &self, value: Option<Rc<dyn Fn(WindowTransparencyLevel)>>, )
pub fn closed(&self) -> Option<Rc<dyn Fn()>>
pub fn set_closed(&self, value: Option<Rc<dyn Fn()>>)
pub fn lost_focus(&self) -> Option<Rc<dyn Fn()>>
pub fn set_lost_focus(&self, value: Option<Rc<dyn Fn()>>)
Auto Trait Implementations§
impl !Freeze for TopLevelImpl
impl !RefUnwindSafe for TopLevelImpl
impl !Send for TopLevelImpl
impl !Sync for TopLevelImpl
impl !UnwindSafe for TopLevelImpl
impl Unpin for TopLevelImpl
impl UnsafeUnpin for TopLevelImpl
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more