linux: Primary clipboard (#10534)
Implements copying from and pasting to the primary selection. Release Notes: - N/A
This commit is contained in:
parent
98db7fa61e
commit
b31df39ab0
13 changed files with 173 additions and 16 deletions
|
@ -547,11 +547,23 @@ impl AppContext {
|
|||
self.platform.window_appearance()
|
||||
}
|
||||
|
||||
/// Writes data to the primary selection buffer.
|
||||
/// Only available on Linux.
|
||||
pub fn write_to_primary(&self, item: ClipboardItem) {
|
||||
self.platform.write_to_primary(item)
|
||||
}
|
||||
|
||||
/// Writes data to the platform clipboard.
|
||||
pub fn write_to_clipboard(&self, item: ClipboardItem) {
|
||||
self.platform.write_to_clipboard(item)
|
||||
}
|
||||
|
||||
/// Reads data from the primary selection buffer.
|
||||
/// Only available on Linux.
|
||||
pub fn read_from_primary(&self) -> Option<ClipboardItem> {
|
||||
self.platform.read_from_primary()
|
||||
}
|
||||
|
||||
/// Reads data from the platform clipboard.
|
||||
pub fn read_from_clipboard(&self) -> Option<ClipboardItem> {
|
||||
self.platform.read_from_clipboard()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue