Skip to content

PDFKit macOS xcode16.0 b1

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

#PDFKit.framework

Rolf

diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFAnnotation.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFAnnotation.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFAnnotation.h	2024-04-13 21:38:16
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFAnnotation.h	2024-05-30 04:23:08
@@ -117,13 +117,11 @@
 PDFKIT_EXTERN PDFAnnotationKey PDFAnnotationKeyWidgetTextLabelUI PDFKIT_AVAILABLE(10_13, 11_0);                 // "/TU": String
 PDFKIT_EXTERN PDFAnnotationKey PDFAnnotationKeyWidgetValue PDFKIT_AVAILABLE(10_13, 11_0);                       // "/V": (various)
 
-@class PDFAction, PDFBorder, PDFPage, PDFAnnotationPopup, PDFAnnotationPrivateVars;
+@class PDFAction, PDFBorder, PDFPage, PDFAnnotationPopup;
 
 PDFKIT_CLASS_AVAILABLE(10_4, 11_0)
 @interface PDFAnnotation : NSObject <NSCopying, NSCoding>
 {
-@private
-    PDFAnnotationPrivateVars *_private;
 }
 
 // This is the base class for all annotations. A PDFAnnotation object by itself is not useful, only subclasses (like 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFDocument.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFDocument.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFDocument.h	2024-04-13 21:53:10
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFDocument.h	2024-05-30 11:51:48
@@ -21,8 +21,9 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-@class PDFDestination, PDFOutline, PDFPage, PDFSelection, PDFDocumentPrivate;
+@class PDFDestination, PDFOutline, PDFPage, PDFSelection;
 @protocol PDFDocumentDelegate;
+typedef NS_ENUM(NSUInteger, PDFSelectionGranularity);
 
 #if defined(PDFKIT_PLATFORM_OSX)
 
@@ -128,8 +129,6 @@
 PDFKIT_CLASS_AVAILABLE(10_4, 11_0)
 @interface PDFDocument : NSObject <NSCopying>
 {
-@private
-    PDFDocumentPrivate* _private;
 }
 
 // -------- init
@@ -299,6 +298,8 @@
 // that page. Points are in page-space and relative to their respective pages.  Start and end page can be the same 
 // (and are then equivalent to calling -[PDFPage selectionFromPoint: toPoint:]).
 - (nullable PDFSelection *)selectionFromPage:(PDFPage *)startPage atPoint:(PDFPoint)startPoint toPage:(PDFPage *)endPage atPoint:(PDFPoint)endPoint;
+
+- (nullable PDFSelection *)selectionFromPage:(PDFPage *)startPage atPoint:(PDFPoint)startPoint toPage:(PDFPage *)endPage atPoint:(PDFPoint)endPoint withGranularity:(PDFSelectionGranularity)granularity PDFKIT_AVAILABLE(15_0, 18_0);
 
 // Similar to the above method but allows you to specify a character index for the start and end pages.
 - (nullable PDFSelection *)selectionFromPage:(PDFPage *)startPage atCharacterIndex:(NSUInteger)startCharacter toPage:(PDFPage *)endPage atCharacterIndex:(NSUInteger)endCharacter;
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFPage.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFPage.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFPage.h	2024-03-22 20:37:20
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFPage.h	2024-05-30 12:30:51
@@ -13,8 +13,26 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-@class PDFDocument, PDFAnnotation, PDFSelection, PDFPagePrivate, PDFAccessibilityNode;
+@class PDFDocument, PDFAnnotation, PDFSelection, PDFAccessibilityNode;
 
+// PDF areas of interest (bitfield, multiple bits below may be set).
+PDFKIT_AVAILABLE(10_4, 11_0)
+typedef NS_OPTIONS(NSInteger, PDFAreaOfInterest)
+{
+    kPDFNoArea =            0,
+    kPDFPageArea =          (1UL << 0),
+    kPDFTextArea =          (1UL << 1),
+    kPDFAnnotationArea =    (1UL << 2),
+    kPDFLinkArea =          (1UL << 3),
+    kPDFControlArea =       (1UL << 4),
+    kPDFTextFieldArea =     (1UL << 5),
+    kPDFIconArea =          (1UL << 6),
+    kPDFPopupArea =         (1UL << 7),
+    kPDFImageArea =         (1UL << 8),
+
+    kPDFAnyArea =           NSIntegerMax
+};
+
 // Page boxes.
 PDFKIT_ENUM_AVAILABLE(10_4, 11_0)
 typedef NS_ENUM(NSInteger, PDFDisplayBox)
@@ -31,8 +49,6 @@
 PDFKIT_CLASS_AVAILABLE(10_4, 11_0)
 @interface PDFPage : NSObject <NSCopying>
 {
-@private
-	PDFPagePrivate *_private;
 }
 
 // -------- initializer
@@ -134,7 +150,7 @@
 - (nullable PDFSelection *)selectionForRect:(PDFRect)rect;
 
 // Given a point in page-space, returns a selection representing a whole word at that point. May return NULL if no 
-// character (and by extension no word) under point. If data dectors are enabled (-[PDFView enableDataDetectors]),
+// character (and by extension no word) under point. If data dectors are enabled (-[PDFDocument enableDataDetectors]),
 // this return the smart-selection for the content at the given point.
 - (nullable PDFSelection *)selectionForWordAtPoint:(PDFPoint)point;
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFSelection.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFSelection.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFSelection.h	2024-03-22 20:37:20
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFSelection.h	2024-05-30 06:19:27
@@ -15,13 +15,19 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-@class PDFPage, PDFSelectionPrivate;
+@class PDFPage;
 
+// Enum used to determine the granularity at which text selections are created. Mirrors CGPDFSelectionType.
+PDFKIT_ENUM_AVAILABLE(15_0, 18_0)
+typedef NS_ENUM(NSUInteger, PDFSelectionGranularity) {
+    PDFSelectionGranularityCharacter,
+    PDFSelectionGranularityWord,
+    PDFSelectionGranularityLine,
+};
+
 PDFKIT_CLASS_AVAILABLE(10_4, 11_0)
 @interface PDFSelection : NSObject <NSCopying>
 {
-@private
-    PDFSelectionPrivate *_private;
 }
 
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFView.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFView.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFView.h	2024-03-22 20:29:53
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFView.h	2024-05-30 06:19:28
@@ -38,24 +38,6 @@
     kPDFDisplayDirectionHorizontal = 1,
 };
 
-// PDF areas of interest (bitfield, multiple bits below may be set).
-PDFKIT_AVAILABLE(10_4, 11_0)
-typedef NS_OPTIONS(NSInteger, PDFAreaOfInterest)
-{
-    kPDFNoArea =            0,
-    kPDFPageArea =          (1UL << 0),
-    kPDFTextArea =          (1UL << 1),
-    kPDFAnnotationArea =    (1UL << 2),
-    kPDFLinkArea =          (1UL << 3),
-    kPDFControlArea =       (1UL << 4),
-    kPDFTextFieldArea =     (1UL << 5),
-    kPDFIconArea =          (1UL << 6),
-    kPDFPopupArea =         (1UL << 7),
-    kPDFImageArea =         (1UL << 8),
-    
-    kPDFAnyArea =           NSIntegerMax
-};
-
 // Interpolation quality.
 PDFKIT_ENUM_AVAILABLE(10_7, 11_0)
 typedef NS_ENUM(NSInteger, PDFInterpolationQuality)
@@ -357,8 +339,8 @@
 
 // Turns on or off data detection. If enabled, page text will be scanned for results such as URL's, addresses, phone numbers,
 // times/dates, etc., as the page becomes visible. Where URL's are found, Link annotations are created in place. These are
-// temporary annotations and are not saved.
-@property (nonatomic) BOOL enableDataDetectors PDFKIT_AVAILABLE(10_6, 11_0);
+// temporary annotations and are not saved. It is deprecated in favor of -[PDFDocument enableDataDetectors].
+@property (nonatomic) BOOL enableDataDetectors PDFKIT_DEPRECATED(10_6, 15_0, 11_0, 18_0);
 
 // If YES, page overlay views will be hit tested and therefore receive gestures. If NO, PDFView will receive gestures,
 // namely those for text selection.
Clone this wiki locally