diff --git a/src/Photos/Enums.cs b/src/Photos/Enums.cs index d86445560fc0..6bbf6979cbab 100644 --- a/src/Photos/Enums.cs +++ b/src/Photos/Enums.cs @@ -259,6 +259,9 @@ public enum PHAssetResourceType : long { [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] AdjustmentBaseVideo = 12, + [iOS (17, 0), TV (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0)] + PhotoProxy = 19, } [MacCatalyst (13, 1)] diff --git a/src/photos.cs b/src/photos.cs index 3840e39ab9c5..b598334351eb 100644 --- a/src/photos.cs +++ b/src/photos.cs @@ -8,6 +8,7 @@ using CoreMedia; using ImageIO; using System; +using UniformTypeIdentifiers; #if !MONOMAC using UIKit; using NSImage = Foundation.NSObject; // help [NoiOS] and [NoTV] @@ -795,6 +796,19 @@ interface PHContentEditingOutput : NSCoding, NSSecureCoding { [Export ("renderedContentURL", ArgumentSemantic.Copy)] NSUrl RenderedContentUrl { get; } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NullAllowed, Export ("defaultRenderedContentType", ArgumentSemantic.Copy)] + UTType DefaultRenderedContentType { get; } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("supportedRenderedContentTypes", ArgumentSemantic.Copy)] + UTType [] SupportedRenderedContentTypes { get; } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("renderedContentURLForType:error:")] + [return: NullAllowed] + NSUrl GetRenderedContentUrl (UTType type, [NullAllowed] out NSError error); } [MacCatalyst (13, 1)] @@ -912,6 +926,10 @@ interface PHImageRequestOptions : NSCopying { [Export ("progressHandler", ArgumentSemantic.Copy)] [NullAllowed] PHAssetImageProgressHandler ProgressHandler { get; set; } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("allowSecondaryDegradedImage")] + bool AllowSecondaryDegradedImage { get; set; } } delegate void PHAssetVideoProgressHandler (double progress, NSError error, out bool stop, NSDictionary info); diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Photos.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-Photos.todo deleted file mode 100644 index af69f3b15f19..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Photos.todo +++ /dev/null @@ -1,6 +0,0 @@ -!missing-enum-value! PHAssetResourceType native value PHAssetResourceTypePhotoProxy = 19 not bound -!missing-selector! PHContentEditingOutput::defaultRenderedContentType not bound -!missing-selector! PHContentEditingOutput::renderedContentURLForType:error: not bound -!missing-selector! PHContentEditingOutput::supportedRenderedContentTypes not bound -!missing-selector! PHImageRequestOptions::allowSecondaryDegradedImage not bound -!missing-selector! PHImageRequestOptions::setAllowSecondaryDegradedImage: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Photos.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-Photos.todo deleted file mode 100644 index af69f3b15f19..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Photos.todo +++ /dev/null @@ -1,6 +0,0 @@ -!missing-enum-value! PHAssetResourceType native value PHAssetResourceTypePhotoProxy = 19 not bound -!missing-selector! PHContentEditingOutput::defaultRenderedContentType not bound -!missing-selector! PHContentEditingOutput::renderedContentURLForType:error: not bound -!missing-selector! PHContentEditingOutput::supportedRenderedContentTypes not bound -!missing-selector! PHImageRequestOptions::allowSecondaryDegradedImage not bound -!missing-selector! PHImageRequestOptions::setAllowSecondaryDegradedImage: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Photos.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Photos.todo deleted file mode 100644 index af69f3b15f19..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Photos.todo +++ /dev/null @@ -1,6 +0,0 @@ -!missing-enum-value! PHAssetResourceType native value PHAssetResourceTypePhotoProxy = 19 not bound -!missing-selector! PHContentEditingOutput::defaultRenderedContentType not bound -!missing-selector! PHContentEditingOutput::renderedContentURLForType:error: not bound -!missing-selector! PHContentEditingOutput::supportedRenderedContentTypes not bound -!missing-selector! PHImageRequestOptions::allowSecondaryDegradedImage not bound -!missing-selector! PHImageRequestOptions::setAllowSecondaryDegradedImage: not bound diff --git a/tests/xtro-sharpie/iOS-Photos.todo b/tests/xtro-sharpie/iOS-Photos.todo deleted file mode 100644 index af69f3b15f19..000000000000 --- a/tests/xtro-sharpie/iOS-Photos.todo +++ /dev/null @@ -1,6 +0,0 @@ -!missing-enum-value! PHAssetResourceType native value PHAssetResourceTypePhotoProxy = 19 not bound -!missing-selector! PHContentEditingOutput::defaultRenderedContentType not bound -!missing-selector! PHContentEditingOutput::renderedContentURLForType:error: not bound -!missing-selector! PHContentEditingOutput::supportedRenderedContentTypes not bound -!missing-selector! PHImageRequestOptions::allowSecondaryDegradedImage not bound -!missing-selector! PHImageRequestOptions::setAllowSecondaryDegradedImage: not bound diff --git a/tests/xtro-sharpie/macOS-Photos.todo b/tests/xtro-sharpie/macOS-Photos.todo deleted file mode 100644 index af69f3b15f19..000000000000 --- a/tests/xtro-sharpie/macOS-Photos.todo +++ /dev/null @@ -1,6 +0,0 @@ -!missing-enum-value! PHAssetResourceType native value PHAssetResourceTypePhotoProxy = 19 not bound -!missing-selector! PHContentEditingOutput::defaultRenderedContentType not bound -!missing-selector! PHContentEditingOutput::renderedContentURLForType:error: not bound -!missing-selector! PHContentEditingOutput::supportedRenderedContentTypes not bound -!missing-selector! PHImageRequestOptions::allowSecondaryDegradedImage not bound -!missing-selector! PHImageRequestOptions::setAllowSecondaryDegradedImage: not bound diff --git a/tests/xtro-sharpie/tvOS-Photos.todo b/tests/xtro-sharpie/tvOS-Photos.todo deleted file mode 100644 index af69f3b15f19..000000000000 --- a/tests/xtro-sharpie/tvOS-Photos.todo +++ /dev/null @@ -1,6 +0,0 @@ -!missing-enum-value! PHAssetResourceType native value PHAssetResourceTypePhotoProxy = 19 not bound -!missing-selector! PHContentEditingOutput::defaultRenderedContentType not bound -!missing-selector! PHContentEditingOutput::renderedContentURLForType:error: not bound -!missing-selector! PHContentEditingOutput::supportedRenderedContentTypes not bound -!missing-selector! PHImageRequestOptions::allowSecondaryDegradedImage not bound -!missing-selector! PHImageRequestOptions::setAllowSecondaryDegradedImage: not bound