Tyler Mandry
14d8c7fb82
Bump core-graphics to v0.25.0 ( #722 )
...
* Bump core-graphics to 0.25.0
Signed-off-by: Tyler Mandry <tmandry@gmail.com >
* Update Cargo.toml
Signed-off-by: Tyler Mandry <tmandry@gmail.com >
---------
Signed-off-by: Tyler Mandry <tmandry@gmail.com >
2025-05-27 01:39:27 +00:00
nashaofu
c97cdc6c46
Remove duplicate definitions of CGWindow-related constants and types ( #659 )
2025-05-26 19:26:39 +00:00
Bruce Mitchener
7928f6ffc9
Remove core_graphics::private::CGSRegion ( #700 )
...
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 .
2025-05-26 19:23:14 +00:00
Tyler Mandry
f0882ea7c2
[breaking][core-graphics] Enforce Sendness of CGEventTap callback (soundness fix) ( #725 )
...
* 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.
2025-05-26 19:21:27 +00:00
Jay Madden
0e484ab3df
fix: add catalina feature flag to srgb binding ( #719 )
2025-05-26 19:00:32 +00:00
Tyler Mandry
7e4d907137
Allow dropping event from CGEventTap callback ( #724 )
2025-05-26 18:49:04 +00:00
Tyler Mandry
d7202b3451
Fix CI ( #723 )
...
* Fix check-cfg error in CI
* Fix clippy::precedence warning
* Mark semver checks as optional while they are failing
2025-03-16 21:04:30 +00:00
Bruce Mitchener
f23baea603
Fix clippy::needless_lifetimes lints ( #717 )
...
* Fix `clippy::needless_lifetimes` lints
* Fix `clippy::doc_markdown` lints
2025-01-08 05:20:49 +00:00
Jay Madden
94373819a7
core-graphics: add binding for CGColorCreateSRGB ( #716 )
...
Signed-off-by: Jay Madden <25359755+Jay-Madden@users.noreply.github.com >
2025-01-07 10:20:59 +00:00
pentamassiv
8c71d0f34f
core-graphics: Add CGKeyCodes for numpad keys ( #712 )
...
* 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 >
2024-12-09 14:52:38 +00:00
Iason Paraskevopoulos
ef896fee16
core-graphics: add event set_location ( #713 )
...
* core-graphics: add event set_location
* core-graphics: add documentation to CGEvent functions
Adds documentation to CGEventTapEnable and CGEventSetLocation.
2024-10-15 07:14:11 +00:00
Tyler Mandry
66be81ae13
[breaking][core-graphics] Fix unsoundness in CGEventTap API ( #710 )
...
* Fix unsoundness in CGEventTap API
* Fix lifetime unsoundness in CGEventTap, add ::with
2024-10-12 02:23:16 +00:00
Lucas Nogueira
cf4c9c06c5
core-graphics: remove set_font_smoothing_style API, closes #707 ( #709 )
...
The `CGContextSetFontSmoothingStyle` API is private, and Apple rejects it for the App Store.
See #707 for more information.
2024-08-30 20:03:51 +00:00
Bruce Mitchener
6610aaa1ff
Fix clippy::doc_markdown lints. ( #705 )
2024-08-14 02:16:33 +00:00
Matt Bray
743b793f75
feat(CGDisplay): add displays_with_point and displays_with_rect ( #657 )
...
* 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
2024-08-14 02:12:10 +00:00
Bruce Mitchener
fb71d45b30
Enable clippy, suppress lots, fix a couple. ( #703 )
...
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.
2024-08-13 04:25:49 +00:00
Bruce Mitchener
39a39555c0
Use workspace inheritance. ( #701 )
...
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.
2024-08-12 07:41:37 +00:00
Bruce Mitchener
e513e990dc
Correct screen capture access return values. ( #698 )
...
Both `CGRequestScreenCaptureAccess` and `CGPreflightScreenCaptureAccess`
return `bool`, not `boolean_t`.
Fixes #677 .
Replaces #678 .
2024-08-12 01:27:32 +00:00
Bruce Mitchener
9f33b121fb
Use core::ffi over std::os::raw and libc::c_* ( #692 )
...
`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.
2024-08-11 20:24:22 +00:00
Bruce Mitchener
42ec06106d
Bump MSRV to 1.65 ( #694 )
...
This will allow us to use `dep:` syntax and also move to using types
from `core::ffi` as well as some other more modern constructs.
2024-08-11 16:15:49 +00:00
Marco Mastropaolo
f94fa25c02
Added ffi bindings for CGDisplayRegisterReconfigurationCallback and related types/funcs ( #687 )
2024-08-02 06:15:35 +00:00
Bruce Mitchener
31a92cd2fc
Fix typos. ( #689 )
2024-07-20 10:26:35 +00:00
Bruce Mitchener
2847e06cf5
core-graphics: Fix kCGWindowSharingReadWrite value ( #690 )
2024-07-20 10:25:46 +00:00
Marco Mastropaolo
8002ddd167
Fixes a minor race condition in active_displays ( #686 )
...
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.
2024-06-18 14:39:29 +00:00
Bruce Mitchener
8d2b732db5
Remove usages of extern crate. ( #672 )
2024-05-27 06:40:54 +00:00
George Burton
abbcc1eea5
Update bitflags to 2.2.1 ( #549 )
2024-04-09 08:47:41 +00:00
Alex Touchet
f9440bcddb
Update/remove obsolete badges and update link ( #663 )
2024-04-08 10:27:33 +00:00
Dirkjan Ochtman
9721646053
foundation: remove optional chrono dependency ( #666 )
...
* foundation: remove optional chrono dependency
* Bump version numbers for semver-incompatible changes
2024-04-08 10:20:45 +00:00
Martin Robinson
d7879eb353
core-graphics: Add more metrics functions to CGFont ( #661 )
2024-04-04 19:28:23 +00:00
Jeff Muizelaar
dd284a07f4
Bump the patch version. ( #662 )
...
The change to kCGWindowListOptionAll was technically semver breaking
but the constants were wrong before so it should be fine.
2024-04-04 17:14:38 +00:00
nashaofu
0933af08be
fix: Correcting errors in window CGWindowListOption values ( #653 )
2024-01-13 12:21:17 +00:00
Bruce Mitchener
58972aef0a
Update to 2018 edition. ( #642 )
...
This is the minimum fix required. It updates to use crate-relative
imports.
2023-10-24 00:30:22 +00:00
Bruce Mitchener
3ff7cc2795
docs: Fix various markdown issues. ( #639 )
2023-10-10 15:22:46 +00:00
Leo Kettmeir
c4f4ad20b6
feat: add link feature ( #608 )
...
adjust docs
Update cocoa/Cargo.toml
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com >
fmt
2023-10-10 14:46:20 +00:00
Bruce Mitchener
e589abe82e
Make license files consistent. ( #625 )
...
Each crate now has a symlink to the root level license files.
Previously, some did, some had copies, and some had nothing.
Fixes #503 .
2023-08-13 12:20:16 +00:00
Bruce Mitchener
18df9aafe7
Some clippy fixes. ( #624 )
2023-08-03 14:20:26 +00:00
Bruce Mitchener
062041a921
docs.rs: Document with all-features enabled. ( #626 )
...
This will help people find the functionality that is feature-gated.
Fixes #540 .
2023-08-01 15:29:29 +00:00
micolous
b009c87f2d
Auto-format code with "cargo fmt" and check in CI ( #615 )
...
* add rustfmt check to CI
* Run "cargo fmt" (rustfmt) over core-foundation-rs
2023-07-25 02:22:25 +00:00
Jeff Muizelaar
50fec8dd8d
Bump core-graphics version to get cg_event_tap_callback_internal fix.
2023-07-07 11:46:55 -04:00
Jeff Muizelaar
f3cf0f1d38
Drop #[no_mangle] from cg_event_tap_callback_internal
...
This allows multiple versions of core-graphics to be linked into the
same binaries without getting "duplicate symbol: cg_event_tap_callback_internal"
2023-07-07 11:36:20 -04:00
Nicolas Silva
589c97086e
Bump core-text, core-graphics and cocoa
2023-06-19 17:07:44 +02:00
michaelwright235
612ef8f9e5
core-graphics: Assign a value to a _ variable
...
Compiler thinks that we need to use the value, so we use this workaroud
to get rid of a warning.
2023-06-07 02:09:50 +03:00
bors-servo
c441d916e1
Auto merge of #560 - fcfangcc:release-0.23.4, r=jdm
...
Release for core-graphics
Release core-graphics version to 0.22.4
Include #554 , I urgently need to use it. Thanks 😃
2023-05-29 04:29:36 +02:00
fcfangcc
4c11545a87
release core-graphics 0.22.4
2023-05-29 09:39:15 +08:00
bors-servo
d254cec065
Auto merge of #554 - fcfangcc:feat-screenCaptureAccess, r=jdm
...
Add binding for ScreenCaptureAccess
Add binding for [CGRequestScreenCaptureAccess](https://developer.apple.com/documentation/coregraphics/3656524-cgrequestscreencaptureaccess ) and [CGPreflightScreenCaptureAccess](https://developer.apple.com/documentation/coregraphics/3656523-cgpreflightscreencaptureaccess )
to check if the app has screen recording permission on macOS
2023-05-24 15:53:08 +02:00
bors-servo
8b982fdd57
Auto merge of #548 - burtonageo:update_foreign_types, r=jdm
...
Update `foreign-types` crate to v0.5
Splits out the `foreign-types` part of https://github.com/servo/core-foundation-rs/pull/545
2023-05-24 15:42:31 +02:00
fcfangcc
d8b6ff1723
Add ScreenCaptureAccess struct
2023-05-24 21:23:55 +08:00
fcfangcc
2784e317bd
Add binding for ScreenCaptureAccess
2023-05-24 15:50:12 +08:00
mtfcd
75f424f81a
Add function from apple document, and add a method image_for_rect for convinient to use.
2023-04-27 00:04:55 -04:00
George Burton
6ddf5cadcc
Update foreign-types crate to v0.5
2023-04-25 22:15:52 +01:00