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

[PencilKit] Add support for Xcode 15 beta 6 #18769

Merged
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
57 changes: 57 additions & 0 deletions src/pencilkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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))]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand All @@ -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)]
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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]
tj-devel709 marked this conversation as resolved.
Show resolved Hide resolved
NativeHandle Constructor (CGPoint location, double timeOffset, CGSize size, nfloat opacity, nfloat force, nfloat azimuth, nfloat altitude, nfloat secondaryScale);

[Export ("location")]
CGPoint Location { get; }

Expand All @@ -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; }
}
}
15 changes: 0 additions & 15 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-PencilKit.todo

This file was deleted.

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

This file was deleted.

15 changes: 0 additions & 15 deletions tests/xtro-sharpie/iOS-PencilKit.todo

This file was deleted.

11 changes: 0 additions & 11 deletions tests/xtro-sharpie/macOS-PencilKit.todo

This file was deleted.