-
Notifications
You must be signed in to change notification settings - Fork 518
AppKit macOS xcode14.0 beta1
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_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSColorWell.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSColorWell.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSColorWell.h 2022-02-17 00:13:01.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSColorWell.h 2022-05-31 15:03:25.000000000 -0400
@@ -11,19 +11,35 @@
NS_ASSUME_NONNULL_BEGIN
APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
+typedef NS_ENUM(NSInteger, NSColorWellStyle) {
+ NSColorWellStyleDefault = 0, /// The default `colorWellStyle`. A well that accepts drag/drop of colors as well as reveals the color panel when clicked.
+ NSColorWellStyleMinimal, /// A minimally adorned well. By default shows a popover color picker when clicked; this interaction behavior can be customized.
+ NSColorWellStyleExpanded, /// An expanded well with a dedicated button for revealing the color panel. By default, clicking the well will show a popover color picker; this interaction behavior can be customized.
+} NS_SWIFT_NAME(NSColorWell.Style) API_AVAILABLE(macos(13.0));
+
@interface NSColorWell : NSControl
++ (instancetype) colorWellWithStyle:(NSColorWellStyle)style API_AVAILABLE(macos(13.0)); /// Instantiates a well in the given style with a default configuration.
+
- (void)deactivate;
- (void)activate:(BOOL)exclusive;
@property (getter=isActive, readonly) BOOL active;
- (void)drawWellInside:(NSRect)insideRect;
-@property (getter=isBordered) BOOL bordered;
+@property (getter=isBordered) BOOL bordered API_DEPRECATED("This property will be deprecated in a future release.", macos(10.0, API_TO_BE_DEPRECATED));
- (void)takeColorFrom:(nullable id)sender;
@property (copy) NSColor *color;
+@property (assign) NSColorWellStyle colorWellStyle API_AVAILABLE(macos(13.0));
+
+@property (nullable, strong) NSImage *image API_AVAILABLE(macos(13.0)); /// The image that appears on the button portion of the expanded control. This property only applicable when `colorWellStyle` is `NSColorWellStyleExpanded`.
+
+@property (nullable, weak) id pulldownTarget API_AVAILABLE(macos(13.0)); /// The target which `pulldownAction` is sent to. This property only applicable when `colorWellStyle` is `NSColorWellStyleExpanded` or `NSColorWellStyleMinimal`.
+@property (nullable) SEL pulldownAction API_AVAILABLE(macos(13.0)); /// The action sent to `pulldownTarget` when the user interacts with the well. This property only applicable when `colorWellStyle` is `NSColorWellStyleExpanded` or `NSColorWellStyleMinimal`. If no action is set, the well will show the system color picker popover.
+
+
@end
API_UNAVAILABLE_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSComboButton.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSComboButton.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSComboButton.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSComboButton.h 2022-05-31 15:03:21.000000000 -0400
@@ -0,0 +1,71 @@
+/*
+ NSComboButton.h
+ Application Kit
+ Copyright (c) 2021, Apple Inc.
+ All rights reserved.
+*/
+
+#import <AppKit/NSControl.h>
+
+NS_ASSUME_NONNULL_BEGIN
+APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
+
+API_AVAILABLE(macos(13.0))
+typedef NS_ENUM(NSInteger, NSComboButtonStyle) {
+ /// The button will be split across 2 segments. The leading segment shows `title`, `image`, or both. If `action` is set, it will be performed when the leading segment is clicked. If `action` is `nil`, the leading segment will be disabled. The trailing segment shows a menu indicator. If `menu` is set, clicking the trailing segment will show it. If `menu` is empty, the trailing segment will be disabled.
+ NSComboButtonStyleSplit = 0,
+
+ /// The button will be unified in a single segment. If `action` is set, `menu` will appear on click and hold. If `action` is `nil`, then `menu` will appear on click.
+ NSComboButtonStyleUnified = 1
+} NS_SWIFT_NAME(NSComboButton.Style);
+
+API_AVAILABLE(macos(13.0))
+@interface NSComboButton : NSControl
+
+/*!
+ Creates a standard combo button with a title, menu, and primary action.
+ @param title The localized title string that is displayed on the button.
+ @param menu The additional menu to display on the button.
+ @param target The target object that receives primary action messages from the control.
+ @param action The action message sent by the primary action portion of the control.
+ */
++ (instancetype)comboButtonWithTitle:(NSString *)title menu:(nullable NSMenu *)menu target:(nullable id)target action:(nullable SEL)action;
+
+/*!
+ Creates a standard combo button with a image, menu, and primary action.
+ @param image The image to display in the body of the button.
+ @param menu The additional menu to display on the button.
+ @param target The target object that receives primary action messages from the control.
+ @param action The action message sent by the primary action portion of the control.
+ */
++ (instancetype)comboButtonWithImage:(NSImage *)image menu:(nullable NSMenu *)menu target:(nullable id)target action:(nullable SEL)action;
+
+/*!
+ Creates a standard combo button with a title, image, menu, and primary action.
+ @param title The localized title string that is displayed on the button.
+ @param image The image to display in the body of the button.
+ @param menu The additional menu to display on the button.
+ @param target The target object that receives primary action messages from the control.
+ @param action The action message sent by the primary action portion of the control.
+ */
++ (instancetype)comboButtonWithTitle:(NSString *)title image:(NSImage *)image menu:(nullable NSMenu *)menu target:(nullable id)target action:(nullable SEL)action;
+
+/*! The title displayed on the control. The default value is an empty string. */
+@property (copy) NSString *title;
+
+/*! The image displayed on the control. The default value is `nil`. */
+@property (nullable, strong) NSImage *image;
+
+/*! The scaling mode applied to fit the button's image within the content area. The default value is `NSImageScaleProportionallyDown`. */
+@property NSImageScaling imageScaling;
+
+/*! Overrides behavior of NSResponder menu. This menu is shown when interacting with the button (see NSComboButtonStyle). NSComboButton does not have a context menu. Items in this menu specify their own target and action independent of the primary action that is configured on the control. */
+@property (strong) NSMenu *menu;
+
+/*! Specifies the visual presentation and behavior for NSComboButton's primary action and its menu. The default value is `NSComboButtonStyleSplit`. */
+@property NSComboButtonStyle style;
+
+@end
+
+API_UNAVAILABLE_END
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h 2022-02-23 10:57:04.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSImage.h 2022-05-31 15:03:21.000000000 -0400
@@ -65,6 +65,8 @@
#endif /* NSIMAGE_UNAVAILABLE_MACCATALYST */
@interface NSImage : NSObject
+#pragma mark - Initialization
+
#if NSIMAGE_UNAVAILABLE_MACCATALYST
- (instancetype)init API_UNAVAILABLE(ios);
+ (instancetype)new API_UNAVAILABLE(ios);
@@ -76,6 +78,22 @@
+ (nullable instancetype)imageWithSystemSymbolName:(NSString *)symbolName accessibilityDescription:(nullable NSString *)description API_AVAILABLE(macos(11.0));
+/** Creates a symbol image with with the specified name and value. The @c value argument is only accommodated if the symbol supports variable rendering.
+
+@param name The name of a symbol image file in the main bundle's catalog.
+@param value The value represented by the symbol. The value should be between 0 and 1 inclusive ([0,1]).
+
+@note Values less than 0 or greater than 1 will be clamped to 0 and 1, respectively. */
++ (nullable instancetype)imageWithSymbolName:(NSString *)name variableValue:(double)value API_AVAILABLE(macos(13.0));
+
+/** Creates a system symbol image with the specified name and value. The value argument is only accommodated if the symbol supports variable rendering.
+
+@param name A name from the system's SF Symbols catalog.
+@param value The value represented by the symbol. The value should be between 0 and 1 inclusive ([0,1]).
+
+@note Values less than 0 or greater than 1 will be clamped to 0 and 1, respectively. */
++ (nullable instancetype)imageWithSystemSymbolName:(NSString *)name variableValue:(double)value accessibilityDescription:(nullable NSString *)description API_AVAILABLE(macos(13.0));
+
- (instancetype)initWithSize:(NSSize)size NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@@ -92,6 +110,8 @@
// Note that the block passed to the below method may be invoked whenever and on whatever thread the image itself is drawn on. Care should be taken to ensure that all state accessed within the drawingHandler block is done so in a thread safe manner.
+ (instancetype)imageWithSize:(NSSize)size flipped:(BOOL)drawingHandlerShouldBeCalledWithFlippedContext drawingHandler:(BOOL (^)(NSRect dstRect))drawingHandler API_AVAILABLE(macos(10.8));
+#pragma mark - Properties and Methods
+
@property NSSize size;
- (BOOL)setName:(nullable NSImageName)string;
- (nullable NSImageName)name;
@@ -120,9 +140,10 @@
- (void)removeRepresentation:(NSImageRep *)imageRep;
@property (getter=isValid, readonly) BOOL valid;
-- (void)lockFocus;
-- (void)lockFocusFlipped:(BOOL)flipped API_AVAILABLE(macos(10.6));
-- (void)unlockFocus;
+
+- (void)lockFocus API_DEPRECATED("This method is incompatible with resolution-independent drawing and should not be used. Instead, use +[NSImage imageWithSize:flipped:drawingHandler:] to create a block-based image describing the desired image drawing, or use +[NSGraphicsContext graphicsContextWithBitmapImageRep:] to manipulate specific bitmap image representations.", macos(10.0, API_TO_BE_DEPRECATED));
+- (void)lockFocusFlipped:(BOOL)flipped API_DEPRECATED("This method is incompatible with resolution-independent drawing and should not be used. Instead, use +[NSImage imageWithSize:flipped:drawingHandler:] to create a block-based image describing the desired image drawing, or use +[NSGraphicsContext graphicsContextWithBitmapImageRep:] to manipulate specific bitmap image representations.", macos(10.6, API_TO_BE_DEPRECATED));
+- (void)unlockFocus API_DEPRECATED("This method is incompatible with resolution-independent drawing and should not be used. Instead, use +[NSImage imageWithSize:flipped:drawingHandler:] to create a block-based image describing the desired image drawing, or use +[NSGraphicsContext graphicsContextWithBitmapImageRep:] to manipulate specific bitmap image representations.", macos(10.0, API_TO_BE_DEPRECATED));
@property (nullable, weak) id<NSImageDelegate> delegate;
@@ -145,7 +166,7 @@
*/
@property NSRect alignmentRect API_AVAILABLE(macos(10.5));
-/* The 'template' property is metadata that allows clients to be smarter about image processing. An image should be marked as a template if it is basic glpyh-like black and white art that is intended to be processed into derived images for use on screen.
+/* The 'template' property is metadata that allows clients to be smarter about image processing. An image should be marked as a template if it is basic glyph-like black and white art that is intended to be processed into derived images for use on screen.
NSButtonCell applies effects to images based on the state of the button. For example, images are shaded darker when the button is pressed. If a template image is set on a cell, the cell can apply more sophisticated effects. For example, it may be processed into an image that looks engraved when drawn into a cell whose interiorBackgroundStyle is NSBackgroundStyleRaised, like on a textured button.
*/
@@ -214,6 +235,10 @@
#if !NSIMAGE_UNAVAILABLE_MACCATALYST
@interface NSImage () <NSCopying, NSSecureCoding, NSPasteboardReading, NSPasteboardWriting>
@end
+
+API_AVAILABLE(macos(13.0))
+@interface NSImage () <NSItemProviderReading, NSItemProviderWriting>
+@end
#endif /* !NSIMAGE_UNAVAILABLE_MACCATALYST */
@protocol NSImageDelegate <NSObject>
@@ -230,7 +255,7 @@
@interface NSBundle(NSBundleImageExtension)
- (nullable NSImage *)imageForResource:(NSImageName)name API_AVAILABLE(macos(10.7)); /* May return nil if no file found */
-/* Neither of the following methods can return images with multiple representations in different files (for example, MyImage.png and [email protected].) The above method is generally prefered.
+/* Neither of the following methods can return images with multiple representations in different files (for example, MyImage.png and [email protected].) The above method is generally preferred.
*/
- (nullable NSString *)pathForImageResource:(NSImageName)name; /* May return nil if no file found */
- (nullable NSURL *)URLForImageResource:(NSImageName)name API_AVAILABLE(macos(10.6)); /* May return nil if no file found */
@@ -265,7 +290,7 @@
- (void)compositeToPoint:(NSPoint)point fromRect:(NSRect)rect operation:(NSCompositingOperation)op fraction:(CGFloat)delta API_DEPRECATED("Use -drawAtPoint:... or -drawInRect:... methods instead", macos(10.0,10.6));
// This method doesn't do what people expect. See AppKit 10.6 release notes. Briefly, you can replace invocation of this method with code that locks focus on the image and then draws the rep in the image.
-- (void)lockFocusOnRepresentation:(null_unspecified NSImageRep *)imageRepresentation API_DEPRECATED("Use -lockFocus followed by -[NSImageRep drawInRect:] instead. See documentation for more info.", macos(10.0,10.6));
+- (void)lockFocusOnRepresentation:(null_unspecified NSImageRep *)imageRepresentation API_DEPRECATED("Create an image using +[NSImage imageWithSize:flipped:drawingHandler:], and begin your custom drawing with -[NSImageRep drawInRect:] instead.", macos(10.0,10.6));
- (void)setScalesWhenResized:(BOOL)flag API_DEPRECATED("You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details.", macos(10.0,10.6));
- (BOOL)scalesWhenResized API_DEPRECATED("You should be able to remove use of this method without any replacement. See 10.6 AppKit release notes for details.", macos(10.0,10.6));
@@ -284,7 +309,7 @@
Most images are named by a specific function or situation where they are intended to be used. In some cases, the artwork may be more generic than the name. For example, the image for NSImageNameInvalidDataFreestandingTemplate is an arrow in 10.5. Please do not use an image outside of the function for which it is intended - the artwork can change between releases. The invalid data image could change to a yellow exclamation-point-in-triangle icon. If there is no image available for the situation you're interested in, please file a bug report, and use your own custom art in the meantime.
- The size of an image is also not guaranteed to be the same (or maintain the same aspect ratio) between releases, so you should explcitly size the image appropriately for your use.
+ The size of an image is also not guaranteed to be the same (or maintain the same aspect ratio) between releases, so you should explicitly size the image appropriately for your use.
Constants that end in the word "Template" name black and clear images that return YES for isTemplate. These images can be processed into variants appropriate for different situations. For example, these images can invert in a selected table view row. See -[NSImage setTemplate:] for more comments. These images are inappropriate for display without further processing, but NSCell and its subclasses will perform the processing.
@@ -361,7 +386,7 @@
APPKIT_EXTERN NSImageName const NSImageNameRightFacingTriangleTemplate API_AVAILABLE(macos(10.5));
APPKIT_EXTERN NSImageName const NSImageNameLeftFacingTriangleTemplate API_AVAILABLE(macos(10.5));
-/* NSImageNameDotMac will continue to work for the forseeable future, and will return the same image as NSImageNameMobileMe.
+/* NSImageNameDotMac will continue to work for the foreseeable future, and will return the same image as NSImageNameMobileMe.
*/
APPKIT_EXTERN NSImageName const NSImageNameDotMac API_DEPRECATED_WITH_REPLACEMENT("NSImageNameMobileMe", macos(10.5,10.7));
APPKIT_EXTERN NSImageName const NSImageNameMobileMe API_AVAILABLE(macos(10.6));
@@ -482,7 +507,7 @@
APPKIT_EXTERN NSImageName const NSImageNameTouchBarVolumeDownTemplate API_AVAILABLE(macos(10.12.2), ios(13.0));
APPKIT_EXTERN NSImageName const NSImageNameTouchBarVolumeUpTemplate API_AVAILABLE(macos(10.12.2), ios(13.0));
-/* If you have an NSTouchBarItem with a seekable media control, NSImageNameTouchBarPlayheadTemplate is suitable for use in displaying the playhead.
+/* If you have an NSTouchBarItem with a seek-able media control, NSImageNameTouchBarPlayheadTemplate is suitable for use in displaying the playhead.
*/
APPKIT_EXTERN NSImageName const NSImageNameTouchBarPlayheadTemplate API_AVAILABLE(macos(10.12.2));
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuView.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuView.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuView.h 2022-02-17 00:12:57.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuView.h 1969-12-31 19:00:00.000000000 -0500
@@ -1,8 +0,0 @@
-/*
- NSMenuView.h
- Application Kit
- Copyright (c) 1997-2021, Apple Inc.
- All rights reserved.
-*/
-
-#warning NSMenuView is deprecated, and does not exist on 64-bit architectures. This header will be removed from the framework in a future release.
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMovieView.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMovieView.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMovieView.h 2022-02-17 00:12:57.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMovieView.h 1969-12-31 19:00:00.000000000 -0500
@@ -1,6 +0,0 @@
-/*
- NSMovieView.h
- Copyright (c) 1998-2021, Apple Inc. All rights reserved.
-*/
-
-#warning NSMovieView is deprecated, and does not exist on 64-bit architectures. This header will be removed from the framework in a future release.
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPreviewRepresentingActivityItem.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPreviewRepresentingActivityItem.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPreviewRepresentingActivityItem.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPreviewRepresentingActivityItem.h 2022-05-31 15:03:25.000000000 -0400
@@ -0,0 +1,74 @@
+/*
+ NSPreviewRepresentingActivityItem.h
+ Application Kit
+ Copyright (c) 2022, Apple Inc.
+ All rights reserved.
+*/
+
+#import <AppKit/AppKitDefines.h>
+#import <AppKit/NSImage.h>
+#import <Foundation/NSObject.h>
+#import <Foundation/NSString.h>
+#import <Foundation/NSItemProvider.h>
+
+NS_ASSUME_NONNULL_BEGIN
+APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
+
+API_AVAILABLE(macos(13.0)) API_UNAVAILABLE(ios, watchos, tvos)
+@protocol NSPreviewRepresentableActivityItem <NSObject>
+
+@required
+
+/// The item to be shared
+@property (strong, readonly) id item;
+
+@optional
+
+/// A string representing the name or title of the item to be shared
+@property (nullable, copy, readonly) NSString *title;
+
+/// Provides an image appropriate to represent the item.
+///
+/// This image typically is a full-size representation of the content being shared.
+/// For instance, if sharing a link to a webpage, this might be the hero image on that webpage.
+@property (nullable, strong, readonly) NSItemProvider *imageProvider;
+
+/// Provides an icon appropriate to represent the item.
+///
+/// This icon typically is a thumbnail-sized representation of the source of the content.
+/// For instance, if sharing a link to a webpage, this might be an icon representing the website overall.
+@property (nullable, strong, readonly) NSItemProvider *iconProvider;
+
+@end
+
+
+API_AVAILABLE(macos(13.0)) API_UNAVAILABLE(ios, watchos, tvos)
+@interface NSPreviewRepresentingActivityItem : NSObject <NSPreviewRepresentableActivityItem>
+
+/// - Parameters:
+/// - item: The item to share
+/// - title: A title to show in a preview
+/// - image: An image to show in a preview
+/// - icon: An icon to show in a preview
+///
+/// For more information about the parameters, see NSPreviewRepresentableActivityItem documentation
+
+- (instancetype)initWithItem:(id)item title:(nullable NSString *)title image:(nullable NSImage *)image icon:(nullable NSImage *)icon;
+
+/// - Parameters:
+/// - item: The item to share
+/// - title: A title to show in a preview
+/// - imageProvider: An NSItemProvider which provides an image to show in a preview
+/// - iconProvider: An NSItemProvider which provides an icon to show in a preview
+///
+/// For more information about the parameters, see NSPreviewRepresentableActivityItem documentation
+
+- (instancetype)initWithItem:(id)item title:(nullable NSString *)title imageProvider:(nullable NSItemProvider *)imageProvider iconProvider:(nullable NSItemProvider *)iconProvider NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+API_UNAVAILABLE_END
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSQuickDrawView.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSQuickDrawView.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSQuickDrawView.h 2022-02-17 00:12:57.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSQuickDrawView.h 1969-12-31 19:00:00.000000000 -0500
@@ -1,8 +0,0 @@
-/*
- NSQuickDrawView.h
- Application Kit
- Copyright (c) 1999-2021, Apple Inc.
- All rights reserved.
-*/
-
-#warning NSQuickDrawView is deprecated, and does not exist on 64-bit architectures. This header will be removed from the framework in a future release.
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h 2022-02-23 10:57:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h 2022-05-31 15:03:17.000000000 -0400
@@ -102,7 +102,7 @@
Returns a list of NSSharingServices which could share all the provided items together. sharingServicesForItems can be used to build a custom UI, or to populate a contextual NSMenu.
The items represent the objects to be shared and must conform to the <NSPasteboardWriting> protocol or be an NSItemProvider or an NSDocument. (e.g. NSString, NSImage, NSURL, etc.)
*/
-+ (NSArray<NSSharingService *> *)sharingServicesForItems:(NSArray *)items;
++ (NSArray<NSSharingService *> *)sharingServicesForItems:(NSArray *)items API_DEPRECATED("Use -[NSSharingServicePicker standardShareMenuItem] instead.", macos(10.8, 13.0));
/**
@@ -270,6 +270,11 @@
*/
- (void)showRelativeToRect:(NSRect)rect ofView:(NSView *)view preferredEdge:(NSRectEdge)preferredEdge;
+/**
+ * Returns a menu item suitable to display the picker for the given items.
+ */
+@property (readonly) NSMenuItem *standardShareMenuItem API_AVAILABLE(macos(13.0));
+
@end
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableRowView.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableRowView.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableRowView.h 2022-02-23 10:56:56.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableRowView.h 2022-05-31 15:03:14.000000000 -0400
@@ -40,7 +40,7 @@
/* Next and previous row selection state. Allows subclassers to draw selection differently based on the previous next row being selected. State is automatically updated by NSTableView, however, the changing of the state does not invalidate the row view. If a row view depends on this state, it should override the particular setter and call [self setNeedsDisplay:YES] before or after calling super.
*/
@property(getter=isPreviousRowSelected) BOOL previousRowSelected API_AVAILABLE(macos(10.10));
-@property(getter=isNextRowSelected) BOOL nextRowSelected;
+@property(getter=isNextRowSelected) BOOL nextRowSelected API_AVAILABLE(macos(10.10));
/* Floating is a temporary attribute that is set when a particular group row is actually floating above other rows. The state may change dynamically based on the position of the group row. Drawing may be different for rows that are currently 'floating'. The TableView's delegate must implement tableView:isGroupRow: (or outlineView:isGroupItem:) to enable floating group rows.
*/
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextElement.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextElement.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextElement.h 2022-02-23 10:56:57.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextElement.h 2022-05-31 15:03:14.000000000 -0400
// NSTextElement is an abstract base class for representing the smallest text layout unit typically paragraphs, tables, or attachments. A text element is associated with an NSTextContentManager.
API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
@@ -29,6 +29,18 @@
// Represents the range of the element inside the document.
@property (nullable, strong) NSTextRange *elementRange;
+
+#pragma mark Child Elements
+// A concrete NSTextElement subclass can be structured in a tree. An element can have zero or more child elements. This section provides interface for supporting such a configuration.
+// Returns an array of children. The array can contain zero or more elements.
+@property (readonly, copy) NSArray<__kindof NSTextElement *> *childElements API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos);
+
+// Returns the parent element if the receiver is a child.
+@property (nullable, readonly, weak) __kindof NSTextElement *parentElement API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos);
+
+// Returns YES if it is an element represented in text layout. It is enumerated by NSTextContentManager.
+@property (readonly) BOOL isRepresentedElement API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos);
+
@end
#pragma mark NSTextParagraph
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextList.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextList.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextList.h 2022-02-23 10:57:02.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextList.h 2022-05-31 15:03:19.000000000 -0400
@@ -1,55 +1,70 @@
-#if !__has_include(<UIFoundation/NSTextList.h>)
-/*
- NSTextList.h
- Copyright (c) 2004-2021, Apple Inc.
- All rights reserved.
+#if (defined(USE_APPKIT_PUBLIC_HEADERS) && USE_APPKIT_PUBLIC_HEADERS) || !__has_include(<UIFoundation/NSTextList.h>)
+#include <TargetConditionals.h>
- Class to represent text lists.
-*/
+#if !TARGET_OS_IPHONE
+//
+// NSTextList.h
+// Text Kit
+//
+// Copyright (c) 2004-2021, Apple Inc. All rights reserved.
#import <Foundation/NSObject.h>
#import <AppKit/AppKitDefines.h>
-NS_ASSUME_NONNULL_BEGIN
-#if !TARGET_OS_IPHONE
-
-typedef NSString * NSTextListMarkerFormat NS_TYPED_EXTENSIBLE_ENUM;
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerBox API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerCheck API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerCircle API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerDiamond API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerDisc API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerHyphen API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerSquare API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseHexadecimal API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseHexadecimal API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerOctal API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseAlpha API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseAlpha API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseLatin API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseLatin API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseRoman API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseRoman API_AVAILABLE(macos(10.13));
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerDecimal API_AVAILABLE(macos(10.13));
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+// NSTextList represents a stylistic format of a group of text list items belonging to the same nested level. It supports both ordered and unordered lists. The type of marker is defined by markerFormat.
typedef NS_OPTIONS(NSUInteger, NSTextListOptions) {
- NSTextListPrependEnclosingMarker = (1 << 0)
+ NSTextListPrependEnclosingMarker API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos) = (1 << 0), // All marker strings up to the top-level parent are concatenated to the marker string used by the text list item.
};
+typedef NSString * NSTextListMarkerFormat NS_TYPED_EXTENSIBLE_ENUM API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerBox API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerCheck API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerCircle API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerDiamond API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerDisc API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerHyphen API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerSquare API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseHexadecimal API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseHexadecimal API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerOctal API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseAlpha API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseAlpha API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseLatin API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseLatin API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseRoman API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseRoman API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerDecimal API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+
+API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos)
@interface NSTextList : NSObject <NSSecureCoding, NSCopying>
-- (instancetype)initWithMarkerFormat:(NSTextListMarkerFormat)format options:(NSUInteger)mask;
-@property (readonly, copy) NSTextListMarkerFormat markerFormat;
-@property (readonly) NSTextListOptions listOptions;
-- (NSString *)markerForItemNumber:(NSInteger)itemNum;
-@property NSInteger startingItemNumber API_AVAILABLE(macos(10.6));
+#pragma mark Initialization
+- (instancetype)initWithMarkerFormat:(NSTextListMarkerFormat)markerFormat options:(NSTextListOptions)options startingItemNumber:(NSInteger)startingItemNumber NS_DESIGNATED_INITIALIZER API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos);
+- (instancetype)initWithMarkerFormat:(NSTextListMarkerFormat)markerFormat options:(NSUInteger)options;
-@end
+- (nullable instancetype) initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
+
+#pragma mark Properties
+@property (readonly, strong) NSTextListMarkerFormat markerFormat;
+@property (readonly) NSTextListOptions listOptions;
+#pragma mark Ordered List
+// When > 0, it is used to define the starting value for a group of ordered text list.
+@property NSInteger startingItemNumber;
+
+// Yes if markerFormat is an ordered text list type
+@property (readonly, getter=isOrdered) BOOL ordered API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos);
+
+#pragma mark Resolved Marker String
+// Returns the marker corresponding to itemNumber. itemNumber is ignored if < 1 or isOrdered==NO.
+- (NSString *)markerForItemNumber:(NSInteger)itemNumber;
+@end
+NS_HEADER_AUDIT_END(nullability, sendability)
#endif // !TARGET_OS_IPHONE
-NS_ASSUME_NONNULL_END
#else
#import <UIFoundation/NSTextList.h>
#endif
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextListElement.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextListElement.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextListElement.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextListElement.h 2022-05-31 15:03:13.000000000 -0400
@@ -0,0 +1,59 @@
+#if (defined(USE_APPKIT_PUBLIC_HEADERS) && USE_APPKIT_PUBLIC_HEADERS) || !__has_include(<UIFoundation/NSTextListElement.h>)
+#include <TargetConditionals.h>
+
+#if !TARGET_OS_IPHONE
+//
+// NSTextListElement.h
+// Text Kit
+//
+// Copyright (c) 2021, Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <AppKit/NSTextElement.h>
+
+@class NSTextList;
+
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+// NSTextListElement is a concrete subclass of NSTextElement representing a text list node. It can contain an array of child element. A text list can be represented by a tree of NSTextListElements.
+#pragma mark NSTextListElement
+
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos)
+@interface NSTextListElement : NSTextParagraph
+#pragma mark Initializer
+// Designated initializer. Initializes 2 types of NSTextListElement: a standard list item and nesting parent element. Either of contents, markerAttributes, or childElements must be non-nil. Clients should typically use one of 2 factory methods below for instantiating with a specific type. When markerAttributes!=nil, it will be used to format the marker; otherwise, it is derived from contents.
+- (instancetype)initWithParentElement:(nullable NSTextListElement *)parentElement textList:(NSTextList *)textList contents:(nullable NSAttributedString *)contents markerAttributes:(nullable NSDictionary<NSAttributedStringKey, id> *)markerAttributes childElements:(nullable NSArray<NSTextListElement *> *)childElements NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)initWithAttributedString:(nullable NSAttributedString *)attributedString NS_UNAVAILABLE;
+
+// Instantiates a standard text list.
++ (instancetype)textListElementWithContents:(NSAttributedString *)contents markerAttributes:(nullable NSDictionary<NSAttributedStringKey, id> *)markerAttributes textList:(NSTextList *)textList childElements:(nullable NSArray<NSTextListElement *> *)childElements;
+
+// Returns an instance with childElements without contents. Returns nil if childElements.count == 0. nestingLevel specifies the number of shifts represented by the tree elements returned. Raises an exception when nestingLevel < 0. textList specifies NSTextList used by the new instance.
++ (nullable instancetype)textListElementWithChildElements:(NSArray<NSTextListElement *> *)childElements textList:(NSTextList *)textList nestingLevel:(NSInteger)nestingLevel;
+
+#pragma mark Properties
+@property (readonly, strong) NSTextList *textList;
+
+// Element contents
+@property (nullable, readonly, strong) NSAttributedString *contents; // The text list element contents without markers and formatting.
+
+@property (nullable, readonly, strong) NSDictionary<NSAttributedStringKey, id> *markerAttributes; // Attributes defining the text formatting of marker string inside attributedString.
+
+@property (strong, readonly) NSAttributedString *attributedString; // The contents intended to be displayed. Derived from contents/textList configured with the text list element's position inside the tree. It is overriding its superclass implementation, NSTextParagraph.attributedString
+
+#pragma mark Child Elements
+// NSTextListElement has children of the same type.
+@property (readonly, copy) NSArray<NSTextListElement *> *childElements;
+
+// NSTextListElement has the parent of the same type.
+@property (nullable, readonly, weak) NSTextListElement *parentElement;
+@end
+
+NS_HEADER_AUDIT_END(nullability, sendability)
+
+#endif // !TARGET_OS_IPHONE
+#else
+#import <UIFoundation/NSTextListElement.h>
+#endif
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h 2022-02-23 10:57:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h 2022-05-31 15:03:18.000000000 -0400
@@ -658,8 +658,8 @@
APPKIT_EXTERN NSNotificationName NSTextViewDidChangeTypingAttributesNotification;
-APPKIT_EXTERN NSNotificationName NSTextViewWillSwitchToNSLayoutManagerNotification;
-APPKIT_EXTERN NSNotificationName NSTextViewDidSwitchToNSLayoutManagerNotification;
+APPKIT_EXTERN NSNotificationName NSTextViewWillSwitchToNSLayoutManagerNotification API_AVAILABLE(macos(12.0));
+APPKIT_EXTERN NSNotificationName NSTextViewDidSwitchToNSLayoutManagerNotification API_AVAILABLE(macos(12.0));
/* These constants are deprecated in favor of their NSTextFinder equivalents. */
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbar.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbar.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbar.h 2022-02-23 10:56:55.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbar.h 2022-05-31 15:03:13.000000000 -0400
@@ -13,6 +13,9 @@
typedef NSString * NSToolbarIdentifier NS_SWIFT_BRIDGED_TYPEDEF API_AVAILABLE(ios(13.0));
typedef NSString * NSToolbarItemIdentifier NS_TYPED_EXTENSIBLE_ENUM API_AVAILABLE(ios(13.0));
+typedef NSString * NSToolbarUserInfoKey NS_TYPED_ENUM;
+APPKIT_EXTERN NSToolbarUserInfoKey const NSToolbarItemKey API_AVAILABLE(macos(13.0));
+
@class NSToolbarItem, NSWindow, NSView;
@protocol NSToolbarDelegate;
@@ -28,7 +31,7 @@
NSToolbarSizeModeDefault,
NSToolbarSizeModeRegular,
NSToolbarSizeModeSmall
-};
+} API_DEPRECATED("NSToolbarSizeMode is no longer recommended and will be ignored in the future", macos(10.0, API_TO_BE_DEPRECATED));
API_AVAILABLE(ios(13.0)) NS_SWIFT_UI_ACTOR
@interface NSToolbar : NSObject
@@ -61,7 +64,7 @@
/* Sets the toolbar's selected item by identifier. Use this to force an item identifier to be selected. Toolbar manages selection of image items automatically. This method can be used to select identifiers of custom view items, or to force a selection change. (see toolbarSelectableItemIdentifiers: delegate method for more details). */
@property (nullable, copy) NSToolbarItemIdentifier selectedItemIdentifier;
-@property NSToolbarSizeMode sizeMode API_UNAVAILABLE(ios);
+@property NSToolbarSizeMode sizeMode API_UNAVAILABLE(ios) API_DEPRECATED("NSToolbarSizeMode is no longer recommended and will be ignored in the future", macos(10.0, API_TO_BE_DEPRECATED));
/* Use this API to hide the baseline NSToolbar draws between itself and the main window contents. The default is YES. This method should only be used before the toolbar is attached to its window (-[NSWindow setToolbar:]).
*/
@@ -82,12 +85,19 @@
/* Allows you to access the current visible items (non clipped). */
@property (nullable, readonly, copy) NSArray<__kindof NSToolbarItem *> *visibleItems;
+/**
+ Items with centered identifiers will be centered together in the Toolbar relative to the window assuming space allows. The order of items is initially defined by the default set of identifiers, but may be customized by the user. Centered items may not be moved outside of the center set of items by the user.
+
+ This property is archived.
+ */
+@property (copy) NSSet<NSToolbarItemIdentifier> *centeredItemIdentifiers API_AVAILABLE(macos(13.0), ios(16.0));
+
/*
The item with the specified identifier will be positioned in the absolute center of the Toolbar relative to the window assuming space allows. When the window shrinks, the highest priority is to have the most items visible. Thus, centering is broken first (it'll be pushed off to the left/right as necessary). Next, items will be shrunk down a little at a time towards their min size, at the same rate. Finally, items will be removed based on their visibility priority.
This property is archived.
*/
-@property (nullable, copy) NSToolbarItemIdentifier centeredItemIdentifier API_AVAILABLE(macos(10.14));
+@property (nullable, copy) NSToolbarItemIdentifier centeredItemIdentifier API_DEPRECATED("Use the centeredItemIdentifiers property instead", macos(10.14, API_TO_BE_DEPRECATED));
// ----- Autosaving The Configuration -----
@@ -103,7 +113,8 @@
// ----- Validation of the items -----
/* Typically you should not invoke this method. This method is called on window updates with the purpose of validating
- each of the visible items. The toolbar will iterate through the list of visible items, sending each a -validate message. */
+ each of the visible items. The toolbar will iterate through the list of visible items, sending each a -validate message.
+ If this method is invoked directly, all visible items including those with autovalidates disabled will get a -validate message. */
- (void)validateVisibleItems API_UNAVAILABLE(ios);
// ----- Extension toolbar items -----
@@ -133,12 +144,18 @@
/* Optional method. Those wishing to indicate item selection in a toolbar should implement this method to return a non-empty array of selectable item identifiers. If implemented, the toolbar will remember and display the selected item with a special highlight. A selected item is one whose item identifier matches the current selected item identifier. Clicking on an item whose identifier is selectable will automatically update the toolbar's selectedItemIdentifier when possible. (see setSelectedItemIdentifier: for more details) */
- (NSArray<NSToolbarItemIdentifier> *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar;
+/// Items in this set cannot be dragged or removed by the user
+- (NSSet<NSToolbarItemIdentifier> *)toolbarImmovableItemIdentifiers:(NSToolbar *)toolbar API_AVAILABLE(macos(13.0), ios(16.0));
+
+/// Whether or not an item can be moved to a specified position in the toolbar. If implemented, this method will be called during a user drag and does not necessarily indicate the final position of an item. An index of NSNotFound indicates the item would be removed from the toolbar
+- (BOOL)toolbar:(NSToolbar *)toolbar itemIdentifier:(NSToolbarItemIdentifier)itemIdentifier canBeInsertedAtIndex:(NSInteger)index API_AVAILABLE(macos(13.0), ios(16.0));
+
/* Notifications */
-/* Before a new item is added to the toolbar, this notification is posted. This is the best place to notice a new item is going into the toolbar. For instance, if you need to cache a reference to the toolbar item or need to set up some initial state, this is the best place to do it. The notification object is the toolbar to which the item is being added. The item being added is found by referencing the @"item" key in the userInfo. */
+/* Before a new item is added to the toolbar, this notification is posted. This is the best place to notice a new item is going into the toolbar. For instance, if you need to cache a reference to the toolbar item or need to set up some initial state, this is the best place to do it. The notification object is the toolbar to which the item is being added. The item being added is found by referencing the NSToolbarItemKey in the userInfo. */
- (void)toolbarWillAddItem:(NSNotification *)notification;
-/* After an item is removed from a toolbar the notification is sent. This allows the chance to tear down information related to the item that may have been cached. The notification object is the toolbar from which the item is being removed. The item being removed is found by referencing the @"item" key in the userInfo. */
+/* After an item is removed from a toolbar the notification is sent. This allows the chance to tear down information related to the item that may have been cached. The notification object is the toolbar from which the item is being removed. The item being removed is found by referencing the NSToolbarItemKey in the userInfo. */
- (void)toolbarDidRemoveItem:(NSNotification *)notification;
@end
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItem.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItem.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItem.h 2022-02-23 10:56:59.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItem.h 2022-05-31 15:03:16.000000000 -0400
@@ -48,6 +48,11 @@
/* Use this to set the item's label that appears when the item is in the customization palette. All Items must have a palette label, and for most things it is reasonable to set them to the same string as the label used in the toolbar. */
@property (copy) NSString *paletteLabel;
+/**
+ An array of all alternate labels this item may display. The item will use the size of the longest label to prevent resizing when the label is changed.
+ */
+@property (copy) NSSet<NSString *> *possibleLabels API_AVAILABLE(macos(13.0));
+
/* Use this to set a tooltip to be used when the item is displayed in the toolbar. (forwards to -view if it responds) */
@property (nullable, copy) NSString *toolTip;
@@ -90,6 +95,12 @@
/* Use setView: if you want your toolbar item to use something other than the standard. Note that, by default, many of the set/get methods will be implemented by calls forwarded to the view you set, if it responds to it. */
@property (nullable, strong) NSView *view API_UNAVAILABLE(ios);
+/**
+ An item is visible if it is present in the NSToolbar and not in the overflow menu.
+ This property is key value observable.
+ */
+@property (readonly, getter=isVisible) BOOL visible API_AVAILABLE(macos(12.0), ios(16.0));
+
/*
Unless you have already set your own custom view, you should not call these methods.
The min size should be small enough to look nice in all display modes.
@@ -109,7 +120,7 @@
- (void)validate API_AVAILABLE(ios(13.0));
-/* By default NSToolbar automatically invokes its items validate method on a regular basis. To be in complete control of when the -validate method is invoked, you can disable automatic validation on a per-item basis. In particular, if your validation code is slow, you may want to do this for performance reasons. */
+/* This property only affects automatic validation performed by NSToolbar. Explicit validation requests, such as the `-[NSToolbar validateVisibleItems]` method, will invoke the `-validate` method even if `autovalidates` is `NO`. */
@property BOOL autovalidates API_AVAILABLE(ios(13.0));
@@ -150,22 +161,38 @@
#endif
-/* standard toolbar item identifiers */
+/*
+ These are the standard toolbar item identifiers that AppKit will automatically create when they appear in the default or allowed item sets. As such, the delegate method -toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar: will not be called for these items.
+ */
-APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarSeparatorItemIdentifier API_DEPRECATED("This item is no longer recommended and will be ignored on 10.7 and later.", macos(10.0, 11.0)) API_UNAVAILABLE(ios);
+/* A space item of a standard fixed size. */
APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarSpaceItemIdentifier API_AVAILABLE(ios(13.0));
+
+/* A space item of flexible width. */
APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarFlexibleSpaceItemIdentifier API_AVAILABLE(ios(13.0));
-APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarShowColorsItemIdentifier API_AVAILABLE(ios(13.0)); // Shows the color panel.
-APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarShowFontsItemIdentifier API_AVAILABLE(ios(13.0)); // Shows the font panel.
-APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarCustomizeToolbarItemIdentifier API_DEPRECATED("This item is no longer recommended and will be ignored on 10.7 and later.", macos(10.0, 11.0)) API_UNAVAILABLE(ios);
-APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarPrintItemIdentifier API_AVAILABLE(ios(13.0)); // Sends printDocument: to firstResponder, but you can change this in toolbarWillAddItem: if you need to do so.
-APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarToggleSidebarItemIdentifier API_AVAILABLE(macos(10.11), ios(13.0)); // A standard toolbar item identifier for sidebars. It sends -toggleSidebar: to the firstResponder.
-APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarCloudSharingItemIdentifier API_AVAILABLE(macos(10.12)); // A standard toolbar item identifier for cloud sharing via NSSharingServiceNameCloudSharing. It validates itself and modifies its appearance by using the NSCloudSharingValidation protocol. It sends -performCloudSharing: to the firstResponder.
+/* A standard item that is configured to show the color panel when invoked. */
+APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarShowColorsItemIdentifier API_AVAILABLE(ios(13.0));
-/*
-Creates a new NSTrackingSeparatorToolbarItem and automatically configures it to track the divider of the sidebar if one is discovered.
-*/
+/* A standard item that is configured to show the font panel when invoked. */
+APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarShowFontsItemIdentifier API_AVAILABLE(ios(13.0));
+
+/* A standard item that is configured to send -printDocument: to the firstResponder when invoked */
+APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarPrintItemIdentifier API_AVAILABLE(ios(13.0));
+
+/* A standard item that is configured to send -toggleSidebar: to the firstResponder when invoked. */
+APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarToggleSidebarItemIdentifier API_AVAILABLE(macos(10.11), ios(13.0));
+
+/* A standard item for cloud sharing via NSSharingServiceNameCloudSharing. It validates itself and modifies its appearance by using the NSCloudSharingValidation protocol. It sends -performCloudSharing: to the firstResponder. */
+APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarCloudSharingItemIdentifier API_AVAILABLE(macos(10.12));
+
+/* Creates a new NSTrackingSeparatorToolbarItem and automatically configures it to track the divider of the sidebar if one is discovered. */
APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarSidebarTrackingSeparatorItemIdentifier API_AVAILABLE(macos(11.0)) API_UNAVAILABLE(ios);
+/*
+ Deprecated Item Identifiers
+ */
+APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarSeparatorItemIdentifier API_DEPRECATED("This item is no longer recommended and will be ignored on 10.7 and later.", macos(10.0, 11.0)) API_UNAVAILABLE(ios);
+APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarCustomizeToolbarItemIdentifier API_DEPRECATED("This item is no longer recommended and will be ignored on 10.7 and later.", macos(10.0, 11.0)) API_UNAVAILABLE(ios);
+
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h 2022-02-23 10:57:04.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h 2022-05-31 15:03:21.000000000 -0400
@@ -230,14 +230,6 @@
*/
@property BOOL wantsRestingTouches API_AVAILABLE(macos(10.6));
-- (void)addCursorRect:(NSRect)rect cursor:(NSCursor *)object;
-- (void)removeCursorRect:(NSRect)rect cursor:(NSCursor *)object;
-- (void)discardCursorRects;
-- (void)resetCursorRects;
-
-- (NSTrackingRectTag)addTrackingRect:(NSRect)rect owner:(id)owner userData:(nullable void *)data assumeInside:(BOOL)flag;
-- (void)removeTrackingRect:(NSTrackingRectTag)tag;
-
- (CALayer *)makeBackingLayer API_AVAILABLE(macos(10.6));
/* Get and set how the layer should redraw when resizing and redisplaying. Prior to 10.8, the default value was always set to NSViewLayerContentsRedrawDuringViewResize when an AppKit managed layer was created. In 10.8 and higher, the value is initialized to the appropriate thing for each individual AppKit view. Generally, the default value is NSViewLayerContentsRedrawOnSetNeedsDisplay if the view responds YES to -wantsUpdateLayer. Otherwise, the value is usually NSViewLayerContentsRedrawDuringViewResize, indicating that the view needs to redraw on each step of an animation via a setFrame: change. On 10.8, the value is not encoded by the view.
@@ -284,16 +276,6 @@
@property (nullable, copy) NSShadow *shadow API_AVAILABLE(macos(10.5));
-/* The following methods are meant to be invoked, and probably don't need to be overridden
-*/
-- (void)addTrackingArea:(NSTrackingArea *)trackingArea API_AVAILABLE(macos(10.5));
-- (void)removeTrackingArea:(NSTrackingArea *)trackingArea API_AVAILABLE(macos(10.5));
-@property (readonly, copy) NSArray<NSTrackingArea *> *trackingAreas API_AVAILABLE(macos(10.5));
-
-/* updateTrackingAreas should be overridden to remove out of date tracking areas and add recomputed tracking areas, and should call super.
-*/
-- (void)updateTrackingAreas API_AVAILABLE(macos(10.5));
-
@property BOOL postsBoundsChangedNotifications;
@property (nullable, readonly, strong) NSScrollView *enclosingScrollView;
@@ -564,6 +546,28 @@
@end
+@interface NSView(NSTrackingArea)
+/* The following methods are meant to be invoked, and probably don't need to be overridden
+*/
+- (void)addTrackingArea:(NSTrackingArea *)trackingArea API_AVAILABLE(macos(10.5));
+- (void)removeTrackingArea:(NSTrackingArea *)trackingArea API_AVAILABLE(macos(10.5));
+@property (readonly, copy) NSArray<NSTrackingArea *> *trackingAreas API_AVAILABLE(macos(10.5));
+
+/* updateTrackingAreas should be overridden to remove out of date tracking areas and add recomputed tracking areas, and should call super.
+*/
+- (void)updateTrackingAreas API_AVAILABLE(macos(10.5));
+
+/* The following methods are soft deprecated. Use the above NSTrackingArea API instead
+*/
+- (void)addCursorRect:(NSRect)rect cursor:(NSCursor *)object;
+- (void)removeCursorRect:(NSRect)rect cursor:(NSCursor *)object;
+- (void)discardCursorRects;
+- (void)resetCursorRects;
+
+- (NSTrackingRectTag)addTrackingRect:(NSRect)rect owner:(id)owner userData:(nullable void *)data assumeInside:(BOOL)flag;
+- (void)removeTrackingRect:(NSTrackingRectTag)tag;
+@end
+
@interface NSView(NSDeprecated)
- (void)dragImage:(NSImage *)image at:(NSPoint)viewLocation offset:(NSSize)initialOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pboard source:(id)sourceObj slideBack:(BOOL)slideFlag API_DEPRECATED("Use -beginDraggingSessionWithItems:event:source: instead", macos(10.0,10.7));
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h 2022-02-23 10:57:03.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h 2022-05-31 15:03:20.000000000 -0400
@@ -579,7 +579,7 @@
@property (nullable, strong) NSToolbar *toolbar;
- (void)toggleToolbarShown:(nullable id)sender;
- (void)runToolbarCustomizationPalette:(nullable id)sender;
-@property BOOL showsToolbarButton; // Does nothing in recent versions of the OS
+@property BOOL showsToolbarButton API_DEPRECATED("This property has no effect", macos(10.0, API_TO_BE_DEPRECATED));
#pragma mark - Automatic Window Tabbing
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status
- xcode16.1 Binding Status
- xcode16.2 Binding Status