pub struct MacosPlatform { /* private fields */ }Expand description
macOS platform bridge.
In production, each method will call through FFI to the Swift/ObjC layer. For now, we maintain an in-memory view registry for testing and development.
Implementations§
Source§impl MacosPlatform
impl MacosPlatform
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 MacosPlatform
impl Default for MacosPlatform
Source§impl PlatformBridge for MacosPlatform
impl PlatformBridge for MacosPlatform
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 MacosPlatform
impl RefUnwindSafe for MacosPlatform
impl Send for MacosPlatform
impl Sync for MacosPlatform
impl Unpin for MacosPlatform
impl UnsafeUnpin for MacosPlatform
impl UnwindSafe for MacosPlatform
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