From c4679268135a9c406cb15a2a67ef631134d85939 Mon Sep 17 00:00:00 2001 From: Alex Soto Date: Thu, 6 Aug 2020 05:58:17 -0400 Subject: [PATCH] [AppKit] Update bindings to Xcode 12 Beta 4 (#9287) --- src/AppKit/Enums.cs | 11 ++++++++ src/appkit.cs | 38 ++++++++++++++++++++++++++-- tests/xtro-sharpie/macOS-AppKit.todo | 14 ---------- 3 files changed, 47 insertions(+), 16 deletions(-) diff --git a/src/AppKit/Enums.cs b/src/AppKit/Enums.cs index 39ef34c63e..4c47603ac3 100644 --- a/src/AppKit/Enums.cs +++ b/src/AppKit/Enums.cs @@ -3066,4 +3066,15 @@ namespace AppKit { Medium = 2, Large = 3, } + + [Mac (11,0)] + [Flags] + [Native] + public enum NSLineBreakStrategy : ulong + { + None = 0x0, + PushOut = 1uL << 0, + HangulWordPriority = 1uL << 1, + Standard = 0xffff, + } } diff --git a/src/appkit.cs b/src/appkit.cs index 49b724e9ef..fbd37e3e56 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -2260,6 +2260,11 @@ namespace AppKit { [Export ("imageHugsTitle")] bool ImageHugsTitle { get; set; } + [NullAllowed] + [Mac (11,0)] + [Export ("symbolConfiguration", ArgumentSemantic.Copy)] + NSImageSymbolConfiguration SymbolConfiguration { get; set; } + [Export ("imageScaling")] NSImageScale ImageScaling { get; set; } @@ -6511,6 +6516,10 @@ namespace AppKit { [Static] [Export ("preferredFontForTextStyle:options:")] NSFont GetPreferredFont (string textStyle, NSDictionary options); + + [Mac (11,0)] + [Export ("fontWithSize:")] + NSFont GetFont (nfloat fontSize); } interface NSFontCollectionChangedEventArgs { @@ -10149,6 +10158,11 @@ namespace AppKit { [Mac (10, 14)] [NullAllowed, Export ("contentTintColor", ArgumentSemantic.Copy)] NSColor ContentTintColor { get; set; } + + [NullAllowed] + [Mac (11,0)] + [Export ("symbolConfiguration", ArgumentSemantic.Copy)] + NSImageSymbolConfiguration SymbolConfiguration { get; set; } } [BaseType (typeof (NSControl), Delegates=new string [] { "WeakDelegate" }, Events=new Type [] { typeof (NSMatrixDelegate)})] @@ -10909,6 +10923,10 @@ namespace AppKit { [Export ("headerLevel")] nint HeaderLevel { get; [NotImplemented] set; } + [Mac (11,0)] + [Export ("lineBreakStrategy")] + NSLineBreakStrategy LineBreakStrategy { get; [NotImplemented] set; } + // @property (readonly) BOOL allowsDefaultTighteningForTruncation __attribute__((availability(macosx, introduced=10.11))); [Mac (10,11)] [Export ("allowsDefaultTighteningForTruncation")] @@ -10951,6 +10969,11 @@ namespace AppKit { [Override] nint HeaderLevel { get; set; } + [Mac (11,0)] + [Override] + [Export ("lineBreakStrategy", ArgumentSemantic.Assign)] + NSLineBreakStrategy LineBreakStrategy { get; set; } + [Export ("lineSpacing")] [Override] nfloat LineSpacing { get; set; } @@ -14997,6 +15020,10 @@ namespace AppKit { [Field ("NSKernAttributeName")] NSString KerningAdjustment { get; } + [Mac (11,0)] + [Field ("NSTrackingAttributeName")] + NSString Tracking { get; } + [Field ("NSLinkAttributeName")] NSString Link { get; } @@ -18169,6 +18196,10 @@ namespace AppKit { [Export ("allowsDefaultTighteningForTruncation")] bool AllowsDefaultTighteningForTruncation { get; set; } + [Mac (10,15)] + [Export ("lineBreakStrategy", ArgumentSemantic.Assign)] + NSLineBreakStrategy LineBreakStrategy { get; set; } + [Mac (10,12)] [Static] [Export ("labelWithString:")] @@ -28020,7 +28051,7 @@ namespace AppKit { [Mac (11,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface NSImageSymbolConfiguration + interface NSImageSymbolConfiguration : NSCopying { [Static] [Export ("configurationWithPointSize:weight:scale:")] @@ -28034,9 +28065,12 @@ namespace AppKit { [Export ("configurationWithTextStyle:scale:")] NSImageSymbolConfiguration Create (string style, NSImageSymbolScale scale); - [NoiOS] [Static] [Export ("configurationWithTextStyle:")] NSImageSymbolConfiguration Create (string style); + + [Static] + [Export ("configurationWithScale:")] + NSImageSymbolConfiguration Create (NSImageSymbolScale scale); } } diff --git a/tests/xtro-sharpie/macOS-AppKit.todo b/tests/xtro-sharpie/macOS-AppKit.todo index a36733d449..e69de29bb2 100644 --- a/tests/xtro-sharpie/macOS-AppKit.todo +++ b/tests/xtro-sharpie/macOS-AppKit.todo @@ -1,14 +0,0 @@ -!missing-enum! NSLineBreakStrategy not bound -!missing-field! NSTrackingAttributeName not bound -!missing-protocol-conformance! NSImageSymbolConfiguration should conform to NSCopying -!missing-selector! +NSImageSymbolConfiguration::configurationWithScale: not bound -!missing-selector! NSButton::setSymbolConfiguration: not bound -!missing-selector! NSButton::symbolConfiguration not bound -!missing-selector! NSFont::fontWithSize: not bound -!missing-selector! NSImageView::setSymbolConfiguration: not bound -!missing-selector! NSImageView::symbolConfiguration not bound -!missing-selector! NSMutableParagraphStyle::lineBreakStrategy not bound -!missing-selector! NSMutableParagraphStyle::setLineBreakStrategy: not bound -!missing-selector! NSParagraphStyle::lineBreakStrategy not bound -!missing-selector! NSTextField::lineBreakStrategy not bound -!missing-selector! NSTextField::setLineBreakStrategy: not bound \ No newline at end of file