forked from rust-windowing/winit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
164 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
[package] | ||
name = "winit" | ||
version = "0.30.4" | ||
authors = [ | ||
"The winit contributors", | ||
"Pierre Krieger <[email protected]>", | ||
] | ||
authors = ["The winit contributors", "Pierre Krieger <[email protected]>"] | ||
categories = ["gui"] | ||
description = "Cross-platform window creation library." | ||
keywords = ["windowing"] | ||
readme = "README.md" | ||
documentation = "https://docs.rs/winit" | ||
categories = ["gui"] | ||
rust-version.workspace = true | ||
repository.workspace = true | ||
license.workspace = true | ||
edition.workspace = true | ||
exclude = ["/.cargo"] | ||
keywords = ["windowing"] | ||
license.workspace = true | ||
name = "winit" | ||
readme = "README.md" | ||
repository.workspace = true | ||
rust-version.workspace = true | ||
version = "0.30.4" | ||
|
||
[package.metadata.docs.rs] | ||
features = [ | ||
|
@@ -27,6 +24,7 @@ features = [ | |
"android-native-activity", | ||
] | ||
# These are all tested in CI | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
targets = [ | ||
# Windows | ||
"i686-pc-windows-msvc", | ||
|
@@ -43,12 +41,17 @@ targets = [ | |
# Web | ||
"wasm32-unknown-unknown", | ||
] | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
|
||
# Features are documented in either `lib.rs` or under `winit::platform`. | ||
[features] | ||
android-game-activity = ["android-activity/game-activity"] | ||
android-native-activity = ["android-activity/native-activity"] | ||
default = ["rwh_06", "x11", "wayland", "wayland-dlopen", "wayland-csd-adwaita"] | ||
x11 = ["x11-dl", "bytemuck", "percent-encoding", "xkbcommon-dl/x11", "x11rb"] | ||
mint = ["dpi/mint"] | ||
rwh_04 = ["dep:rwh_04", "ndk/rwh_04"] | ||
rwh_05 = ["dep:rwh_05", "ndk/rwh_05"] | ||
rwh_06 = ["dep:rwh_06", "ndk/rwh_06"] | ||
serde = ["dep:serde", "cursor-icon/serde", "smol_str/serde", "dpi/serde"] | ||
wayland = [ | ||
"wayland-client", | ||
"wayland-backend", | ||
|
@@ -58,17 +61,11 @@ wayland = [ | |
"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", "dpi/serde"] | ||
mint = ["dpi/mint"] | ||
rwh_04 = ["dep:rwh_04", "ndk/rwh_04"] | ||
rwh_05 = ["dep:rwh_05", "ndk/rwh_05"] | ||
rwh_06 = ["dep:rwh_06", "ndk/rwh_06"] | ||
wayland-dlopen = ["wayland-backend/dlopen"] | ||
x11 = ["x11-dl", "bytemuck", "percent-encoding", "xkbcommon-dl/x11", "x11rb"] | ||
|
||
[build-dependencies] | ||
cfg_aliases = "0.2.1" | ||
|
@@ -78,12 +75,8 @@ bitflags = "2" | |
cursor-icon = "1.1.0" | ||
dpi = { version = "0.1.1", path = "dpi" } | ||
rwh_04 = { package = "raw-window-handle", version = "0.4", optional = true } | ||
rwh_05 = { package = "raw-window-handle", version = "0.5.2", features = [ | ||
"std", | ||
], optional = true } | ||
rwh_06 = { package = "raw-window-handle", version = "0.6", features = [ | ||
"std", | ||
], optional = true } | ||
rwh_05 = { package = "raw-window-handle", version = "0.5.2", features = ["std"], optional = true } | ||
rwh_06 = { package = "raw-window-handle", version = "0.6", features = ["std"], optional = true } | ||
serde = { workspace = true, optional = true } | ||
smol_str = "0.2.0" | ||
tracing = { version = "0.1.40", default-features = false } | ||
|
@@ -114,27 +107,8 @@ objc2 = "0.5.2" | |
|
||
# AppKit | ||
[target.'cfg(target_os = "macos")'.dependencies] | ||
core-graphics = "0.23.1" | ||
block2 = "0.5.1" | ||
objc2-foundation = { version = "0.2.2", features = [ | ||
"block2", | ||
"dispatch", | ||
"NSArray", | ||
"NSAttributedString", | ||
"NSData", | ||
"NSDictionary", | ||
"NSDistributedNotificationCenter", | ||
"NSEnumerator", | ||
"NSKeyValueObserving", | ||
"NSNotification", | ||
"NSObjCRuntime", | ||
"NSPathUtilities", | ||
"NSProcessInfo", | ||
"NSRunLoop", | ||
"NSString", | ||
"NSThread", | ||
"NSValue", | ||
] } | ||
core-graphics = "0.23.1" | ||
objc2-app-kit = { version = "0.2.2", features = [ | ||
"NSAppearance", | ||
"NSApplication", | ||
|
@@ -163,6 +137,25 @@ objc2-app-kit = { version = "0.2.2", features = [ | |
"NSWindowScripting", | ||
"NSWindowTabGroup", | ||
] } | ||
objc2-foundation = { version = "0.2.2", features = [ | ||
"block2", | ||
"dispatch", | ||
"NSArray", | ||
"NSAttributedString", | ||
"NSData", | ||
"NSDictionary", | ||
"NSDistributedNotificationCenter", | ||
"NSEnumerator", | ||
"NSKeyValueObserving", | ||
"NSNotification", | ||
"NSObjCRuntime", | ||
"NSPathUtilities", | ||
"NSProcessInfo", | ||
"NSRunLoop", | ||
"NSString", | ||
"NSThread", | ||
"NSValue", | ||
] } | ||
|
||
# UIKit | ||
[target.'cfg(all(target_vendor = "apple", not(target_os = "macos")))'.dependencies] | ||
|
@@ -250,12 +243,8 @@ wayland-backend = { version = "0.3.5", default-features = false, features = [ | |
"client_system", | ||
], optional = true } | ||
wayland-client = { version = "0.31.4", optional = true } | ||
wayland-protocols = { version = "0.32.2", features = [ | ||
"staging", | ||
], optional = true } | ||
wayland-protocols-plasma = { version = "0.3.2", features = [ | ||
"client", | ||
], optional = true } | ||
wayland-protocols = { version = "0.32.2", features = ["staging"], optional = true } | ||
wayland-protocols-plasma = { version = "0.3.2", features = ["client"], optional = true } | ||
x11-dl = { version = "2.19.1", optional = true } | ||
x11rb = { version = "0.13.0", default-features = false, features = [ | ||
"allow-unsafe-code", | ||
|
@@ -275,62 +264,62 @@ redox_syscall = "0.4.1" | |
|
||
# Web | ||
[target.'cfg(target_family = "wasm")'.dependencies] | ||
web_sys = { package = "web-sys", version = "0.3.64", features = [ | ||
'AbortController', | ||
'AbortSignal', | ||
'Blob', | ||
'BlobPropertyBag', | ||
'console', | ||
'CssStyleDeclaration', | ||
'Document', | ||
'DomException', | ||
'DomRect', | ||
'DomRectReadOnly', | ||
'Element', | ||
'Event', | ||
'EventTarget', | ||
'FocusEvent', | ||
'HtmlCanvasElement', | ||
'HtmlElement', | ||
'HtmlImageElement', | ||
'ImageBitmap', | ||
'ImageBitmapOptions', | ||
'ImageBitmapRenderingContext', | ||
'ImageData', | ||
'IntersectionObserver', | ||
'IntersectionObserverEntry', | ||
'KeyboardEvent', | ||
'MediaQueryList', | ||
'MessageChannel', | ||
'MessagePort', | ||
'Navigator', | ||
'Node', | ||
'OrientationType', | ||
'OrientationLockType', | ||
'PageTransitionEvent', | ||
'Permissions', | ||
'PermissionState', | ||
'PermissionStatus', | ||
'PointerEvent', | ||
'PremultiplyAlpha', | ||
'ResizeObserver', | ||
'ResizeObserverBoxOptions', | ||
'ResizeObserverEntry', | ||
'ResizeObserverOptions', | ||
'ResizeObserverSize', | ||
'Screen', | ||
'ScreenOrientation', | ||
'VisibilityState', | ||
'Window', | ||
'WheelEvent', | ||
'Worker', | ||
'Url', | ||
] } | ||
js-sys = "0.3.64" | ||
pin-project = "1" | ||
wasm-bindgen = "0.2" | ||
wasm-bindgen-futures = "0.4" | ||
web-time = "1" | ||
web_sys = { package = "web-sys", version = "0.3.64", features = [ | ||
"AbortController", | ||
"AbortSignal", | ||
"Blob", | ||
"BlobPropertyBag", | ||
"console", | ||
"CssStyleDeclaration", | ||
"Document", | ||
"DomException", | ||
"DomRect", | ||
"DomRectReadOnly", | ||
"Element", | ||
"Event", | ||
"EventTarget", | ||
"FocusEvent", | ||
"HtmlCanvasElement", | ||
"HtmlElement", | ||
"HtmlImageElement", | ||
"ImageBitmap", | ||
"ImageBitmapOptions", | ||
"ImageBitmapRenderingContext", | ||
"ImageData", | ||
"IntersectionObserver", | ||
"IntersectionObserverEntry", | ||
"KeyboardEvent", | ||
"MediaQueryList", | ||
"MessageChannel", | ||
"MessagePort", | ||
"Navigator", | ||
"Node", | ||
"OrientationLockType", | ||
"OrientationType", | ||
"PageTransitionEvent", | ||
"Permissions", | ||
"PermissionState", | ||
"PermissionStatus", | ||
"PointerEvent", | ||
"PremultiplyAlpha", | ||
"ResizeObserver", | ||
"ResizeObserverBoxOptions", | ||
"ResizeObserverEntry", | ||
"ResizeObserverOptions", | ||
"ResizeObserverSize", | ||
"Screen", | ||
"ScreenOrientation", | ||
"Url", | ||
"VisibilityState", | ||
"WheelEvent", | ||
"Window", | ||
"Worker", | ||
] } | ||
|
||
[target.'cfg(all(target_family = "wasm", target_feature = "atomics"))'.dependencies] | ||
atomic-waker = "1" | ||
|
@@ -346,15 +335,15 @@ doc-scrape-examples = true | |
name = "window" | ||
|
||
[workspace] | ||
resolver = "2" | ||
members = ["dpi"] | ||
resolver = "2" | ||
|
||
[workspace.package] | ||
rust-version = "1.73" | ||
repository = "https://github.com/rust-windowing/winit" | ||
license = "Apache-2.0" | ||
edition = "2021" | ||
license = "Apache-2.0" | ||
repository = "https://github.com/rust-windowing/winit" | ||
rust-version = "1.73" | ||
|
||
[workspace.dependencies] | ||
serde = { version = "1", features = ["serde_derive"] } | ||
mint = "0.5.6" | ||
serde = { version = "1", features = ["serde_derive"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
disallowed-methods = [ | ||
{ path = "web_sys::window", reason = "is not available in every context" }, | ||
{ path = "web_sys::HtmlCanvasElement::width", reason = "Winit shouldn't touch the internal canvas size" }, | ||
{ path = "objc2_app_kit::NSView::visibleRect", reason = "We expose a render target to the user, and visibility is not really relevant to that (and can break if you don't use the rectangle position as well). Use `frame` instead." }, | ||
{ path = "objc2_app_kit::NSWindow::setFrameTopLeftPoint", reason = "Not sufficient when working with Winit's coordinate system, use `flip_window_screen_coordinates` instead" }, | ||
{ path = "web_sys::Document::exit_fullscreen", reason = "Doesn't account for compatibility with Safari" }, | ||
{ path = "web_sys::Document::fullscreen_element", reason = "Doesn't account for compatibility with Safari" }, | ||
{ path = "web_sys::Element::request_fullscreen", reason = "Doesn't account for compatibility with Safari" }, | ||
{ path = "web_sys::HtmlCanvasElement::height", reason = "Winit shouldn't touch the internal canvas size" }, | ||
{ path = "web_sys::HtmlCanvasElement::set_width", reason = "Winit shouldn't touch the internal canvas size" }, | ||
{ path = "web_sys::HtmlCanvasElement::set_height", reason = "Winit shouldn't touch the internal canvas size" }, | ||
{ path = "web_sys::Window::navigator", reason = "cache this to reduce calls to JS" }, | ||
{ path = "web_sys::HtmlCanvasElement::set_width", reason = "Winit shouldn't touch the internal canvas size" }, | ||
{ path = "web_sys::HtmlCanvasElement::width", reason = "Winit shouldn't touch the internal canvas size" }, | ||
{ path = "web_sys::HtmlElement::style", reason = "cache this to reduce calls to JS" }, | ||
{ path = "web_sys::Window::document", reason = "cache this to reduce calls to JS" }, | ||
{ path = "web_sys::Window::get_computed_style", reason = "cache this to reduce calls to JS" }, | ||
{ path = "web_sys::HtmlElement::style", reason = "cache this to reduce calls to JS" }, | ||
{ path = "web_sys::Element::request_fullscreen", reason = "Doesn't account for compatibility with Safari" }, | ||
{ path = "web_sys::Document::exit_fullscreen", reason = "Doesn't account for compatibility with Safari" }, | ||
{ path = "web_sys::Document::fullscreen_element", reason = "Doesn't account for compatibility with Safari" }, | ||
{ path = "objc2_app_kit::NSView::visibleRect", reason = "We expose a render target to the user, and visibility is not really relevant to that (and can break if you don't use the rectangle position as well). Use `frame` instead." }, | ||
{ path = "objc2_app_kit::NSWindow::setFrameTopLeftPoint", reason = "Not sufficient when working with Winit's coordinate system, use `flip_window_screen_coordinates` instead" }, | ||
{ path = "web_sys::Window::navigator", reason = "cache this to reduce calls to JS" }, | ||
{ path = "web_sys::window", reason = "is not available in every context" }, | ||
] |
Oops, something went wrong.