Drag and drop support in druid-shell
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 9.7k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
This is mentioned in the "longer term future" section of the [druid-shell roadmap](https://github.com/linebender/druid/issues/16). Perhaps we're getting close?
My personal use case is to drag files from the filesystem onto the window, ideally with a sub-window drop location.
For implementation reference, Winit has `DroppedFile` / `HoveredFile` / `HoveredFileCancelled` events for [mac](https://github.com/rust-windowing/winit/blob/b9f3d333e41464457f6e42640793bf88b9563727/src/platform_impl/macos/window_delegate.rs), [windows](https://github.com/rust-windowing/winit/blob/b9f3d333e41464457f6e42640793bf88b9563727/src/platform_impl/windows/drop_handler.rs), and [x11](https://github.com/rust-windowing/winit/blob/c5620efc9c5f44f9755a64359bb9fee9f92a4ded/src/platform_impl/linux/x11/event_processor.rs). I wasn't able to find the precise way this is done in GTK... drag and drop are a little bit overloaded terms.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the druid-shell roadmap issue linked in the description, then inspect druid-shell's existing platform event handling. Use Winit's DroppedFile, HoveredFile, and HoveredFileCancelled implementations for macOS, Windows, and X11 as implementation references. Done means drag-and-drop file events work across the relevant platforms, including a sub-window drop location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100