-
Notifications
You must be signed in to change notification settings - Fork 520
AppKit macOS xcode16.3 b1
Rolf Bjarne Kvinge edited this page Feb 24, 2025
·
1 revision
#AppKit.framework
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKitErrors.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKitErrors.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKitErrors.h 2024-11-20 11:14:42
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKitErrors.h 2025-02-13 06:07:23
@@ -56,6 +56,14 @@
NSWindowSharingRequestUnspecifiedError API_AVAILABLE(macos(13.3)) = 67458,
NSWindowSharingErrorMinimum API_AVAILABLE(macos(13.3)) = 67456,
NSWindowSharingErrorMaximum API_AVAILABLE(macos(13.3)) = 67466,
+
+ // NSPasteboard
+ NSPasteboardMiscellaneousError API_AVAILABLE(macos(15.4)) = 67584,
+ NSPasteboardCommunicationError API_AVAILABLE(macos(15.4)) = 67585,
+ NSPasteboardInvalidArgumentError API_AVAILABLE(macos(15.4)) = 67586,
+ NSPasteboardContentsNotAvailableError API_AVAILABLE(macos(15.4)) = 67587,
+ NSPasteboardErrorMinimum API_AVAILABLE(macos(15.4)) = 67584,
+ NSPasteboardErrorMaximum API_AVAILABLE(macos(15.4)) = 67839,
};
API_UNAVAILABLE_END
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h 2024-11-20 11:14:44
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h 2025-02-13 06:07:25
@@ -12,6 +12,8 @@
#import <Foundation/NSString.h>
#import <Foundation/NSURL.h>
#import <CoreFoundation/CFBase.h>
+#import <CoreFoundation/CFCGTypes.h>
+#import <ImageIO/CGImageProperties.h>
NS_HEADER_AUDIT_BEGIN(nullability, sendability)
APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
@@ -48,6 +50,112 @@
APPKIT_EXTERN NSPasteboardName NSPasteboardNameFind API_AVAILABLE(macos(10.13));
APPKIT_EXTERN NSPasteboardName NSPasteboardNameDrag API_AVAILABLE(macos(10.13));
+
+/* Behavior in case of programmatic pasteboard access */
+
+/// A value indicating pasteboard access behavior.
+typedef NS_ENUM(NSInteger, NSPasteboardAccessBehavior) {
+
+ /// The default behavior for the General pasteboard is to ask upon programmatic access. All other pasteboards default to always allow access.
+ /// If an app has never triggered a pasteboard access alert, its General pasteboard will report `.default` behavior. Such an app is not shown in the corresponding System Settings pane.
+ /// Once programmatic pasteboard access triggers the first pasteboard access alert, the state automatically changes to `.ask`. At this point the app starts being shown in System Settings, where the user can toggle the behavior between `.ask`, `.alwaysAllow`, and `.alwaysDeny`.
+ NSPasteboardAccessBehaviorDefault = 0,
+
+ /// The system will notify the user and ask for permission before granting pasteboard access. However, access that is both user originated and paste related will always be allowed, and will not result in a notification. The app is listed in the corresponding System Settings pane.
+ NSPasteboardAccessBehaviorAsk = 1,
+
+ /// The system will automatically allow all pasteboard access, without notifying the user. The app is listed in the corresponding System Settings pane.
+ NSPasteboardAccessBehaviorAlwaysAllow = 2,
+
+ /// The system will automatically deny all pasteboard access, without notifying the user. However, access that is both user originated and paste related will always be allowed, and will not result in a notification. The app is listed in the corresponding System Settings pane.
+ NSPasteboardAccessBehaviorAlwaysDeny = 3
+} NS_SWIFT_NAME(NSPasteboard.AccessBehavior) API_AVAILABLE(macos(15.4));
+
+
+/* Detection */
+
+/// A pattern to detect on the pasteboard, such as a URL, text, or a number.
+typedef NSString * NSPasteboardDetectionPattern NS_REFINED_FOR_SWIFT NS_TYPED_ENUM API_AVAILABLE(macos(15.4));
+
+/// A pattern that indicates the pasteboard detects a string that consists of a web URL.
+/// @returns NSString value, suitable for implementing "Paste and Go"
+APPKIT_EXTERN NSPasteboardDetectionPattern const NSPasteboardDetectionPatternProbableWebURL NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// A pattern that indicates the pasteboard detects a string suitable for use as a web search term.
+/// @returns NSString value, suitable for implementing "Paste and Search"
+APPKIT_EXTERN NSPasteboardDetectionPattern const NSPasteboardDetectionPatternProbableWebSearch NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// A pattern that indicates the pasteboard detects a string that consists of a numeric value.
+/// @returns NSNumber value
+APPKIT_EXTERN NSPasteboardDetectionPattern const NSPasteboardDetectionPatternNumber NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// A pattern that indicates the pasteboard detects a string that contains a URL.
+/// @returns array of DDMatchLink values
+APPKIT_EXTERN NSPasteboardDetectionPattern const NSPasteboardDetectionPatternLink NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// A pattern that indicates the pasteboard detects a string that contains a phone number.
+/// @returns array of DDMatchPhoneNumber values
+APPKIT_EXTERN NSPasteboardDetectionPattern const NSPasteboardDetectionPatternPhoneNumber NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// A pattern that indicates the pasteboard detects a string that contains an email address.
+/// @returns array of DDMatchEmailAddress values
+APPKIT_EXTERN NSPasteboardDetectionPattern const NSPasteboardDetectionPatternEmailAddress NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// A pattern that indicates the pasteboard detects a string that contains a postal address.
+/// @returns array of DDMatchPostalAddress values
+APPKIT_EXTERN NSPasteboardDetectionPattern const NSPasteboardDetectionPatternPostalAddress NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// A pattern that indicates the pasteboard detects a string that contains a calendar event.
+/// @returns array of DDMatchCalendarEvent values
+APPKIT_EXTERN NSPasteboardDetectionPattern const NSPasteboardDetectionPatternCalendarEvent NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// A pattern that indicates the pasteboard detects a string that contains a parcel tracking number and carrier.
+/// @returns array of DDMatchShipmentTrackingNumber values
+APPKIT_EXTERN NSPasteboardDetectionPattern const NSPasteboardDetectionPatternShipmentTrackingNumber NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// A pattern that indicates the pasteboard detects a string that contains a flight number.
+/// @returns array of DDMatchFlightNumber values
+APPKIT_EXTERN NSPasteboardDetectionPattern const NSPasteboardDetectionPatternFlightNumber NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// A pattern that indicates the pasteboard detects a string that contains an amount of money.
+/// @returns array of DDMatchMoneyAmount values
+APPKIT_EXTERN NSPasteboardDetectionPattern const NSPasteboardDetectionPatternMoneyAmount NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+
+/* Metadata */
+
+/// A metadata type to detect on the pasteboard, such as content type or image metadata.
+typedef NSString * NSPasteboardMetadataType NS_REFINED_FOR_SWIFT NS_TYPED_ENUM API_AVAILABLE(macos(15.4));
+
+/// A metadata type that returns the content type if the pasteboard detects a reference to a file.
+/// @returns UTType value for the detected content type of the file URL, if a file URL type is present.
+APPKIT_EXTERN NSPasteboardMetadataType const NSPasteboardMetadataTypeContentType NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// A metadata type that returns the image properties if the pasteboard detects an image file URL or image data. Preference is given to the file, if both are present.
+/// @returns NSPasteboardImageProperties instance, if an image is present.
+APPKIT_EXTERN NSPasteboardMetadataType const NSPasteboardMetadataTypeImageProperties NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// The return value for `NSPasteboardMetadataTypeImageProperties`.
+NS_REFINED_FOR_SWIFT
+API_AVAILABLE(macos(15.4))
+@interface NSPasteboardImageProperties : NSObject
+
+/// The image size in pixels. `CGSizeZero` if unknown.
+@property (readonly) CGSize pixelSize;
+
+/// The image resolution in DPI. `CGPointZero` if unknown.
+@property (readonly) CGPoint resolution;
+
+/// The image orientation. `kCGImagePropertyOrientationUp` if unknown.
+@property (readonly) CGImagePropertyOrientation orientation;
+
+/// The image depth in bits per pixel. 0 if unknown.
+@property (readonly) NSUInteger bitsPerPixel;
+
+/// Whether the image has an alpha channel. NO if unknown.
+@property (readonly) BOOL hasAlpha;
+@end
+
/* Options for prepareForNewContentsWithOptions: */
typedef NS_OPTIONS(NSUInteger, NSPasteboardContentsOptions) {
@@ -84,6 +192,9 @@
- (oneway void)releaseGlobally;
+/// The current pasteboard access behavior. The user can customize this behavior per-app in System Settings for any app that has triggered a pasteboard access alert in the past.
+@property (readonly, assign) NSPasteboardAccessBehavior accessBehavior API_AVAILABLE(macos(15.4));
+
/* Prepares the pasteboard for new contents, clearing the existing contents of the pasteboard. This is the first step in providing data on the pasteboard. Any options specified will persist until prepareForNewContentsWithOptions: or clearContents is called. Returns the change count of the pasteboard.
*/
- (NSInteger)prepareForNewContentsWithOptions:(NSPasteboardContentsOptions)options API_AVAILABLE(macos(10.12));
@@ -153,6 +264,42 @@
- (nullable id)propertyListForType:(NSPasteboardType)dataType;
- (nullable NSString *)stringForType:(NSPasteboardType)dataType;
+
+/* Detection / Metadata */
+
+/// Determines whether the first pasteboard item matches the specified patterns, without notifying the user.
+///
+/// Because this method only gives an indication of whether a pasteboard item matches a particular pattern and doesn’t allow the app to access the contents, the system doesn’t notify the user about reading the contents of the pasteboard.
+///
+/// @param patterns The patterns to detect on the pasteboard.
+/// @param completionHandler A block that the system invokes after detecting patterns on the pasteboard. The block receives either a set with the patterns found on the pasteboard or an error if detection failed.
+- (void)detectPatternsForPatterns:(NSSet<NSPasteboardDetectionPattern> *)patterns
+ completionHandler:(void(^)(NSSet<NSPasteboardDetectionPattern> * _Nullable detectedPatterns,
+ NSError * _Nullable error))completionHandler NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// Determines whether the first pasteboard item matches the specified patterns, reading the contents if it finds a match.
+///
+/// - Important: Calling this method notifies the user that the app has read the contents of the pasteboard, if a match is found.
+///
+/// For details about the types returned for each pattern, see `NSPasteboardDetectionPattern`.
+///
+/// @param patterns The patterns to detect on the pasteboard.
+/// @param completionHandler A block that the system invokes after detecting patterns on the pasteboard. The block returns either dictionary with the patterns found on the pasteboard or an error if detection failed. The dictionary keys specify the matched patterns, and the values specify the corresponding content of the pasteboard.
+- (void)detectValuesForPatterns:(NSSet<NSPasteboardDetectionPattern> *)patterns
+ completionHandler:(void(^)(NSDictionary<NSPasteboardDetectionPattern, id> * _Nullable detectedValues,
+ NSError * _Nullable error))completionHandler NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// Determines available metadata from the specified metadata types for the first pasteboard item, without notifying the user.
+///
+/// Because this method only gives access to limited types of metadata and doesn’t allow the app to access the contents, the system doesn’t notify the user about reading the contents of the pasteboard.
+///
+/// For details about the metadata returned for each type, see `NSPasteboardMetadataType`.
+///
+/// @param types The metadata types to detect on the pasteboard.
+/// @param completionHandler A block that the system invokes after detecting metadata on the pasteboard. The block receives either a dictionary with the metadata types found on the pasteboard or an error if detection failed. The dictionary keys specify the matched metadata types, and the values specify the corresponding metadata.
+- (void)detectMetadataForTypes:(NSSet<NSPasteboardMetadataType> *)types
+ completionHandler:(void(^)(NSDictionary<NSPasteboardMetadataType, id> * _Nullable detectedMetadata,
+ NSError * _Nullable error))completionHandler NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
@end
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboardItem.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboardItem.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboardItem.h 2024-11-20 11:14:43
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPasteboardItem.h 2025-02-13 06:07:24
@@ -60,6 +60,43 @@
- (nullable NSString *)stringForType:(NSPasteboardType)type;
- (nullable id)propertyListForType:(NSPasteboardType)type;
+
+/* Detection / Metadata */
+
+/// Determines whether this pasteboard item matches the specified patterns, without notifying the user.
+///
+/// Because this method only gives an indication of whether a pasteboard item matches a particular pattern and doesn’t allow the app to access the contents, the system doesn’t notify the user about reading the contents of the pasteboard.
+///
+/// @param patterns The patterns to detect on the pasteboard item.
+/// @param completionHandler A block that the system invokes after detecting patterns on the pasteboard item. The block receives either a set with the patterns found on the pasteboard item or an error if detection failed.
+- (void)detectPatternsForPatterns:(NSSet<NSPasteboardDetectionPattern> *)patterns
+ completionHandler:(void(^)(NSSet<NSPasteboardDetectionPattern> * _Nullable detectedPatterns,
+ NSError * _Nullable error))completionHandler NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// Determines whether this pasteboard item matches the specified patterns, reading the contents if it finds a match.
+///
+/// - Important: Calling this method notifies the user that the app has read the contents of the pasteboard, if a match is found.
+///
+/// For details about the types returned for each pattern, see `NSPasteboardDetectionPattern`.
+///
+/// @param patterns The patterns to detect on the pasteboard item.
+/// @param completionHandler A block that the system invokes after detecting patterns on the pasteboard item. The block returns either dictionary with the patterns found on the pasteboard item or an error if detection failed. The dictionary keys specify the matched patterns, and the values specify the corresponding content of the pasteboard.
+- (void)detectValuesForPatterns:(NSSet<NSPasteboardDetectionPattern> *)patterns
+ completionHandler:(void(^)(NSDictionary<NSPasteboardDetectionPattern, id> * _Nullable detectedValues,
+ NSError * _Nullable error))completionHandler NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
+/// Determines available metadata from the specified metadata types for this pasteboard item, without notifying the user.
+///
+/// Because this method only gives access to limited types of metadata and doesn’t allow the app to access the contents, the system doesn’t notify the user about reading the contents of the pasteboard.
+///
+/// For details about the metadata returned for each type, see `NSPasteboardMetadataType`.
+///
+/// @param types The metadata types to detect on the pasteboard item.
+/// @param completionHandler A block that the system invokes after detecting metadata on the pasteboard item. The block receives either a dictionary with the metadata types found on the pasteboard item or an error if detection failed. The dictionary keys specify the matched metadata types, and the values specify the corresponding metadata.
+- (void)detectMetadataForTypes:(NSSet<NSPasteboardMetadataType> *)types
+ completionHandler:(void(^)(NSDictionary<NSPasteboardMetadataType, id> * _Nullable detectedMetadata,
+ NSError * _Nullable error))completionHandler NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.4));
+
@end
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextField.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextField.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextField.h 2024-11-20 11:14:42
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextField.h 2025-02-13 06:07:23
@@ -58,6 +58,7 @@
#endif
@property BOOL allowsWritingTools API_AVAILABLE(macos(15.2)); // Default is YES. Configures its field editor to work with Writing Tools.
+@property BOOL allowsWritingToolsAffordance API_AVAILABLE(macos(15.4)); // Default is YES.
@end
#pragma mark NSTextField NSTouchBar Properties
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputClient.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputClient.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputClient.h 2024-11-20 11:14:44
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputClient.h 2025-02-13 06:07:25
@@ -101,15 +101,17 @@
*/
- (NSTextCursorAccessoryPlacement)preferredTextAccessoryPlacement;
-/* Return rect which covers whole selected text in screen coordinate. If this method isn't provided, -selectedRange + -firstRectForCharRange:actualRange: will be used.
+/* Return rect which covers whole selected text in screen coordinate. If this method isn't provided, -selectedRange + -firstRectForCharRange:actualRange: will be used. If the selected text is partially visible in the current clip view, it’s ok for `unionRectInVisibleSelectedRange` to go beyond `documentVisibleRect`.
- To support dictation indicator on custom text view, expose this method and `-documentVisibleRect`, and also calls `-[NSTextInputContext willStartScrollingOrZooming]`/ `-[NSTextInputContext didEndScrollingOrZooming]` when needed.
+ To support dictation indicator on custom text view, expose this method and `-documentVisibleRect`, and call `-[NSTextInputContext willStartScrollingOrZooming]`/ `-[NSTextInputContext didEndScrollingOrZooming]` when needed.
+ To support Writing Tools affordance on custom text view, expose this method and `-documentVisibleRect`, and call `-[NSTextInputContext textInputClientDidUpdateSelectionRect]` when needed.
*/
@property (readonly) NSRect unionRectInVisibleSelectedRange API_AVAILABLE(macos(14.0));
/* Return visible rect of document area in screen coordinate. If this method isn't provided, -[NSView visibleRect] will be used.
- To support dictation indicator on custom text view, expose this method and `-selectionRect`, and also calls `-[NSTextInputContext willStartScrollingOrZooming]`/ `-[NSTextInputContext didEndScrollingOrZooming]` when needed.
+ To support dictation indicator on custom text view, expose this method and `-unionRectInVisibleSelectedRange`, and call `-[NSTextInputContext willStartScrollingOrZooming]`/ `-[NSTextInputContext didEndScrollingOrZooming]` when needed.
+ To support Writing Tools affordance on custom text view, expose this method and `-unionRectInVisibleSelectedRange `, and call `-[NSTextInputContext textInputClientDidUpdateSelectionRect]` when needed.
*/
@property (readonly) NSRect documentVisibleRect API_AVAILABLE(macos(14.0));
@@ -117,6 +119,8 @@
@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));
+
+@property (readonly) BOOL allowsWritingToolsAffordance API_AVAILABLE(macos(15.4)); // Default is automatic if not implemented.
@end
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputContext.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputContext.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputContext.h 2024-11-20 11:14:46
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputContext.h 2025-02-13 06:07:28
@@ -73,6 +73,12 @@
This method should be called after -invalidateCharacterCoordinates. */
- (void)textInputClientDidEndScrollingOrZooming API_AVAILABLE(macos(14.0));
+// Notify when the text view selection is changed.
+- (void)textInputClientDidUpdateSelection API_AVAILABLE(macos(15.4));
+
+// Notify when the text view scroll location is changed.
+- (void)textInputClientDidScroll API_AVAILABLE(macos(15.4));
+
/**** Text Input sources handling ****/
/* Text Input source handling API identifies text input sources with text input source identifier strings (i.e. "com.apple.inputmethod.Kotoeri.Japanese") supplied by the underlying TextInputSources framework. The ID corresponds to the kTISPropertyInputSourceID attribute.
*/
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h 2024-11-20 11:14:44
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h 2025-02-13 06:07:25
@@ -433,6 +433,8 @@
@property NSWritingToolsBehavior writingToolsBehavior API_AVAILABLE(macos(15.0));
@property NSWritingToolsResultOptions allowedWritingToolsResultOptions API_AVAILABLE(macos(15.0));
+
+@property BOOL allowsWritingToolsAffordance API_AVAILABLE(macos(15.4)); // Default is YES.
@end
@interface NSTextView (NSTextChecking)
diff -ruN /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWritingToolsCoordinator.h /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWritingToolsCoordinator.h
--- /Applications/Xcode_16.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWritingToolsCoordinator.h 2024-11-20 11:14:42
+++ /Applications/Xcode_16.3.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWritingToolsCoordinator.h 2025-02-13 06:07:23
@@ -601,42 +601,6 @@
/// changes, call the provided completion block to let Writing Tools know you’re finished.
- (void)writingToolsCoordinator:(NSWritingToolsCoordinator *)writingToolsCoordinator selectRanges:(NSArray<NSValue * /* NSRange */> *)ranges inContext:(NSWritingToolsCoordinatorContext *)context completion:(void(^)(void))completion NS_SWIFT_NAME(writingToolsCoordinator(_:select:in:completion:));
-/// Asks the delegate to provide the location of the character at the
-/// specified point in your view’s coordinate system.
-///
-/// - Parameters:
-/// - writingToolsCoordinator: The coordinator object requesting
-/// information from your custom view.
-/// - point: A point in your view’s coordinate space. Find the
-/// location of the text under this point, if any.
-/// - completion: A handler to execute with the required information.
-/// This handler has no return value and takes an <doc://com.apple.documentation/documentation/foundation/nsrange>
-/// and <doc://com.apple.documentation/documentation/foundation/uuid>
-/// as parameters. Set the range to the character’s location in one of your
-/// ``NSWritingToolsCoordinator/Context`` objects, which you specify using
-/// the <doc://com.apple.documentation/documentation/foundation/uuid> parameter.
-/// You must call this handler at some point during your method’s implementation.
-///
-/// When someone interacts with your view during a proofreading operation, Writing Tools
-/// calls this method to get the location of the interaction. If the interaction
-/// occurs in the text of one of your ``NSWritingToolsCoordinator/Context`` objects,
-/// configure an <doc://com.apple.documentation/documentation/foundation/nsrange>
-/// with the character’s location in that context object and a length of `1`. If
-/// the interaction occurs outside of the text of your context objects, configure
-/// the range with a location of `NSNotFound`.
-///
-/// When specifying the location of a character in your context object, provide a
-/// location relative to the start of your context object’s text. The first character
-/// in a context object’s text is always at location `0`, and it’s your responsibility
-/// to track the location of the context object’s text in your text storage object.
-/// When the context object’s text begins in the middle of your text storage,
-/// subtract the starting location of the context object’s text from the location
-/// you specify in your range value. For example, if the context object’s text
-/// starts at character `100` in your text storage, and an interaction occurs
-/// with the character at location `102`, specify a range with a location of
-/// `2` and a length of `1`.
-- (void)writingToolsCoordinator:(NSWritingToolsCoordinator *)writingToolsCoordinator requestsRangeInContextWithIdentifierForPoint:(NSPoint)point completion:(void(^)(NSRange range, NSUUID *contextID))completion NS_SWIFT_ASYNC_NAME(writingToolsCoordinator(_:rangeInContextWithIdentifierFor:));
-
/// Asks the delegate to provide the bounding paths for the specified
/// text in your view.
///
@@ -999,6 +963,45 @@
/// your view’s content. For example, it moves to the ``NSWritingToolsCoordinator/State/interactiveUpdating``
/// state when it’s making changes to your view’s text storage.
- (void)writingToolsCoordinator:(NSWritingToolsCoordinator *)writingToolsCoordinator willChangeToState:(NSWritingToolsCoordinatorState)newState completion:(void(^)(void))completion;
+
+
+#pragma mark Deprecated NSWritingToolsCoordinatorDelegate methods
+
+/// Asks the delegate to provide the location of the character at the
+/// specified point in your view’s coordinate system.
+///
+/// - Parameters:
+/// - writingToolsCoordinator: The coordinator object requesting
+/// information from your custom view.
+/// - point: A point in your view’s coordinate space. Find the
+/// location of the text under this point, if any.
+/// - completion: A handler to execute with the required information.
+/// This handler has no return value and takes an <doc://com.apple.documentation/documentation/foundation/nsrange>
+/// and <doc://com.apple.documentation/documentation/foundation/uuid>
+/// as parameters. Set the range to the character’s location in one of your
+/// ``NSWritingToolsCoordinator/Context`` objects, which you specify using
+/// the <doc://com.apple.documentation/documentation/foundation/uuid> parameter.
+/// You must call this handler at some point during your method’s implementation.
+///
+/// When someone interacts with your view during a proofreading operation, Writing Tools
+/// calls this method to get the location of the interaction. If the interaction
+/// occurs in the text of one of your ``NSWritingToolsCoordinator/Context`` objects,
+/// configure an <doc://com.apple.documentation/documentation/foundation/nsrange>
+/// with the character’s location in that context object and a length of `1`. If
+/// the interaction occurs outside of the text of your context objects, configure
+/// the range with a location of `NSNotFound`.
+///
+/// When specifying the location of a character in your context object, provide a
+/// location relative to the start of your context object’s text. The first character
+/// in a context object’s text is always at location `0`, and it’s your responsibility
+/// to track the location of the context object’s text in your text storage object.
+/// When the context object’s text begins in the middle of your text storage,
+/// subtract the starting location of the context object’s text from the location
+/// you specify in your range value. For example, if the context object’s text
+/// starts at character `100` in your text storage, and an interaction occurs
+/// with the character at location `102`, specify a range with a location of
+/// `2` and a length of `1`.
+- (void)writingToolsCoordinator:(NSWritingToolsCoordinator *)writingToolsCoordinator requestsRangeInContextWithIdentifierForPoint:(NSPoint)point completion:(void(^)(NSRange range, NSUUID *contextID))completion API_DEPRECATED("Not used anymore", macos(15.2, 15.4)) NS_SWIFT_ASYNC_NAME(writingToolsCoordinator(_:rangeInContextWithIdentifierFor:));
@end
#pragma mark NSTextPreview