mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-25 18:47:22 -06:00
* Issue #324: vendor winit 0.30.13 as published The crate as released on crates.io, without its asset files (docs/res/*.svg and examples/data/*.png, AGENTS.md §1). Not used yet: the next commit patches it and adds it to [patch.crates-io]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Issue #324: on Windows 11, a window dragged to another monitor takes its scale winit 0.30.13 handles WM_DPICHANGED by checking that the new window rect is on the monitor `MonitorFromWindow` names. During a drag that is still the monitor being left, so winit nudged the window back onto it, which sent another WM_DPICHANGED: the window grew and stayed on the wrong monitor at the wrong scale. From Windows 11 (build 22000) on, apply the rect Windows suggests, as winit master does since 488c036a (rust-windowing/winit#4341); no 0.30 release has it. Windows 10 keeps the old adjustment, as on winit master. The vendored copy goes in [patch.crates-io]; a test fails if winit resolves from crates.io again or the vendored copy loses the patch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
71 lines
2.8 KiB
Markdown
71 lines
2.8 KiB
Markdown
# winit - Cross-platform window creation and management in Rust
|
|
|
|
[](https://crates.io/crates/winit)
|
|
[](https://docs.rs/winit)
|
|
[](https://rust-windowing.github.io/winit/winit/index.html)
|
|
[](https://github.com/rust-windowing/winit/actions)
|
|
|
|
```toml
|
|
[dependencies]
|
|
winit = "0.30.13"
|
|
```
|
|
|
|
## [Documentation](https://docs.rs/winit)
|
|
|
|
For features _within_ the scope of winit, see [FEATURES.md](FEATURES.md).
|
|
|
|
For features _outside_ the scope of winit, see [Are we GUI Yet?](https://areweguiyet.com/) and [Are we game yet?](https://arewegameyet.rs/), depending on what kind of project you're looking to do.
|
|
|
|
## Contact Us
|
|
|
|
Join us in our [](https://matrix.to/#/#rust-windowing:matrix.org) room.
|
|
|
|
The maintainers have a meeting every friday at UTC 15. The meeting notes can be found [here](https://hackmd.io/@winit-meetings).
|
|
|
|
## Usage
|
|
|
|
Winit is a window creation and management library. It can create windows and lets you handle
|
|
events (for example: the window being resized, a key being pressed, a mouse movement, etc.)
|
|
produced by the window.
|
|
|
|
Winit is designed to be a low-level brick in a hierarchy of libraries. Consequently, in order to
|
|
show something on the window you need to use the platform-specific getters provided by winit, or
|
|
another library.
|
|
|
|
## CONTRIBUTING
|
|
|
|
For contributing guidelines see [CONTRIBUTING.md](./CONTRIBUTING.md).
|
|
|
|
## MSRV Policy
|
|
|
|
This crate's Minimum Supported Rust Version (MSRV) is **1.70**. Changes to
|
|
the MSRV will be accompanied by a minor version bump.
|
|
|
|
As a **tentative** policy, the upper bound of the MSRV is given by the following
|
|
formula:
|
|
|
|
```
|
|
min(sid, stable - 3)
|
|
```
|
|
|
|
Where `sid` is the current version of `rustc` provided by [Debian Sid], and
|
|
`stable` is the latest stable version of Rust. This bound may be broken in case of a major ecosystem shift or a security vulnerability.
|
|
|
|
[Debian Sid]: https://packages.debian.org/sid/rustc
|
|
|
|
The exception is for the Android platform, where a higher Rust version
|
|
must be used for certain Android features. In this case, the MSRV will be
|
|
capped at the latest stable version of Rust minus three. This inconsistency is
|
|
not reflected in Cargo metadata, as it is not powerful enough to expose this
|
|
restriction.
|
|
|
|
All crates in the [`rust-windowing`] organizations have the
|
|
same MSRV policy.
|
|
|
|
[`rust-windowing`]: https://github.com/rust-windowing
|
|
|
|
### Platform-specific usage
|
|
|
|
Check out the [`winit::platform`](https://rust-windowing.github.io/winit/winit/platform/index.html) module for platform-specific usage.
|