* Add cursor position drag and drop events.
* Reword drag events to match pointer ones.
* appkit: Use `convertPoint_fromView` for coordinate conversion.
* appkit: use ProtocolObject<dyn NSDraggingInfo>.
* x11: store dnd.position as pair of i16
It's what translate_coords takes anyway, so the extra precision is
misleading if we're going to cast it to i16 everywhere it's used.
We can also simplify the "unpacking" from the XdndPosition message--we
can and should use the value of 16 as the shift instead of
size_of::<c_short> * 2 or something like that, because the specification
gives us the constant 16.
* x11: store translated DnD coords.
* x11: don't emit DragLeave without DragEnter.
* windows: only emit DragEnter if valid.
* windows: in DnD, always set pdwEffect.
It appears other apps (like Chromium) set pdwEffect on Drop too:
|
||
|---|---|---|
| .cargo | ||
| .github | ||
| docs | ||
| dpi | ||
| examples | ||
| src | ||
| tests | ||
| .git-blame-ignore-revs | ||
| .gitattributes | ||
| .gitignore | ||
| build.rs | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| clippy.toml | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| deny.toml | ||
| FEATURES.md | ||
| HALL_OF_CHAMPIONS.md | ||
| LICENSE | ||
| README.md | ||
| rustfmt.toml | ||
| taplo.toml | ||
| typos.toml | ||
winit - Cross-platform window creation and management in Rust
[dependencies]
winit = "0.30.7"
Documentation
For features within the scope of winit, see FEATURES.md.
For features outside the scope of winit, see Are we GUI Yet? and Are we game yet?, depending on what kind of project you're looking to do.
Contact Us
The maintainers have a meeting every friday at UTC 15. The meeting notes can be found here.
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.
MSRV Policy
This crate's Minimum Supported Rust Version (MSRV) is 1.73. 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.
An exception is made 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.
Redox OS is also not covered by this MSRV policy, as it requires a Rust nightly toolchain to compile.
All crates in the rust-windowing organizations have the
same MSRV policy.
Platform-specific usage
Check out the winit::platform module for platform-specific usage.