mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-14 06:22:24 +00:00
* craft-window: restore store: window.json beside config.toml and a pure place() * craft-window: restore: review fixes (bar strip, mixed DPI, pending writes, work area) --------- Co-authored-by: aiongg <aiongtaigi@gmail.com>
38 lines
1.8 KiB
TOML
38 lines
1.8 KiB
TOML
[package]
|
|
name = "craft-window"
|
|
description = "Decide who draws the window frame (the desktop or the app) so every Craft app gets the same titlebar and borders per desktop, make an app-drawn strip act as the title bar, and keep the window list, cascade placement and Window menu for apps with one window per document."
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
repository.workspace = true
|
|
|
|
[features]
|
|
# `decorate`: set the decision on an `egui::ViewportBuilder`. `title_bar`: an app-drawn strip as
|
|
# the title bar (on macOS with AppKit's `movable` flag). `Viewports`: one immediate viewport per window.
|
|
egui = ["dep:egui", "dep:objc2", "dep:objc2-app-kit"]
|
|
# `restore`: the window-restore store (`window.json` beside `config.toml`) and the pure `place`. No egui.
|
|
restore = ["dep:craft-atomic", "dep:craft-settings", "dep:serde", "dep:serde_json"]
|
|
|
|
[dependencies]
|
|
egui = { workspace = true, optional = true }
|
|
craft-atomic = { workspace = true, optional = true }
|
|
craft-settings = { workspace = true, optional = true }
|
|
serde = { workspace = true, optional = true }
|
|
serde_json = { workspace = true, optional = true }
|
|
|
|
# Only Linux and the BSDs probe a Wayland compositor; everywhere else the frame is the OS's.
|
|
[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies]
|
|
wayland-client = "0.31"
|
|
|
|
# `title_bar::sync_movable` (`NSWindow.movable`); eframe's winit already uses these.
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
objc2 = { version = "0.6.4", default-features = false, features = ["std"], optional = true }
|
|
objc2-app-kit = { version = "0.3.2", default-features = false, features = ["std", "NSApplication", "NSButton", "NSControl", "NSResponder", "NSView", "NSWindow"], optional = true }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
|
|
[lints]
|
|
workspace = true
|