mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-12 05:12:39 +00:00
Split out of #2073. winit sends no pointer events during a drag from another application on macOS, so a Finder drop had no pointer and never found the frame under it. The host now gives the pointer's place on the screen (`Services::pointer`, `PointerFn`: the system's points before the UI scale, from `NSEvent.mouseLocation`), and `take_pending_drops` uses it for the files that came without a pointer, divided by egui's zoom factor and made relative to the window.
66 lines
3.0 KiB
TOML
66 lines
3.0 KiB
TOML
[package]
|
|
name = "designcraft"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
default-run = "designcraft"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
designcraft-engine = { workspace = true }
|
|
designcraft-ui-egui = { workspace = true }
|
|
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "wayland", "x11", "links", "clipboard"] }
|
|
egui = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
|
|
[build-dependencies]
|
|
# Icon + VERSIONINFO for designcraft.exe; build.rs only uses it when the target is Windows.
|
|
winresource = "0.1"
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
# Not called here: craft-dialogs shows the dialogs. rfd's default features keep its Wayland
|
|
# support on, so portal dialogs get the window as their parent.
|
|
rfd = { workspace = true }
|
|
arboard = { workspace = true }
|
|
|
|
[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies]
|
|
# The same winit eframe uses: to pick the X11 backend (file drag-and-drop) in main.rs.
|
|
winit = { version = "0.30", default-features = false, features = ["x11"] }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
craft-update = { workspace = true }
|
|
# EnumDisplayDevices (src/gpu.rs): which GPU drives the display, so the window draws on the GPU
|
|
# that shows it; drawing on a GPU without a monitor reset the display driver. Safe wrappers over
|
|
# Win32 (MIT); the `user` feature is User32.dll only. Also the window frame for the custom title
|
|
# bar (src/window_frame.rs, window styles).
|
|
winsafe = { version = "0.0.29", default-features = false, features = ["user"] }
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
# The same winit as eframe; only the native termination opt-in is used.
|
|
winit = { version = "0.30", default-features = false }
|
|
muda = { version = "0.21", default-features = false }
|
|
# The input context, to drop the IME's marked text when the Type tool ends a composition. The
|
|
# versions muda uses, through safe methods.
|
|
objc2 = "0.6"
|
|
objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "NSEvent", "NSResponder", "NSScreen", "NSTextInputContext"] }
|
|
# Files dragged in from the Finder: the pointer's place on the screen (src/pointer.rs).
|
|
objc2-foundation = { version = "0.3", default-features = false, features = ["std", "NSArray", "NSGeometry"] }
|
|
# The window's `movable` flag follows the application bar's controls.
|
|
craft-window = { workspace = true }
|
|
# Finder double-clicks, Open With, Dock drops and `open -a DesignCraft brochure.idml` arrive as a
|
|
# kAEOpenDocuments Apple event, which winit 0.30 doesn't handle. This crate (also used by PhotoCraft,
|
|
# PdfCraft and WordCraft) registers the handler behind a safe API (Objective-C interop needs unsafe,
|
|
# which the workspace forbids). Pinned exactly: review the diff before bumping.
|
|
fmv-macos-events = "=0.1.0"
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
# Native GNOME/Wayland controls without a bundled title font.
|
|
winit = { version = "0.30", default-features = false, features = ["wayland-csd-adwaita-notitle"] }
|
|
|