2014-07-27 10:55:37 +02:00
|
|
|
[package]
|
2016-02-23 12:56:23 +01:00
|
|
|
name = "winit"
|
2024-01-05 15:18:55 +04:00
|
|
|
version = "0.29.9"
|
2018-09-11 05:23:48 +01:00
|
|
|
authors = ["The winit contributors", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
2016-02-23 12:56:23 +01:00
|
|
|
description = "Cross-platform window creation library."
|
2022-01-13 16:59:57 +11:00
|
|
|
edition = "2021"
|
2016-02-23 12:56:23 +01:00
|
|
|
keywords = ["windowing"]
|
2014-11-13 09:01:30 +01:00
|
|
|
license = "Apache-2.0"
|
2014-11-14 08:54:04 +01:00
|
|
|
readme = "README.md"
|
2019-06-23 08:39:26 +02:00
|
|
|
repository = "https://github.com/rust-windowing/winit"
|
2016-09-19 19:53:28 +03:00
|
|
|
documentation = "https://docs.rs/winit"
|
2017-01-31 10:01:36 +01:00
|
|
|
categories = ["gui"]
|
2023-12-22 23:27:36 +01:00
|
|
|
rust-version = "1.70.0"
|
2014-07-27 10:55:37 +02:00
|
|
|
|
2018-05-11 10:33:06 -04:00
|
|
|
[package.metadata.docs.rs]
|
2023-11-23 08:18:05 +01:00
|
|
|
features = [
|
|
|
|
|
"rwh_04",
|
|
|
|
|
"rwh_05",
|
|
|
|
|
"rwh_06",
|
|
|
|
|
"serde",
|
2024-01-04 12:54:35 +01:00
|
|
|
"mint",
|
2023-11-23 08:18:05 +01:00
|
|
|
# Enabled to get docs to compile
|
|
|
|
|
"android-native-activity",
|
|
|
|
|
]
|
2020-04-19 12:37:13 -07:00
|
|
|
default-target = "x86_64-unknown-linux-gnu"
|
2022-06-11 00:45:24 +02:00
|
|
|
# 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",
|
|
|
|
|
]
|
2022-10-24 17:02:52 -05:00
|
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
2018-05-07 17:36:21 -04:00
|
|
|
|
2019-06-27 00:02:46 +02:00
|
|
|
[features]
|
2023-10-14 19:07:39 -07:00
|
|
|
default = ["rwh_06", "x11", "wayland", "wayland-dlopen", "wayland-csd-adwaita"]
|
2023-07-22 02:32:27 -07:00
|
|
|
x11 = ["x11-dl", "bytemuck", "percent-encoding", "xkbcommon-dl/x11", "x11rb"]
|
2023-10-15 06:49:57 +04:00
|
|
|
wayland = ["wayland-client", "wayland-backend", "wayland-protocols", "wayland-protocols-plasma", "sctk", "ahash", "memmap2"]
|
2023-04-19 00:56:29 +03:00
|
|
|
wayland-dlopen = ["wayland-backend/dlopen"]
|
2022-08-24 14:24:29 +02:00
|
|
|
wayland-csd-adwaita = ["sctk-adwaita", "sctk-adwaita/ab_glyph"]
|
|
|
|
|
wayland-csd-adwaita-crossfont = ["sctk-adwaita", "sctk-adwaita/crossfont"]
|
2022-05-20 02:09:23 +02:00
|
|
|
wayland-csd-adwaita-notitle = ["sctk-adwaita"]
|
2023-04-19 00:56:29 +03:00
|
|
|
android-native-activity = ["android-activity/native-activity"]
|
|
|
|
|
android-game-activity = ["android-activity/game-activity"]
|
2023-05-28 20:02:59 +02:00
|
|
|
serde = ["dep:serde", "cursor-icon/serde", "smol_str/serde"]
|
2023-10-17 02:08:33 +02:00
|
|
|
rwh_04 = ["dep:rwh_04", "ndk/rwh_04"]
|
|
|
|
|
rwh_05 = ["dep:rwh_05", "ndk/rwh_05"]
|
|
|
|
|
rwh_06 = ["dep:rwh_06", "ndk/rwh_06"]
|
2019-06-27 00:02:46 +02:00
|
|
|
|
2022-12-25 09:57:27 +02:00
|
|
|
[build-dependencies]
|
|
|
|
|
cfg_aliases = "0.1.1"
|
|
|
|
|
|
2015-02-06 09:21:55 +01:00
|
|
|
[dependencies]
|
2023-06-02 15:44:36 +01:00
|
|
|
bitflags = "2"
|
2023-11-04 15:19:15 +04:00
|
|
|
cursor-icon = "1.1.0"
|
2018-07-01 11:01:46 -04:00
|
|
|
log = "0.4"
|
2021-05-09 00:56:52 +02:00
|
|
|
mint = { version = "0.5.6", optional = true }
|
2023-01-06 10:26:57 +00:00
|
|
|
once_cell = "1.12"
|
2023-10-14 19:07:39 -07:00
|
|
|
rwh_04 = { package = "raw-window-handle", version = "0.4", optional = true }
|
2023-12-24 06:37:35 +00:00
|
|
|
rwh_05 = { package = "raw-window-handle", version = "0.5.2", features = ["std"], optional = true }
|
2023-10-14 19:07:39 -07:00
|
|
|
rwh_06 = { package = "raw-window-handle", version = "0.6", features = ["std"], optional = true }
|
2023-01-06 10:26:57 +00:00
|
|
|
serde = { version = "1", optional = true, features = ["serde_derive"] }
|
2023-05-28 20:02:59 +02:00
|
|
|
smol_str = "0.2.0"
|
2014-10-04 15:49:39 +02:00
|
|
|
|
2019-02-23 20:59:00 -05:00
|
|
|
[dev-dependencies]
|
2022-02-17 14:13:32 +01:00
|
|
|
image = { version = "0.24.0", default-features = false, features = ["png"] }
|
2023-10-17 04:35:14 +04:00
|
|
|
simple_logger = { version = "4.2.0", default_features = false }
|
2023-10-17 07:53:38 +04:00
|
|
|
winit = { path = ".", features = ["rwh_05"] }
|
2019-02-23 20:59:00 -05:00
|
|
|
|
2023-06-19 11:46:38 -07:00
|
|
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dev-dependencies]
|
|
|
|
|
softbuffer = "0.3.0"
|
|
|
|
|
|
2020-05-06 15:27:49 +02:00
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
2023-10-17 02:08:33 +02:00
|
|
|
android-activity = "0.5.0"
|
2023-11-04 12:18:55 +01:00
|
|
|
ndk = { version = "0.8.0", default-features = false }
|
2023-10-17 02:08:33 +02:00
|
|
|
ndk-sys = "0.5.0"
|
2014-12-31 23:10:29 +01:00
|
|
|
|
2020-10-18 02:05:08 +03:00
|
|
|
[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies]
|
2022-09-08 21:03:25 +02:00
|
|
|
core-foundation = "0.9.3"
|
2023-12-23 18:04:24 +01:00
|
|
|
objc2 = "0.5.0"
|
2015-09-21 18:57:35 +02:00
|
|
|
|
2016-05-02 14:58:52 -07:00
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
2023-09-16 12:54:49 +02:00
|
|
|
core-graphics = "0.23.1"
|
2015-01-10 01:56:47 -08:00
|
|
|
|
2023-07-29 00:33:03 +02:00
|
|
|
[target.'cfg(target_os = "macos")'.dependencies.icrate]
|
2023-12-23 18:04:24 +01:00
|
|
|
version = "0.1.0"
|
2023-07-29 00:33:03 +02:00
|
|
|
features = [
|
2023-08-14 21:19:57 +02:00
|
|
|
"dispatch",
|
2023-07-29 00:33:03 +02:00
|
|
|
"Foundation",
|
|
|
|
|
"Foundation_NSArray",
|
|
|
|
|
"Foundation_NSAttributedString",
|
|
|
|
|
"Foundation_NSMutableAttributedString",
|
|
|
|
|
"Foundation_NSData",
|
|
|
|
|
"Foundation_NSDictionary",
|
|
|
|
|
"Foundation_NSString",
|
|
|
|
|
"Foundation_NSProcessInfo",
|
|
|
|
|
"Foundation_NSThread",
|
|
|
|
|
"Foundation_NSNumber",
|
2023-12-23 20:58:38 +01:00
|
|
|
"AppKit",
|
|
|
|
|
"AppKit_NSAppearance",
|
|
|
|
|
"AppKit_NSApplication",
|
|
|
|
|
"AppKit_NSBitmapImageRep",
|
|
|
|
|
"AppKit_NSButton",
|
|
|
|
|
"AppKit_NSColor",
|
|
|
|
|
"AppKit_NSControl",
|
|
|
|
|
"AppKit_NSCursor",
|
|
|
|
|
"AppKit_NSEvent",
|
|
|
|
|
"AppKit_NSGraphicsContext",
|
|
|
|
|
"AppKit_NSImage",
|
|
|
|
|
"AppKit_NSImageRep",
|
|
|
|
|
"AppKit_NSMenu",
|
|
|
|
|
"AppKit_NSMenuItem",
|
|
|
|
|
"AppKit_NSPasteboard",
|
|
|
|
|
"AppKit_NSResponder",
|
|
|
|
|
"AppKit_NSScreen",
|
|
|
|
|
"AppKit_NSTextInputContext",
|
|
|
|
|
"AppKit_NSView",
|
|
|
|
|
"AppKit_NSWindow",
|
|
|
|
|
"AppKit_NSWindowTabGroup",
|
2023-07-29 00:33:03 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[target.'cfg(target_os = "ios")'.dependencies.icrate]
|
2023-12-23 18:04:24 +01:00
|
|
|
version = "0.1.0"
|
2023-07-29 00:33:03 +02:00
|
|
|
features = [
|
2023-08-14 21:19:57 +02:00
|
|
|
"dispatch",
|
2023-07-29 00:33:03 +02:00
|
|
|
"Foundation",
|
|
|
|
|
"Foundation_NSArray",
|
|
|
|
|
"Foundation_NSString",
|
|
|
|
|
"Foundation_NSProcessInfo",
|
|
|
|
|
"Foundation_NSThread",
|
|
|
|
|
"Foundation_NSSet",
|
|
|
|
|
]
|
|
|
|
|
|
2023-05-28 20:02:59 +02:00
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
|
|
|
unicode-segmentation = "1.7.1"
|
|
|
|
|
|
2022-03-07 22:58:12 +01:00
|
|
|
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
|
2023-06-03 15:02:37 -07:00
|
|
|
version = "0.48"
|
2017-12-24 15:46:47 +02:00
|
|
|
features = [
|
2022-03-07 22:58:12 +01:00
|
|
|
"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",
|
2017-12-24 15:46:47 +02:00
|
|
|
]
|
2015-08-21 11:49:10 -04:00
|
|
|
|
2023-03-16 20:49:59 +01:00
|
|
|
[target.'cfg(all(unix, not(any(target_os = "redox", target_family = "wasm", target_os = "android", target_os = "ios", target_os = "macos"))))'.dependencies]
|
2023-10-15 06:49:57 +04:00
|
|
|
ahash = { version = "0.8.3", features = ["no-rng"], optional = true }
|
2023-07-12 00:59:12 -07:00
|
|
|
bytemuck = { version = "1.13.1", default-features = false, optional = true }
|
2023-10-15 06:49:57 +04:00
|
|
|
calloop = "0.12.3"
|
2023-01-06 10:26:57 +00:00
|
|
|
libc = "0.2.64"
|
2023-10-15 06:49:57 +04:00
|
|
|
memmap2 = { version = "0.9.0", optional = true }
|
2023-01-06 10:26:57 +00:00
|
|
|
percent-encoding = { version = "2.0", optional = true }
|
2023-07-22 02:32:27 -07:00
|
|
|
rustix = { version = "0.38.4", default-features = false, features = ["std", "system", "thread", "process"] }
|
2023-10-15 06:49:57 +04:00
|
|
|
sctk = { package = "smithay-client-toolkit", version = "0.18.0", default-features = false, features = ["calloop"], optional = true }
|
2023-12-16 17:16:39 +01:00
|
|
|
sctk-adwaita = { version = "0.8.0", default_features = false, optional = true }
|
2023-10-15 06:49:57 +04:00
|
|
|
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 }
|
2020-06-15 09:15:27 +02:00
|
|
|
x11-dl = { version = "2.18.5", optional = true }
|
m: Update to x11rb 0.13.0
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>
2023-12-09 16:02:30 +01:00
|
|
|
x11rb = { version = "0.13.0", default-features = false, features = ["allow-unsafe-code", "dl-libxcb", "randr", "resource_manager", "xinput", "xkb"], optional = true }
|
2023-06-28 02:01:11 +04:00
|
|
|
xkbcommon-dl = "0.4.0"
|
2019-02-12 20:47:31 -05:00
|
|
|
|
2023-01-05 06:58:08 -07:00
|
|
|
[target.'cfg(target_os = "redox")'.dependencies]
|
|
|
|
|
orbclient = { version = "0.3.42", default-features = false }
|
|
|
|
|
redox_syscall = "0.3"
|
|
|
|
|
|
2023-03-16 20:49:59 +01:00
|
|
|
[target.'cfg(target_family = "wasm")'.dependencies.web_sys]
|
2019-07-01 20:43:54 +02:00
|
|
|
package = "web-sys"
|
2023-06-14 09:43:53 +02:00
|
|
|
version = "0.3.64"
|
2019-06-03 22:51:01 -07:00
|
|
|
features = [
|
2023-08-25 21:40:21 +02:00
|
|
|
'AbortController',
|
|
|
|
|
'AbortSignal',
|
2023-12-16 22:02:17 +02:00
|
|
|
'Blob',
|
2019-06-05 22:58:11 -07:00
|
|
|
'console',
|
2019-12-31 14:39:33 -08:00
|
|
|
'CssStyleDeclaration',
|
2019-06-03 22:51:01 -07:00
|
|
|
'Document',
|
2019-06-04 23:08:09 -07:00
|
|
|
'DomRect',
|
2023-06-14 09:43:53 +02:00
|
|
|
'DomRectReadOnly',
|
2019-06-04 23:08:09 -07:00
|
|
|
'Element',
|
2019-06-03 22:51:01 -07:00
|
|
|
'Event',
|
|
|
|
|
'EventTarget',
|
|
|
|
|
'FocusEvent',
|
|
|
|
|
'HtmlCanvasElement',
|
2019-06-04 23:08:09 -07:00
|
|
|
'HtmlElement',
|
2023-12-22 22:20:41 +01:00
|
|
|
'HtmlImageElement',
|
2023-12-16 22:02:17 +02:00
|
|
|
'ImageBitmap',
|
|
|
|
|
'ImageBitmapOptions',
|
|
|
|
|
'ImageBitmapRenderingContext',
|
|
|
|
|
'ImageData',
|
2023-07-10 02:02:38 +02:00
|
|
|
'IntersectionObserver',
|
|
|
|
|
'IntersectionObserverEntry',
|
2019-06-03 22:51:01 -07:00
|
|
|
'KeyboardEvent',
|
2020-02-17 20:25:27 +01:00
|
|
|
'MediaQueryList',
|
2023-08-25 21:40:21 +02:00
|
|
|
'MessageChannel',
|
|
|
|
|
'MessagePort',
|
2019-06-04 23:08:09 -07:00
|
|
|
'Node',
|
2023-06-28 12:54:21 +02:00
|
|
|
'PageTransitionEvent',
|
2019-06-03 22:51:01 -07:00
|
|
|
'PointerEvent',
|
2023-12-16 22:02:17 +02:00
|
|
|
'PremultiplyAlpha',
|
2023-06-14 09:43:53 +02:00
|
|
|
'ResizeObserver',
|
|
|
|
|
'ResizeObserverBoxOptions',
|
|
|
|
|
'ResizeObserverEntry',
|
|
|
|
|
'ResizeObserverOptions',
|
|
|
|
|
'ResizeObserverSize',
|
2023-07-10 02:02:38 +02:00
|
|
|
'VisibilityState',
|
2019-06-03 22:51:01 -07:00
|
|
|
'Window',
|
2023-12-16 22:02:17 +02:00
|
|
|
'WheelEvent',
|
|
|
|
|
'Url',
|
2019-06-03 22:51:01 -07:00
|
|
|
]
|
|
|
|
|
|
2023-03-26 17:19:26 +02:00
|
|
|
[target.'cfg(target_family = "wasm")'.dependencies]
|
2023-06-05 02:44:54 +02:00
|
|
|
atomic-waker = "1"
|
2023-06-13 15:49:27 +02:00
|
|
|
js-sys = "0.3.64"
|
|
|
|
|
wasm-bindgen = "0.2"
|
2023-03-26 17:19:26 +02:00
|
|
|
wasm-bindgen-futures = "0.4"
|
2023-06-01 17:22:28 +02:00
|
|
|
web-time = "0.2"
|
2019-12-03 18:16:06 +01:00
|
|
|
|
2023-03-16 20:49:59 +01:00
|
|
|
[target.'cfg(target_family = "wasm")'.dev-dependencies]
|
2023-06-01 17:01:59 +02:00
|
|
|
console_log = "1"
|
2022-09-04 02:26:24 +10:00
|
|
|
web-sys = { version = "0.3.22", features = ['CanvasRenderingContext2d'] }
|
2022-02-25 22:57:46 +11:00
|
|
|
|
|
|
|
|
[workspace]
|
|
|
|
|
members = [
|
|
|
|
|
"run-wasm",
|
|
|
|
|
]
|
2024-01-05 15:05:12 +01:00
|
|
|
|
|
|
|
|
[[example]]
|
|
|
|
|
doc-scrape-examples = true
|
|
|
|
|
name = "window"
|