mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 12:50:04 -04:00
This commit implements a new API for drag and drop, with a `DataTransfer` type which abstracts over the various clipboard/drag and drop APIs across different platforms. I built this on top of #2429 although admittedly I ended up removing pretty much all of their work while I was reworking the design. This is being built in order to help support [drag-and-drop work](https://github.com/slint-ui/slint/issues/1967) in Slint's winit backend. As part of that work, I did extensive research on how drag-and-drop and clipboard APIs are implemented across different platforms, and wrote a (still WIP) research document that can be found [here](https://gist.github.com/eira-fransham/06750cf8d25ade08d362a0ca8dfafe06). The new API is inspired by the browser's [`DataTransfer`](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer) API.
63 lines
1.6 KiB
TOML
63 lines
1.6 KiB
TOML
[package]
|
|
description = "Winit's Win32/Windows backend"
|
|
documentation = "https://docs.rs/winit-win32"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
name = "winit-win32"
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
version.workspace = true
|
|
|
|
[features]
|
|
serde = ["dep:serde", "bitflags/serde", "smol_str/serde", "dpi/serde", "winit-core/serde"]
|
|
|
|
[dependencies]
|
|
bitflags.workspace = true
|
|
cursor-icon.workspace = true
|
|
dpi.workspace = true
|
|
rwh_06.workspace = true
|
|
serde = { workspace = true, optional = true }
|
|
smol_str.workspace = true
|
|
tracing.workspace = true
|
|
url.workspace = true
|
|
winit-core.workspace = true
|
|
|
|
# Platform-specific
|
|
unicode-segmentation.workspace = true
|
|
windows-sys = { workspace = true, features = [
|
|
"Win32_Devices_HumanInterfaceDevice",
|
|
"Win32_Foundation",
|
|
"Win32_Globalization",
|
|
"Win32_Graphics_Dwm",
|
|
"Win32_Graphics_Gdi",
|
|
"Win32_Media",
|
|
"Win32_System_Com_StructuredStorage",
|
|
"Win32_System_Com",
|
|
"Win32_System_DataExchange",
|
|
"Win32_System_LibraryLoader",
|
|
"Win32_System_Memory",
|
|
"Win32_System_Ole",
|
|
"Win32_Security",
|
|
"Win32_System_SystemInformation",
|
|
"Win32_System_SystemServices",
|
|
"Win32_System_Threading",
|
|
"Win32_System_WindowsProgramming",
|
|
"Win32_UI_Accessibility",
|
|
"Win32_UI_Controls",
|
|
"Win32_UI_HiDpi",
|
|
"Win32_UI_Input_Ime",
|
|
"Win32_UI_Input_KeyboardAndMouse",
|
|
"Win32_UI_Input_Pointer",
|
|
"Win32_UI_Input_Touch",
|
|
"Win32_UI_Shell",
|
|
"Win32_UI_TextServices",
|
|
"Win32_UI_WindowsAndMessaging",
|
|
] }
|
|
|
|
[dev-dependencies]
|
|
winit.workspace = true
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
targets = ["x86_64-pc-windows-msvc"]
|