Skip to content

CoreGraphics macOS xcode26.0 b1

Rolf Bjarne Kvinge edited this page Jun 20, 2025 · 2 revisions

#CoreGraphics.framework

diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h	2025-04-19 01:28:04
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h	2025-05-30 01:54:41
@@ -368,5 +368,12 @@
 # define CG_BOXABLE
 #endif
 
+#define CG_ENUM_SOFT_DEPRECATED_WITH_REPLACEMENT(repl) __attribute__(( \
+availability(macos,deprecated=API_TO_BE_DEPRECATED,replacement=#repl), \
+availability(ios,deprecated=API_TO_BE_DEPRECATED,replacement=#repl))) = repl
+
+#define CG_SOFT_DEPRECATED_WITH_REPLACEMENT(repl) __attribute__(( \
+availability(macos,deprecated=API_TO_BE_DEPRECATED,replacement=#repl), \
+availability(ios,deprecated=API_TO_BE_DEPRECATED,replacement=#repl)))
 
 #endif /* CGBASE_H_ */
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h	2025-04-19 02:44:20
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h	2025-06-01 22:02:51
@@ -1,5 +1,5 @@
 /* CoreGraphics - CGBitmapContext.h
-   Copyright (c) 2000-2011 Apple Inc.
+   Copyright (c) 2000-2025 Apple Inc.
    All rights reserved. */
 
 #ifndef CGBITMAPCONTEXT_H_
@@ -7,6 +7,7 @@
 
 #include <CoreGraphics/CGBase.h>
 #include <CoreGraphics/CGContext.h>
+#include <CoreGraphics/CGRenderingBufferProvider.h>
 #include <CoreFoundation/CFBase.h>
 #include <CoreFoundation/CFAvailability.h>
 #include <stdint.h>
@@ -41,11 +42,22 @@
 
 CG_EXTERN CGContextRef __nullable CGBitmapContextCreateWithData(
     void * __nullable data, size_t width, size_t height, size_t bitsPerComponent,
-    size_t bytesPerRow, CGColorSpaceRef cg_nullable space, uint32_t bitmapInfo,
+    size_t bytesPerRow, CGColorSpaceRef __nullable space, CGBitmapInfo bitmapInfo,
     CGBitmapContextReleaseDataCallback __nullable releaseCallback,
     void * __nullable releaseInfo)
     API_AVAILABLE(macos(10.6), ios(4.0));
 
+#ifdef __swift__
+API_DEPRECATED("update space parameter to CGColorSpace?, bitmapInfo parameter to CGBitmapInfo", macos(10.6, API_TO_BE_DEPRECATED), ios(4.0, API_TO_BE_DEPRECATED))
+CG_INLINE CGContextRef __nullable __CGBitmapContextCreateWithData(
+    void * __nullable data, size_t width, size_t height, size_t bitsPerComponent,
+    size_t bytesPerRow, CGColorSpaceRef cg_nullable space, uint32_t bitmapInfo,
+    CGBitmapContextReleaseDataCallback __nullable releaseCallback,
+    void * __nullable releaseInfo) {
+    return CGBitmapContextCreateWithData(data, width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo, releaseCallback, releaseInfo);
+}
+#endif
+
 /* Create a bitmap context. The context draws into a bitmap which is `width'
    pixels wide and `height' pixels high. The number of components for each
    pixel is specified by `space', which may also specify a destination color
@@ -64,8 +76,108 @@
 
 CG_EXTERN CGContextRef __nullable CGBitmapContextCreate(void * __nullable data,
     size_t width, size_t height, size_t bitsPerComponent, size_t bytesPerRow,
-    CGColorSpaceRef cg_nullable space, uint32_t bitmapInfo)
+    CGColorSpaceRef __nullable space, CGBitmapInfo bitmapInfo)
     API_AVAILABLE(macos(10.0), ios(2.0));
+
+#ifdef __swift__
+API_DEPRECATED("update space parameter to CGColorSpace?, bitmapInfo parameter to CGBitmapInfo", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED))
+CG_INLINE CGContextRef __nullable __CGBitmapContextCreate(void * __nullable data,
+    size_t width, size_t height, size_t bitsPerComponent, size_t bytesPerRow,
+    CGColorSpaceRef cg_nullable space, uint32_t bitmapInfo) {
+    return CGBitmapContextCreate(data, width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo);
+}
+#endif
+
+/* Bitmap Context typedefs */
+ 
+typedef CF_OPTIONS (uint32_t, CGColorModel) {
+    kCGColorModelNoColorant               = 0 << 0,
+    kCGColorModelGray                     = 1 << 0,
+    kCGColorModelRGB CF_SWIFT_NAME(rgb)   = 1 << 1,
+    kCGColorModelCMYK CF_SWIFT_NAME(cmyk) = 1 << 2,
+    kCGColorModelLab                      = 1 << 3,
+    kCGColorModelDeviceN                  = 1 << 4
+};
+
+typedef CF_ENUM(uint32_t, CGComponent) {
+    kCGComponentUnknown      = 0,
+    kCGComponentInteger8Bit  = 1,
+    kCGComponentInteger10Bit = 6,
+    kCGComponentInteger16Bit = 2,
+    kCGComponentInteger32Bit = 3,
+    kCGComponentFloat16Bit   = 5,
+    kCGComponentFloat32Bit   = 4
+};
+
+typedef struct {
+    CGComponent  deepestImageComponent;  /* deepest image component */
+    CGColorModel contentColorModels;     /* sum of all color models drawn */
+    bool         hasWideGamut;           /* there is content in wide gamut color space */
+    bool         hasTransparency;        /* there is transparent content */
+    float        largestContentHeadroom;
+} CGContentInfo;
+
+typedef CF_ENUM (uint32_t, CGBitmapLayout) {
+    kCGBitmapLayoutAlphaOnly CF_SWIFT_NAME(alphaOnly),
+    kCGBitmapLayoutGray      CF_SWIFT_NAME(gray),
+    kCGBitmapLayoutGrayAlpha CF_SWIFT_NAME(grayAlpha),
+    kCGBitmapLayoutRGBA      CF_SWIFT_NAME(rgba),
+    kCGBitmapLayoutARGB      CF_SWIFT_NAME(argb),
+    kCGBitmapLayoutRGBX      CF_SWIFT_NAME(rgbx), // alpha skipped
+    kCGBitmapLayoutXRGB      CF_SWIFT_NAME(xrgb), // alpha skipped; 16-bit float excluded
+    kCGBitmapLayoutBGRA      CF_SWIFT_NAME(bgra), // 8-bit only
+    kCGBitmapLayoutBGRX      CF_SWIFT_NAME(bgrx), // alpha skipped; 8-bit only
+    kCGBitmapLayoutABGR      CF_SWIFT_NAME(abgr), // 8-bit only
+    kCGBitmapLayoutXBGR      CF_SWIFT_NAME(xbgr), // alpha skipped; 8-bit only
+    kCGBitmapLayoutCMYK      CF_SWIFT_NAME(cmyk)
+};
+
+typedef struct {
+    const size_t             width;
+    const size_t             height;
+    size_t                   bytesPerPixel;
+    size_t                   alignedBytesPerRow; /* Rounded up to an appropriate value for bitmap data */
+    CGComponent              component;
+    CGBitmapLayout           layout;
+    CGImagePixelFormatInfo   format;
+    CGColorSpaceRef          colorSpace;
+    bool                     hasPremultipliedAlpha;
+    CFByteOrder              byteOrder;
+    float                    edrTargetHeadroom;
+} CGBitmapParameters CF_REFINED_FOR_SWIFT;
+
+/* CGBitmapContextCreateAdaptive creates a bitmap context which is designed to choose
+ * optimal bit depth, color space and EDR target headroom based on the drawn content.
+ * Client has an option to override the calculated settings in 'onResolve' callback,
+ * however the image creation from the context will fail if the selected options
+ * are not legal options for creating a CG bitmap content.
+ * The 'onResolve' callback takes a pointer to CGBitmapParameters so the client can modify CGBitmapParameters.
+ * The client returns true from 'onResolve' if CGBitmapParameters object is accepted as is, or false if it's modified.
+ * If 'onResolve' is NULL, system will determine CGBitmapParameters based on the content drawn to the context.
+ * If 'onAllocate' is NULL, system will allocate memory based on chosen CGBitmapParameters.
+ * If 'onFree' is NULL, the allocated memory will be released using C 'free' when the context is released.
+ * The 'onError' callback gives the client an option to receive a CFErrorRef describing a reason of failure,
+ * should the creation of the bitmap failed.
+ */
+
+CG_EXTERN CGContextRef __nullable
+CGBitmapContextCreateAdaptive(
+    size_t width, size_t height,
+    CFDictionaryRef                           __nullable auxiliaryInfo,
+    bool                                    (^__nullable onResolve)(const CGContentInfo* __nonnull, CGBitmapParameters* __nonnull),
+    CGRenderingBufferProviderRef __nullable (^__nullable onAllocate)(const CGContentInfo* __nonnull, const CGBitmapParameters* __nonnull),
+    void                                    (^__nullable onFree)(CGRenderingBufferProviderRef __nonnull, const CGContentInfo* __nonnull, const CGBitmapParameters* __nonnull),
+    void                                    (^__nullable onError)(CFErrorRef __nonnull, const CGContentInfo* __nonnull, const CGBitmapParameters* __nonnull))
+    CF_REFINED_FOR_SWIFT
+    API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0), visionos(26.0));
+
+/* kCGAdaptiveMaximumBitDepth passed in auxiliaryInfo provides a hint about maximum bit depth of the
+ * adaptive context which should be considered by the system. The value should be a CFNumberRef of
+ * kCFNumberIntType created from CGComponent enum type.
+ * Currently kCGAdaptiveMaximumBitDepth is the only valid key to be used in auxiliaryInfo.
+ */
+
+CG_EXTERN const CFStringRef kCGAdaptiveMaximumBitDepth CF_REFINED_FOR_SWIFT API_AVAILABLE(macos(10.13), ios(11.0));
 
 /* Return the data associated with the bitmap context `context', or NULL if
    `context' is not a bitmap context. */
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h	2025-04-19 02:44:20
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h	2025-06-01 23:31:15
@@ -51,6 +51,17 @@
 CG_EXTERN CGColorRef  CGColorCreateSRGB(CGFloat red, CGFloat green,
                                         CGFloat blue, CGFloat alpha) API_AVAILABLE(macos(10.15), ios(13.0));
 
+/* Create a color with a specified content headroom. Color space is required to be either HDR or extended range RGB.
+   The content value of 0.0f means 'unknown headroom'. If the color space is HDR, passing a headroom of 0.0f
+   is a request to use a default headroom implied by the color space. */
+
+CG_EXTERN CGColorRef __nullable CGColorCreateWithContentHeadroom(float headroom, CGColorSpaceRef cg_nullable space, CGFloat red, CGFloat green,
+                                                                 CGFloat blue, CGFloat alpha) API_AVAILABLE(macos(26.0), ios(26.0));
+
+/* Return content headroom of the color. Returned value is 0.0f if the content headroom of the color is unknown */
+
+CG_EXTERN float CGColorGetContentHeadroom(CGColorRef cg_nullable color) API_AVAILABLE(macos(26.0), ios(26.0));
+
 /* Return a constant color. As `CGColorGetConstantColor' is not a "Copy" or
    "Create" function, it does not necessarily return a new reference each
    time it's called. As a consequence, you should not release the returned
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h	2025-04-19 02:39:30
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h	2025-06-01 22:03:22
@@ -93,7 +93,7 @@
 CG_EXTERN const CFStringRef kCGColorSpaceSRGB
   API_AVAILABLE(macos(10.5), ios(9.0));
 
-/* The "Generic" gray color space with γ = 2.2. */
+/* The "Generic" gray color space with γ = 1.8. */
 
 CG_EXTERN const CFStringRef kCGColorSpaceGenericGrayGamma2_2
   API_AVAILABLE(macos(10.6), ios(9.0));
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h	2025-04-19 03:17:53
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h	2025-06-01 23:34:29
@@ -665,8 +665,9 @@
     API_AVAILABLE(macos(10.0), ios(2.0));
 
 /* 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 */
+   The value of the 'headroom' will be adjusted as follows: (headroom < 0.0f) ? 0.0f : (headroom > 0.0f && headroom < 1.0f) ? 1.0f : headroom.
+   Please note that the headroom value of 0.0f means "headroom unknown" which prevents tone mapping.
+   Context 'c' needs to be a valid context. 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));
 
@@ -699,6 +700,18 @@
 
 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));
 
+/* Return the CGContentToneMappingInfo for rendering HDR content in `context'. The
+   content tone mapping info is a gstate parameter which defines the method and method's
+   options performed when rendering HDR CGColors and CGImages.
+   Note that CGContextDrawImageApplyingToneMapping (described above) will override the
+   context's content tone mapping info. */
+
+CG_EXTERN CGContentToneMappingInfo CGContextGetContentToneMappingInfo(CGContextRef __nonnull c) API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0));
+
+/* Set the content tone mapping info of `context' to `info'. */
+
+CG_EXTERN void CGContextSetContentToneMappingInfo(CGContextRef __nonnull c, CGContentToneMappingInfo info) API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0));
+
 /* Return the interpolation quality for image rendering of `context'. The
    interpolation quality is a gstate parameter which controls the level of
    interpolation performed when an image is interpolated (for example, when
@@ -882,15 +895,20 @@
 CG_EXTERN void CGContextRelease(CGContextRef cg_nullable c)
     API_AVAILABLE(macos(10.0), ios(2.0));
 
-/* Flush all drawing to the destination. */
+/* Flush all drawings to the destination. */
 
 CG_EXTERN void CGContextFlush(CGContextRef cg_nullable c)
     API_AVAILABLE(macos(10.0), ios(2.0));
 
-/* Synchronized drawing. */
+/* Synchronize drawing. */
 
 CG_EXTERN void CGContextSynchronize(CGContextRef cg_nullable c)
     API_AVAILABLE(macos(10.0), ios(2.0));
+
+/* Synchronize destination attributes with the context. */
+
+CG_EXTERN void CGContextSynchronizeAttributes(CGContextRef c)
+API_AVAILABLE(macos(26.0), ios(26.0));
 
 /** Antialiasing functions. **/
 
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h	2025-04-19 01:28:05
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h	2025-05-30 01:54:42
@@ -5,7 +5,7 @@
 #ifndef CGEXRTONEMAPPINGGAMMA_H
 #define CGEXRTONEMAPPINGGAMMA_H
 
-#include <CoreFoundation/CFAvailability.h>
+#include <CoreFoundation/CoreFoundation.h>
 #include <CoreGraphics/CGBase.h>
 
 CF_IMPLICIT_BRIDGING_ENABLED
@@ -24,6 +24,8 @@
 /* kCGEXRToneMappingGammaKneeHigh allows for specifying custom "knee high" value to override system defaults when applying kCGToneMappingEXRGamma tone mapping method */
 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]    */
 
+/* Return a dictionary with default options for tone mapping using EXR Gamma method */
+CG_EXTERN CFDictionaryRef CGEXRToneMappingGammaGetDefaultOptions(void) API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0));
 
 CF_ASSUME_NONNULL_END
 
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h	2025-04-19 02:44:19
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h	2025-06-01 23:53:16
@@ -30,17 +30,33 @@
     kCGImageAlphaOnly                /* No color data, alpha data only */
 };
 
+typedef CF_ENUM(uint32_t, CGImageComponentInfo) {
+    kCGImageComponentInteger = (0 << 8),
+    kCGImageComponentFloat = (1 << 8)
+} API_AVAILABLE(macos(10.0), ios(2.0));
+
 typedef CF_ENUM(uint32_t, CGImageByteOrderInfo) {
-    kCGImageByteOrderMask     = 0x7000,
+    kCGImageByteOrderMask CG_SOFT_DEPRECATED_WITH_REPLACEMENT(kCGBitmapByteOrderInfoMask)
+                              = 0x7000,
+    
     kCGImageByteOrderDefault  = (0 << 12),
     kCGImageByteOrder16Little = (1 << 12),
     kCGImageByteOrder32Little = (2 << 12),
     kCGImageByteOrder16Big    = (3 << 12),
-    kCGImageByteOrder32Big    = (4 << 12)
+    kCGImageByteOrder32Big    = (4 << 12),
+#ifdef __BIG_ENDIAN__
+    kCGImageByteOrder16Host   = kCGImageByteOrder16Big,
+    kCGImageByteOrder32Host   = kCGImageByteOrder32Big
+#else
+    kCGImageByteOrder16Host   = kCGImageByteOrder16Little,
+    kCGImageByteOrder32Host   = kCGImageByteOrder32Little
+#endif
 } API_AVAILABLE(macos(10.0), ios(2.0));
 
 typedef CF_ENUM(uint32_t, CGImagePixelFormatInfo) {
-    kCGImagePixelFormatMask      = 0xF0000,
+    kCGImagePixelFormatMask CG_SOFT_DEPRECATED_WITH_REPLACEMENT(kCGBitmapPixelFormatInfoMask)
+                                 = 0xF0000,
+
     kCGImagePixelFormatPacked    = (0 << 16),
     kCGImagePixelFormatRGB555    = (1 << 16), /* Only for RGB 16 bits per pixel, alpha != alpha none */
     kCGImagePixelFormatRGB565    = (2 << 16), /* Only for RGB 16 bits per pixel, alpha none */
@@ -51,27 +67,35 @@
 } API_AVAILABLE(macos(10.14), ios(12.0));
 
 typedef CF_OPTIONS(uint32_t, CGBitmapInfo) {
-    kCGBitmapAlphaInfoMask = 0x1F,
+    kCGBitmapAlphaInfoMask       = 0x1F,
+    kCGBitmapComponentInfoMask   = 0xF00,
+    kCGBitmapByteOrderInfoMask   = 0x7000,
+    kCGBitmapPixelFormatInfoMask = 0xF0000,
+    
+    kCGBitmapFloatInfoMask CG_ENUM_SOFT_DEPRECATED_WITH_REPLACEMENT(kCGBitmapComponentInfoMask),
+    kCGBitmapByteOrderMask CG_ENUM_SOFT_DEPRECATED_WITH_REPLACEMENT(kCGBitmapByteOrderInfoMask),
 
-    kCGBitmapFloatInfoMask = 0xF00,
-    kCGBitmapFloatComponents = (1 << 8),
-
-    kCGBitmapByteOrderMask     = kCGImageByteOrderMask,
-    kCGBitmapByteOrderDefault  = kCGImageByteOrderDefault,
-    kCGBitmapByteOrder16Little = kCGImageByteOrder16Little,
-    kCGBitmapByteOrder32Little = kCGImageByteOrder32Little,
-    kCGBitmapByteOrder16Big    = kCGImageByteOrder16Big,
-    kCGBitmapByteOrder32Big    = kCGImageByteOrder32Big
+    kCGBitmapFloatComponents CG_ENUM_SOFT_DEPRECATED_WITH_REPLACEMENT(kCGImageComponentFloat),
+    kCGBitmapByteOrderDefault CG_ENUM_SOFT_DEPRECATED_WITH_REPLACEMENT(kCGImageByteOrderDefault),
+    kCGBitmapByteOrder16Little CG_ENUM_SOFT_DEPRECATED_WITH_REPLACEMENT(kCGImageByteOrder16Little),
+    kCGBitmapByteOrder32Little CG_ENUM_SOFT_DEPRECATED_WITH_REPLACEMENT(kCGImageByteOrder32Little),
+    kCGBitmapByteOrder16Big CG_ENUM_SOFT_DEPRECATED_WITH_REPLACEMENT(kCGImageByteOrder16Big),
+    kCGBitmapByteOrder32Big CG_ENUM_SOFT_DEPRECATED_WITH_REPLACEMENT(kCGImageByteOrder32Big)
 } API_AVAILABLE(macos(10.0), ios(2.0));
 
-#ifdef __BIG_ENDIAN__
-static const CGBitmapInfo kCGBitmapByteOrder16Host = kCGBitmapByteOrder16Big;
-static const CGBitmapInfo kCGBitmapByteOrder32Host = kCGBitmapByteOrder32Big;
-#else    /* Little endian. */
-static const CGBitmapInfo kCGBitmapByteOrder16Host = kCGBitmapByteOrder16Little;
-static const CGBitmapInfo kCGBitmapByteOrder32Host = kCGBitmapByteOrder32Little;
-#endif
+static const CGBitmapInfo kCGBitmapByteOrder16Host CG_SOFT_DEPRECATED_WITH_REPLACEMENT(kCGImageByteOrder16Host) = (CGBitmapInfo)kCGImageByteOrder16Host;
+static const CGBitmapInfo kCGBitmapByteOrder32Host CG_SOFT_DEPRECATED_WITH_REPLACEMENT(kCGImageByteOrder32Host) = (CGBitmapInfo)kCGImageByteOrder32Host;
 
+CF_REFINED_FOR_SWIFT
+API_AVAILABLE(macos(10.14), ios(12.0))
+CG_INLINE CGBitmapInfo CGBitmapInfoMake(
+    CGImageAlphaInfo alpha,
+    CGImageComponentInfo component,
+    CGImageByteOrderInfo byteOrder,
+    CGImagePixelFormatInfo pixelFormat) {
+    return alpha | component | byteOrder | pixelFormat;
+}
+
 /* Return the CFTypeID for CGImageRefs. */
 
 CG_EXTERN CFTypeID CGImageGetTypeID(void)
@@ -211,12 +235,8 @@
    clipped to [0.0, 1.0] range, and other bit depths will be treated as
    representing [0.0, 1.0] range, same as in the '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 and the color space is extended,
-   the image content headroom will be calculated from the image data.
-   When needed, the exisitng 'CGImageCreate' API will create an image with
-   content headroom equal 0.0f.
-   When the headroom parameter is 0.0f in case of PQ or HLG color spaces,
-   the image content headroom value will be estimated based on the color space.
+   The headroom value of 0.0f means "headroom unknown".
+   The image with unknown content headroom will be excluded  from tone mapping.
    When justified, kCGDefaultHDRImageContentHeadroom which is a typical content
    headroom for PQ and HLG images could be used to specify the content headroom.*/
 
@@ -231,11 +251,12 @@
     API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
 
 /* Create a copy of `image' adding or replacing the image's content headroom.
-   Returns NULL if `image' is an image mask, or if original is not using
-   extended color space, PQ or HLG.
+   Returns NULL if `image' is not using PQ, HLG or extended color space.
    The headroom parameter must be either equal 0.0f or be greater or equal 1.0f.
-   When the headroom parameter is 0.0f and the color space is extended,
-   the image content headroom will be calculated from the image data. */
+   The headroom value of 0.0f means "headroom unknown".
+   The image with unknown content headroom will be excluded from tone mapping.
+   When justified, kCGDefaultHDRImageContentHeadroom which is a typical content
+   headroom for PQ and HLG images could be used to specify the content headroom. */
 
 CG_EXTERN CGImageRef __nullable CGImageCreateCopyWithContentHeadroom(
     float headroom, CGImageRef cg_nullable image)
@@ -244,10 +265,38 @@
 CG_EXTERN float kCGDefaultHDRImageContentHeadroom
 API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
 
-/* Return image content headroom */
+/* Return image content headroom if it is contained in the image metadata, and return 0.0f if unknown. */
 
 CG_EXTERN float CGImageGetContentHeadroom(CGImageRef cg_nullable image)
    API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
+/* Calculate the image content headroom, and return 0.0f if unknown. Please note that because of image immutability, the image metadata cannot be updated.
+ Use CGImageCreateCopyWithContentHeadroom if applicable. */
+
+CG_EXTERN float CGImageCalculateContentHeadroom(CGImageRef cg_nullable image)
+   API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0));
+
+/* Return the image content average light level value normalized by the reference white if the content average light level is contained in the image metadata, and return 0.0f if unknown. */
+
+CG_EXTERN float CGImageGetContentAverageLightLevel(CGImageRef cg_nullable image)
+   API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0));
+
+/* Calculate the image content average light level value normalized by the reference white, and return 0.0f if unknown. Please note that because of image immutability, the image metadata cannot be updated.
+ Use CGImageCreateCopyWithContentAverageLightLevel if applicable. */
+
+CG_EXTERN float CGImageCalculateContentAverageLightLevel(CGImageRef cg_nullable image)
+   API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0));
+
+/* Create a copy of `image' adding or replacing the image's content average light level.
+   Returns NULL if `image' is not using color space of RGB model.
+   The `avll' parameter must be greater or equal 0.0f.
+   The value of 0.0f means "content average light level unknown". */
+
+CG_EXTERN CGImageRef __nullable CGImageCreateCopyWithContentAverageLightLevel(float avll, CGImageRef cg_nullable image)
+   API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0));
+
+CG_EXTERN CGImageRef __nullable CGImageCreateCopyWithCalculatedHDRStats(CGImageRef cg_nullable image)
+   API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0));
 
 /* Equivalent to `CFRetain(image)'. */
 
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h	2025-04-19 04:33:30
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h	2025-05-30 01:54:41
@@ -9,7 +9,7 @@
 #include <CoreFoundation/CFAvailability.h>
 #include <stdint.h>
 
-typedef struct CGPDFArray *CGPDFArrayRef;
+typedef struct CGPDFArray *CGPDFArrayRef __attribute__((swift_wrapper(struct)));
 
 #include <CoreGraphics/CGPDFDictionary.h>
 #include <CoreGraphics/CGPDFObject.h>
@@ -110,7 +110,7 @@
    early. */
 
 CG_EXTERN void CGPDFArrayApplyBlock(CGPDFArrayRef cg_nullable array,
-    CGPDFArrayApplierBlock cg_nullable block, void * __nullable info)
+    CF_NOESCAPE CGPDFArrayApplierBlock cg_nullable block, void * __nullable info)
     API_AVAILABLE(macos(10.14), ios(12.0));
 
 CF_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h	2025-04-19 02:15:35
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h	2025-06-01 23:33:42
@@ -9,7 +9,7 @@
 #include <CoreFoundation/CFAvailability.h>
 #include <stdint.h>
 
-typedef struct CGPDFDictionary *CGPDFDictionaryRef;
+typedef struct CGPDFDictionary *CGPDFDictionaryRef __attribute__((swift_wrapper(struct)));
 
 #include <CoreGraphics/CGPDFArray.h>
 #include <CoreGraphics/CGPDFObject.h>
@@ -123,7 +123,7 @@
    early. */
 
 CG_EXTERN void CGPDFDictionaryApplyBlock(CGPDFDictionaryRef cg_nullable dict,
-    CGPDFDictionaryApplierBlock cg_nullable block, void * __nullable info)
+    CF_NOESCAPE CGPDFDictionaryApplierBlock cg_nullable block, void * __nullable info)
     API_AVAILABLE(macos(10.14), ios(12.0));
 
 CF_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h	2025-04-19 01:28:04
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h	2025-05-30 01:54:41
@@ -28,7 +28,7 @@
 
 /* A type to hold any object. */
 
-typedef struct CGPDFObject *CGPDFObjectRef;
+typedef struct CGPDFObject *CGPDFObjectRef __attribute__((swift_wrapper(struct)));
 
 /* An identifier to describe an object's type. */
 
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h	2025-04-19 01:28:06
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h	2025-05-30 01:54:42
@@ -5,7 +5,7 @@
 #ifndef CGPDFSTREAM_H_
 #define CGPDFSTREAM_H_
 
-typedef struct CGPDFStream *CGPDFStreamRef;
+typedef struct CGPDFStream *CGPDFStreamRef __attribute__((swift_wrapper(struct)));;
 
 #include <CoreFoundation/CFBase.h>
 #include <CoreFoundation/CFAvailability.h>
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h	2025-04-19 01:28:04
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h	2025-05-30 01:54:41
@@ -9,7 +9,7 @@
 #include <CoreFoundation/CFAvailability.h>
 #include <stdint.h>
 
-typedef struct CGPDFString *CGPDFStringRef;
+typedef struct CGPDFString *CGPDFStringRef __attribute__((swift_wrapper(struct)));
 
 #include <CoreGraphics/CGBase.h>
 #include <CoreFoundation/CFDate.h>
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFWrappedObject.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFWrappedObject.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFWrappedObject.h	1969-12-31 19:00:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFWrappedObject.h	2025-05-30 01:54:39
@@ -0,0 +1,40 @@
+//
+//  CGPDFWrappedObject.h
+//  CoreGraphics
+//
+//  Copyright © 2024 Apple. All rights reserved.
+//
+
+#ifndef CGPDFWRAPPEDOBJECT_H_
+#define CGPDFWRAPPEDOBJECT_H_
+
+#include <CoreFoundation/CFBase.h>
+#include <CoreFoundation/CFAvailability.h>
+#include <CoreGraphics/CGPDFObject.h>
+#include <CoreGraphics/CGPDFString.h>
+#include <CoreGraphics/CGPDFArray.h>
+#include <CoreGraphics/CGPDFDictionary.h>
+#include <CoreGraphics/CGPDFStream.h>
+
+/// CGPDFWrappedObject is used to add a PDF object to a CGPDFArray or CGPDFDictionary.
+
+typedef struct CF_BRIDGED_TYPE(id) CGPDFWrappedObject *CGPDFWrappedObjectRef;
+
+CF_IMPLICIT_BRIDGING_ENABLED
+
+CF_ASSUME_NONNULL_BEGIN
+
+CG_EXTERN CGPDFWrappedObjectRef CGPDFWrappedObjectCreateWithBoolean(CGPDFBoolean value);
+CG_EXTERN CGPDFWrappedObjectRef CGPDFWrappedObjectCreateWithInteger(CGPDFInteger value);
+CG_EXTERN CGPDFWrappedObjectRef CGPDFWrappedObjectCreateWithReal(CGPDFReal value);
+CG_EXTERN CGPDFWrappedObjectRef CGPDFWrappedObjectCreateWithName(const char *value);
+CG_EXTERN CGPDFWrappedObjectRef CGPDFWrappedObjectCreateWithString(CGPDFStringRef value);
+CG_EXTERN CGPDFWrappedObjectRef CGPDFWrappedObjectCreateWithArray(CGPDFArrayRef value);
+CG_EXTERN CGPDFWrappedObjectRef CGPDFWrappedObjectCreateWithDictionary(CGPDFDictionaryRef value);
+CG_EXTERN CGPDFWrappedObjectRef CGPDFWrappedObjectCreateWithStream(CGPDFStreamRef value);
+
+CF_ASSUME_NONNULL_END
+
+CF_IMPLICIT_BRIDGING_DISABLED
+
+#endif /* CGPDFWRAPPEDOBJECT_H_ */
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h	1969-12-31 19:00:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h	2025-05-30 01:54:39
@@ -0,0 +1,37 @@
+/* CoreGraphics - CGRenderingBufferProvider.h
+ Copyright (c) 2018 Apple Inc.
+ All rights reserved. */
+
+#ifndef CGRENDERINGBUFFERPROVIDER_H_
+#define CGRENDERINGBUFFERPROVIDER_H_
+
+#include <CoreGraphics/CGBase.h>
+#include <CoreFoundation/CoreFoundation.h>
+
+typedef struct CF_BRIDGED_TYPE(id) CGRenderingBufferProvider* CGRenderingBufferProviderRef;
+
+CF_IMPLICIT_BRIDGING_ENABLED
+
+CF_ASSUME_NONNULL_BEGIN
+
+CG_EXTERN CGRenderingBufferProviderRef __nullable CGRenderingBufferProviderCreate(void *__nullable info,
+                                                                size_t size,
+                                                                void* __nullable(^__nonnull  lockPointer)(void* __nullable info),
+                                                                void            (^__nullable unlockPointer)(void* __nullable info, void*  __nonnull pointer),
+                                                                void            (^__nullable releaseInfo)(void* __nullable info)) CF_REFINED_FOR_SWIFT;
+
+CG_EXTERN CGRenderingBufferProviderRef __nullable CGRenderingBufferProviderCreateWithCFData(CFMutableDataRef data) CF_REFINED_FOR_SWIFT;
+
+CG_EXTERN size_t CGRenderingBufferProviderGetSize(CGRenderingBufferProviderRef provider) CF_REFINED_FOR_SWIFT;
+
+CG_EXTERN void* __nullable CGRenderingBufferLockBytePtr(CGRenderingBufferProviderRef provider) CF_REFINED_FOR_SWIFT;
+
+CG_EXTERN void CGRenderingBufferUnlockBytePtr(CGRenderingBufferProviderRef provider) CF_REFINED_FOR_SWIFT;
+
+CG_EXTERN CFTypeID CGRenderingBufferProviderGetTypeID(void) CF_REFINED_FOR_SWIFT;
+
+CF_ASSUME_NONNULL_END
+
+CF_IMPLICIT_BRIDGING_DISABLED
+
+#endif /* CGRENDERINGBUFFERPROVIDER_H_ */
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h	2025-04-19 01:28:06
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h	2025-05-30 01:54:42
@@ -1,11 +1,11 @@
 /* CoreGraphics - CGToneMapping.h
-   Copyright (c) 2000-2012 Apple Inc.
+   Copyright (c) 2018-2025 Apple Inc.
    All rights reserved. */
 
 #ifndef CGTONEMAPPING_H_
 #define CGTONEMAPPING_H_
 
-#include <CoreFoundation/CFBase.h>
+#include <CoreFoundation/CoreFoundation.h>
 #include <CoreFoundation/CFAvailability.h>
 #include <stdint.h>
 
@@ -17,6 +17,10 @@
 
 CF_ASSUME_NONNULL_BEGIN
 
+#ifdef __cplusplus
+    extern "C" {
+#endif
+
 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 */
@@ -25,6 +29,29 @@
   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));
+
+typedef struct CGContentToneMappingInfo {
+    CGToneMapping method;
+    CFDictionaryRef options;
+} CGContentToneMappingInfo API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0));
+
+/* Option keys and values for Preferred Dynamic Range.
+ * Applicable to kCGToneMappingDefault, kCGToneMappingImageSpecificLumaScaling and kCGToneMappingReferenceWhiteBased methods.
+ */
+
+CG_EXTERN const CFStringRef __nonnull kCGPreferredDynamicRange  API_AVAILABLE(macos(26.0), ios(26.0));
+
+/* Legal values for kCGPreferredDynamicRange are the following strings. */
+    CG_EXTERN const CFStringRef __nonnull kCGDynamicRangeHigh API_AVAILABLE(macos(26.0), ios(26.0));
+    CG_EXTERN const CFStringRef __nonnull kCGDynamicRangeConstrained API_AVAILABLE(macos(26.0), ios(26.0));
+    CG_EXTERN const CFStringRef __nonnull kCGDynamicRangeStandard API_AVAILABLE(macos(26.0), ios(26.0));
+
+CG_EXTERN const CFStringRef __nonnull kCGContentAverageLightLevel API_AVAILABLE(macos(26.0), ios(26.0));
+CG_EXTERN const CFStringRef __nonnull kCGContentAverageLightLevelNits API_AVAILABLE(macos(26.0), ios(26.0));
+
+#ifdef __cplusplus
+}   /* extern "C" */
+#endif
 
 CF_ASSUME_NONNULL_END
 
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h	2025-04-19 01:28:03
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h	2025-05-30 01:54:40
@@ -37,6 +37,7 @@
 #include <CoreGraphics/CGPDFScanner.h>
 #include <CoreGraphics/CGPDFStream.h>
 #include <CoreGraphics/CGPDFString.h>
+#include <CoreGraphics/CGPDFWrappedObject.h>
 #include <CoreGraphics/CGPath.h>
 #include <CoreGraphics/CGPattern.h>
 #include <CoreGraphics/CGShading.h>
Clone this wiki locally