-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AppKit] Improve bindings for NSPasteboard and NSPasteboardReading a …
…bit. (#20643) * Create strong enums for NSPasteboardType and NSPasteboardName. * Bind the NSPasteboardReading constructor. Ref: #14039
- Loading branch information
1 parent
36bc43f
commit 13cec0c
Showing
8 changed files
with
207 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#if !__MACCATALYST__ | ||
|
||
using System; | ||
|
||
using Foundation; | ||
using ObjCRuntime; | ||
|
||
#nullable enable | ||
|
||
#if NET | ||
namespace AppKit { | ||
public partial interface INSPasteboardReading { | ||
[BindingImpl (BindingImplOptions.Optimizable)] | ||
public unsafe static T? CreateInstance<T> (NSObject propertyList, NSPasteboardType type) where T: NSObject, INSPasteboardReading | ||
{ | ||
return CreateInstance<T> (propertyList, type.GetConstant ()!); | ||
} | ||
} | ||
} | ||
#endif // NET | ||
#endif // !__MACCATALYST__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.