windows: Refactor clipboard implementation (#14347)

This PR provides a similar implementation to the macOS clipboard
implementation, adds support for metadata and includes tests.

Release Notes:

- N/A
This commit is contained in:
张小白 2024-07-15 10:40:41 +08:00 committed by GitHub
parent ba09eabfba
commit 315692d112
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 180 additions and 35 deletions

View file

@ -406,6 +406,8 @@ pub(crate) trait PlatformTextSystem: Send + Sync {
raster_bounds: Bounds<DevicePixels>,
) -> Result<(Size<DevicePixels>, Vec<u8>)>;
fn layout_line(&self, text: &str, font_size: Pixels, runs: &[FontRun]) -> LineLayout;
#[cfg(target_os = "windows")]
fn destroy(&self);
}
#[derive(PartialEq, Eq, Hash, Clone)]