Better text selection

This commit is contained in:
2026-03-21 01:55:06 -04:00
parent 84077b718f
commit 6954c8c74d
7 changed files with 844 additions and 159 deletions

View File

@@ -117,6 +117,16 @@ impl WindowController {
self.proxy.set_primary_selection_text(self.id, text)
}
/// Copies plain text to the platform clipboard for this window.
pub fn set_clipboard_text(&self, text: impl Into<String>) -> Result<(), PlatformClosed> {
self.proxy.set_clipboard_text(self.id, text)
}
/// Requests the current plain-text clipboard contents from the platform.
pub fn request_clipboard_text(&self) -> Result<(), PlatformClosed> {
self.proxy.request_clipboard_text(self.id)
}
/// Requests the current plain-text primary selection contents from the platform.
pub fn request_primary_selection_text(&self) -> Result<(), PlatformClosed> {
self.proxy.request_primary_selection_text(self.id)