* Only build, but don't run tests in MSRV CI
Since the MSRV of development dependencies can easily be bumped without it affecting the MSRV of the published version of `winit`
* Run clippy on stable Rust instead of MSRV Rust
clippy inspects the `rust-version` field, and only suggests changes that conform to that.
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>
Even when the protocol explicitly tells to send proper UTF-8
boundaries for cursor, some IMEs don't do that, so sanity check
them before sending downstream.
* MacOS: set value for `accepts_first_mouse`
* Update CHANGELOG and FEATURES
* Field doesn't need to be public
* Convert `bool` to `BOOL`
* Fix formatting
* Move flag from window state to view instance
* Feedback from PR
* Fix changelog location
Introduced in https://github.com/rust-windowing/winit/pull/2479; turns out the definitions were not entirely equal, the `kCFRunLoopEntry` that we were using previously was defined as `0` while the correct value is `1` (which meant the `unimplemented!()` branch suddenly started triggering)
Use the definitions that `core_foundation` exposes (almost the same, except `CFRunLoopSourceContext::perform` is not nullable, so we account for that as well).
* Remove UnownedWindow::inner_rect
* Refactor custom view to use much less `unsafe`
The compiler fence is safe to get rid of now since `interpretKeyEvents` takes `&mut self`
* Refactor Window to use much less unsafe
* Refactor NSApplication usage to have much less unsafe
* Remove cocoa dependency
* Enable `deny(unsafe_op_in_unsafe_fn)` on macOS
Also re-enable clippy `let_unit_value` lint
* Remove #[macro_use] on macOS
* Refactor window delegate to use much less unsafe
* Disable scrolling on web by default but provide method in builder to enable it
* rename enable_web_scroll -> enable_web_page_scroll
* move enable_web_page_scroll into prevent_default option
* final approach
* Mark prevent_default change as breaking
Co-authored-by: Mads Marquart <mads@marquart.dk>
* Begin abstraction over AppKit
* Clean up NSApplication delegate declaration
* Clean up NSApplication override declaration
* Clean up NSWindow delegate declaration
* Clean up NSWindow override declaration
* Clean up NSView delegate declaration