YaLTeR / wl-clipboard-rs

A safe Rust crate for working with the Wayland clipboard.
Apache License 2.0
223 stars 16 forks source link

Allow offering multiple mime types at once #9

Closed ghost closed 4 years ago

ghost commented 4 years ago

The current copy() only allows setting one data source, but some applications need to offer their copy in different formats. For example, libreoffice offers rich text with plain text as a fallback.

For implementing such a functionality, we need a copy_multi() function that takes, e.g., a vector of (Source, MimeType) or a hashmap of MimeType: Source, and offers them simultaneously.