summaryrefslogtreecommitdiffstats
path: root/runtime/src/command
diff options
context:
space:
mode:
authorLibravatar Mattias Eriksson <snaggen@mayam.com>2024-02-07 17:25:40 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-13 03:14:30 +0100
commit4155edab8d123b767ddad67e24ca2d4c50f31ece (patch)
tree30c81bc419920dd2e425f05caf160377b85ca961 /runtime/src/command
parent7615b2240c360fea21ef041bfd5b1deb73fc03d1 (diff)
downloadiced-4155edab8d123b767ddad67e24ca2d4c50f31ece.tar.gz
iced-4155edab8d123b767ddad67e24ca2d4c50f31ece.tar.bz2
iced-4155edab8d123b767ddad67e24ca2d4c50f31ece.zip
Add support for primary clipboard
Diffstat (limited to 'runtime/src/command')
-rw-r--r--runtime/src/command/action.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/src/command/action.rs b/runtime/src/command/action.rs
index c9ffe801..f04c642c 100644
--- a/runtime/src/command/action.rs
+++ b/runtime/src/command/action.rs
@@ -26,6 +26,9 @@ pub enum Action<T> {
/// Run a clipboard action.
Clipboard(clipboard::Action<T>),
+ /// Run a clipboard action on primary.
+ ClipboardPrimary(clipboard::Action<T>),
+
/// Run a window action.
Window(window::Action<T>),
@@ -66,6 +69,9 @@ impl<T> Action<T> {
Self::Future(future) => Action::Future(Box::pin(future.map(f))),
Self::Stream(stream) => Action::Stream(Box::pin(stream.map(f))),
Self::Clipboard(action) => Action::Clipboard(action.map(f)),
+ Self::ClipboardPrimary(action) => {
+ Action::ClipboardPrimary(action.map(f))
+ }
Self::Window(window) => Action::Window(window.map(f)),
Self::System(system) => Action::System(system.map(f)),
Self::Widget(operation) => {
@@ -88,6 +94,9 @@ impl<T> fmt::Debug for Action<T> {
Self::Clipboard(action) => {
write!(f, "Action::Clipboard({action:?})")
}
+ Self::ClipboardPrimary(action) => {
+ write!(f, "Action::ClipboardPrimary({action:?})")
+ }
Self::Window(action) => {
write!(f, "Action::Window({action:?})")
}