Skip to content

AppKit macOS xcode16.0 b1

Rolf Bjarne Kvinge edited this page Jun 21, 2024 · 2 revisions

#AppKit.framework

Rolf

diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAdaptiveImageGlyph.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAdaptiveImageGlyph.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAdaptiveImageGlyph.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAdaptiveImageGlyph.h	2024-06-01 03:52:50
@@ -0,0 +1,49 @@
+#if (defined(USE_APPKIT_PUBLIC_HEADERS) && USE_APPKIT_PUBLIC_HEADERS) || !__has_include(<UIFoundation/NSAdaptiveImageGlyph.h>)
+#include <TargetConditionals.h>
+
+#if !TARGET_OS_IPHONE
+//
+//  NSAdaptiveImageGlyph.h
+//  Text Kit
+//
+//  Copyright (c) 2024, Apple Inc. All rights reserved.
+//
+
+#import <Foundation/NSAttributedString.h>
+#import <CoreText/CTRunDelegate.h>
+#import <AppKit/AppKitDefines.h>
+
+@protocol CTAdaptiveImageProviding;
+@class UTType;
+
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+// NSAdaptiveImageGlyph is a data model object representing an image containing multiple resolutions and representations conforming to the image format described by NSAdaptiveImageGlyph.contentType. It can be applied to a range of text with NSAttributedString.Key.adaptiveImageGlyph (NSAdaptiveImageGlyphAttributeName).
+
+API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0)) NS_SWIFT_SENDABLE
+@interface NSAdaptiveImageGlyph : NSObject <NSCopying, NSSecureCoding, CTAdaptiveImageProviding>
+
+- (instancetype)initWithImageContent:(NSData*)imageContent NS_DESIGNATED_INITIALIZER; // Initialization: imageContent must conform to the image data format identified by contentType
+- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
+- (instancetype)init NS_UNAVAILABLE;
+
+@property (readonly) NSData *imageContent;
+
+// Unique identifier, derived from the underlying image data which can be used as a persistent / durable way to reference the content represented by this adaptive image glyph instance.
+@property (readonly) NSString *contentIdentifier;
+
+// Brief textual alternate representation of the represented contents, useful for non-graphical depiction of the image data or searching.  Note that the value of this property is derived from the underlying image data.
+@property (readonly, copy) NSString *contentDescription;
+
+@property (class, readonly) UTType *contentType; // A UTType identifying the image data format
+@end
+
+@interface NSAttributedString (NSAttributedStringAdaptiveImageGlyphConveniences)
+// A convenience method for creating an attributed string containing an NSAdaptiveImageGlyph with attributes using NSAttachmentCharacter as the base character.
++ (instancetype)attributedStringWithAdaptiveImageGlyph:(NSAdaptiveImageGlyph *)adaptiveImageGlyph attributes:(NSDictionary<NSAttributedStringKey, id> *)attributes API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+@end
+NS_HEADER_AUDIT_END(nullability, sendability)
+#endif // !TARGET_OS_IPHONE
+#else
+#import <UIFoundation/NSAdaptiveImageGlyph.h>
+#endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h	2024-04-25 05:49:40
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h	2024-06-01 03:52:55
@@ -1,146 +1,267 @@

 /************************ Attributes ************************/
 
 // Predefined character attributes for text. If the key is not present in the dictionary, it indicates the default value described below.

+// NSTextHighlightStyleAttributeName is a character-level NSAttributedStringKey for decorating a section of text highlighted for emphasis.
+APPKIT_EXTERN NSAttributedStringKey const NSTextHighlightStyleAttributeName API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0)); // NSTextHighlightStyle, default nil: no highlight
 
+// NSTextHighlightColorSchemeAttributeName is a character-level NSAttributedStringKey for specifying the color scheme used by NSTextHighlightStyleAttributeName at the same range.
+APPKIT_EXTERN NSAttributedStringKey const NSTextHighlightColorSchemeAttributeName API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0)); // The default color scheme. The color is based on the tint/accent color for the rendering context. By default UIKit uses UIView.tintColor and AppKit uses NSColor.controlAccentColor.
 
+APPKIT_EXTERN NSAttributedStringKey const NSAdaptiveImageGlyphAttributeName API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0)); // NSAdaptiveImageGlyph, default nil
 
 /************************ Attribute values ************************/
 // This defines currently supported values for NSUnderlineStyleAttributeName and NSStrikethroughStyleAttributeName. These values are or'ed together to produce an underline style.
 // Underlines will be drawn with a solid pattern by default, so NSUnderlineStylePatternSolid does not need to be specified.
 typedef NS_OPTIONS(NSInteger, NSUnderlineStyle) {
 
+// NSTextHighlightStyleAttributeName values
+typedef NSString * NSTextHighlightStyle NS_TYPED_EXTENSIBLE_ENUM API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+APPKIT_EXTERN NSTextHighlightStyle const NSTextHighlightStyleDefault API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0)); // The system-defined default highlight type. Supported only with TextKit2
 
+// NSTextHighlightColorSchemeAttributeName values
+typedef NSString * NSTextHighlightColorScheme NS_TYPED_EXTENSIBLE_ENUM API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+APPKIT_EXTERN NSTextHighlightColorScheme const NSTextHighlightColorSchemeDefault API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0)); // The system-defined default highlight type. Supported only with TextKit2
+APPKIT_EXTERN NSTextHighlightColorScheme const NSTextHighlightColorSchemePurple API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+APPKIT_EXTERN NSTextHighlightColorScheme const NSTextHighlightColorSchemePink API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+APPKIT_EXTERN NSTextHighlightColorScheme const NSTextHighlightColorSchemeOrange API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+APPKIT_EXTERN NSTextHighlightColorScheme const NSTextHighlightColorSchemeMint API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+APPKIT_EXTERN NSTextHighlightColorScheme const NSTextHighlightColorSchemeBlue API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+
+
[...]

+
+// NSHTMLTextDocumentType document attributes
+

+// Document text scaling and Cocoa version
+// They are document attributes used by read/write methods.
+
+
+typedef NSString * NSAttributedStringDocumentReadingOptionKey NS_TYPED_EXTENSIBLE_ENUM API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));
+
+/************************ Misc methods ************************/
+@interface NSAttributedString (NSAttributedStringKitAdditions)
+
+// Returns YES when any attribute preferring RTFD found in range. This method should be preferred over containsAttachmentsInRange() for determining its preferred external document format.
+- (BOOL)prefersRTFDInRange:(NSRange)range API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+@end
+
+NS_HEADER_AUDIT_END(nullability, sendability)
+
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCursor.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCursor.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCursor.h	2024-04-25 05:49:37
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCursor.h	2024-06-01 03:52:53
@@ -20,41 +21,8 @@
 API_AVAILABLE(macos(10.0), ios(13.0))
 @interface NSCursor : NSObject <NSSecureCoding>
 
-@property (class, readonly, nullable, strong) NSCursor *currentSystemCursor API_AVAILABLE(macos(10.6));
-
 #if !TARGET_OS_IPHONE
 - (instancetype)initWithImage:(NSImage *)newImage hotSpot:(NSPoint)point NS_DESIGNATED_INITIALIZER;
 #else
@@ -74,14 +39,130 @@
 #endif
 - (void)set;
 
+// MARK: - Retrieving Cursor Instances
+
+/// Returns the application’s current cursor.
+/// - Note: This isn’t necessarily the cursor that is currently being displayed, as the system may be showing the cursor for another running application.
+
+
+/// Returns the zoom-in cursor.
+/// - Note: This cursor is used to indicate zooming in on (magnifying) a canvas or object.
+@property (class, readonly, strong) NSCursor *zoomInCursor API_AVAILABLE(macos(15.0));
+
+/// Returns the zoom-out cursor.
+/// - Note: This cursor is used to indicate zooming out of a canvas or object.
+@property (class, readonly, strong) NSCursor *zoomOutCursor API_AVAILABLE(macos(15.0));
+
+// MARK: Column Resize Cursors
+
+/// Returns the cursor for resizing a column (vertical divider) in either direction.
+@property (class, readonly, strong) NSCursor *columnResizeCursor NS_SWIFT_NAME(columnResize) API_AVAILABLE(macos(15.0));
+
+/// Returns the cursor for resizing a column (vertical divider) in the specified directions.
+/// - Parameter directions: The direction in which a column can be resized.
++ (NSCursor *)columnResizeCursorInDirections:(NSHorizontalDirections)directions NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+// MARK: Row Resize Cursors
+
+/// Returns the cursor for resizing a row (horizontal divider) in either direction.
+@property (class, readonly, strong) NSCursor *rowResizeCursor NS_SWIFT_NAME(rowResize) API_AVAILABLE(macos(15.0));
+
+/// Returns the cursor for resizing a row (horizontal divider) in the specified directions.
+/// - Parameter directions: The direction in which a row can be resized.
++ (NSCursor *)rowResizeCursorInDirections:(NSVerticalDirections)directions NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+// MARK: Frame Resize Cursors
+
+/// The position along the perimeter of a rectangular frame (its edges and corners) from which it’s resized.
+typedef NS_CLOSED_ENUM(NSUInteger, NSCursorFrameResizePosition) {
+    /// The top edge of the frame.
+    NSCursorFrameResizePositionTop = (1 << 0),
+    /// The left edge of the frame.
+    NSCursorFrameResizePositionLeft = (1 << 1),
+    /// The bottom edge of the frame.
+    NSCursorFrameResizePositionBottom = (1 << 2),
+    /// The right edge of the frame.
+    NSCursorFrameResizePositionRight = (1 << 3),
+    /// The top left corner of the frame.
+    NSCursorFrameResizePositionTopLeft = (NSCursorFrameResizePositionTop | NSCursorFrameResizePositionLeft),
+    /// The top right corner of the frame.
+    NSCursorFrameResizePositionTopRight = (NSCursorFrameResizePositionTop | NSCursorFrameResizePositionRight),
+    /// The bottom left corner of the frame.
+    NSCursorFrameResizePositionBottomLeft = (NSCursorFrameResizePositionBottom | NSCursorFrameResizePositionLeft),
+    /// The bottom right corner of the frame.
+    NSCursorFrameResizePositionBottomRight = (NSCursorFrameResizePositionBottom | NSCursorFrameResizePositionRight),
+} NS_SWIFT_NAME(NSCursor.FrameResizePosition) API_AVAILABLE(macos(15.0));
+
+/// The directions in which a rectangular frame can be resized.
+typedef NS_OPTIONS(NSUInteger, NSCursorFrameResizeDirections) {
+    /// Indicates that the shape can be resized inwards to be smaller.
+    NSCursorFrameResizeDirectionsInward = (1 << 0),
+    /// Indicates that the shape can be resized outwards to be larger.
+    NSCursorFrameResizeDirectionsOutward = (1 << 1),
+    /// Indicates that the shape can be resized inwards or wards to be either smaller or larger, respectively.
+    NSCursorFrameResizeDirectionsAll = (NSCursorFrameResizeDirectionsInward | NSCursorFrameResizeDirectionsOutward),
+} NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+/// Returns the cursor for resizing a rectangular frame from the specified edge or corner.
+/// - Parameters:
+///   - position: The position along the perimeter of a rectangular frame (its edges and corners) from which it’s resized.
+///   - directions: The directions in which a rectangular frame can be resized.
++ (NSCursor *)frameResizeCursorFromPosition:(NSCursorFrameResizePosition)position inDirections:(NSCursorFrameResizeDirections)directions NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
 @end
 
+// MARK: - Deprecated
+
 APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
 static const NSAppKitVersion NSAppKitVersionNumberWithCursorSizeSupport = 682.0;
+API_UNAVAILABLE_END
+
+@interface NSCursor (Deprecated)
+/// This property will always be `nil` in a future version of macOS.
+@property (class, readonly, nullable, strong) NSCursor *currentSystemCursor API_DEPRECATED("No longer recommended. Use ScreenCaptureKit to capture the screen. Use the `showsCursor` property on `SCStreamConfiguration` to control whether or not to include the cursor in the capture. Or, use `NSCursor.currentCursor` if needing to just get the current cursor for this application.", macos(10.6, API_TO_BE_DEPRECATED));
+@end
+
+APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
 @interface NSCursor (NSDeprecated)
 - (instancetype)initWithImage:(NSImage *)newImage foregroundColorHint:(nullable NSColor *)fg backgroundColorHint:(nullable NSColor *)bg hotSpot:(NSPoint)hotSpot API_DEPRECATED("Color hints are ignored. Use -initWithImage:hotSpot: instead", macos(10.0,10.12));
 - (void)setOnMouseExited:(BOOL)flag API_DEPRECATED("setOnMouseExited is unused and should not be called", macos(10.0,10.13));
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDirection.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDirection.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDirection.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDirection.h	2024-06-01 03:52:52
@@ -0,0 +1,32 @@
+/*
+ NSDirection.h
+ Application Kit
+ Copyright (c) 2024, Apple Inc.
+ All rights reserved.
+ */
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// The absolute directions on the horizontal axis.
+typedef NS_OPTIONS(NSUInteger, NSHorizontalDirections) {
+    /// The left direction.
+    NSHorizontalDirectionsLeft = (1 << 0),
+    /// The right direction.
+    NSHorizontalDirectionsRight = (1 << 1),
+    /// All horizontal directions (left and right).
+    NSHorizontalDirectionsAll = (NSHorizontalDirectionsLeft | NSHorizontalDirectionsRight),
+} NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+/// The directions on the vertical axis.
+typedef NS_OPTIONS(NSUInteger, NSVerticalDirections) {
+    /// The upwards direction.
+    NSVerticalDirectionsUp = (1 << 0),
+    /// The downward direction.
+    NSVerticalDirectionsDown = (1 << 1),
+    /// All vertical directions (up and down).
+    NSVerticalDirectionsAll = (NSVerticalDirectionsUp | NSVerticalDirectionsDown),
+} NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDocument.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDocument.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDocument.h	2024-04-25 05:49:39
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDocument.h	2024-06-01 03:52:55
@@ -361,15 +361,15 @@
 */
-@property (readonly) BOOL shouldRunSavePanelWithAccessoryView;
+@property (readonly) BOOL savePanelShowsFileFormatsControl API_AVAILABLE(macos(15.0));
 
 /* Given the save panel that -runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo: is about to present to the user, make any final changes before it is presented, and return YES for success. Return NO for failure, to cancel the save operation. The default implementation of this method just returns YES.
 */
@@ -833,6 +833,10 @@
 @end
 
 @interface NSDocument(NSDeprecated)
+
+/* APIs that will be deprecated in an imminent future release.
+*/
+@property (readonly) BOOL shouldRunSavePanelWithAccessoryView API_DEPRECATED_WITH_REPLACEMENT("savePanelShowsFileFormatsControl", macos(10.0, API_TO_BE_DEPRECATED));
 
 #pragma mark *** Backward Compatibility ***
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphicsContext.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphicsContext.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphicsContext.h	2024-04-25 05:49:40
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphicsContext.h	2024-06-01 03:52:56
@@ -42,9 +42,6 @@
 // Instantiates from an appropriate concrete subclass depending on NSGraphicsContextDestinationAttributeName attribute
 + (nullable NSGraphicsContext *)graphicsContextWithAttributes:(NSDictionary<NSGraphicsContextAttributeKey, id> *)attributes;
 
-// Convenience cover method for [NSGraphicsContext graphicsContextWithAttributes:[NSDictionary dictionaryWithObject:<NSWindow instance> forKey:NSGraphicsContextDestinationAttributeName]]
-+ (NSGraphicsContext *)graphicsContextWithWindow:(NSWindow *)window;
-
 /* Convenience cover method for [NSGraphicsContext graphicsContextWithAttributes:[NSDictionary dictionaryWithObject:<NSBitmapImageRep instance> forKey:NSGraphicsContextDestinationAttributeName]]. Only NSBitmapImageRep instances with isPlanar == NO are supported.
 */
 + (nullable NSGraphicsContext *)graphicsContextWithBitmapImageRep:(NSBitmapImageRep *)bitmapRep;
@@ -108,6 +105,8 @@
 
 + (NSGraphicsContext *)graphicsContextWithGraphicsPort:(void *)graphicsPort flipped:(BOOL)initialFlippedState API_DEPRECATED_WITH_REPLACEMENT("graphicsContextWithCGContext:flipped:", macos(10.0,10.14));
 @property (readonly) void *graphicsPort NS_RETURNS_INNER_POINTER API_DEPRECATED_WITH_REPLACEMENT("CGContext", macos(10.0,10.14));
+
++ (NSGraphicsContext *)graphicsContextWithWindow:(NSWindow *)window API_DEPRECATED("Add instances of NSView to display content in a window", macos(10.0,10.14));
 
 @end
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h	2024-04-25 05:49:37
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h	2024-06-01 03:52:52
@@ -50,6 +50,12 @@
 
 @end
 
+@interface NSOpenPanel (InheritedAndUnavailable)
+
+@property BOOL showsContentTypes NS_UNAVAILABLE;
+
+@end
+
 @interface NSOpenPanel (NSDeprecated)
 
 /* Use URLs instead.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPopUpButton.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPopUpButton.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPopUpButton.h	2024-04-25 05:49:31
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPopUpButton.h	2024-06-01 03:52:56
@@ -18,20 +18,68 @@
 
 @interface NSPopUpButton : NSButton
 
+/*!
+ Creates a standard pop-up button with a menu, target, and action.
+ @param menu A menu presented by the pop-up button, containing items that the user can choose between.
+ @param target The target object that receives action messages from the control.
+ @param action The action message sent by the control.
+ @discussion If `menu` is non-empty, the pop-up button uses the first item for its initial selection.
+ @return An initialized pop-up button object.
+ */
++ (instancetype)popUpButtonWithMenu:(NSMenu *)menu target:(nullable id)target action:(nullable SEL)action NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+/*!
+ Creates a standard pull-down button with a title and menu.
+ @param title The localized title string that is displayed on the button.
+ @param menu The pull-down menu to present when interacting with the button.
+ @discussion Pull-down buttons created using this method have the `usesItemFromMenu` property set to `NO`.
+ @return An initialized pull-down button object.
+ */
++ (instancetype)pullDownButtonWithTitle:(NSString *)title menu:(NSMenu *)menu NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+/*!
+ Creates a standard pull-down button with an image and menu.
+ @param image The icon that is displayed on the button.
+ @param menu The pull-down menu to present when interacting with the button.
+ @discussion Pull-down buttons created using this method have the `usesItemFromMenu` property set to `NO`.
+ @return An initialized pull-down button object.
+ */
++ (instancetype)pullDownButtonWithImage:(NSImage *)image menu:(NSMenu *)menu NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+/*!
+ Creates a standard pull-down button with a title, image, and menu.
+ @param title The localized title string that is displayed on the button.
+ @param image The icon that is displayed on the button.
+ @param menu The pull-down menu to present when interacting with the button.
+ @discussion Pull-down buttons created using this method have the `usesItemFromMenu` property set to `NO`.
+ @return An initialized pull-down button object.
+ */
++ (instancetype)pullDownButtonWithTitle:(NSString *)title image:(NSImage *)image menu:(NSMenu *)menu NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
 - (instancetype)initWithFrame:(NSRect)buttonFrame pullsDown:(BOOL)flag;
 
 
+/*! When `usesItemFromMenu` is `YES`, a pull-down button uses the title of the first menu item and hides the first menu item. A pop-up button uses the title of the currently selected menu. The default value is `YES`. */
+@property BOOL usesItemFromMenu API_AVAILABLE(macos(15.0));
+
+/*! When the value of this property is `YES`, the selected menu item's `state` is set to `NSControlStateValueOn`. When the value of this property is `NO`, the menu item's `state` is not changed. When this property changes, the `state` of the currently selected item is updated appropriately. This property is ignored for pull-down buttons. */
+@property BOOL altersStateOfSelectedItem API_AVAILABLE(macos(15.0));
+
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h	2024-04-25 05:49:36
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h	2024-06-01 03:52:51
@@ -25,175 +25,245 @@
+@property (nullable, copy) UTType *currentContentType API_AVAILABLE(macos(15.0));
+
+/**
+ Sets and returns the accessory view shown in the panel. For applications that link on SnowLeopard and higher, the accessoryView's frame will be observed, and any changes the programmer makes to the frame will automatically be reflected in the panel (including animated changes to the frame height).
+ */
 @property (nullable, strong) NSView *accessoryView;
 
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wincompatible-property-type"
 
+/**
+ `NSSavePanel`: Whether or not to show a control for selecting the type of the saved file.
+ The control shows the types in `allowedContentTypes`. Default is `NO`.
+ - Note: If @c allowedContentTypes is empty, the control is not displayed.
+ `NSOpenPanel`: Not used.
+ */
+@property BOOL showsContentTypes API_AVAILABLE(macos(15.0));
 
+/**
+ Refreshes the open or save panel's contents.
+ */
+- (void)validateVisibleColumns;
+
+// MARK: - Actions
+
 - (IBAction)ok:(nullable id)sender;
 - (IBAction)cancel:(nullable id)sender;
  
  */
 - (void)panelSelectionDidChange:(nullable id)sender NS_SWIFT_UI_ACTOR;
 
+/**
+ `NSSavePanel`: Optional — Sent when the content type popup is displayed and the save panel needs the display name for a type. If `nil` is returned, the save panel will display type's `localizedDescription`.
+  `NSOpenPanel`: Not sent.
+*/
+- (nullable NSString *)panel:(id)sender displayNameForType:(UTType *)type API_AVAILABLE(macos(15.0)) NS_SWIFT_UI_ACTOR;
+
+/**
+  `NSSavePanel`: Optional — Sent when the user changes the current type.
+  `NSOpenPanel`: Not sent.
+*/
+- (void)panel:(id)sender didSelectType:(nullable UTType *)type API_AVAILABLE(macos(15.0)) NS_SWIFT_UI_ACTOR;
+
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingCollaborationModeRestriction.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingCollaborationModeRestriction.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingCollaborationModeRestriction.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingCollaborationModeRestriction.h	2024-06-01 03:52:54
@@ -0,0 +1,84 @@
+//
+/*
+        NSSharingCollaborationModeRestriction.h
+        Application Kit
+        Copyright (c) 2023, Apple Inc.
+        All rights reserved.
+*/
+
+#import <AppKit/AppKitDefines.h>
+#import <Foundation/NSObject.h>
+#import <Foundation/NSString.h>
+#import <Foundation/NSURL.h>
+
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
+
+/// Represents the types of sharing (collaborating on an item vs. sending a copy of the item)
+/// The share picker supports up to two modes, each of which corresponds to one of these types
+API_AVAILABLE(macos(15.0)) API_UNAVAILABLE(ios, watchos, tvos)
+typedef NS_ENUM(NSInteger, NSSharingCollaborationMode) {
+    NSSharingCollaborationModeSendCopy,
+    NSSharingCollaborationModeCollaborate,
+};
+
+/// Specifies whether a specific type of sharing should be disabled in the share picker, and if so, whether a reason should be provided for the disablement
+/// If a reason is provided, the corresponding mode will show up as an option, but an alert explaining why it is disabled will show if it is chosen, and the mode will switch back to the supported one
+/// Optionally, an extra alert button can be provided for a "recovery suggestion". This can give a user a way to fix whatever is causing this type of sharing to be disabled
+/// If no reason is provided, the corresponding mode will not show up as an option
+API_AVAILABLE(macos(15.0)) API_UNAVAILABLE(ios, watchos, tvos)
+NS_SWIFT_NAME(NSSharingServicePicker.CollaborationModeRestriction)
+@interface NSSharingCollaborationModeRestriction : NSObject<NSSecureCoding, NSCopying>
+
+/// The type of sharing which should be disabled
+@property (readonly) NSSharingCollaborationMode disabledMode;
+
+/// The title of the alert if a reason for disabling is provided
+@property (readonly, copy, nullable) NSString *alertTitle;
+
+/// The message of the alert if a reason for disabling is provided
+@property (readonly, copy, nullable) NSString *alertMessage;
+
+/// The label on the alert button which will simply confirm that the alert was viewed and dismiss it
+/// Defaults to "OK"
+@property (readonly, copy, nullable) NSString *alertDismissButtonTitle;
+
+/// The label on the recovery suggestion button if it is provided
+@property (readonly, copy, nullable) NSString *alertRecoverySuggestionButtonTitle;
+
+/// The URL that is opened when the user selects the recovery suggestion, if any
+@property (readonly, copy, nullable) NSURL *alertRecoverySuggestionButtonLaunchURL;
+
+/// - Parameters:
+///     - disabledMode: The disabled type of sharing
+- (instancetype)initWithDisabledMode:(NSSharingCollaborationMode)disabledMode;
+
+/// - Parameters:
+///     - disabledMode: The disabled type of sharing
+///     - alertTitle: The alert title
+///     - alertMessage: The alert message
+- (instancetype)initWithDisabledMode:(NSSharingCollaborationMode)disabledMode alertTitle:(NSString *)alertTitle alertMessage:(NSString *)alertMessage;
+
+/// - Parameters:
+///     - disabledMode: The disabled type of sharing
+///     - alertTitle: The alert title
+///     - alertMessage: The alert message
+///     - alertDismissButtonTitle: The label on the default alert button
+- (instancetype)initWithDisabledMode:(NSSharingCollaborationMode)disabledMode alertTitle:(NSString *)alertTitle alertMessage:(NSString *)alertMessage alertDismissButtonTitle:(NSString *)alertDismissButtonTitle;
+
+/// - Parameters:
+///     - disabledMode: The disabled type of sharing
+///     - alertTitle: The alert title
+///     - alertMessage: The alert message
+///     - alertDismissButtonTitle: The label on the default alert button
+///     - alertRecoverySuggestionButtonTitle: The label on the optional recovery suggestion button on the alert
+///     - alertRecoverySuggestionButtonLaunchURL: The URL that is opened when the optional recovery suggestion button is selected
+- (instancetype)initWithDisabledMode:(NSSharingCollaborationMode)disabledMode alertTitle:(NSString *)alertTitle alertMessage:(NSString *)alertMessage alertDismissButtonTitle:(NSString *)alertDismissButtonTitle alertRecoverySuggestionButtonTitle:(NSString *)alertRecoverySuggestionButtonTitle alertRecoverySuggestionButtonLaunchURL:(NSURL *)alertRecoverySuggestionButtonLaunchURL;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+API_UNAVAILABLE_END
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h	2024-04-25 05:49:36
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h	2024-06-01 03:52:52
@@ -312,6 +312,12 @@
  Sent when the user has selected a service and before it is executed. Service will be nil if the picker was dismissed.
  */
 - (void)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker didChooseSharingService:(nullable NSSharingService *)service;
+
+/**
+ Used to specify the case where the share picker should not support some modes of sharing even if they are supported by the items being shared.
+ Disabling all possible modes at the same time is not supported behavior.
+ */
+- (nullable NSArray<NSSharingCollaborationModeRestriction *> *)sharingServicePickerCollaborationModeRestrictions:(NSSharingServicePicker *)sharingServicePicker API_AVAILABLE(macos(15.0)) API_UNAVAILABLE(ios, watchos, tvos);
 
 @end
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSStringDrawing.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSStringDrawing.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSStringDrawing.h	2024-04-25 05:49:41
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSStringDrawing.h	2024-06-01 03:52:56
@@ -23,45 +31,62 @@
 @property (readonly) CGFloat actualScaleFactor;
 
 // bounds of the string drawn by the previous invocation of drawWithRect:options:context:
-@property (readonly) NSRect totalBounds;
+@property (readonly) CGRect totalBounds;
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextAttachment.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextAttachment.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextAttachment.h	2024-04-25 05:49:37
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextAttachment.h	2024-06-01 03:52:52
@@ -31,38 +31,26 @@
+
+// A convenience method for creating an attributed string containing an attachment with attributes using NSAttachmentCharacter as the base character.
++ (instancetype)attributedStringWithAttachment:(NSTextAttachment *)attachment attributes:(NSDictionary<NSAttributedStringKey, id> *)attributes API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
 @end
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextCheckingClient.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextCheckingClient.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextCheckingClient.h	2024-04-25 05:49:40
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextCheckingClient.h	2024-06-01 03:52:55
@@ -25,6 +25,34 @@
    NSTextInputTraitTypeYes,
 };
 
+typedef NS_ENUM(NSInteger, NSWritingToolsBehavior) {
+    // Writing Tools will ignore this view
+    NSWritingToolsBehaviorNone = -1,
+
+    // System-defined behavior, may resolve to `None`, `Complete`, or `Limited`
+    NSWritingToolsBehaviorDefault = 0,
+
+    // The complete inline-editing experience will be provided if possible.
+    NSWritingToolsBehaviorComplete,
+
+    // The limited, overlay-panel experience will be provided if possible.
+    NSWritingToolsBehaviorLimited,
+} API_AVAILABLE(macos(15.0));
+
+typedef NS_OPTIONS(NSUInteger, NSWritingToolsAllowedInputOptions) {
+    // System—defined behavior
+    NSWritingToolsAllowedInputOptionsDefault = 0,
+
+    // Writing Tools will provide plain text in proofreading suggestions or rewrites
+    NSWritingToolsAllowedInputOptionsPlainText = 1 << 0,
+
+    // as well as plain text, Writing Tools will provide text attributes in proofreading suggestions or rewrites that are natively supported or known to be easily adopted (such as lists)
+    NSWritingToolsAllowedInputOptionsRichText = 1 << 1,
+
+    // implies `RichText`,  and Writing Tools may provide attributes for tabular layout
+    NSWritingToolsAllowedInputOptionsTable = 1 << 2,
+} API_AVAILABLE(macos(15.0));
+
 @protocol NSTextInputTraits
 @optional
 @property NSTextInputTraitType autocorrectionType;
@@ -38,6 +66,10 @@
 @property NSTextInputTraitType linkDetectionType;
 @property NSTextInputTraitType textCompletionType;
 @property NSTextInputTraitType inlinePredictionType API_AVAILABLE(macos(14.0));
+@property NSTextInputTraitType mathExpressionCompletionType API_AVAILABLE(macos(15.0));
+
+@property NSWritingToolsBehavior writingToolsBehavior API_AVAILABLE(macos(15.0));
+@property NSWritingToolsAllowedInputOptions writingToolsAllowedInputOptions API_AVAILABLE(macos(15.0));
 @end
 
 @protocol NSTextCheckingClient <NSTextInputClient, NSTextInputTraits>
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputClient.h	2024-04-25 05:49:37
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputClient.h	2024-06-01 03:52:52
@@ -111,6 +112,11 @@
  To support dictation indicator on custom text view, expose this method and `-selectionRect`, and also calls `-[NSTextInputContext willStartScrollingOrZooming]`/ `-[NSTextInputContext didEndScrollingOrZooming]` when needed.
  */
 @property (readonly) NSRect documentVisibleRect API_AVAILABLE(macos(14.0));
+
+@optional
+@property (readonly) BOOL supportsAdaptiveImageGlyph API_AVAILABLE(macos(15.0));
+
+- (void)insertAdaptiveImageGlyph:(NSAdaptiveImageGlyph *)adaptiveImageGlyph replacementRange:(NSRange)replacementRange NS_SWIFT_NAME(insert(_:replacementRange:)) API_AVAILABLE(macos(15.0));
 
 @end
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h	2024-04-25 05:49:37
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h	2024-06-01 03:52:52
 /*************************** Input Source support ***************************/
 /* Returns an array of locale identifiers representing keyboard input sources allowed to be enabled when the receiver has the keyboard focus.
  */
 @property (nullable, copy) NSArray<NSString *> *allowedInputSourceLocales API_AVAILABLE(macos(10.5));
+
+#pragma mark WritingTools
+@property(nonatomic,readonly,getter=isWritingToolsActive) BOOL writingToolsActive API_AVAILABLE(macos(15.0));
 @end
 
 @interface NSTextView (NSTextChecking)
@@ -476,6 +480,9 @@
 // Allows clients to turn inline prediction on or off for this view. The default setting should be appropriate for most purposes, but in some cases clients may wish to set this explicitly.
 @property NSTextInputTraitType inlinePredictionType API_AVAILABLE(macos(14.0));
 
+// Allows clients to turn math inline completion on or off for this view.
+@property NSTextInputTraitType mathExpressionCompletionType API_AVAILABLE(macos(15.0));
+
 @end
 
 @interface NSTextView (NSQuickLookPreview)
@@ -539,6 +546,19 @@
 + (NSScrollView *)scrollablePlainDocumentContentTextView API_AVAILABLE(macos(10.14));
 @end
 
+#pragma mark NSTextHighlight
+@interface NSTextView (NSTextView_TextHighlight)
+/*************************** Text Highlight  support ***************************/
+// Attributes for NSTextHighlightStyleAttributeName rendering. It is consulted when the corresponding NSTextHighlightColorSchemeAttributeName is NSTextHighlightColorSchemeDefault. NSForegroundColorAttributeName overrides the text color, and NSBackgroundColorAttributeName specifies the highlight color rendered with drawTextHighlightBackground(for textRange:, origin:). When NSForegroundColorAttributeName is missing, it uses the text color specified by the document content. When NSBackgroundColorAttributeName is not specified, it is derived from NSForegroundColorAttributeName.
+@property (copy) NSDictionary<NSAttributedStringKey, id> *textHighlightAttributes API_AVAILABLE(macos(15.0));
+
+// Renders the text highlight background for NSTextHighlightStyleAttributeName in textRange. origin specifies the coordinate origin in the NSTextContainer coordinate system of the rendering context.
+- (void)drawTextHighlightBackgroundForTextRange:(NSTextRange *)textRange origin:(NSPoint)origin API_AVAILABLE(macos(15.0));
+
+// An action for toggling NSTextHighlightStyleAttributeName in the selected range.
+- (IBAction)highlight:(nullable id)sender API_AVAILABLE(macos(15.0));
+@end
+
 @interface NSTextView (NSDeprecated)
 
 // toggleBaseWritingDirection: will be deprecated in favor of the new NSResponder methods makeBaseWritingDirectionNatural:, makeBaseWritingDirectionLeftToRight:, and makeBaseWritingDirectionRightToLeft:, which NSTextView now implements.
@@ -629,6 +649,11 @@
 // Delegate only. Notifies the delegate that the user selected the candidate at index in -[NSCandidateListTouchBarItem candidates] for textView.candidateListTouchBarItem. When no candidate selected, index is NSNotFound. Returning YES allows textView to insert the candidate into the text storage if it's NSString, NSAttributedString, or NSTextCheckingResult.
 - (BOOL)textView:(NSTextView *)textView shouldSelectCandidateAtIndex:(NSUInteger)index NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(10.12.2));
 
+#pragma mark WritingTools
+// Delegate only.
+- (void)textViewWritingToolsWillBegin:(NSTextView *)textView NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(15.0));
+- (void)textViewWritingToolsDidEnd:(NSTextView *)textView NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(15.0));
+- (NSArray<NSValue *> *)textView:(NSTextView *)textView writingToolsIgnoredRangesInEnclosingRange:(NSRange)enclosingRange NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(15.0));
 
 // The following delegate-only methods are deprecated in favor of the more verbose ones above.
 - (BOOL)textView:(NSTextView *)textView clickedOnLink:(null_unspecified id)link API_DEPRECATED("Use -textView:clickedOnLink:atIndex: instead", macos(10.0,10.6));
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbar.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbar.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbar.h	2024-04-25 05:49:34
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbar.h	2024-06-01 03:52:49
@@ -15,6 +15,7 @@
 
 typedef NSString * NSToolbarUserInfoKey NS_TYPED_ENUM;
 APPKIT_EXTERN NSToolbarUserInfoKey const NSToolbarItemKey API_AVAILABLE(macos(13.0));
+APPKIT_EXTERN NSToolbarUserInfoKey const NSToolbarNewIndexKey API_AVAILABLE(macos(15.0));
 
 @class NSToolbarItem, NSWindow, NSView;
 @protocol NSToolbarDelegate;
+/**
+ Removes the item with matching `itemIdentifier` in the receiving toolbar. If multiple items share the same identifier (as is the case with space items) all matching items will be removed. To remove only a single space item, use `-removeItemAtIndex:` instead.
+ 
+ Any change made will be propagated immediately to all other toolbars with the same identifier.
+ */
+- (void)removeItemWithItemIdentifier:(NSToolbarItemIdentifier)itemIdentifier API_AVAILABLE(macos(15.0), ios(18.0)) NS_SWIFT_NAME(removeItem(identifier:));
+
 @property (nullable, weak) id<NSToolbarDelegate> delegate;

 @property (nullable, copy) NSToolbarItemIdentifier selectedItemIdentifier;
 
-@property BOOL showsBaselineSeparator;

+@property BOOL allowsDisplayModeCustomization API_AVAILABLE(macos(15.0), ios(18.0));
 
 
+@property (copy) NSArray<NSToolbarItemIdentifier> *itemIdentifiers API_AVAILABLE(macos(15.0), ios(18.0));
 
  This property is archived.
  */
 
-- (void)setConfigurationFromDictionary:(NSDictionary<NSString *, id> *)configDict API_UNAVAILABLE(ios);
-@property (readonly, copy) NSDictionary<NSString *, id> *configurationDictionary API_UNAVAILABLE(ios);
 
 @property CGFloat fullScreenAccessoryViewMinHeight API_DEPRECATED("Use NSTitlebarAccessoryViewController and its fullScreenMinHeight property with NSWindow instead.", macos(10.7,10.13));
 @property CGFloat fullScreenAccessoryViewMaxHeight API_DEPRECATED("Use NSTitlebarAccessoryViewController with NSWindow instead. The max height of a titlebar accessory is implied by its view's height.", macos(10.7,10.13));
+@property BOOL showsBaselineSeparator API_DEPRECATED("No longer supported", macos(10.0, 15.0));
+@property (readonly, copy) NSDictionary<NSString *, id> *configurationDictionary API_DEPRECATED("Use -itemIdentifiers and -displayMode instead.", macos(10.0, 15.0));
+- (void)setConfigurationFromDictionary:(NSDictionary<NSString *, id> *)configDict API_DEPRECATED("Use -setItemIdentifiers: and -setDisplayMode: instead.", macos(10.0, 15.0));
 
 @end
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItem.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItem.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItem.h	2024-04-25 05:49:36
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItem.h	2024-06-01 03:52:51

+@property (readonly) BOOL allowsDuplicatesInToolbar API_UNAVAILABLE(ios) API_DEPRECATED("Duplicates are no longer supported.", macos(10.0, 15.0));
-@property (readonly) BOOL allowsDuplicatesInToolbar API_UNAVAILABLE(ios);
 @end
 
 #if !TARGET_OS_IPHONE
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h	2024-04-25 05:49:38
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h	2024-06-01 03:52:53
@@ -81,13 +81,11 @@
  * @typedef NSWindowSharingType
  *
  * @const NSWindowSharingNone          Window contents may not be read by another process.
- * @const NSWindowSharingReadOnly   Window contents may be read but not modified by another process.
- * @const NSWindowSharingReadWrite  Window contents may be read or modified by another process.
+ * @const NSWindowSharingReadOnly   Window contents may be read by another process.
  */
 typedef NS_ENUM(NSUInteger, NSWindowSharingType) {
     NSWindowSharingNone = 0,
     NSWindowSharingReadOnly = 1,
-    NSWindowSharingReadWrite = 2
 } API_AVAILABLE(macos(10.5));
 
 /*!
@@ -522,11 +520,6 @@
 
 @property BOOL displaysWhenScreenProfileChanges;
 
-/*!
- In recent macOS versions this method does not do anything and should not be called. 
- */
-- (void)disableScreenUpdatesUntilFlush;
-
 /*! This API controls whether the receiver is permitted onscreen before the user has logged in.  This property is off by default.  Alert panels and windows presented by input managers are examples of windows which should have this property set.
 */
 @property BOOL canBecomeVisibleWithoutLogin API_AVAILABLE(macos(10.5));
@@ -745,6 +738,30 @@
  */
 @property (readonly) BOOL hasActiveWindowSharingSession API_AVAILABLE(macos(13.3));
 
+/*!
+ @abstract Request sharing of window.  If there is an available ScreenCaptureKit sharing session, an alert will be presented asking the user to confirm the share
+ @param window
+ The window to share
+ @param completionHandler
+ A completion block that is called after the request finishes.
+ @c error
+ The error will be non-nil if the request does not result in a window being shared.  The error will be NSUserCancelledError if there is no ScreenCaptureKit session, or if the user rejects the offer to share.  If sharing fails for some other reason, the error will provide the details.
+ */
+- (void)requestSharingOfWindow:(NSWindow *)window completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(requestSharingOfWindow(_:completionHandler:)) API_AVAILABLE(macos(15.0));
+
+/*!
+ @abstract Request sharing of window to be provided later.  If there is an available ScreenCaptureKit sharing session, an alert will be presented asking the user to confirm the share.  The delegate will be asked to provide the window to share via windowForSharingRequestFromWindow:
+ @param image
+ An image showing a preview of the window to share
+ @param title
+ The title to show in a confirmation dialog
+ @param completionHandler
+ A completion block that is called after the request finishes.
+ @c error
+ The error will be non-nil if the request does not result in a window being shared.  The error will be NSUserCancelledError if there is no ScreenCaptureKit session, or if the user rejects the offer to share.  If sharing fails for some other reason, the error will provide the details.
+ */
+- (void)requestSharingOfWindowUsingPreview:(NSImage *)image title:(NSString *)title completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(requestSharingOfWindow(usingPreview:title:completionHandler:)) API_AVAILABLE(macos(15.0));
+
 #pragma mark - Other
 
 /*! Retrieve the layout direction of the window titlebar: this includes the standard window buttons (close/minimize/maximize buttons) and the title for this window. In general, this will return "right to left" (RTL) if the primary system language is RTL. The layout direction may be RTL even in applications that do not have a RTL language localization. This value should be utilized if an application uses titlebarAppearsTransparent and places controls underneath the titlebar.
@@ -781,23 +798,15 @@
 @end
 
 @interface NSWindow(NSDrag)
-- (void)dragImage:(NSImage *)image at:(NSPoint)baseLocation offset:(NSSize)initialOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pboard source:(id)sourceObj slideBack:(BOOL)slideFlag;
 
+- (NSDraggingSession *)beginDraggingSessionWithItems:(NSArray<NSDraggingItem *> *)items event:(NSEvent *)event source:(id<NSDraggingSource>)source NS_SWIFT_NAME(beginDraggingSession(items:event:source:)) API_AVAILABLE(macos(15.0));
+
+- (void)dragImage:(NSImage *)image at:(NSPoint)baseLocation offset:(NSSize)initialOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pboard source:(id)sourceObj slideBack:(BOOL)slideFlag API_DEPRECATED("Use -[NSWindow beginDraggingSessionWithItems:event:source:] instead.", macos(10.0, API_TO_BE_DEPRECATED));
+
 - (void)registerForDraggedTypes:(NSArray<NSPasteboardType> *)newTypes;
 - (void)unregisterDraggedTypes;
 @end
 
-@interface NSWindow(NSCarbonExtensions)
-
-/*! Create an \c NSWindow for a Carbon window - \c windowRef must be a Carbon \c WindowRef - see `MacWindows.h`. This method can only be called on \c NSWindow, and not subclasses of \c NSWindow. On 10.11, it will throw an exception if this is done.
- */
-- (nullable NSWindow *)initWithWindowRef:(void * /* WindowRef */)windowRef;
-
-/*! Return the Carbon \c WindowRef for this window, creating if necessary: - see `MacWindows.h`.
- */
-@property (readonly) void * /* WindowRef */windowRef NS_RETURNS_INNER_POINTER;
-@end
-
 API_AVAILABLE(macos(14.0))
 @interface NSWindow (NSDisplayLink)
 /*
@@ -879,6 +888,10 @@
 */
 - (NSArray<id<NSPreviewRepresentableActivityItem>> *_Nullable)previewRepresentableActivityItemsForWindow:(NSWindow *)window NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(13.2)) API_UNAVAILABLE(ios);
 
+/*! Method called to get the window to share once sharing is confirmed, after a request is initiated by requestSharingOfWindowUsingPreview:title:completionHandler:. Implement this on the delegate of the requesting window
+ */
+- (nullable NSWindow *)windowForSharingRequestFromWindow:(NSWindow *)window NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(15.0));
+
 /* Notifications
 */
 - (void)windowDidResize:(NSNotification *)notification NS_SWIFT_UI_ACTOR;
@@ -1009,9 +1022,13 @@
 @property NSWindowBackingLocation preferredBackingLocation API_DEPRECATED("This property does not do anything and should not be used", macos(10.5,10.14));
 @property (readonly) NSWindowBackingLocation backingLocation API_DEPRECATED("This property does not do anything and should not be used", macos(10.5,10.14));
 
-// showsResizeIndicator is soft-deprecated in 10.14. It is ignored on 10.7 and newer, and should not be used.
-@property BOOL showsResizeIndicator;
+@property BOOL showsResizeIndicator API_DEPRECATED("This property does not do anything and should not be used.", macos(10.0,15.0));
 
+- (nullable NSWindow *)initWithWindowRef:(void * /* WindowRef */)windowRef API_DEPRECATED("This method should not be used.", macos(10.0,15.0));
+@property (readonly) void * /* WindowRef */windowRef NS_RETURNS_INNER_POINTER API_DEPRECATED("This method should not be used.", macos(10.0,15.0));
+
+- (void)disableScreenUpdatesUntilFlush API_DEPRECATED("This method does not do anything and should not be called.", macos(10.0,15.0));
+
 @end
 
 /* Deprecated legacy style mask constants. Prefer to use NSWindowStyleMask values instead.
@@ -1038,6 +1055,8 @@
 /* Deprecated window levels
  */
 static const NSWindowLevel NSDockWindowLevel API_DEPRECATED("", macos(10.0,10.13)) = kCGDockWindowLevel;
+
+static const NSWindowSharingType NSWindowSharingReadWrite NS_SWIFT_NAME(NSWindowSharingType.readWrite) API_DEPRECATED("Use NSWindowSharingReadOnly instead", macos(10.5, 15.0)) = (NSWindowSharingType)2;
 
 
 
Clone this wiki locally