Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vision] Implement Xcode 16.0 beta 1-6 changes. #21149

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions src/vision.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,17 @@ enum VNCoreMLRequestRevision : ulong {
[Native]
enum VNDetectBarcodesRequestRevision : ulong {
Unspecified = 0,
[Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'Three' instead.")]
[Deprecated (PlatformName.iOS, 17, 0, message: "Use 'Three' instead.")]
[Deprecated (PlatformName.TvOS, 17, 0, message: "Use 'Three' instead.")]
[Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use 'Three' instead.")]
One = 1,
[TV (15, 0), Mac (12, 0), iOS (15, 0)]
[MacCatalyst (15, 0)]
[Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'Three' instead.")]
[Deprecated (PlatformName.iOS, 18, 0, message: "Use 'Three' instead.")]
[Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'Three' instead.")]
[Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'Three' instead.")]
Two = 2,
[TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)]
Three = 3,
Expand Down Expand Up @@ -449,10 +457,16 @@ enum VNRequestTextRecognitionLevel : long {
[Native]
enum VNRecognizeTextRequestRevision : ulong {
Unspecified = 0,
[Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'Two' or 'Three' instead.")]
[Deprecated (PlatformName.iOS, 18, 0, message: "Use 'Two' or 'Three' instead.")]
[Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'Two' or 'Three' instead.")]
[Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'Two' or 'Three' instead.")]
One = 1,
[TV (14, 0), Mac (11, 0), iOS (14, 0)]
[MacCatalyst (14, 0)]
Two = 2,
[TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)]
Three = 3,
}

[TV (13, 0), iOS (13, 0)]
Expand Down Expand Up @@ -552,6 +566,12 @@ enum VNTrackOpticalFlowRequestRevision : ulong {
One = 1,
}

[Native]
[TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
enum VNCalculateImageAestheticsScoresRequestRevision : ulong {
One = 1,
}

[TV (14, 0), Mac (11, 0), iOS (14, 0)]
[MacCatalyst (14, 0)]
enum VNHumanBodyPoseObservationJointName {
Expand Down Expand Up @@ -4135,6 +4155,12 @@ interface VNGeneratePersonSegmentationRequest {
[Export ("qualityLevel", ArgumentSemantic.Assign)]
VNGeneratePersonSegmentationRequestQualityLevel QualityLevel { get; set; }

[TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[return: NullAllowed]
[return: BindAs (typeof (CVPixelFormatType []))]
[Export ("supportedOutputPixelFormatsAndReturnError:")]
NSNumber [] GetSupportedOutputPixelFormats (out NSError error);

[Export ("outputPixelFormat")]
uint OutputPixelFormat { get; set; }

Expand Down Expand Up @@ -4674,4 +4700,27 @@ interface VNAnimalBodyPoseObservation {
[return: NullAllowed]
NSDictionary<NSString, VNRecognizedPoint> GetRecognizedPoints ([BindAs (typeof (VNAnimalBodyPoseObservationJointsGroupName))] NSString jointsGroupName, [NullAllowed] out NSError error);
}

[TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[BaseType (typeof (VNImageBasedRequest))]
[DisableDefaultCtor]
interface VNCalculateImageAestheticsScoresRequest {
[NullAllowed, Export ("results", ArgumentSemantic.Copy)]
VNImageAestheticsScoresObservation [] Results { get; }

[Export ("initWithCompletionHandler:")]
[DesignatedInitializer]
NativeHandle Constructor ([NullAllowed] VNRequestCompletionHandler completionHandler);
}

[TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[BaseType (typeof (VNObservation))]
[DisableDefaultCtor]
interface VNImageAestheticsScoresObservation {
[Export ("isUtility")]
bool IsUtility { get; }

[Export ("overallScore")]
float OverallScore { get; }
}
}
8 changes: 8 additions & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20845,6 +20845,7 @@ F:Vision.VNBarcodeSymbology.MsiPlessey
F:Vision.VNBarcodeSymbology.Pdf417
F:Vision.VNBarcodeSymbology.QR
F:Vision.VNBarcodeSymbology.Upce
F:Vision.VNCalculateImageAestheticsScoresRequestRevision.One
F:Vision.VNChirality.Left
F:Vision.VNChirality.Right
F:Vision.VNChirality.Unknown
Expand Down Expand Up @@ -21046,6 +21047,7 @@ F:Vision.VNRecognizedObjectObservationRequestRevision.One
F:Vision.VNRecognizedObjectObservationRequestRevision.Two
F:Vision.VNRecognizedObjectObservationRequestRevision.Unspecified
F:Vision.VNRecognizeTextRequestRevision.One
F:Vision.VNRecognizeTextRequestRevision.Three
F:Vision.VNRecognizeTextRequestRevision.Two
F:Vision.VNRecognizeTextRequestRevision.Unspecified
F:Vision.VNRectangleObservationRequestRevision.One
Expand Down Expand Up @@ -51585,6 +51587,7 @@ M:Vision.VNBarcodeObservation.FromBoundingBox(CoreGraphics.CGRect)
M:Vision.VNBarcodeObservation.FromBoundingBox(Vision.VNBarcodeObservationRequestRevision,CoreGraphics.CGRect)
M:Vision.VNBarcodeSymbologyExtensions.GetConstants(Vision.VNBarcodeSymbology[])
M:Vision.VNBarcodeSymbologyExtensions.GetValues(Foundation.NSString[])
M:Vision.VNCalculateImageAestheticsScoresRequest.#ctor(Vision.VNRequestCompletionHandler)
M:Vision.VNCircle.Contains(Vision.VNPoint,System.Double)
M:Vision.VNCircle.Contains(Vision.VNPoint)
M:Vision.VNCircle.Copy(Foundation.NSZone)
Expand Down Expand Up @@ -51696,6 +51699,7 @@ M:Vision.VNGeneratePersonInstanceMaskRequest.#ctor(Vision.VNRequestCompletionHan
M:Vision.VNGeneratePersonSegmentationRequest.#ctor(CoreMedia.CMTime,Vision.VNRequestCompletionHandler)
M:Vision.VNGeneratePersonSegmentationRequest.#ctor(Vision.VNRequestCompletionHandler)
M:Vision.VNGeneratePersonSegmentationRequest.Create
M:Vision.VNGeneratePersonSegmentationRequest.GetSupportedOutputPixelFormats(Foundation.NSError@)
M:Vision.VNGeometryUtils.CalculateArea(System.Double@,Vision.VNContour,System.Boolean,Foundation.NSError@)
M:Vision.VNGeometryUtils.CalculatePerimeter(System.Double@,Vision.VNContour,Foundation.NSError@)
M:Vision.VNGeometryUtils.CreateBoundingCircle(System.Numerics.Vector2[],Foundation.NSError@)
Expand Down Expand Up @@ -77625,6 +77629,7 @@ P:Vision.VNBarcodeObservation.SupplementalPayloadData
P:Vision.VNBarcodeObservation.SupplementalPayloadString
P:Vision.VNBarcodeObservation.Symbology
P:Vision.VNBarcodeObservation.WeakSymbology
P:Vision.VNCalculateImageAestheticsScoresRequest.Results
P:Vision.VNCircle.Center
P:Vision.VNCircle.Diameter
P:Vision.VNCircle.Radius
Expand Down Expand Up @@ -77851,6 +77856,8 @@ P:Vision.VNHumanHandPoseObservation.AvailableJointNames
P:Vision.VNHumanHandPoseObservation.AvailableJointsGroupNames
P:Vision.VNHumanHandPoseObservation.Chirality
P:Vision.VNHumanObservation.UpperBodyOnly
P:Vision.VNImageAestheticsScoresObservation.IsUtility
P:Vision.VNImageAestheticsScoresObservation.OverallScore
P:Vision.VNImageBasedRequest.RegionOfInterest
P:Vision.VNImageHomographicAlignmentObservation.WarpTransform
P:Vision.VNImageOptions.CameraIntrinsics
Expand Down Expand Up @@ -84710,6 +84717,7 @@ T:Vision.VNAnimalBodyPoseObservationJointsGroupName
T:Vision.VNAnimalIdentifier
T:Vision.VNBarcodeCompositeType
T:Vision.VNBarcodeObservationRequestRevision
T:Vision.VNCalculateImageAestheticsScoresRequestRevision
T:Vision.VNChirality
T:Vision.VNClassifyImageRequestRevision
T:Vision.VNComputeStage
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
## static const NSUInteger VNCoreMLRequestRevision1 = 1;
!unknown-native-enum! VNRequestRevision bound
!unknown-native-enum! VNBarcodeObservationRequestRevision bound
!unknown-native-enum! VNCalculateImageAestheticsScoresRequestRevision bound
!unknown-native-enum! VNCoreMLRequestRevision bound
!unknown-native-enum! VNDetectBarcodesRequestRevision bound
!unknown-native-enum! VNDetectedObjectObservationRequestRevision bound
Expand Down
6 changes: 0 additions & 6 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-Vision.todo

This file was deleted.

6 changes: 0 additions & 6 deletions tests/xtro-sharpie/api-annotations-dotnet/macOS-Vision.todo

This file was deleted.

6 changes: 0 additions & 6 deletions tests/xtro-sharpie/api-annotations-dotnet/tvOS-Vision.todo

This file was deleted.

7 changes: 1 addition & 6 deletions tests/xtro-sharpie/iOS-Vision.todo
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
!missing-selector! VNCalculateImageAestheticsScoresRequest::results not bound
!missing-selector! VNGeneratePersonSegmentationRequest::supportedOutputPixelFormatsAndReturnError: not bound
!missing-selector! VNImageAestheticsScoresObservation::isUtility not bound
!missing-selector! VNImageAestheticsScoresObservation::overallScore not bound
!missing-type! VNCalculateImageAestheticsScoresRequest not bound
!missing-type! VNImageAestheticsScoresObservation not bound
!unknown-native-enum! VNCalculateImageAestheticsScoresRequestRevision bound
7 changes: 1 addition & 6 deletions tests/xtro-sharpie/macOS-Vision.todo
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
!missing-selector! VNCalculateImageAestheticsScoresRequest::results not bound
!missing-selector! VNGeneratePersonSegmentationRequest::supportedOutputPixelFormatsAndReturnError: not bound
!missing-selector! VNImageAestheticsScoresObservation::isUtility not bound
!missing-selector! VNImageAestheticsScoresObservation::overallScore not bound
!missing-type! VNCalculateImageAestheticsScoresRequest not bound
!missing-type! VNImageAestheticsScoresObservation not bound
!unknown-native-enum! VNCalculateImageAestheticsScoresRequestRevision bound
7 changes: 1 addition & 6 deletions tests/xtro-sharpie/tvOS-Vision.todo
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
!missing-selector! VNCalculateImageAestheticsScoresRequest::results not bound
!missing-selector! VNGeneratePersonSegmentationRequest::supportedOutputPixelFormatsAndReturnError: not bound
!missing-selector! VNImageAestheticsScoresObservation::isUtility not bound
!missing-selector! VNImageAestheticsScoresObservation::overallScore not bound
!missing-type! VNCalculateImageAestheticsScoresRequest not bound
!missing-type! VNImageAestheticsScoresObservation not bound
!unknown-native-enum! VNCalculateImageAestheticsScoresRequestRevision bound