diff --git a/src/pencilkit.cs b/src/pencilkit.cs index 163f804f5373..edcb67525f83 100644 --- a/src/pencilkit.cs +++ b/src/pencilkit.cs @@ -59,6 +59,22 @@ enum PKInkType { [Field ("PKInkTypeMarker")] Marker, + + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("PKInkTypeMonoline")] + Monoline, + + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("PKInkTypeFountainPen")] + FountainPen, + + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("PKInkTypeWatercolor")] + Watercolor, + + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("PKInkTypeCrayon")] + Crayon, } [iOS (14, 0), NoMac] @@ -70,6 +86,14 @@ enum PKCanvasViewDrawingPolicy : ulong { PencilOnly, } + [iOS (17, 0), Mac (14, 0)] + [Introduced (PlatformName.MacCatalyst, 17, 0)] + [Native] + public enum PKContentVersion : long { + Version1 = 1, + Version2 = 2, + } + [iOS (13, 0), NoMac] [Introduced (PlatformName.MacCatalyst, 14, 0)] [BaseType (typeof (NSObject))] @@ -130,6 +154,10 @@ interface PKCanvasView : PKToolPickerObserver { [MacCatalyst (14, 0)] [Export ("drawingPolicy", ArgumentSemantic.Assign)] PKCanvasViewDrawingPolicy DrawingPolicy { get; set; } + + [iOS (17, 0), MacCatalyst (17, 0)] + [Export ("maximumSupportedContentVersion", ArgumentSemantic.Assign)] + PKContentVersion MaximumSupportedContentVersion { get; set; } } [iOS (13, 0)] @@ -174,6 +202,10 @@ interface PKDrawing : NSCopying, NSSecureCoding { [MacCatalyst (14, 0)] [Export ("drawingByAppendingStrokes:")] PKDrawing GetDrawing (PKStroke [] strokes); + + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("requiredContentVersion")] + PKContentVersion RequiredContentVersion { get; } } [iOS (13, 0), Mac (11, 0)] @@ -264,6 +296,10 @@ interface PKInkingTool { [MacCatalyst (14, 0)] [Export ("ink")] PKInk Ink { get; } + + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("requiredContentVersion")] + PKContentVersion RequiredContentVersion { get; } } [iOS (13, 0), Mac (11, 0)] @@ -353,6 +389,10 @@ interface PKToolPicker { [NullAllowed] [Export ("stateAutosaveName")] string StateAutosaveName { get; set; } + + [iOS (17, 0), MacCatalyst (17, 0)] + [Export ("maximumSupportedContentVersion", ArgumentSemantic.Assign)] + PKContentVersion MaximumSupportedContentVersion { get; set; } } [Mac (11, 0), iOS (14, 0)] @@ -377,6 +417,10 @@ interface PKInk : NSCopying { [Export ("color")] UIColor Color { get; } + + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("requiredContentVersion")] + PKContentVersion RequiredContentVersion { get; } } [Mac (11, 0), iOS (14, 0)] @@ -427,6 +471,10 @@ interface PKStroke : NSCopying { [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("randomSeed")] uint RandomSeed { get; } + + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("requiredContentVersion")] + PKContentVersion RequiredContentVersion { get; } } delegate void PKInterpolatedPointsEnumeratorHandler (PKStrokePoint strokePoint, out bool stop); @@ -483,6 +531,11 @@ interface PKStrokePoint : NSCopying { [DesignatedInitializer] NativeHandle Constructor (CGPoint location, double timeOffset, CGSize size, nfloat opacity, nfloat force, nfloat azimuth, nfloat altitude); + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("initWithLocation:timeOffset:size:opacity:force:azimuth:altitude:secondaryScale:")] + [DesignatedInitializer] + NativeHandle Constructor (CGPoint location, double timeOffset, CGSize size, nfloat opacity, nfloat force, nfloat azimuth, nfloat altitude, nfloat secondaryScale); + [Export ("location")] CGPoint Location { get; } @@ -503,5 +556,9 @@ interface PKStrokePoint : NSCopying { [Export ("altitude")] nfloat Altitude { get; } + + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("secondaryScale")] + nfloat SecondaryScale { get; } } } diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-PencilKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-PencilKit.todo deleted file mode 100644 index a0f938ff6640..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-PencilKit.todo +++ /dev/null @@ -1,15 +0,0 @@ -!missing-enum! PKContentVersion not bound -!missing-field! PKInkTypeCrayon not bound -!missing-field! PKInkTypeFountainPen not bound -!missing-field! PKInkTypeMonoline not bound -!missing-field! PKInkTypeWatercolor not bound -!missing-selector! PKCanvasView::maximumSupportedContentVersion not bound -!missing-selector! PKCanvasView::setMaximumSupportedContentVersion: not bound -!missing-selector! PKDrawing::requiredContentVersion not bound -!missing-selector! PKInk::requiredContentVersion not bound -!missing-selector! PKInkingTool::requiredContentVersion not bound -!missing-selector! PKStroke::requiredContentVersion not bound -!missing-selector! PKStrokePoint::initWithLocation:timeOffset:size:opacity:force:azimuth:altitude:secondaryScale: not bound -!missing-selector! PKStrokePoint::secondaryScale not bound -!missing-selector! PKToolPicker::maximumSupportedContentVersion not bound -!missing-selector! PKToolPicker::setMaximumSupportedContentVersion: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-PencilKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-PencilKit.todo deleted file mode 100644 index 7e11ab3b1035..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-PencilKit.todo +++ /dev/null @@ -1,11 +0,0 @@ -!missing-enum! PKContentVersion not bound -!missing-field! PKInkTypeCrayon not bound -!missing-field! PKInkTypeFountainPen not bound -!missing-field! PKInkTypeMonoline not bound -!missing-field! PKInkTypeWatercolor not bound -!missing-selector! PKDrawing::requiredContentVersion not bound -!missing-selector! PKInk::requiredContentVersion not bound -!missing-selector! PKInkingTool::requiredContentVersion not bound -!missing-selector! PKStroke::requiredContentVersion not bound -!missing-selector! PKStrokePoint::initWithLocation:timeOffset:size:opacity:force:azimuth:altitude:secondaryScale: not bound -!missing-selector! PKStrokePoint::secondaryScale not bound diff --git a/tests/xtro-sharpie/iOS-PencilKit.todo b/tests/xtro-sharpie/iOS-PencilKit.todo deleted file mode 100644 index a0f938ff6640..000000000000 --- a/tests/xtro-sharpie/iOS-PencilKit.todo +++ /dev/null @@ -1,15 +0,0 @@ -!missing-enum! PKContentVersion not bound -!missing-field! PKInkTypeCrayon not bound -!missing-field! PKInkTypeFountainPen not bound -!missing-field! PKInkTypeMonoline not bound -!missing-field! PKInkTypeWatercolor not bound -!missing-selector! PKCanvasView::maximumSupportedContentVersion not bound -!missing-selector! PKCanvasView::setMaximumSupportedContentVersion: not bound -!missing-selector! PKDrawing::requiredContentVersion not bound -!missing-selector! PKInk::requiredContentVersion not bound -!missing-selector! PKInkingTool::requiredContentVersion not bound -!missing-selector! PKStroke::requiredContentVersion not bound -!missing-selector! PKStrokePoint::initWithLocation:timeOffset:size:opacity:force:azimuth:altitude:secondaryScale: not bound -!missing-selector! PKStrokePoint::secondaryScale not bound -!missing-selector! PKToolPicker::maximumSupportedContentVersion not bound -!missing-selector! PKToolPicker::setMaximumSupportedContentVersion: not bound diff --git a/tests/xtro-sharpie/macOS-PencilKit.todo b/tests/xtro-sharpie/macOS-PencilKit.todo deleted file mode 100644 index 7e11ab3b1035..000000000000 --- a/tests/xtro-sharpie/macOS-PencilKit.todo +++ /dev/null @@ -1,11 +0,0 @@ -!missing-enum! PKContentVersion not bound -!missing-field! PKInkTypeCrayon not bound -!missing-field! PKInkTypeFountainPen not bound -!missing-field! PKInkTypeMonoline not bound -!missing-field! PKInkTypeWatercolor not bound -!missing-selector! PKDrawing::requiredContentVersion not bound -!missing-selector! PKInk::requiredContentVersion not bound -!missing-selector! PKInkingTool::requiredContentVersion not bound -!missing-selector! PKStroke::requiredContentVersion not bound -!missing-selector! PKStrokePoint::initWithLocation:timeOffset:size:opacity:force:azimuth:altitude:secondaryScale: not bound -!missing-selector! PKStrokePoint::secondaryScale not bound