From d13ed2902cc4976f11d46ed155e09612f56743b3 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 18 Jul 2022 00:57:59 -0400 Subject: [PATCH 1/2] [CoreText] Add support for Xcode 14 beta 1,2 & 3 --- src/CoreText/CTFont.cs | 9 +++++++++ src/CoreText/CTParagraphStyle.cs | 4 ++++ .../{tvOS-CoreText.todo => tvOS-CoreText.ignore} | 1 + .../{tvOS-CoreText.todo => tvOS-CoreText.ignore} | 1 + tests/xtro-sharpie/watchOS-CoreText.todo | 2 -- 5 files changed, 15 insertions(+), 2 deletions(-) rename tests/xtro-sharpie/api-annotations-dotnet/{tvOS-CoreText.todo => tvOS-CoreText.ignore} (85%) rename tests/xtro-sharpie/{tvOS-CoreText.todo => tvOS-CoreText.ignore} (85%) delete mode 100644 tests/xtro-sharpie/watchOS-CoreText.todo diff --git a/src/CoreText/CTFont.cs b/src/CoreText/CTFont.cs index 3446e899f899..dbff59359205 100644 --- a/src/CoreText/CTFont.cs +++ b/src/CoreText/CTFont.cs @@ -173,6 +173,15 @@ public enum CTFontTable : uint { // defined as uint32_t - /System/Library/Frameworks/CoreText.framework/Headers/CTFont.h public enum CTFontTableOptions : uint { None = 0, +#if NET + [UnsupportedOSPlatform ("tvos16.0")] +#if TVOS + [Obsolete ("Starting with tvos16.0.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] +#endif +#else + [Deprecated (PlatformName.TvOS, 16, 0)] + [Deprecated (PlatformName.WatchOS, 9, 0)] +#endif ExcludeSynthetic = (1 << 0), } diff --git a/src/CoreText/CTParagraphStyle.cs b/src/CoreText/CTParagraphStyle.cs index 4df9f2fb8ac9..3dd63c8b68fe 100644 --- a/src/CoreText/CTParagraphStyle.cs +++ b/src/CoreText/CTParagraphStyle.cs @@ -99,10 +99,14 @@ internal enum CTParagraphStyleSpecifier : uint { [Obsolete ("Starting with macos10.8 use 'MaximumLineSpacing' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] #elif IOS [Obsolete ("Starting with ios6.0 use 'MaximumLineSpacing' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] +#elif TVOS + [Obsolete ("Starting with tvos16.0 use 'MaximumLineSpacing' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] #endif #else [Deprecated (PlatformName.iOS, 6, 0, message : "Use 'MaximumLineSpacing' instead.")] [Deprecated (PlatformName.MacOSX, 10, 8, message : "Use 'MaximumLineSpacing' instead.")] + [Deprecated (PlatformName.TvOS, 16, 0, message : "Use 'MaximumLineSpacing' instead.")] + [Deprecated (PlatformName.WatchOS, 9, 0, message : "Use 'MaximumLineSpacing' instead.")] #endif LineSpacing = 10, ParagraphSpacing = 11, diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreText.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreText.ignore similarity index 85% rename from tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreText.todo rename to tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreText.ignore index 3c9da0a74653..ac1463bccb5e 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreText.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreText.ignore @@ -1,2 +1,3 @@ +# bound in previous versions but removed in xcode 14 !extra-enum-value! Managed value 1 for CTFontTableOptions.ExcludeSynthetic is available for the current platform while the value in the native header is not !extra-enum-value! Managed value 10 for CTParagraphStyleSpecifier.LineSpacing is available for the current platform while the value in the native header is not diff --git a/tests/xtro-sharpie/tvOS-CoreText.todo b/tests/xtro-sharpie/tvOS-CoreText.ignore similarity index 85% rename from tests/xtro-sharpie/tvOS-CoreText.todo rename to tests/xtro-sharpie/tvOS-CoreText.ignore index 3c9da0a74653..ac1463bccb5e 100644 --- a/tests/xtro-sharpie/tvOS-CoreText.todo +++ b/tests/xtro-sharpie/tvOS-CoreText.ignore @@ -1,2 +1,3 @@ +# bound in previous versions but removed in xcode 14 !extra-enum-value! Managed value 1 for CTFontTableOptions.ExcludeSynthetic is available for the current platform while the value in the native header is not !extra-enum-value! Managed value 10 for CTParagraphStyleSpecifier.LineSpacing is available for the current platform while the value in the native header is not diff --git a/tests/xtro-sharpie/watchOS-CoreText.todo b/tests/xtro-sharpie/watchOS-CoreText.todo deleted file mode 100644 index 3c9da0a74653..000000000000 --- a/tests/xtro-sharpie/watchOS-CoreText.todo +++ /dev/null @@ -1,2 +0,0 @@ -!extra-enum-value! Managed value 1 for CTFontTableOptions.ExcludeSynthetic is available for the current platform while the value in the native header is not -!extra-enum-value! Managed value 10 for CTParagraphStyleSpecifier.LineSpacing is available for the current platform while the value in the native header is not From cfcaed6f49486ab92b575f149caca75174338ab7 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 18 Jul 2022 17:13:38 -0400 Subject: [PATCH 2/2] Add missing ignore. --- .../xtro-sharpie/api-annotations-dotnet/watchOS-CoreText.ignore | 2 ++ tests/xtro-sharpie/watchOS-CoreText.ignore | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 tests/xtro-sharpie/api-annotations-dotnet/watchOS-CoreText.ignore create mode 100644 tests/xtro-sharpie/watchOS-CoreText.ignore diff --git a/tests/xtro-sharpie/api-annotations-dotnet/watchOS-CoreText.ignore b/tests/xtro-sharpie/api-annotations-dotnet/watchOS-CoreText.ignore new file mode 100644 index 000000000000..3c9da0a74653 --- /dev/null +++ b/tests/xtro-sharpie/api-annotations-dotnet/watchOS-CoreText.ignore @@ -0,0 +1,2 @@ +!extra-enum-value! Managed value 1 for CTFontTableOptions.ExcludeSynthetic is available for the current platform while the value in the native header is not +!extra-enum-value! Managed value 10 for CTParagraphStyleSpecifier.LineSpacing is available for the current platform while the value in the native header is not diff --git a/tests/xtro-sharpie/watchOS-CoreText.ignore b/tests/xtro-sharpie/watchOS-CoreText.ignore new file mode 100644 index 000000000000..3c9da0a74653 --- /dev/null +++ b/tests/xtro-sharpie/watchOS-CoreText.ignore @@ -0,0 +1,2 @@ +!extra-enum-value! Managed value 1 for CTFontTableOptions.ExcludeSynthetic is available for the current platform while the value in the native header is not +!extra-enum-value! Managed value 10 for CTParagraphStyleSpecifier.LineSpacing is available for the current platform while the value in the native header is not