-
Notifications
You must be signed in to change notification settings - Fork 507
CoreGraphics macOS xcode16.0 b1
Rolf Bjarne Kvinge edited this page Aug 14, 2024
·
3 revisions
#CoreGraphics.framework https://github.com/xamarin/xamarin-macios/pull/21033
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h 2024-04-18 08:40:59
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h 2024-05-30 10:36:13
@@ -661,8 +661,18 @@
+/* Set target EDR headroom on a context to be used when rendering HDR content to the context.
+ Context 'c' has to be a bitmap context using either extended or HDR color space and
+ 'headroom' has to be a value greater than 1.0f. Return true on success and false on failure */
+
+CG_EXTERN bool CGContextSetEDRTargetHeadroom(CGContextRef __nonnull c, float headroom) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
+/* Return the EDR target headroom of the context `c'. */
+
+CG_EXTERN float CGContextGetEDRTargetHeadroom(CGContextRef c) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
/** Image functions. **/
/* Draw `image' in the rectangular area specified by `rect' in the context
@@ -681,8 +691,34 @@
+typedef CF_ENUM (uint32_t, CGToneMapping) {
+ kCGToneMappingDefault = 0, /* A system default method will be used */
+ kCGToneMappingImageSpecificLumaScaling, /* Implements tone mapping of HDR content associated with the CGImage gain map */
+ kCGToneMappingReferenceWhiteBased, /* Implements a tone curve that preserves SDR contrast and rolls off HDR highlights */
+ kCGToneMappingITURecommended, /* Implements tone mapping based on ITU-R specifications for HDR-to-SDR and SDR-to-HDR conversions assuming mastering peak of 1000 nits */
+ kCGToneMappingEXRGamma, /* Implements Open EXR tone mapping gamma suitable for tone mapping images in extended linear sRGB color space to SDR */
+ kCGToneMappingNone /* Does not apply any tone mapping. Color converted values in extended color spaces will be clipped to SDR ([0.0-1.0]) range */
+} API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
+CG_EXTERN bool CGContextDrawImageApplyingToneMapping(CGContextRef __nonnull c, CGRect r, CGImageRef image, CGToneMapping method, CFDictionaryRef __nullable options) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
+/* kCGColorITURecommendedToneMapping allows for using HLG OOTF targeting 100 nits when converting HLG to SDR. */
+CG_EXTERN const CFStringRef kCGUse100nitsHLGOOTF API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* The expected value is a CFBooleanRef (kCFBooleanTrue) */
+
+/* kCGColorITURecommendedToneMapping allows for choosing BT1886 recommended gamma in lieu of CoreVideo Gamma. */
+CG_EXTERN const CFStringRef kCGUseBT1886ForCoreVideoGamma API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* The expected value is a CFBooleanRef (kCFBooleanTrue) */
+
+/* kCGColorITURecommendedToneMapping allows for skipping linear boost when converting non-HDR content (either SDR or extended range) to HDR. */
+CG_EXTERN const CFStringRef kCGSkipBoostToHDR API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* The expected value is a CFBooleanRef (kCFBooleanTrue) */
+
+/* kCGToneMappingEXRGamma allows for specifying custom parameters to override system defaults. */
+CG_EXTERN const CFStringRef kCGEXRToneMappingGammaDefog API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* default value: 0.0f range [0.0f, 0.01f] */
+CG_EXTERN const CFStringRef kCGEXRToneMappingGammaExposure API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* default value: 0.0f range [-10.0f, 10.0f] */
+CG_EXTERN const CFStringRef kCGEXRToneMappingGammaKneeLow API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* default value: 0.0f range [-2.85f, 3.0f] */
+CG_EXTERN const CFStringRef kCGEXRToneMappingGammaKneeHigh API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* default value: 5.0f range [3.5f, 7.5f] */
+
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h 2024-04-18 08:40:59
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h 2024-05-30 03:00:16
@@ -156,7 +155,7 @@
source rectangle is specified in display logical coordinates and not in pixels, in order to match the normal convention on
HiDPI displays.
*/
-CG_EXTERN const CFStringRef kCGDisplayStreamSourceRect CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration sourceRect property instead"); /* Source rectangle to capture - defaults to entire display */
+CG_EXTERN const CFStringRef kCGDisplayStreamSourceRect SCREEN_CAPTURE_OBSOLETE(10.8,14.0,15.0); /* Source rectangle to capture - defaults to entire display */
/*!
@const kCGDisplayStreamDestinationRect
@@ -165,7 +164,7 @@
the destination rectangle is always specified in output pixels to match the fact that the output buffer size is also
specified in terms of pixels.
*/
-CG_EXTERN const CFStringRef kCGDisplayStreamDestinationRect CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration destinationRect property instead"); /* Destination rectangle - defaults to entire buffer */
+CG_EXTERN const CFStringRef kCGDisplayStreamDestinationRect SCREEN_CAPTURE_OBSOLETE(10.8,14.0,15.0); /* Destination rectangle - defaults to entire buffer */
/*!
@const kCGDisplayStreamPreserveAspectRatio
@@ -174,38 +173,38 @@
the display stream destination rect are not the same, black borders will be inserted at the top/bottom or right/left sides of the destination
in order to preserve the source aspect ratio.
*/
-CG_EXTERN const CFStringRef kCGDisplayStreamPreserveAspectRatio CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration preserveAspectRatio property instead"); /* CFBoolean - defaults to true */
+CG_EXTERN const CFStringRef kCGDisplayStreamPreserveAspectRatio SCREEN_CAPTURE_OBSOLETE(10.8,14.0,15.0); /* CFBoolean - defaults to true */
/*!
@const kCGDisplayStreamColorSpace
@discussion Set the desired CGColorSpace of the output frames. By default the color space will be that of the display.
*/
-CG_EXTERN const CFStringRef kCGDisplayStreamColorSpace CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration colorSpaceName property instead"); /* Desired output color space (CGColorSpaceRef) - defaults to display color space */
+CG_EXTERN const CFStringRef kCGDisplayStreamColorSpace SCREEN_CAPTURE_OBSOLETE(10.8,14.0,15.0); /* Desired output color space (CGColorSpaceRef, macos(10.8,14.0)) - defaults to display color space */
/*!
@const kCGDisplayStreamMinimumFrameTime
@discussion Request that the delta between frame updates be at least as much specified by this value.
*/
-CG_EXTERN const CFStringRef kCGDisplayStreamMinimumFrameTime CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration minimumFrameInterval property instead"); /* CFNumber in seconds, defaults to zero. */
+CG_EXTERN const CFStringRef kCGDisplayStreamMinimumFrameTime SCREEN_CAPTURE_OBSOLETE(10.8,14.0,15.0); /* CFNumber in seconds, defaults to zero. */
/*!
@const kCGDisplayStreamShowCursor
@discussion Controls whether the cursor is embedded within the provided buffers or not.
*/
-CG_EXTERN const CFStringRef kCGDisplayStreamShowCursor CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration showsCursor property instead"); /* CFBoolean - defaults to false */
+CG_EXTERN const CFStringRef kCGDisplayStreamShowCursor SCREEN_CAPTURE_OBSOLETE(10.8,14.0,15.0); /* CFBoolean - defaults to false */
/*!
@const kCGDisplayStreamQueueDepth
@discussion Controls how many frames deep the frame queue will be. Defaults to N.
*/
-CG_EXTERN const CFStringRef kCGDisplayStreamQueueDepth CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration queueDepth property instead"); /* Queue depth in frames. Defaults to 3. */
+CG_EXTERN const CFStringRef kCGDisplayStreamQueueDepth SCREEN_CAPTURE_OBSOLETE(10.8,14.0,15.0); /* Queue depth in frames. Defaults to 3. */
/*!
@const kCGDisplayStreamYCbCrMatrix
@discussion When outputting frames in 420v or 420f format, this key may be used to control which YCbCr matrix is used
The value should be one of the three kCGDisplayStreamYCbCrMatrix values specified below.
*/
-CG_EXTERN const CFStringRef kCGDisplayStreamYCbCrMatrix CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration colorMatrix property");
+CG_EXTERN const CFStringRef kCGDisplayStreamYCbCrMatrix SCREEN_CAPTURE_OBSOLETE(10.8,14.0,15.0);
/* Supported YCbCr matrices. Note that these strings have identical values to the equivalent CoreVideo strings. */
CG_EXTERN const CFStringRef kCGDisplayStreamYCbCrMatrix_ITU_R_709_2;
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEventTypes.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEventTypes.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEventTypes.h 2024-04-18 08:40:58
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEventTypes.h 2024-05-30 03:00:15
@@ -379,7 +379,16 @@
/* Unaccelerated pointer movement */
kCGEventUnacceleratedPointerMovementX = 170,
- kCGEventUnacceleratedPointerMovementY = 171
+ kCGEventUnacceleratedPointerMovementY = 171,
+
+ /* Momentum Scroll Optional Phase */
+ kCGScrollWheelEventMomentumOptionPhase = 173,
+
+ /* Raw and accelerated scroll wheel deltas*/
+ kCGScrollWheelEventAcceleratedDeltaAxis1 = 176,
+ kCGScrollWheelEventAcceleratedDeltaAxis2 = 175,
+ kCGScrollWheelEventRawDeltaAxis1 = 178,
+ kCGScrollWheelEventRawDeltaAxis2 = 177
};
/* Constants used with the `kCGMouseEventSubtype' event field. */
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h 2024-04-18 07:10:24
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h 2024-05-30 10:36:12
@@ -202,96 +202,131 @@
+/* Create an image with specified EDR headroom. ColorSpace 'space' must be an
+ extended color space, PQ or HLG. In case of extended color spaces, image
+ components must be either 16-bit or 32-bit float. In case of PQ or HLG
+ color spaces, 16-bit or 32-bit float image components values will be
+ clipped to [0.0, 1.0] range, and other bit depths will be treated as
+ representing [0.0, 1.0] range, same as in 'CGImageCreate' API.
+ The headroom parameter must be either equal 0.0f or be greater or equal 1.0f.
+ When the headroom parameter is 0.0f, the image EDR headroom value will be
+ estimated based on the default headroom of the color space. */
+
+CG_EXTERN CGImageRef __nullable CGImageCreateWithEDRHeadroom(
+ float headroom,
+ size_t width, size_t height,
+ size_t bitsPerComponent, size_t bitsPerPixel, size_t bytesPerRow,
+ CGColorSpaceRef cg_nullable space, CGBitmapInfo bitmapInfo,
+ CGDataProviderRef cg_nullable provider,
+ const CGFloat * __nullable decode, bool shouldInterpolate,
+ CGColorRenderingIntent intent)
+ API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
+/* Return image content headroom */
+
+CG_EXTERN float CGImageGetContentHeadroom(CGImageRef cg_nullable image)
+ API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
/* Equivalent to `CFRetain(image)'. */
+/* Return true if `image' should be tone mapped while rendering, false otherwise.
+ Tone mapping results depend on the receiving context.
+ */
+
+CG_EXTERN bool CGImageShouldToneMap(CGImageRef cg_nullable image) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
+/* Return true if `image' contains image specific tone mapping metadata, false otherwise. */
+
+CG_EXTERN bool CGImageContainsImageSpecificToneMappingMetadata(CGImageRef cg_nullable image) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
/* Return the UTType of `image'. */
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h 2024-04-18 08:41:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h 2024-05-30 03:00:17
@@ -219,6 +219,11 @@
kCGWindowImageNominalResolution = (1 << 4)
};
+
+#define SCREEN_CAPTURE_OBSOLETE(x,y,z) \
+ __attribute__((availability(macos,introduced=x,deprecated=y,obsoleted=z,message="Please use ScreenCaptureKit instead.")));
+
+
/* Create an image containing a composite of the specified set of windows
contained within a rectangular area. The set of windows is specified
using options from `CGWindowListOption', along with an optional
@@ -266,7 +271,7 @@
CG_EXTERN CGImageRef __nullable CGWindowListCreateImage(CGRect screenBounds,
CGWindowListOption listOption, CGWindowID windowID,
CGWindowImageOption imageOption)
- CG_AVAILABLE_BUT_DEPRECATED(10.5, 14.0, "This API is deprecated. Please use ScreenCaptureKit's captureScreenshot APIs instead.");
+ SCREEN_CAPTURE_OBSOLETE(10.5,14.0,15.0);
/* Create an image containing a composite of the specified set of windows
contained within a rectangular area à la `CGWindowListCreateImage'. The
@@ -275,7 +280,7 @@
CG_EXTERN CGImageRef __nullable CGWindowListCreateImageFromArray(
CGRect screenBounds, CFArrayRef windowArray,
CGWindowImageOption imageOption)
- CG_AVAILABLE_BUT_DEPRECATED(10.5, 14.0, "This API is deprecated. Please use ScreenCaptureKit's captureScreenshot APIs instead.");
+ SCREEN_CAPTURE_OBSOLETE(10.5,14.0,15.0);
/* A CFNumberRef encoding appropriate for use with a CGWindowID. */
#define kCGWindowIDCFNumberType kCFNumberSInt32Type
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status