This commit is contained in:
Ashley Wulber 2024-10-16 15:20:36 -04:00
parent 8fb1e21873
commit 757d0753ad
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
14 changed files with 146 additions and 2521 deletions

View file

@ -2,10 +2,8 @@
use std::any::Any;
use bytes::buf::Take;
use dnd::{DndDestinationRectangle, DndSurface};
use iced_core::{clipboard::DndSource, Vector};
use iced_futures::MaybeSend;
use iced_core::clipboard::DndSource;
use window_clipboard::mime::{AllowedMimeTypes, AsMimeTypes};
use crate::{oneshot, task, Action, Task};

View file

@ -29,7 +29,6 @@ pub use user_interface::UserInterface;
pub use window::Window;
use crate::futures::futures::channel::oneshot;
use dnd::DndAction;
use std::borrow::Cow;
use std::fmt;
@ -70,6 +69,7 @@ pub enum Action<T> {
/// This will normally close any application windows and
/// terminate the runtime loop.
Exit,
/// Run a Dnd action.
Dnd(crate::dnd::DndAction),
@ -126,7 +126,7 @@ where
Action::PlatformSpecific(action) => {
write!(f, "Action::PlatformSpecific({:?})", action)
}
Action::Dnd(action) => write!(f, "Action::Dnd({:?})", action),
Action::Dnd(_) => write!(f, "Action::Dnd"),
}
}
}

View file

@ -1,8 +1,6 @@
//! Platform specific actions defined for wayland
use std::{fmt, marker::PhantomData};
use iced_futures::MaybeSend;
use std::fmt;
#[cfg(feature = "wayland")]
/// Platform specific actions defined for wayland
@ -20,6 +18,7 @@ impl fmt::Debug for Action {
match self {
#[cfg(feature = "wayland")]
Action::Wayland(action) => action.fmt(_f),
#[cfg(not(feature = "wayland"))]
_ => Ok(()),
}
}

View file

@ -1,5 +1,3 @@
use iced_core::widget::operation::Outcome;
use crate::core::event::{self, Event};
use crate::core::mouse;
use crate::core::renderer;
@ -211,7 +209,6 @@ where
operation::Outcome::Chain(next) => {
current_operation = Some(next);
}
_ => {}
};
}
}

View file

@ -1,7 +1,6 @@
//! Implement your own event loop to drive a user interface.
use iced_core::clipboard::DndDestinationRectangles;
use iced_core::widget::Operation;
use iced_core::widget::tree::NAMED;
use crate::core::event::{self, Event};