diff --git a/src/appkit.cs b/src/appkit.cs index 4ebe637631..169f185bb6 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -928,12 +928,12 @@ namespace AppKit { } delegate void NSApplicationEnumerateWindowsHandler (NSWindow window, ref bool stop); -// radar://42781537 -//#if XAMCORE_4_0 -// delegate void ContinueUserActivityRestorationHandler (NSUserActivityRestoring [] restorableObjects); -//#else +#if NET + [NoMacCatalyst] + delegate void ContinueUserActivityRestorationHandler (INSUserActivityRestoring [] restorableObjects); +#else delegate void ContinueUserActivityRestorationHandler (NSObject [] restorableObjects); -//#endif +#endif [NoMacCatalyst] [BaseType (typeof (NSObject))] @@ -5546,7 +5546,7 @@ namespace AppKit { [NoMacCatalyst] [DesignatedDefaultCtor] [BaseType (typeof (NSObject))] - partial interface NSDocument /* : NSUserActivityRestoring radar://42781537 */ { + partial interface NSDocument : NSUserActivityRestoring { [Export ("initWithType:error:")] NativeHandle Constructor (string typeName, [NullAllowed] out NSError outError); @@ -5888,10 +5888,12 @@ namespace AppKit { [Export ("updateUserActivityState:")] void UpdateUserActivityState (NSUserActivity userActivity); +#if !NET // Should be removed but radar://42781537 - Classes fail to conformsToProtocol despite header declaration [Mac (10,10)] [Export ("restoreUserActivityState:")] void RestoreUserActivityState (NSUserActivity userActivity); +#endif [Mac (10,12)] [Export ("isBrowsingVersions")] @@ -12702,7 +12704,7 @@ namespace AppKit { [NoMacCatalyst] [DesignatedDefaultCtor] [BaseType (typeof (NSObject))] - partial interface NSResponder : NSCoding, NSTouchBarProvider /* radar://42781537 , NSUserActivityRestoring */ { + partial interface NSResponder : NSCoding, NSTouchBarProvider , NSUserActivityRestoring { [Export ("tryToPerform:with:")] bool TryToPerformwith (Selector anAction, [NullAllowed] NSObject anObject); @@ -12862,10 +12864,12 @@ namespace AppKit { [Export ("updateUserActivityState:")] void UpdateUserActivityState (NSUserActivity userActivity); +#if !NET // Should be removed but radar://42781537 - Classes fail to conformsToProtocol despite header declaration [Mac (10,10)] [Export ("restoreUserActivityState:")] void RestoreUserActivityState (NSUserActivity userActivity); +#endif [Mac (10,10,3)] [Export ("pressureChangeWithEvent:")] @@ -12890,14 +12894,17 @@ namespace AppKit { void EncodeRestorableState (NSCoder coder, NSOperationQueue queue); } -// [Protocol] // radar://42781537 - Classes fail to conformsToProtocol despite header declaration -// interface NSUserActivityRestoring -// { -// [Mac (10,10)] -// [Abstract] -// [Export ("restoreUserActivityState:")] -// void RestoreUserActivityState (NSUserActivity userActivity); -// } + [NoMacCatalyst] + [Protocol] + interface NSUserActivityRestoring + { + [Mac (10,10)] + [Abstract] + [Export ("restoreUserActivityState:")] + void RestoreUserActivityState (NSUserActivity userActivity); + } + + interface INSUserActivityRestoring { } [NoMacCatalyst] [Category] diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-AppKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-AppKit.ignore index 69782f00f9..5d36269cd2 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-AppKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-AppKit.ignore @@ -6,9 +6,6 @@ ## 42814697 NSViewLayerContentScaleDelegate defined in header but never used !missing-protocol! NSViewLayerContentScaleDelegate not bound -## 42781537 Classes fail to conformsToProtocol despite header declaration -!missing-protocol! NSUserActivityRestoring not bound - ## recent fox top xtro reported additional missing API (to be reviewed) !missing-selector! +NSBezierPath::bezierPath not bound !missing-selector! +NSCursor::pop not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore index 93ca82075b..16dac1051a 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.ignore @@ -228,10 +228,6 @@ ## DoCommandBySelector conflicts with NSTextViewDelegate in generated code !missing-protocol-member! NSTextInput::doCommandBySelector: not found -## 42781537 Classes fail to conformsToProtocol despite header declaration -!missing-protocol-conformance! NSDocument should conform to NSUserActivityRestoring (defined in 'NSUserActivity' category) -!missing-protocol-conformance! NSResponder should conform to NSUserActivityRestoring (defined in 'NSUserActivity' category) - ## Added in Xcode 10.2 Final but deprecated !missing-release-attribute-on-return-value! AppKit.NSDictionaryControllerKeyValuePair AppKit.NSDictionaryController::get_NewObject()'s selector's ('newObject') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. diff --git a/tests/xtro-sharpie/common-AppKit.ignore b/tests/xtro-sharpie/common-AppKit.ignore index 69782f00f9..5d36269cd2 100644 --- a/tests/xtro-sharpie/common-AppKit.ignore +++ b/tests/xtro-sharpie/common-AppKit.ignore @@ -6,9 +6,6 @@ ## 42814697 NSViewLayerContentScaleDelegate defined in header but never used !missing-protocol! NSViewLayerContentScaleDelegate not bound -## 42781537 Classes fail to conformsToProtocol despite header declaration -!missing-protocol! NSUserActivityRestoring not bound - ## recent fox top xtro reported additional missing API (to be reviewed) !missing-selector! +NSBezierPath::bezierPath not bound !missing-selector! +NSCursor::pop not bound diff --git a/tests/xtro-sharpie/macOS-AppKit.ignore b/tests/xtro-sharpie/macOS-AppKit.ignore index d1b2fc0c4e..e1ec005ba4 100644 --- a/tests/xtro-sharpie/macOS-AppKit.ignore +++ b/tests/xtro-sharpie/macOS-AppKit.ignore @@ -321,10 +321,6 @@ ## DoCommandBySelector conflicts with NSTextViewDelegate in generated code !missing-protocol-member! NSTextInput::doCommandBySelector: not found -## 42781537 Classes fail to conformsToProtocol despite header declaration -!missing-protocol-conformance! NSDocument should conform to NSUserActivityRestoring (defined in 'NSUserActivity' category) -!missing-protocol-conformance! NSResponder should conform to NSUserActivityRestoring (defined in 'NSUserActivity' category) - ## Added in Xcode 10.2 Final but deprecated !missing-release-attribute-on-return-value! AppKit.NSDictionaryControllerKeyValuePair AppKit.NSDictionaryController::get_NewObject()'s selector's ('newObject') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required.