[package]
name = "native-theme"
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
readme = "README.md"
description = "Cross-platform native theme detection and loading for Rust GUI applications"
[package.metadata.docs.rs]
all-features = true
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
]
[features]
kde = ["dep:configparser"]
portal = ["dep:ashpd", "ashpd/async-io", "dep:zbus"]
windows = ["dep:windows"]
macos = ["dep:objc2", "dep:objc2-foundation", "dep:objc2-app-kit", "dep:block2", "dep:objc2-core-foundation"]
linux-kde = ["kde"]
linux-portal = ["portal"]
linux = ["linux-kde", "linux-portal"]
native = ["linux", "macos", "windows"]
watch = ["dep:notify", "zbus?/blocking-api"]
material-icons = []
lucide-icons = []
svg-rasterize = ["dep:resvg"]
system-fonts = ["dep:fontdb", "dep:objc2-core-text", "dep:objc2-core-foundation"]
system-icons = [
"dep:freedesktop-icons",
"dep:objc2",
"dep:objc2-app-kit",
"dep:objc2-core-foundation",
"dep:objc2-core-graphics",
"dep:objc2-foundation",
"dep:png",
"dep:windows",
"material-icons",
]
[dependencies]
arc-swap = "1.9.2"
async-trait = "0.1.92"
fontdb = { version = "0.23", optional = true, default-features = false, features = ["fs", "fontconfig", "memmap"] }
inventory = "0.3.24"
native-theme-derive = { version = "0.6.0", path = "../native-theme-derive" }
resvg = { version = "0.48.1", optional = true, default-features = false }
serde.workspace = true
serde_with.workspace = true
toml.workspace = true
unicase = "2.9"
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = { version = "0.6.4", optional = true }
objc2-foundation = { version = "0.3.2", optional = true, features = [
"NSString",
"NSUserDefaults",
"NSDistributedNotificationCenter",
"NSNotification",
"NSRunLoop",
"NSOperation",
"block2",
] }
objc2-app-kit = { version = "0.3.2", optional = true, features = [
"NSColor",
"NSColorSpace",
"NSAppearance",
"NSFont",
"NSFontDescriptor",
"NSScroller",
"objc2-core-foundation",
"NSImage",
"NSImageRep",
"NSGraphicsContext",
"objc2-core-graphics",
"NSWorkspace",
"NSAccessibility",
] }
block2 = { version = ">=0.6.2, <0.8.0", optional = true }
objc2-core-text = { version = "0.3.2", optional = true, features = [
"CTFont",
"CTFontDescriptor",
"CTFontTraits",
] }
objc2-core-foundation = { version = "0.3.2", optional = true, features = [
"CFCGTypes",
"CFRunLoop",
"CFDate",
"CFURL",
] }
objc2-core-graphics = { version = "0.3.2", optional = true, features = [
"CGBitmapContext",
"CGColorSpace",
"CGContext",
"CGGeometry",
"CGImage",
] }
[target.'cfg(target_os = "linux")'.dependencies]
ashpd = { version = "0.13.13", optional = true, default-features = false, features = [
"settings",
] }
configparser = { version = "3.2.0", optional = true }
freedesktop-icons = { version = "0.4", optional = true }
notify = { version = "8.2", optional = true, default-features = false }
png = { version = "0.18.1", optional = true, default-features = false }
pollster = "1.0"
zbus = { version = "5.19.0", optional = true, default-features = false }
[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.62.2", optional = true, default-features = false, features = [
"UI_ViewManagement",
"Win32_UI_WindowsAndMessaging",
"Win32_UI_Accessibility",
"Win32_UI_HiDpi",
"Win32_Graphics_Gdi",
"Win32_Graphics_Dwm",
"Win32_UI_Shell",
"Foundation_Metadata",
"Win32_System_Com",
"Win32_System_Threading",
] }
[dev-dependencies]
pollster = "1.0"
proptest = "1.11"
serde_json = "1.0.151"