Skip to content

CoreGraphics macOS xcode15.0 b1

Manuel de la Pena edited this page Aug 26, 2023 · 3 revisions

#CoreGraphics.framework https://github.com/xamarin/xamarin-macios/pull/18838

diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h	2023-03-09 19:08:12
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h	2023-05-19 21:12:14
@@ -439,6 +439,8 @@
 CG_EXTERN bool CGColorSpaceSupportsOutput(CGColorSpaceRef space)
 CG_AVAILABLE_STARTING(10.12, 10.0);
 
+/*  CGColorSpaceCopyPropertyList will return NULL for special color spaces
+    (e.g. kCGColorSpaceDeviceN or kCGColorSpacePattern), except Indexed Color Space */
 CG_EXTERN CFPropertyListRef __nullable
 CGColorSpaceCopyPropertyList(CGColorSpaceRef space)
 CG_AVAILABLE_STARTING(10.12, 10.0);
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h	2023-03-09 19:13:19
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h	2023-05-26 00:39:35
@@ -751,6 +751,19 @@
     CGPoint endCenter, CGFloat endRadius, CGGradientDrawingOptions options)
     CG_AVAILABLE_STARTING(10.5, 2.0);
 
+/* Fill the current clipping region of `context' with a conic gradient
+   defined by the center point and rotation angle. The location 0 of `gradient'
+   corresponds to a initial rotation angle; the location 1 of `gradient'
+   corresponds to 360 degrees rotation from rotation angle; colors are linearly
+   interpolated over the full angle based on the values of the gradient's
+   locations. The 0 angle corresponds to positive x axis. The angle increases
+   towards positive y axis. */
+
+CG_EXTERN void CGContextDrawConicGradient(CGContextRef _Nonnull c,
+    CGGradientRef _Nullable gradient, CGPoint center, CGFloat angle)
+    CG_AVAILABLE_STARTING(14.0, 17.0);
+
+
 /* Fill the current clipping region of `context' with `shading'. */
 
 CG_EXTERN void CGContextDrawShading(CGContextRef cg_nullable c,
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplayMetal.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplayMetal.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplayMetal.h	2023-03-09 19:08:12
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplayMetal.h	2023-05-26 00:39:35
@@ -5,11 +5,7 @@
 #ifndef CGDIRECTDISPLAYMETAL_H_
 #define CGDIRECTDISPLAYMETAL_H_
 
-#ifdef __cplusplus
-    extern "C" {
-#endif
 
-
 /* This file only makes sense to Objective C clients */
 #if defined(__OBJC__)
 
@@ -17,6 +13,10 @@
 
 @protocol MTLDevice;
 
+#ifdef __cplusplus
+    extern "C" {
+#endif
+
 #ifndef NS_RETURNS_RETAINED
 # if __has_feature(attribute_ns_returns_retained)
 #  define NS_RETURNS_RETAINED __attribute__((ns_returns_retained))
@@ -30,10 +30,10 @@
    almost any time. */
 CG_EXTERN id<MTLDevice> __nullable CGDirectDisplayCopyCurrentMetalDevice(CGDirectDisplayID display) NS_RETURNS_RETAINED CG_AVAILABLE_STARTING(10.11);
 
-#endif /* __OBJC__ */
-
 #ifdef __cplusplus
 }   /* extern "C" */
 #endif
+
+#endif /* __OBJC__ */
 
 #endif /* CGDIRECTDISPLAYMETAL_H_ */
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h	2023-03-09 19:08:10
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h	2023-05-26 00:39:34
@@ -93,7 +93,7 @@
  @result The CFTypeID of the CGDisplayStreamUpdate class.
 */
 CG_EXTERN CFTypeID CGDisplayStreamUpdateGetTypeID(void)
-    CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "There is no direct replacement for this function. Please use ScreenCaptureKit API's SCStreamOutputType instead");
+    CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "There is no direct replacement for this function. Please use ScreenCaptureKit API's SCStreamOutputType instead");
 
 /*!
  @function CGDisplayStreamUpdateGetRects
@@ -105,7 +105,7 @@
 */
 CG_EXTERN const CGRect * __nullable CGDisplayStreamUpdateGetRects(CGDisplayStreamUpdateRef __nullable updateRef, 
     CGDisplayStreamUpdateRectType rectType, size_t *  rectCount)
-    CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "Please use ScreenCaptureKit API's SCStreamFrameInfo with SCStreamFrameInfoContentRect instead");
+    CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's SCStreamFrameInfo with SCStreamFrameInfoContentRect instead");
 
 /*!
  @function CGDisplayStreamUpdateCreateMerged
@@ -122,7 +122,7 @@
 CG_EXTERN CGDisplayStreamUpdateRef __nullable CGDisplayStreamUpdateCreateMergedUpdate(
     CGDisplayStreamUpdateRef __nullable firstUpdate,
     CGDisplayStreamUpdateRef __nullable secondUpdate)
-    CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "There is no direct replacement for this function. Please use ScreenCaptureKit API's SCStreamFrameInfo to replace CGDisplayStreamUpdate");
+    CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "There is no direct replacement for this function. Please use ScreenCaptureKit API's SCStreamFrameInfo to replace CGDisplayStreamUpdate");
 
 /*!
  @function CGDisplayStreamUpdateGetMovedRectsDelta
@@ -134,7 +134,7 @@
 */
 CG_EXTERN void CGDisplayStreamUpdateGetMovedRectsDelta(CGDisplayStreamUpdateRef __nullable updateRef,
     CGFloat *  dx, CGFloat *  dy)
-    CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "Please use ScreenCaptureKit API's SCStreamFrameInfo with SCStreamFrameInfoContentRect instead");
+    CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's SCStreamFrameInfo with SCStreamFrameInfoContentRect instead");
 
 /*!
  @function CGDisplayStreamGetDropCount
@@ -145,7 +145,7 @@
  all WindowServer updates.
 */
 CG_EXTERN size_t CGDisplayStreamUpdateGetDropCount(CGDisplayStreamUpdateRef __nullable updateRef)
-    CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "There is no direct replacement for this function. Please use ScreenCaptureKit API's SCStreamFrameInfo to replace CGDisplayStreamUpdate");
+    CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "There is no direct replacement for this function. Please use ScreenCaptureKit API's SCStreamFrameInfo to replace CGDisplayStreamUpdate");
 
 /* Optional CGDisplayStream Properties */
 
@@ -156,7 +156,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(13.0, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration sourceRect property instead");  /* Source rectangle to capture - defaults to entire display */
+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 */
 
 /*!
  @const kCGDisplayStreamDestinationRect
@@ -165,7 +165,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(13.0, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration destinationRect property instead");     /* Destination rectangle - defaults to entire buffer */
+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 */
 
 /*!
  @const kCGDisplayStreamPreserveAspectRatio
@@ -174,38 +174,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(13.0, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration preserveAspectRatio property instead"); /* CFBoolean - defaults to true */
+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 */
 
 /*!
  @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(13.0, 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 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 */
 
 /*!
  @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(13.0, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration minimumFrameInterval property instead");    /* CFNumber in seconds, defaults to zero. */
+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. */
 
 /*!
  @const kCGDisplayStreamShowCursor
  @discussion Controls whether the cursor is embedded within the provided buffers or not.
 */
-CG_EXTERN const CFStringRef  kCGDisplayStreamShowCursor CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration showsCursor property instead");  /* CFBoolean - defaults to false */
+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 */
 
 /*!
  @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(13.0, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration queueDepth property instead");  /* Queue depth in frames.  Defaults to 3. */
+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. */
 
 /*!
  @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(13.0, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration colorMatrix property");
+CG_EXTERN const CFStringRef  kCGDisplayStreamYCbCrMatrix CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration colorMatrix property");
 
 /* Supported YCbCr matrices. Note that these strings have identical values to the equivalent CoreVideo strings. */
 CG_EXTERN const CFStringRef      kCGDisplayStreamYCbCrMatrix_ITU_R_709_2;
@@ -218,7 +218,7 @@
  @result The CFTypeID of the CGDisplayStream class.
 */
 CG_EXTERN CFTypeID CGDisplayStreamGetTypeID(void)
-    CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "There is no direct replacement for this function. Please use ScreenCaptureKit API's SCStream to replace CGDisplayStream");
+    CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "There is no direct replacement for this function. Please use ScreenCaptureKit API's SCStream to replace CGDisplayStream");
 
 /*!
  @function CGDisplayStreamCreate
@@ -243,7 +243,7 @@
 CG_EXTERN CGDisplayStreamRef __nullable CGDisplayStreamCreate(CGDirectDisplayID display, 
     size_t outputWidth, size_t outputHeight, int32_t pixelFormat, CFDictionaryRef __nullable properties,
     CGDisplayStreamFrameAvailableHandler __nullable handler)
-    CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "Please use ScreenCaptureKit API's initWithFilter:configuration:delegate: instead");
+    CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's initWithFilter:configuration:delegate: instead");
 
 /*!
  @function CGDisplayStreamCreateWithDispatchQueue
@@ -262,7 +262,7 @@
 CG_EXTERN CGDisplayStreamRef __nullable CGDisplayStreamCreateWithDispatchQueue(CGDirectDisplayID display, 
     size_t outputWidth, size_t outputHeight, int32_t pixelFormat, CFDictionaryRef __nullable properties,
     dispatch_queue_t  queue, CGDisplayStreamFrameAvailableHandler __nullable handler)
-    CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "Please use ScreenCaptureKit API's initWithFilter:configuration:delegate: instead");
+    CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's initWithFilter:configuration:delegate: instead");
 
 /*!
  @function CGDisplayStreamStart
@@ -271,7 +271,7 @@
  @result kCGErrorSuccess If the display stream was started, otherwise an error.
 */
 CG_EXTERN CGError CGDisplayStreamStart(CGDisplayStreamRef cg_nullable displayStream)
-    CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "Please use ScreenCaptureKit API's startCaptureWithCompletionHandler: to start a stream instead");
+    CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's startCaptureWithCompletionHandler: to start a stream instead");
 
 /*!
  @function CGDisplayStreamStop
@@ -283,7 +283,7 @@
  It is safe to call this function from within the handler block, but the previous caveat still applies.
 */
 CG_EXTERN CGError CGDisplayStreamStop(CGDisplayStreamRef cg_nullable displayStream)
-    CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "Please use ScreenCaptureKit API's stopCaptureWithCompletionHandler: to stop a stream instead");
+    CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "Please use ScreenCaptureKit API's stopCaptureWithCompletionHandler: to stop a stream instead");
 
 /*!
  @function CGDisplayStreamGetRunLoopSource
@@ -293,7 +293,7 @@
  display stream was created via  CGDisplayStreamCreateWithDispatchQueue().
 */
 CG_EXTERN CFRunLoopSourceRef __nullable CGDisplayStreamGetRunLoopSource(CGDisplayStreamRef cg_nullable displayStream)
-    CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "There is no direct replacement for this function. Please use ScreenCaptureKit API's SCStream to replace CGDisplayStream");
+    CG_AVAILABLE_BUT_DEPRECATED(10.8, 14.0, "There is no direct replacement for this function. Please use ScreenCaptureKit API's SCStream to replace CGDisplayStream");
 
 #endif /* __BLOCKS__ */
 
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h	2023-03-09 19:08:12
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h	2023-05-26 00:39:35
@@ -266,7 +266,7 @@
 CG_EXTERN CGImageRef __nullable CGWindowListCreateImage(CGRect screenBounds,
     CGWindowListOption listOption, CGWindowID windowID,
     CGWindowImageOption imageOption)
-    CG_AVAILABLE_STARTING(10.5);
+    CG_AVAILABLE_BUT_DEPRECATED(10.5, 14.0, "This API is deprecated. Please use ScreenCaptureKit's captureScreenshot APIs instead.");
 
 /* Create an image containing a composite of the specified set of windows
    contained within a rectangular area à la `CGWindowListCreateImage'. The
@@ -275,7 +275,7 @@
 CG_EXTERN CGImageRef __nullable CGWindowListCreateImageFromArray(
     CGRect screenBounds, CFArrayRef  windowArray,
     CGWindowImageOption imageOption)
-    CG_AVAILABLE_STARTING(10.5);
+    CG_AVAILABLE_BUT_DEPRECATED(10.5, 14.0, "This API is deprecated. Please use ScreenCaptureKit's captureScreenshot APIs instead.");
 
 /* A CFNumberRef encoding appropriate for use with a CGWindowID. */
 #define kCGWindowIDCFNumberType kCFNumberSInt32Type
Clone this wiki locally