The only breaking change is that x11rb no longer reports an error when querying the WmSizeHints of a window that does not have this property set. For this reason, the return type of WmSizeHintsCookie::Reply() changed from Result<WmSizeHints, SomeError> to Result<Option<WmSizeHints>, SomeError>. In update_normal_hints(), previously a cryptic error would be reported to the caller. Instead, this now uses unwrap_or_default() to get a WmSizeHints. All fields of WmSizeHints are Options, so this produces an empty object. resize_increments() queries a value from the window and returns an Option. Previously, the error for "missing property" was turned into None via .ok(). This commit adds a call to flatten() to also turn "property not set" into None. Finally, request_user_attention() queries a window's WmHints property and updates one field of it. The code already uses unwrap_or_default() to deal with missing properties, so just a call to flatten() is needed to merge "missing property" and "error while querying" into one. Other changes in x11rb do not seem to affect this crate. x11rb's MSRV increased from 1.56 to 1.63, which is still below the MSRV of this crate, which is 1.65. Signed-off-by: Uli Schlachter <psychon@znc.in>
226 lines
7 KiB
TOML
226 lines
7 KiB
TOML
[package]
|
|
name = "winit"
|
|
version = "0.29.4"
|
|
authors = ["The winit contributors", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
|
description = "Cross-platform window creation library."
|
|
edition = "2021"
|
|
keywords = ["windowing"]
|
|
license = "Apache-2.0"
|
|
readme = "README.md"
|
|
repository = "https://github.com/rust-windowing/winit"
|
|
documentation = "https://docs.rs/winit"
|
|
categories = ["gui"]
|
|
rust-version = "1.65.0"
|
|
|
|
[package.metadata.docs.rs]
|
|
features = [
|
|
"rwh_04",
|
|
"rwh_05",
|
|
"rwh_06",
|
|
"serde",
|
|
# Enabled to get docs to compile
|
|
"android-native-activity",
|
|
]
|
|
default-target = "x86_64-unknown-linux-gnu"
|
|
# These are all tested in CI
|
|
targets = [
|
|
# Windows
|
|
"i686-pc-windows-msvc",
|
|
"x86_64-pc-windows-msvc",
|
|
# macOS
|
|
"x86_64-apple-darwin",
|
|
# Unix (X11 & Wayland)
|
|
"i686-unknown-linux-gnu",
|
|
"x86_64-unknown-linux-gnu",
|
|
# iOS
|
|
"x86_64-apple-ios",
|
|
# Android
|
|
"aarch64-linux-android",
|
|
# WebAssembly
|
|
"wasm32-unknown-unknown",
|
|
]
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
|
|
|
[features]
|
|
default = ["rwh_06", "x11", "wayland", "wayland-dlopen", "wayland-csd-adwaita"]
|
|
x11 = ["x11-dl", "bytemuck", "percent-encoding", "xkbcommon-dl/x11", "x11rb"]
|
|
wayland = ["wayland-client", "wayland-backend", "wayland-protocols", "wayland-protocols-plasma", "sctk", "ahash", "memmap2"]
|
|
wayland-dlopen = ["wayland-backend/dlopen"]
|
|
wayland-csd-adwaita = ["sctk-adwaita", "sctk-adwaita/ab_glyph"]
|
|
wayland-csd-adwaita-crossfont = ["sctk-adwaita", "sctk-adwaita/crossfont"]
|
|
wayland-csd-adwaita-notitle = ["sctk-adwaita"]
|
|
android-native-activity = ["android-activity/native-activity"]
|
|
android-game-activity = ["android-activity/game-activity"]
|
|
serde = ["dep:serde", "cursor-icon/serde", "smol_str/serde"]
|
|
rwh_04 = ["dep:rwh_04", "ndk/rwh_04"]
|
|
rwh_05 = ["dep:rwh_05", "ndk/rwh_05"]
|
|
rwh_06 = ["dep:rwh_06", "ndk/rwh_06"]
|
|
|
|
[build-dependencies]
|
|
cfg_aliases = "0.1.1"
|
|
|
|
[dependencies]
|
|
bitflags = "2"
|
|
cursor-icon = "1.1.0"
|
|
log = "0.4"
|
|
mint = { version = "0.5.6", optional = true }
|
|
once_cell = "1.12"
|
|
rwh_04 = { package = "raw-window-handle", version = "0.4", optional = true }
|
|
rwh_05 = { package = "raw-window-handle", version = "0.5", features = ["std"], optional = true }
|
|
rwh_06 = { package = "raw-window-handle", version = "0.6", features = ["std"], optional = true }
|
|
serde = { version = "1", optional = true, features = ["serde_derive"] }
|
|
smol_str = "0.2.0"
|
|
|
|
[dev-dependencies]
|
|
image = { version = "0.24.0", default-features = false, features = ["png"] }
|
|
simple_logger = { version = "4.2.0", default_features = false }
|
|
winit = { path = ".", features = ["rwh_05"] }
|
|
|
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dev-dependencies]
|
|
softbuffer = "0.3.0"
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
android-activity = "0.5.0"
|
|
ndk = { version = "0.8.0", default-features = false }
|
|
ndk-sys = "0.5.0"
|
|
|
|
[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies]
|
|
core-foundation = "0.9.3"
|
|
objc2 = "0.4.1"
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
core-graphics = "0.23.1"
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies.icrate]
|
|
version = "0.0.4"
|
|
features = [
|
|
"dispatch",
|
|
"Foundation",
|
|
"Foundation_NSArray",
|
|
"Foundation_NSAttributedString",
|
|
"Foundation_NSMutableAttributedString",
|
|
"Foundation_NSData",
|
|
"Foundation_NSDictionary",
|
|
"Foundation_NSString",
|
|
"Foundation_NSProcessInfo",
|
|
"Foundation_NSThread",
|
|
"Foundation_NSNumber",
|
|
]
|
|
|
|
[target.'cfg(target_os = "ios")'.dependencies.icrate]
|
|
version = "0.0.4"
|
|
features = [
|
|
"dispatch",
|
|
"Foundation",
|
|
"Foundation_NSArray",
|
|
"Foundation_NSString",
|
|
"Foundation_NSProcessInfo",
|
|
"Foundation_NSThread",
|
|
"Foundation_NSSet",
|
|
]
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
unicode-segmentation = "1.7.1"
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
|
|
version = "0.48"
|
|
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_LibraryLoader",
|
|
"Win32_System_Ole",
|
|
"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",
|
|
]
|
|
|
|
[target.'cfg(all(unix, not(any(target_os = "redox", target_family = "wasm", target_os = "android", target_os = "ios", target_os = "macos"))))'.dependencies]
|
|
ahash = { version = "0.8.3", features = ["no-rng"], optional = true }
|
|
bytemuck = { version = "1.13.1", default-features = false, optional = true }
|
|
calloop = "0.12.3"
|
|
libc = "0.2.64"
|
|
memmap2 = { version = "0.9.0", optional = true }
|
|
percent-encoding = { version = "2.0", optional = true }
|
|
rustix = { version = "0.38.4", default-features = false, features = ["std", "system", "thread", "process"] }
|
|
sctk = { package = "smithay-client-toolkit", version = "0.18.0", default-features = false, features = ["calloop"], optional = true }
|
|
sctk-adwaita = { version = "0.7.0", default_features = false, optional = true }
|
|
wayland-backend = { version = "0.3.0", default_features = false, features = ["client_system"], optional = true }
|
|
wayland-client = { version = "0.31.1", optional = true }
|
|
wayland-protocols = { version = "0.31.0", features = [ "staging"], optional = true }
|
|
wayland-protocols-plasma = { version = "0.2.0", features = [ "client" ], optional = true }
|
|
x11-dl = { version = "2.18.5", optional = true }
|
|
x11rb = { version = "0.13.0", default-features = false, features = ["allow-unsafe-code", "dl-libxcb", "randr", "resource_manager", "xinput", "xkb"], optional = true }
|
|
xkbcommon-dl = "0.4.0"
|
|
|
|
[target.'cfg(target_os = "redox")'.dependencies]
|
|
orbclient = { version = "0.3.42", default-features = false }
|
|
redox_syscall = "0.3"
|
|
|
|
[target.'cfg(target_family = "wasm")'.dependencies.web_sys]
|
|
package = "web-sys"
|
|
version = "0.3.64"
|
|
features = [
|
|
'AbortController',
|
|
'AbortSignal',
|
|
'console',
|
|
'CssStyleDeclaration',
|
|
'Document',
|
|
'DomRect',
|
|
'DomRectReadOnly',
|
|
'Element',
|
|
'Event',
|
|
'EventTarget',
|
|
'FocusEvent',
|
|
'HtmlCanvasElement',
|
|
'HtmlElement',
|
|
'IntersectionObserver',
|
|
'IntersectionObserverEntry',
|
|
'KeyboardEvent',
|
|
'MediaQueryList',
|
|
'MessageChannel',
|
|
'MessagePort',
|
|
'Node',
|
|
'PageTransitionEvent',
|
|
'PointerEvent',
|
|
'ResizeObserver',
|
|
'ResizeObserverBoxOptions',
|
|
'ResizeObserverEntry',
|
|
'ResizeObserverOptions',
|
|
'ResizeObserverSize',
|
|
'VisibilityState',
|
|
'Window',
|
|
'WheelEvent'
|
|
]
|
|
|
|
[target.'cfg(target_family = "wasm")'.dependencies]
|
|
atomic-waker = "1"
|
|
js-sys = "0.3.64"
|
|
wasm-bindgen = "0.2"
|
|
wasm-bindgen-futures = "0.4"
|
|
web-time = "0.2"
|
|
|
|
[target.'cfg(target_family = "wasm")'.dev-dependencies]
|
|
console_log = "1"
|
|
web-sys = { version = "0.3.22", features = ['CanvasRenderingContext2d'] }
|
|
|
|
[workspace]
|
|
members = [
|
|
"run-wasm",
|
|
]
|