mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-17 02:54:25 +00:00
55 lines
2.0 KiB
TOML
55 lines
2.0 KiB
TOML
[package]
|
|
name = "craft-menu"
|
|
description = "A Craft app's menus: layouts for macOS, Windows, Linux and the web, shortcuts from craft-keymap, a macOS backend (in craft-window), and key equivalents fed back to egui."
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
repository.workspace = true
|
|
|
|
[lib]
|
|
# Every test lives in the `it` integration binary, except the AppKit one (`mac_appkit`, no harness), so `cargo test` builds the library once.
|
|
test = false
|
|
|
|
[dependencies]
|
|
craft-behavior = { workspace = true }
|
|
craft-host = { workspace = true }
|
|
craft-i18n = { workspace = true, features = ["collate"] }
|
|
craft-keymap = { workspace = true, features = ["egui"] }
|
|
craft-quit = { workspace = true, features = ["ui"] }
|
|
craft-theme = { workspace = true }
|
|
craft-ui = { workspace = true }
|
|
craft-window = { workspace = true, features = ["appkit"] }
|
|
egui = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
|
|
[features]
|
|
screen-testing = ["craft-ui/testing"]
|
|
|
|
[dev-dependencies]
|
|
# `default_fonts` so that the shortcuts dialog and native menu tests lay out text.
|
|
egui = { workspace = true }
|
|
|
|
[[test]]
|
|
name = "it"
|
|
path = "tests/it/main.rs"
|
|
harness = false
|
|
required-features = ["screen-testing"]
|
|
|
|
# AppKit end to end: runs on the main thread, so no harness; on other platforms it does nothing.
|
|
[[test]]
|
|
name = "mac_appkit"
|
|
path = "tests/mac_appkit.rs"
|
|
harness = false
|
|
required-features = ["screen-testing"]
|
|
|
|
# The test reads AppKit's menu bar back and feeds it real events, through safe objc2 calls.
|
|
[target.'cfg(target_os = "macos")'.dev-dependencies]
|
|
objc2 = { version = "0.6.4", default-features = false, features = ["std"] }
|
|
objc2-app-kit = { version = "0.3.2", default-features = false, features = ["std", "NSApplication", "NSControl", "NSEvent", "NSMenu", "NSMenuItem", "NSResponder"] }
|
|
objc2-foundation = { version = "0.3.2", default-features = false, features = ["std", "NSDate", "NSGeometry", "NSRunLoop", "NSString"] }
|
|
|
|
[lints]
|
|
workspace = true
|