This updates the Android backend to use the android-activity crate instead
of ndk-glue. This solves a few issues:
1. The backend is agnostic of the application's choice of Activity base
class
2. Winit is no longer responsible for handling any Java synchronization
details, since these are encapsulated by the design of
android_activity
3. The backend no longer depends on global / static getters for state
such as the native_window() which puts it in a better position to
support running multiple activities within a single Android process.
4. Redraw requests are flagged, not queued, in a way that avoids taking
priority over user events (resolves#2299)
To make it possible for application crates to avoid explicitly
depending on the `android-activity` crate (and avoid version conflicts)
this re-exports the android-activity crate under:
`winit::platform::android::activity::*`
This also adds `android-native-activity` and `android-game-activity`
features that set the corresponding android-activity features.
Addresses: PR https://github.com/rust-windowing/winit/pull/1892
Addresses: PR https://github.com/rust-windowing/winit/pull/2307
Addresses: PR https://github.com/rust-windowing/winit/pull/2343
Addresses: #2293Resolves: #2299
Co-authored-by: Markus Siglreithmaier <m.siglreith@gmail.com>
Co-authored-by: Markus Siglreithmaier <m.siglreith@gmail.com>
* Remove redundant documentation links
* Add note to README about windows not showing up on Wayland
* Fix documentation links
* Small documentation fixes
* Add note about doing stuff after StartCause::Init on macOS
* Improve web example
* Implement basic logger into the example webpage
* Repace bash script with xtask
* replace wasm-bindgen-cli with wasm-bindgen-cli-support
* refactor
* Move logic into external crate.
* Remove CI changes
* Review feedback
* Adds Android winit<->ndk_glue version match table
* Fixes justification
* Adds crosses
* Address review and instead of a m:n table it shows a 1:1 version compatibility
* Addresses review
* Remove support for `stdweb`
* Expunge `stdweb`; make `web-sys` the default
* Mark this change as a breaking change
* Re-insert accidental removal of space
* Use the correct cargo feature syntax
* Re-add some `cfg` attributes
* Remove `web-sys` feature from CI
* Link CGDisplayCreateUUIDFromDisplayID through ColorSync instead of CoreGraphics
* Conditionally link through ColorSync only if WINIT_LINK_COLORSYNC is set
to true
* Document new macos env var in README
There are two PRs I'm aware of that should be relatively trivial to get
merged, which would fix some issues. Other than those, I don't think it
makes sense to wait on anything.
- Fix Windows crash: https://github.com/rust-windowing/winit/pull/1459
- Fix macOS mouse reports: https://github.com/rust-windowing/winit/pull/1490
While #1459 seems pretty essential to actually make winit run, #1490 is
much less important and can probably be ignored if there aren't any
resources to merge it.
* README: Use shields.io instead of Herokuapp (#859)
* README: Link to FEATURES.md and missing features wiki page (#860)
Closes#854
* Update URLs (#863)
* CHANGELOG.md: Add line from #861 (legacy) that is missing from equivalent #964 (EL 2)
* Format everything and add rustfmt to travis
* Remove extern crate winit from examples and add force_multiline_blocks
* Format the code properly
* Fix inconsistent period in PULL_REQUEST_TEMPLATE.md
* Only run rustfmt on nightly
* Travis fixings