From 3a0d34c0240f4421737a6a08761f99d6f8140d02 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 4 Mar 2023 05:37:11 +0100 Subject: Create `iced_widget` subcrate and re-organize the whole codebase --- winit/src/clipboard.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'winit/src/clipboard.rs') diff --git a/winit/src/clipboard.rs b/winit/src/clipboard.rs index c1fd8813..22509130 100644 --- a/winit/src/clipboard.rs +++ b/winit/src/clipboard.rs @@ -1,7 +1,6 @@ //! Access the clipboard. -pub use iced_native::clipboard::Action; - -use crate::command::{self, Command}; +use crate::native::clipboard::Action; +use crate::native::command::{self, Command}; /// A buffer for short-term storage and transfer within and between /// applications. @@ -56,7 +55,7 @@ impl Clipboard { } } -impl iced_native::Clipboard for Clipboard { +impl crate::core::Clipboard for Clipboard { fn read(&self) -> Option { self.read() } -- cgit From 99e0a71504456976ba88040f5d1d3bbc347694ea Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 5 Mar 2023 06:35:20 +0100 Subject: Rename `iced_native` to `iced_runtime` --- winit/src/clipboard.rs | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'winit/src/clipboard.rs') diff --git a/winit/src/clipboard.rs b/winit/src/clipboard.rs index 22509130..7271441d 100644 --- a/winit/src/clipboard.rs +++ b/winit/src/clipboard.rs @@ -1,6 +1,4 @@ //! Access the clipboard. -use crate::native::clipboard::Action; -use crate::native::command::{self, Command}; /// A buffer for short-term storage and transfer within and between /// applications. @@ -64,15 +62,3 @@ impl crate::core::Clipboard for Clipboard { self.write(contents) } } - -/// Read the current contents of the clipboard. -pub fn read( - f: impl Fn(Option) -> Message + 'static, -) -> Command { - Command::single(command::Action::Clipboard(Action::Read(Box::new(f)))) -} - -/// Write the given contents to the clipboard. -pub fn write(contents: String) -> Command { - Command::single(command::Action::Clipboard(Action::Write(contents))) -} -- cgit