From e75e149e6d17ebba8ec3eb8ccb005d949e960db2 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Wed, 5 Oct 2022 16:51:37 -0500 Subject: [PATCH 1/3] [appkit] Xcode 14.1 Beta 1-3 --- src/AppKit/Enums.cs | 5 ++++- src/appkit.cs | 13 +++++++++++++ src/foundation.cs | 1 + .../api-annotations-dotnet/common-Foundation.ignore | 1 - .../api-annotations-dotnet/macOS-AppKit.todo | 9 +-------- tests/xtro-sharpie/common-Foundation.ignore | 1 - tests/xtro-sharpie/macOS-AppKit.todo | 9 +-------- 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/AppKit/Enums.cs b/src/AppKit/Enums.cs index f1643801319d..01cde0b170b9 100644 --- a/src/AppKit/Enums.cs +++ b/src/AppKit/Enums.cs @@ -920,7 +920,10 @@ public enum NSWindowCollectionBehavior : ulong { FullScreenAuxiliary = 1 << 8, FullScreenNone = 1 << 9, [Mac (10, 11)] FullScreenAllowsTiling = 1 << 11, - [Mac (10, 11)] FullScreenDisallowsTiling = 1 << 12 + [Mac (10, 11)] FullScreenDisallowsTiling = 1 << 12, + [Mac (10, 13)] Primary = 1 << 16, + [Mac (10, 13)] Auxiliary = 1 << 17, + [Mac (10, 13)] CanJoinAllApplications = 1 << 18, } [NoMacCatalyst] diff --git a/src/appkit.cs b/src/appkit.cs index 8700672b3417..e390408c7653 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -19700,6 +19700,15 @@ NSTextContentType ContentType { [Export ("selectedRanges", ArgumentSemantic.Copy)] NSArray SelectedRanges { get; set; } #endif + + [NoiOS] + [Export ("initUsingTextLayoutManager:")] + NativeHandle Constructor (bool usingTextLayoutManager); + + [NoiOS] + [Static] + [Export ("textViewUsingTextLayoutManager:")] + NSTextView WithTextLayoutManager (bool usingTextLayoutManager); } [NoMacCatalyst] @@ -22960,6 +22969,10 @@ interface NSSharingServicePicker [Mac (13, 0)] [Export ("standardShareMenuItem")] NSMenuItem StandardShareMenuItem { get; } + + [NoiOS, Mac (13,0)] + [Export ("close")] + void Close (); } interface INSSharingServicePickerDelegate {} diff --git a/src/foundation.cs b/src/foundation.cs index 7dfaf9360893..c4eb25f9a53c 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -13076,6 +13076,7 @@ interface NSFileManager_NSUserInformation { partial interface NSFilePresenter { [Abstract] [Export ("presentedItemURL", ArgumentSemantic.Retain)] + [NullAllowed] #if NET NSUrl PresentedItemUrl { get; } #else diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-Foundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-Foundation.ignore index 88361fa0b417..aa16afdae0ca 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-Foundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-Foundation.ignore @@ -1106,7 +1106,6 @@ !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileManager::GetUrl(Foundation.NSSearchPathDirectory,Foundation.NSSearchPathDomain,Foundation.NSUrl,System.Boolean,Foundation.NSError&)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileManager::GetUrlForPublishingUbiquitousItem(Foundation.NSUrl,Foundation.NSDate&,Foundation.NSError&)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileManager::GetUrlForUbiquityContainer(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSFilePresenter::get_PresentedItemUrl()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileVersion::ReplaceItem(Foundation.NSUrl,Foundation.NSFileVersionReplacingOptions,Foundation.NSError&)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileWrapper::get_SymbolicLinkDestinationURL()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSHttpCookie::get_CommentUrl()' is missing an [NullAllowed] on return type diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.todo index 3bc8a5a029a6..d71eecd1310a 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.todo @@ -15,11 +15,4 @@ !missing-selector! NSToolbarItem::isVisible not bound !missing-type! NSNibConnector not bound !missing-type! NSNibControlConnector not bound -!missing-type! NSNibOutletConnector not bound -!missing-enum-value! NSWindowCollectionBehavior native value NSWindowCollectionBehaviorAuxiliary = 131072 not bound -!missing-enum-value! NSWindowCollectionBehavior native value NSWindowCollectionBehaviorCanJoinAllApplications = 262144 not bound -!missing-enum-value! NSWindowCollectionBehavior native value NSWindowCollectionBehaviorPrimary = 65536 not bound -!missing-null-allowed! 'Foundation.NSUrl AppKit.NSDocument::get_PresentedItemUrl()' is missing an [NullAllowed] on return type -!missing-selector! +NSTextView::textViewUsingTextLayoutManager: not bound -!missing-selector! NSSharingServicePicker::close not bound -!missing-selector! NSTextView::initUsingTextLayoutManager: not bound +!missing-type! NSNibOutletConnector not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/common-Foundation.ignore b/tests/xtro-sharpie/common-Foundation.ignore index 5fa8fb4f78c6..118844aa72b6 100644 --- a/tests/xtro-sharpie/common-Foundation.ignore +++ b/tests/xtro-sharpie/common-Foundation.ignore @@ -1118,7 +1118,6 @@ !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileManager::GetUrl(Foundation.NSSearchPathDirectory,Foundation.NSSearchPathDomain,Foundation.NSUrl,System.Boolean,Foundation.NSError&)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileManager::GetUrlForPublishingUbiquitousItem(Foundation.NSUrl,Foundation.NSDate&,Foundation.NSError&)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileManager::GetUrlForUbiquityContainer(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUrl Foundation.NSFilePresenter::get_PresentedItemURL()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileVersion::ReplaceItem(Foundation.NSUrl,Foundation.NSFileVersionReplacingOptions,Foundation.NSError&)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSFileWrapper::get_SymbolicLinkDestinationURL()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSUrl Foundation.NSHttpCookie::get_CommentUrl()' is missing an [NullAllowed] on return type diff --git a/tests/xtro-sharpie/macOS-AppKit.todo b/tests/xtro-sharpie/macOS-AppKit.todo index 5284e70d2a15..d71eecd1310a 100644 --- a/tests/xtro-sharpie/macOS-AppKit.todo +++ b/tests/xtro-sharpie/macOS-AppKit.todo @@ -15,11 +15,4 @@ !missing-selector! NSToolbarItem::isVisible not bound !missing-type! NSNibConnector not bound !missing-type! NSNibControlConnector not bound -!missing-type! NSNibOutletConnector not bound -!missing-enum-value! NSWindowCollectionBehavior native value NSWindowCollectionBehaviorAuxiliary = 131072 not bound -!missing-enum-value! NSWindowCollectionBehavior native value NSWindowCollectionBehaviorCanJoinAllApplications = 262144 not bound -!missing-enum-value! NSWindowCollectionBehavior native value NSWindowCollectionBehaviorPrimary = 65536 not bound -!missing-null-allowed! 'Foundation.NSUrl AppKit.NSDocument::get_PresentedItemURL()' is missing an [NullAllowed] on return type -!missing-selector! +NSTextView::textViewUsingTextLayoutManager: not bound -!missing-selector! NSSharingServicePicker::close not bound -!missing-selector! NSTextView::initUsingTextLayoutManager: not bound +!missing-type! NSNibOutletConnector not bound \ No newline at end of file From 82830867e14fb6778474678352b521344ea58a66 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Thu, 6 Oct 2022 13:44:47 -0500 Subject: [PATCH 2/3] Add missing selector attributes --- src/appkit.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/appkit.cs b/src/appkit.cs index e390408c7653..32de99659e5e 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -19702,11 +19702,13 @@ NSTextContentType ContentType { #endif [NoiOS] + [Mac (13, 0)] [Export ("initUsingTextLayoutManager:")] NativeHandle Constructor (bool usingTextLayoutManager); [NoiOS] [Static] + [Mac (13, 0)] [Export ("textViewUsingTextLayoutManager:")] NSTextView WithTextLayoutManager (bool usingTextLayoutManager); } From a32985c8cad8433d7b971b09334ae696559b4805 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Mon, 10 Oct 2022 14:54:28 -0500 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Rolf Bjarne Kvinge --- src/appkit.cs | 2 +- tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.todo | 2 +- tests/xtro-sharpie/macOS-AppKit.todo | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/appkit.cs b/src/appkit.cs index 32de99659e5e..2a27c9d80e7f 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -19710,7 +19710,7 @@ NSTextContentType ContentType { [Static] [Mac (13, 0)] [Export ("textViewUsingTextLayoutManager:")] - NSTextView WithTextLayoutManager (bool usingTextLayoutManager); + NSTextView Create (bool usingTextLayoutManager); } [NoMacCatalyst] diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.todo index d71eecd1310a..27b497fe5609 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AppKit.todo @@ -15,4 +15,4 @@ !missing-selector! NSToolbarItem::isVisible not bound !missing-type! NSNibConnector not bound !missing-type! NSNibControlConnector not bound -!missing-type! NSNibOutletConnector not bound \ No newline at end of file +!missing-type! NSNibOutletConnector not bound diff --git a/tests/xtro-sharpie/macOS-AppKit.todo b/tests/xtro-sharpie/macOS-AppKit.todo index d71eecd1310a..27b497fe5609 100644 --- a/tests/xtro-sharpie/macOS-AppKit.todo +++ b/tests/xtro-sharpie/macOS-AppKit.todo @@ -15,4 +15,4 @@ !missing-selector! NSToolbarItem::isVisible not bound !missing-type! NSNibConnector not bound !missing-type! NSNibControlConnector not bound -!missing-type! NSNibOutletConnector not bound \ No newline at end of file +!missing-type! NSNibOutletConnector not bound