Skip to main content

PlatformNativeSurface

Trait PlatformNativeSurface 

Source
pub trait PlatformNativeSurface {
    // Required methods
    fn set_bounds(&self, bounds: Bounds<DevicePixels>) -> Result<()>;
    fn set_visible(&self, visible: bool) -> Result<()>;
    fn platform_handle(&self) -> Box<dyn Any>;
}
Expand description

A platform-native surface inserted between GPUI’s base and overlay scene planes.

Required Methods§

Source

fn set_bounds(&self, bounds: Bounds<DevicePixels>) -> Result<()>

Updates the native surface geometry in device pixels.

Source

fn set_visible(&self, visible: bool) -> Result<()>

Updates whether the native surface participates in composition.

Source

fn platform_handle(&self) -> Box<dyn Any>

Returns the platform attachment object, such as an IDCompositionVisual on Windows.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§