pub struct WindowsPlatform { /* private fields */ }Expand description
Windows platform bridge.
In production, each method will call through FFI to the C++/WinRT layer. For now, we maintain an in-memory view registry for testing and development.
Implementations§
Source§impl WindowsPlatform
impl WindowsPlatform
pub fn new() -> Self
pub fn with_screen(self, width: f32, height: f32, scale: f32) -> Self
pub fn view_count(&self) -> usize
Trait Implementations§
Source§impl Default for WindowsPlatform
impl Default for WindowsPlatform
Source§impl PlatformBridge for WindowsPlatform
impl PlatformBridge for WindowsPlatform
fn platform_id(&self) -> PlatformId
fn create_view(&self, view_type: ViewType, node_id: NodeId) -> NativeHandle
fn update_view( &self, handle: NativeHandle, _props: &PropsDiff, ) -> Result<(), PlatformError>
fn remove_view(&self, handle: NativeHandle)
fn insert_child(&self, parent: NativeHandle, child: NativeHandle, index: usize)
fn remove_child(&self, parent: NativeHandle, child: NativeHandle)
fn measure_text( &self, text: &str, style: &TextStyle, max_width: f32, ) -> TextMetrics
fn screen_size(&self) -> ScreenSize
fn scale_factor(&self) -> f32
fn supports(&self, capability: PlatformCapability) -> bool
Auto Trait Implementations§
impl !Freeze for WindowsPlatform
impl RefUnwindSafe for WindowsPlatform
impl Send for WindowsPlatform
impl Sync for WindowsPlatform
impl Unpin for WindowsPlatform
impl UnsafeUnpin for WindowsPlatform
impl UnwindSafe for WindowsPlatform
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