Skip to content

CoreGraphics watchOS xcode13.0 beta1

Manuel de la Pena edited this page Aug 30, 2021 · 3 revisions

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

diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h	2021-03-16 13:58:26.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h	2021-06-02 12:43:44.000000000 -0400
@@ -185,7 +185,7 @@
 #define CG_UNAVAILABLE_DESKTOP API_UNAVAILABLE(macos)
 #define CG_UNAVAILABLE_EMBEDDED API_UNAVAILABLE(ios, tvos, watchos)
 
-#if defined(CG_LINUX) || defined(TARGET_OS_LINUX)  
+#if (defined(TARGET_OS_LINUX) && TARGET_OS_LINUX) || defined(CG_LINUX)
 # undef __OSX_AVAILABLE_STARTING
 # undef __OSX_AVAILABLE_BUT_DEPRECATED
 # undef CG_AVAILABLE_STARTING
@@ -316,11 +316,13 @@
 # define CGFLOAT_IS_DOUBLE 1
 # define CGFLOAT_MIN DBL_MIN
 # define CGFLOAT_MAX DBL_MAX
+# define CGFLOAT_EPSILON DBL_EPSILON
 #else
 # define CGFLOAT_TYPE float
 # define CGFLOAT_IS_DOUBLE 0
 # define CGFLOAT_MIN FLT_MIN
 # define CGFLOAT_MAX FLT_MAX
+# define CGFLOAT_EPSILON FLT_EPSILON
 #endif
 
 /* Definition of the `CGFloat' type and `CGFLOAT_DEFINED'. */
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h	2021-03-16 05:19:55.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h	2021-06-02 05:35:03.000000000 -0400
@@ -300,12 +300,16 @@
 CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreatePattern(CGColorSpaceRef __nullable baseSpace)
   CG_AVAILABLE_STARTING(10.0, 2.0);
 
-/* Create a color space using `ref', a platform-specific color space
-   reference. For MacOS X, `ref' should be a ColorSyncProfileRef. */
+typedef const struct CF_BRIDGED_TYPE(id) ColorSyncProfile* ColorSyncProfileRef;
 
-CG_EXTERN CGColorSpaceRef __nullable
-  CGColorSpaceCreateWithPlatformColorSpace(const void * cg_nullable ref)
-  CG_AVAILABLE_STARTING(10.0, 9.0);
+CG_EXTERN const CFStringRef kCGColorSpaceExtendedRange;
+
+/* Create a color space using ColorSyncProfileRef.
+   To create an extended color space include kCGColorSpaceExtendedRange/kCFBooleanTrue
+   key/value pair in `options' dictionary. */
+
+CG_EXTERN CGColorSpaceRef __nullable CGColorSpaceCreateWithColorSyncProfile(ColorSyncProfileRef __nullable, CFDictionaryRef __nullable options)
+CG_AVAILABLE_STARTING(12.0, 15.0);
 
 /* Create a color space using `name' as the identifier for the color
    space. */
@@ -453,6 +457,11 @@
 CG_EXTERN CFDataRef __nullable CGColorSpaceCopyICCProfile(CGColorSpaceRef cg_nullable space)
   CG_AVAILABLE_BUT_DEPRECATED(10.5, 10.13, 2.0, 11.0);
 
+/* Please use `CGColorSpaceCreateWithColorSyncProfile' */
+CG_EXTERN CGColorSpaceRef __nullable
+  CGColorSpaceCreateWithPlatformColorSpace(const void * cg_nullable ref)
+  CG_AVAILABLE_BUT_DEPRECATED(10.0, 12.0, 9.0, 15.0);
+
 
 CF_ASSUME_NONNULL_END
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h	2021-05-22 06:06:33.000000000 -0400
@@ -0,0 +1,33 @@
+/* CoreGraphics - CGConvertColorDataWithFormat.h
+   Copyright (c)2021 Apple Inc.
+   All rights reserved. */
+
+#ifndef CGCONVERTCOLORDATAWITHFORMAT_H
+#define CGCONVERTCOLORDATAWITHFORMAT_H
+
+#include <CoreGraphics/CoreGraphics.h>
+#include <CoreFoundation/CoreFoundation.h>
+
+typedef struct {
+    uint32_t        		version;            // current version = 0
+    CFTypeRef       		colorspace_info;    // one of:
+                                                // - CGColorSpaceRef,
+                                                // - CFStringRef (known name used by CGColorSpaceCreateWithName),
+                                                // - CFPropertyListRef (flattened CGColorSpaceRef used by IOSurface)
+    CGBitmapInfo    		bitmap_info;		// see CGImage.h
+    size_t          		bits_per_component;
+    size_t          		bytes_per_row;      // can be 0, if data is pixel aligned
+    CGColorRenderingIntent	intent;				// set to kCGRenderingIntentDefault if unknown
+    CGFloat*        		decode;             // pass NULL; reserved for future use
+} CGColorDataFormat;
+
+
+CG_EXTERN bool CGConvertColorDataWithFormat(size_t            width,
+                                            size_t            height,
+                                            void*             dst_data,
+                                            CGColorDataFormat dst_format,
+                                            void*             src_data,
+                                            CGColorDataFormat src_format,
+                                            CFDictionaryRef   options);
+
+#endif /* CGCONVERTCOLORDATAWITHFORMAT_H */
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h	2021-03-16 05:15:27.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h	2021-05-22 06:06:33.000000000 -0400
@@ -27,4 +27,12 @@
   kCGErrorNoneAvailable = 1011,
 };
 
+typedef void (*CGErrorCallback)(void);
+
+/* Set a callback for easier detection of error conditions
+   causing CoreGraphics to raise an error.
+   Pass NULL to reset the callback.*/
+
+CG_EXTERN void CGErrorSetCallback(CGErrorCallback callback);
+
 #endif /* CGERROR_H_ */
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes	2021-03-16 02:33:24.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes	2021-05-22 06:26:04.000000000 -0400
@@ -506,7 +506,8 @@
 - Name: CGEventCreateFromData
   SwiftName: CGEvent.init(withDataAllocator:data:)
 - Name: CGEventCreateData
-  SwiftName: getter:CGEvent.data(self:)
+  SwiftName: CGEvent.__data(allocator:self:)
+  SwiftPrivate: true
 - Name: CGEventCreateCopy
   SwiftName: CGEvent.copy(self:)
 - Name: CGEventPostToPid
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h	2021-03-16 05:15:27.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h	2021-05-22 06:06:34.000000000 -0400
@@ -12,6 +12,7 @@
 #include <CoreGraphics/CGColor.h>
 #include <CoreGraphics/CGColorConversionInfo.h>
 #include <CoreGraphics/CGColorSpace.h>
+#include <CoreGraphics/CGConvertColorDataWithFormat.h>
 #include <CoreGraphics/CGContext.h>
 #include <CoreGraphics/CGDataConsumer.h>
 #include <CoreGraphics/CGDataProvider.h>
Clone this wiki locally