Skip to content

AppKit macOS xcode14.0 beta3

Manuel de la Pena edited this page Aug 29, 2022 · 5 revisions

#AppKit.framework https://github.com/xamarin/xamarin-macios/pull/15778

diff -ruN /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSFontDescriptor.h /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSFontDescriptor.h
--- /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSFontDescriptor.h	2022-06-17 10:25:45.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSFontDescriptor.h	2022-06-30 18:26:31.000000000 -0500
@@ -53,6 +53,7 @@
 typedef NSString * NSFontDescriptorVariationKey NS_TYPED_ENUM;
 typedef NSString * NSFontDescriptorFeatureKey NS_TYPED_EXTENSIBLE_ENUM;
 typedef CGFloat NSFontWeight NS_TYPED_EXTENSIBLE_ENUM;
+typedef CGFloat NSFontWidth NS_TYPED_EXTENSIBLE_ENUM;
 typedef NSString * NSFontDescriptorSystemDesign NS_TYPED_ENUM;
 typedef NSString * NSFontTextStyle NS_TYPED_ENUM API_AVAILABLE(macos(11.0));
 typedef NSString * NSFontTextStyleOptionKey NS_TYPED_ENUM API_AVAILABLE(macos(11.0));
@@ -173,6 +174,14 @@
 APPKIT_EXTERN const NSFontWeight NSFontWeightHeavy API_AVAILABLE(macos(10.11));
 APPKIT_EXTERN const NSFontWeight NSFontWeightBlack API_AVAILABLE(macos(10.11));
 
+/* Font width trait */
+/* Predefined symbolic width values used for NSFontWidthTrait and +[NSFont systemFontOfSize:weight:width:].
+ */
+APPKIT_EXTERN const NSFontWidth NSFontWidthCompressed API_AVAILABLE(macos(13.0));
+APPKIT_EXTERN const NSFontWidth NSFontWidthCondensed API_AVAILABLE(macos(10.10));
+APPKIT_EXTERN const NSFontWidth NSFontWidthStandard API_AVAILABLE(macos(10.10));
+APPKIT_EXTERN const NSFontWidth NSFontWidthExpanded API_AVAILABLE(macos(10.10));
+
 APPKIT_EXTERN NSFontDescriptorSystemDesign const NSFontDescriptorSystemDesignDefault API_AVAILABLE(macos(10.15));
 APPKIT_EXTERN NSFontDescriptorSystemDesign const NSFontDescriptorSystemDesignSerif API_AVAILABLE(macos(10.15));
 APPKIT_EXTERN NSFontDescriptorSystemDesign const NSFontDescriptorSystemDesignMonospaced API_AVAILABLE(macos(10.15));
diff -ruN /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h
--- /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h	2022-06-17 10:25:51.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h	2022-06-30 18:26:37.000000000 -0500
@@ -520,63 +520,67 @@
 API_AVAILABLE(macos(11.0)) NS_SWIFT_NAME(NSImage.SymbolConfiguration)
 @interface NSImageSymbolConfiguration : NSObject <NSCopying, NSSecureCoding>
 
+#pragma mark - Creating a Symbol Configuration
+
 + (instancetype)configurationWithPointSize:(CGFloat)pointSize weight:(NSFontWeight)weight scale:(NSImageSymbolScale)scale;
+
 + (instancetype)configurationWithPointSize:(CGFloat)pointSize weight:(NSFontWeight)weight;
+
 + (instancetype)configurationWithTextStyle:(NSFontTextStyle)style scale:(NSImageSymbolScale)scale;
+
 + (instancetype)configurationWithTextStyle:(NSFontTextStyle)style;
+
 + (instancetype)configurationWithScale:(NSImageSymbolScale)scale;
 
-/*
+#pragma mark - Creating a Color Configuration
+
+/**
+ Create a configuration that specifies that the symbol should prefer its monochrome variant.
+ */
++ (instancetype)configurationPreferringMonochrome NS_SWIFT_NAME(preferringMonochrome()) API_AVAILABLE(macos(13.0));
+
+/**
+ Create a configuration that specifies that the symbol should prefer its hierarchical variant, if one exists.
+ 
+ If the symbol doesn’t support hierarchical, the result will be a monochrome (templated) symbol.
+ */
++ (instancetype)configurationPreferringHierarchical NS_SWIFT_NAME(preferringHierarchical()) API_AVAILABLE(macos(13.0));
+
+/**
  Create a color configuration with a palette derived from one color.
 
- A color scheme will be created based on the provided color, deriving
- secondary and tertiary colors by reducing the intensity of the base color.
- This is typically (but not only) accomplished by reducing opacity of the
- primary color.
-
- When combined with another configuration creating a palette, the
- last specified configuration will win, overwriting the other color
- configuration.
+ A color scheme will be created based on the provided color, deriving secondary and tertiary colors by reducing the intensity of the base color. This is typically (but not only) accomplished by reducing opacity of the primary color.
+
+ When combined with another configuration creating a palette, the last specified configuration will win, overwriting the other color configuration.
 
- If the symbol doesn't have a palette-based variant, the configuration will
- have no effect and the result will be a monochrome (templated) symbol.
+ If the symbol doesn’t have a palette-based variant, the configuration will have no effect and the result will be a monochrome (templated) symbol.
  */
 + (instancetype)configurationWithHierarchicalColor:(NSColor *)hierarchicalColor API_AVAILABLE(macos(12.0));
 
-/*
- Create a color configuration by specifying a palette of colors.
- The colors are used sequentially per layer: the first color for the first
- layer, the second color for the second layer etc. This is independent of
- the hierarchy level of the layer.
-
- When combined with another configuration creating a palette, the
- last specified configuration will win, overwriting the other color
- configuration.
+/**
+ Create a color configuration by specifying a palette of colors. The colors are used sequentially per layer: the first color for the first layer, the second color for the second layer etc. This is independent of the hierarchy level of the layer.
 
- If the symbol doesn't have a palette-based variant, the configuration will
- have no effect and the result will be a monochrome (templated) symbol.
+ When combined with another configuration creating a palette, the last specified configuration will win, overwriting the other color configuration.
+
+ If the symbol doesn’t have a palette-based variant, the configuration will have no effect and the result will be a monochrome (templated) symbol.
  */
 + (instancetype)configurationWithPaletteColors:(NSArray<NSColor *> *)paletteColors API_AVAILABLE(macos(12.0));
 
-/*
- Create a configuration that specifies that the symbol should prefer
- its multicolor variant if one exists.
-
- This configuration can be combined with one of the palette-based
- configurations; in that case, the symbol will use the multicolor
- variant if one exists, or the palette variant otherwise.
+/**
+ Create a configuration that specifies that the symbol should prefer its multicolor variant, if one exists.
+
+ This configuration can be combined with one of the palette-based configurations; in that case, the symbol will use the multicolor variant if one exists, or the palette variant otherwise.
 
- If the symbol supports neither, the result will be a monochrome
- (templated) symbol.
+ If the symbol supports neither, the result will be a monochrome (templated) symbol.
  */
 + (instancetype)configurationPreferringMulticolor NS_SWIFT_NAME(preferringMulticolor()) API_AVAILABLE(macos(12.0));
 
-/*
- Returns a new configuration object whose values are defined by
- applying values from the provided configuration and the receiver.
+#pragma mark - Instance Methods
+
+/**
+ Returns a new configuration object whose values are defined by applying values from the provided configuration and the receiver.
 
- Values defined by both configurations will use the provided
- configuration's values.
+ Values defined by both configurations will use the provided configuration’s values.
  */
 - (instancetype)configurationByApplyingConfiguration:(NSImageSymbolConfiguration *)configuration API_AVAILABLE(macos(12.0));
Clone this wiki locally