diff options
-rw-r--r-- | winit/src/clipboard.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/winit/src/clipboard.rs b/winit/src/clipboard.rs index 1b92b28d..c1fd8813 100644 --- a/winit/src/clipboard.rs +++ b/winit/src/clipboard.rs @@ -26,6 +26,14 @@ impl Clipboard { Clipboard { state } } + /// Creates a new [`Clipboard`] that isn't associated with a window. + /// This clipboard will never contain a copied value. + pub fn unconnected() -> Clipboard { + Clipboard { + state: State::Unavailable, + } + } + /// Reads the current content of the [`Clipboard`] as text. pub fn read(&self) -> Option<String> { match &self.state { |