This is a private API on macOS. This code was added for use
in `servo-glutin` and was not used outside of that as far as
I know (by doing various code searches).
Fixes#656.
* Make CGEventTap #[must_use]
This prevents a failure mode of handling the Result of CGEventTap::new()
but not saving the tap itself.
* Enforce Sendness of CGEventTap callback
This was previously unsound.
* core-graphics: Add CGKeyCodes for numkey as well as ANSI, ISO and JIS keys
* Fix tiny English nit
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
---------
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* feat(CGDisplay): add displays_with_point and displays_with_rect
* inline to match other fns in this module
* add tests for CGDisplay::displays_with_point and displays_with_rect
* refactor: use kCGErrorSuccess
* Improve TCFType macros
This adds the following new features:
* `declare_TCFType!`: Generics are accepted.
* `impl_TCFType!`: Non-defaulted generics are accepted, and impls are
fixed to be for all generics.
In addition, some warnings are silenced and the macros no longer depend
on any traits being in scope in the caller.
* Support generics in impl_CFComparison
* Add generic test for macros
This enables clippy in CI and suppresses most of the existing
warnings. We can drill down and fix those later, but this will
help start getting things under control.
Consolidate package configuration where possible. This also
removes the `homepage` key as it only points to the repository
so isn't providing anything additional.
Use workspace dependencies for the crates provided by the workspace
and used within the workspace. This centralizes the version number
maintenance a bit.
Since `CFIndex` is just `isize`, we can use the `CFIndex::MAX`
constant. The `max_value` and other functions are pending
deprecation and cause a clippy lint warning.
This removes an implicit feature due to the optional dependency
`uuid`.
While this is user visible, any use of `uuid` as a feature previously
would not have enabled the support code and so it wouldn't have had
any benefit.
`core::ffi` is the preferred way to access these type definitions.
Begin removing uses of the versions from `libc`.
`libc::c_void` is not exactly the same as `core::ffi::c_void` but
some code has tried using them interchangeably (like in io-surface).
`libc::size_t` is `usize` on all current platforms.
Fixes a minor race condition in active_displays that might happen
if a display is removed between the active_display_count and the
CGGetActiveDisplayList. In that case the returned vec would be
inconsistent and contain one (or more) spurious null displays.
Note: the returned value will always be subject to TOC/TOU,
of course, but this specific case has the returned value
containing invalid displays with id=0 that were never supposed
to be in the returned value in any possible state of the
displays; this commit fixes this case.
* ci: Remove usage of macos-11
This is being removed at GitHub on June 28, 2024.
Switch semver action to macos-14.
* Use `macos-14` instead of `macos-14.0` for semver check
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>