runtime: Remove start_dnd
This is not currently used. And is impossible to (soundly) use, since it requires a `Send` bound, which `State` and `Element` lack.
This commit is contained in:
parent
bd6c04d809
commit
ed5de12e69
3 changed files with 2 additions and 52 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -3218,11 +3218,13 @@ dependencies = [
|
||||||
"mundy",
|
"mundy",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"rustc-hash 2.1.1",
|
"rustc-hash 2.1.1",
|
||||||
|
"rustix 0.38.44",
|
||||||
"sysinfo",
|
"sysinfo",
|
||||||
"thiserror 2.0.17",
|
"thiserror 2.0.17",
|
||||||
"tracing",
|
"tracing",
|
||||||
"wasm-bindgen-futures",
|
"wasm-bindgen-futures",
|
||||||
"wayland-backend",
|
"wayland-backend",
|
||||||
|
"wayland-client",
|
||||||
"wayland-protocols 0.32.9",
|
"wayland-protocols 0.32.9",
|
||||||
"web-sys",
|
"web-sys",
|
||||||
"winapi",
|
"winapi",
|
||||||
|
|
|
||||||
|
|
@ -17,19 +17,6 @@ pub enum DndAction {
|
||||||
/// The rectangles to register.
|
/// The rectangles to register.
|
||||||
rectangles: Vec<DndDestinationRectangle>,
|
rectangles: Vec<DndDestinationRectangle>,
|
||||||
},
|
},
|
||||||
/// Start a Dnd operation.
|
|
||||||
StartDnd {
|
|
||||||
/// Whether the Dnd operation is internal.
|
|
||||||
internal: bool,
|
|
||||||
/// The source surface of the Dnd operation.
|
|
||||||
source_surface: Option<DndSource>,
|
|
||||||
/// The icon surface of the Dnd operation.
|
|
||||||
icon_surface: Option<Box<dyn Any + Send>>,
|
|
||||||
/// The content of the Dnd operation.
|
|
||||||
content: Box<dyn AsMimeTypes + Send + 'static>,
|
|
||||||
/// The actions of the Dnd operation.
|
|
||||||
actions: dnd::DndAction,
|
|
||||||
},
|
|
||||||
/// End a Dnd operation.
|
/// End a Dnd operation.
|
||||||
EndDnd,
|
EndDnd,
|
||||||
/// Peek the current Dnd operation.
|
/// Peek the current Dnd operation.
|
||||||
|
|
@ -53,19 +40,6 @@ impl std::fmt::Debug for DndAction {
|
||||||
.field("surface", surface)
|
.field("surface", surface)
|
||||||
.field("rectangles", rectangles)
|
.field("rectangles", rectangles)
|
||||||
.finish(),
|
.finish(),
|
||||||
Self::StartDnd {
|
|
||||||
internal,
|
|
||||||
source_surface,
|
|
||||||
icon_surface,
|
|
||||||
content: _,
|
|
||||||
actions,
|
|
||||||
} => f
|
|
||||||
.debug_struct("StartDnd")
|
|
||||||
.field("internal", internal)
|
|
||||||
.field("source_surface", source_surface)
|
|
||||||
.field("icon_surface", icon_surface)
|
|
||||||
.field("actions", actions)
|
|
||||||
.finish(),
|
|
||||||
Self::EndDnd => f.write_str("EndDnd"),
|
Self::EndDnd => f.write_str("EndDnd"),
|
||||||
Self::PeekDnd(mime, _) => {
|
Self::PeekDnd(mime, _) => {
|
||||||
f.debug_struct("PeekDnd").field("mime", mime).finish()
|
f.debug_struct("PeekDnd").field("mime", mime).finish()
|
||||||
|
|
@ -99,23 +73,6 @@ pub fn register_dnd_destination<Message>(
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Start a Dnd operation.
|
|
||||||
pub fn start_dnd<Message>(
|
|
||||||
internal: bool,
|
|
||||||
source_surface: Option<DndSource>,
|
|
||||||
icon_surface: Option<Box<dyn Any + Send>>,
|
|
||||||
content: Box<dyn AsMimeTypes + Send + 'static>,
|
|
||||||
actions: dnd::DndAction,
|
|
||||||
) -> Task<Message> {
|
|
||||||
task::effect(Action::Dnd(DndAction::StartDnd {
|
|
||||||
internal,
|
|
||||||
source_surface,
|
|
||||||
icon_surface,
|
|
||||||
content,
|
|
||||||
actions,
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
|
|
||||||
/// End a Dnd operation.
|
/// End a Dnd operation.
|
||||||
pub fn end_dnd<Message>() -> Task<Message> {
|
pub fn end_dnd<Message>() -> Task<Message> {
|
||||||
task::effect(Action::Dnd(DndAction::EndDnd))
|
task::effect(Action::Dnd(DndAction::EndDnd))
|
||||||
|
|
|
||||||
|
|
@ -2170,15 +2170,6 @@ where
|
||||||
iced_runtime::dnd::DndAction::SetAction(a) => {
|
iced_runtime::dnd::DndAction::SetAction(a) => {
|
||||||
clipboard.set_action(a);
|
clipboard.set_action(a);
|
||||||
}
|
}
|
||||||
iced_runtime::dnd::DndAction::StartDnd {
|
|
||||||
internal,
|
|
||||||
source_surface,
|
|
||||||
icon_surface,
|
|
||||||
content,
|
|
||||||
actions,
|
|
||||||
} => {
|
|
||||||
// removed
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
Action::PlatformSpecific(a) => {
|
Action::PlatformSpecific(a) => {
|
||||||
platform_specific.send_action(a);
|
platform_specific.send_action(a);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue