Commit Graph

113 Commits

Author SHA1 Message Date
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
Alex Touchet 1632edee66 Use SPDX license format 2023-04-02 22:43:22 -07:00
Josh Leeb-du Toit 49aa01d437 Add binding for CGEventTapPostEvent
This change adds the binding for CGEventTapPostEvent and adds a wrapper
function CGEvent::post_from_tap to call the core-graphics function.
2023-03-21 15:38:43 +11:00
Alexander Ekdahl 6a0cbbfb3d Add all color space names
Adds all of the non-deprecated color space names found at: https://developer.apple.com/documentation/coregraphics/cgcolorspace/color_space_names
2022-12-24 00:41:31 +01:00
Hein Rutjes 342af5e6a9 Add CGContextResetClip 2022-10-07 07:43:07 -04:00
Hein Rutjes 3213c3e3f3 Add CGContextSetAlpha 2022-10-06 13:50:31 -04:00
Mads Marquart 560da05fef Add CoreGraphics FFI used by winit 2022-09-05 13:33:55 +02:00
Alex Touchet 5143684bb5 Fix listed core-graphics homepage 2022-05-26 08:25:16 -04:00
Mikaela Szekely 65b1efcd5d Publish core-graphics 2021-10-27 20:31:00 -06:00
bors-servo f7e0b97e0b Auto merge of #436 - AsafFisher:master, r=jrmuizel
Add CGEventTap

https://github.com/servo/core-graphics-rs/issues/111
2021-05-26 13:18:34 -04:00
Phil Dennis-Jordan c519abad47 Adds function for fetching ID of a core_graphics::display::CGDisplayMode
This adds a mode_id() function on CGDisplayMode which returns the unique (to that display) integer ID the system uses to identify the display mode. It internally calls down to CGDisplayModeGetIODisplayModeID() in the CoreGraphics framework. The FFI for this function was previously missing and has also been added.
2021-03-26 15:49:20 +01:00
Jeff Muizelaar d9403529d0 Expose CGFontCopyVariations and CGFontCopyVariationAxes 2021-02-09 20:02:46 -05:00
Asaf Fisher 532a3214be core-graphics: event: Add tests to CGEventTap 2021-01-25 19:58:22 +02:00
Asaf Fisher 19671d30c2 core-graphics: Add CGEventTap object to create an event tap 2021-01-25 19:58:22 +02:00
Jeff Muizelaar 7ce88888a0 Bump core-graphics version 2020-12-08 11:50:48 -05:00
Jeff Muizelaar dc588497db Fix the type of Arc::from_raw().
Previously we were mistakenly creating an Arc<c_void> instead of an
Arc<T>. This also changes the test to catch this problem.
2020-10-14 13:29:28 -04:00
Josh Matthews d3336c3a21 Version bumps for cocoa, core-foundation-sys, core-foundation, core-text, core-graphics-types, core-graphics. 2020-09-15 12:19:56 -04:00
Josh Matthews 95d071234c Bump core-graphics to 0.22.0, core-text to 19.0.0, cocoa to 0.23.0. 2020-09-15 12:15:41 -04:00
Kornel Lesiński 71a0d68abf Fix docs.rs build 2020-08-26 17:28:10 +01:00
Jeff Muizelaar edb7a8c7fc Add cocoa-foundation crate
This should let gfx-metal-rust avoid depending on core-graphics
2020-07-17 22:48:21 -04:00
Jeff Muizelaar 8bf741bc82 Make CGDataProvider::from_buffer more generic
This lets us use more types than just Vec<u8> and should avoid any
compatibility breaks. It also adds a test that ensures
the memory gets released.
2020-07-16 18:07:33 -04:00
Josh Matthews 762a01b90f Major version update for core-foundation-sys and all other dependencies. 2020-06-29 11:45:17 -04:00
Josh Matthews 56d8b6c161 Major version change for core-foundation, core-graphics, io-surface, core-text, cocoa. 2020-06-29 11:03:28 -04:00
Josh Matthews d196c0c4c8 Publish core-graphics 0.19.2. 2020-06-27 15:05:02 -04:00
Francesca Lovebloom 9ae9c5e3f7 Fix build on iOS 2020-06-26 13:15:17 -07:00
Josh Matthews 25840d6dc5 Publish core-graphics 0.19.1. 2020-06-26 11:18:38 -04:00
Colin Rofls 334c234539 Add CGContext::set_/get_interpolation_quality 2020-05-12 14:43:38 -04:00
Colin Rofls db5fa6b85d Add CGContext::clip_to_mask 2020-05-09 14:10:03 -04:00
Kornel acf2c86930 Fix style warnings 2020-05-08 11:42:06 +01:00
brunohgouveia 8fb46bd58a Add CGContextRetain and CGContextRelease
Add function to create CGContext from existing ::sys::CGContextRef pointer
2020-04-16 00:21:03 +01:00
brunohgouveia 999128fc71 Add CGContextSetShadow and CGContextSetShadowWithColor to CGContext 2020-04-14 00:12:00 +01:00
bors-servo 1e06588c4b Auto merge of #365 - brunogouveia:add-cg-gradient, r=jdm
Add CGGradient and CGContext gradient draw functions

This PR adds the following missing APIs:
- Added [CGGradient](https://developer.apple.com/documentation/coregraphics/cggradient) in the `core_graphics::gradient` module.
- Added [CGContextDrawLinearGradient](https://developer.apple.com/documentation/coregraphics/1454782-cgcontextdrawlineargradient) and [CGContextDrawRadialGradient](https://developer.apple.com/documentation/coregraphics/1455923-cgcontextdrawradialgradient) in the `core_graphics::context` module.
2020-04-13 16:52:02 -04:00
bors-servo 8a02888d43 Auto merge of #367 - brunogouveia:add-text-line, r=jdm
Add missing APIs to CTLine

Added the following missing APIs to [CTLine](https://developer.apple.com/documentation/coretext/ctline):
- CTLineDraw
- CTLineGetImageBounds
- CTLineGetStringIndexForPosition
- CTLineGetOffsetForStringIndex

Added `CGContextSetTextPosition` to `CGContext`.

Added `CGTextFillStrokeClip` to `CGTextDrawingMode`.
2020-04-13 16:46:04 -04:00
brunohgouveia 1f4c983cee Add missing APIs to CTLine 2020-04-13 21:25:53 +01:00
brunohgouveia ca3c41846e Add missing APIs to CGAffineTransform 2020-04-13 20:54:50 +01:00
brunohgouveia c503b4eddb Add CGGradient and CGContext gradient draw functions 2020-04-13 20:43:50 +01:00
Max Brunsfeld f763977a76 Move doc comment to struct inside bitflags invocation 2020-01-09 08:38:33 -08:00
Max Brunsfeld d95d3fa743 Fix miscellaneous compile warnings 2020-01-08 20:47:41 -08:00