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§
Sourcefn set_bounds(&self, bounds: Bounds<DevicePixels>) -> Result<()>
fn set_bounds(&self, bounds: Bounds<DevicePixels>) -> Result<()>
Updates the native surface geometry in device pixels.
Sourcefn set_visible(&self, visible: bool) -> Result<()>
fn set_visible(&self, visible: bool) -> Result<()>
Updates whether the native surface participates in composition.
Sourcefn platform_handle(&self) -> Box<dyn Any>
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".