-
Notifications
You must be signed in to change notification settings - Fork 507
QuickLookUI macOS xcode13.0 beta1
Rachel Kang edited this page Aug 9, 2021
·
3 revisions
#QuickLookUI.framework https://github.com/xamarin/xamarin-macios/pull/12389
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QLFilePreviewRequest.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QLFilePreviewRequest.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QLFilePreviewRequest.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QLFilePreviewRequest.h 2021-06-02 11:05:03.000000000 -0400
@@ -0,0 +1,31 @@
+//
+// QLFilePreviewRequest.h
+// Quick Look
+//
+// Copyright © 2020 Apple Inc. All rights reserved.
+//
+
+#if !__has_include(<QuickLookSupport/QLFilePreviewRequest.h>)
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ @abstract This class contains information about the preview that should be provided.
+ */
+API_AVAILABLE(ios(15.0), macos(12.0)) API_UNAVAILABLE(watchos,tvos) __attribute__((visibility("default")))
+@interface QLFilePreviewRequest : NSObject
+
+/**
+ The url of the file for which a preview is being requested.
+ */
+@property (readonly) NSURL* fileURL;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#else
+#import <QuickLookSupport/QLFilePreviewRequest.h>
+#endif
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QLPreviewPanel.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QLPreviewPanel.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QLPreviewPanel.h 2021-03-16 09:53:43.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QLPreviewPanel.h 2021-06-02 11:05:03.000000000 -0400
@@ -60,7 +60,7 @@
- (void)updateController;
/*
- * Acessing the previewed items
+ * Accessing the previewed items
*/
/*!
@@ -101,7 +101,7 @@
/*!
* @abstract The Preview Panel delegate.
*/
-@property(assign) id /*<QLPreviewPanelDelegate>*/ delegate;
+@property(assign) id /** <QLPreviewPanelDelegate>*/ delegate;
/*
* Managing Full screen mode
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QLPreviewProvider.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QLPreviewProvider.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QLPreviewProvider.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QLPreviewProvider.h 2021-06-02 11:05:03.000000000 -0400
@@ -0,0 +1,27 @@
+//
+// QLPreviewProvider.h
+// Quick Look
+//
+// Copyright © 2020 Apple Inc. All rights reserved.
+//
+
+#if !__has_include(<QuickLookSupport/QLPreviewProvider.h>)
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ @abstract Data-based preview extensions should subclass QLPreviewProvider in their principal object. The subclass should conform to QLPreviewingController.
+
+ */
+API_AVAILABLE(ios(15.0), macos(12.0)) API_UNAVAILABLE(watchos,tvos) __attribute__((visibility("default")))
+@interface QLPreviewProvider : NSObject <NSExtensionRequestHandling>
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#else
+#import <QuickLookSupport/QLPreviewProvider.h>
+#endif
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QLPreviewReply.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QLPreviewReply.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QLPreviewReply.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QLPreviewReply.h 2021-06-02 11:05:03.000000000 -0400
@@ -0,0 +1,107 @@
+//
+// QLPreviewReply.h
+// Quick Look
+//
+// Copyright © 2020 Apple Inc. All rights reserved.
+//
+
+#if !__has_include(<QuickLookSupport/QLPreviewReply.h>)
+
+#import <Foundation/Foundation.h>
+#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>
+#import <CoreGraphics/CoreGraphics.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ @abstract QLPreviewReplyAttachment is used to provide data for attachment in html data-based previews.
+ */
+API_AVAILABLE(ios(15.0), macos(12.0)) API_UNAVAILABLE(watchos,tvos) __attribute__((visibility("default")))
+@interface QLPreviewReplyAttachment:NSObject
+
+/** The data content of an html preview*/
+@property (readonly) NSData* data;
+
+/** The content type of the attachment for an html preview*/
+@property (readonly) UTType* contentType;
+
+/**
+ @abstract Create an attachment for html previews by providing the data and mime type of the attachment.
+ @param data The data content of an html preview
+ @param contentType The UTType of the attachment for an html preview
+ */
+- (instancetype)initWithData:(NSData*)data contentType:(UTType*)contentType;
+
+@end
+
+/**
+ @abstract To provide a data-based preview, you have to return a QLPreviewReply object.
+ */
+API_AVAILABLE(ios(15.0), macos(12.0)) API_UNAVAILABLE(watchos,tvos) __attribute__((visibility("default")))
+@interface QLPreviewReply : NSObject
+
+/** String encoding for text or html based previews. Defaults to NSUTF8StringEncoding. */
+@property NSStringEncoding stringEncoding;
+
+/** Attachments for HTML data previews. The keys of the dictionary are the attachment identifiers (eg foo) that can be referenced with the cid:id URL (eg cid:foo).*/
+@property (copy) NSDictionary<NSString*, QLPreviewReplyAttachment*>* attachments;
+
+/** Custom display title for the preview. If left as the empty string, QuickLook will use the file name.*/
+@property (copy) NSString* title;
+
+/**
+ @abstract
+ Use this method to provide a preview by drawing into a context.
+
+ @param contextSize The size of your image.
+ @param isBitmap Whether the context should be bitmap or vector.
+ @param drawingBlock The preview should be drawn into the context passed to this block. The QLPreviewReply passed into this block is the same as the one created by this method and is provided for convenience for any further updates to its properties during the drawing block. Return YES if the preview was successfully drawn into the context. Return NO and populate error otherwise.
+ */
+- (instancetype)initWithContextSize:(CGSize)contextSize isBitmap:(BOOL)isBitmap drawingBlock:(BOOL (^)(CGContextRef context, QLPreviewReply * reply, NSError** error))drawingBlock;
+
+
+/**
+ @abstract
+ Use this method to provide a preview by providing a URL to a file of a supported type.
+
+ @param fileURL A file URL representing a preview of the previewed URL. Currently supported types include: UTTypeImage, UTTypePDF, UTTypeHTML, UTTypeXML, UTTypePlainText, UTTypeRTF, UTTypeRTFD, UTTypeMovie, UTTypeAudio
+ */
+- (instancetype)initWithFileURL:(NSURL *)fileURL;
+
+/**
+ @abstract
+ Use this method to provide a preview with data of a supported format.
+
+ @param contentType The content type of the data.
+ @param contentSize A hint for the size you would like to display your content at. If your content has an intrinsic size built in, such as images and PDFs, that will be used as the final size, but providing the correct size here will allow QuickLook to present loading UI at the correct size before you are finished creating the data. QuickLook will use a default size if NSZeroSize is passed in.
+ @param dataCreationBlock Create and return data representing the file preview. Supported types include: UTTypeImage, UTTypePDF, UTTypeHTML, UTTypeXML, UTTypePlainText, UTTypeRTF. Heavy lifting should be done inside of the dataCreationBlock instead of when creating the QLPreviewReply. The QLPreviewReply passed into this block is the same as the one created by this method and is provided for convenience for any further updates to its properties, such as attachments, during the data generation. Return the data if successful. Populate error if unsuccessful.
+ */
+
+- (instancetype)initWithDataOfContentType:(UTType *)contentType contentSize:(CGSize)contentSize dataCreationBlock:(NSData * _Nullable (^)(QLPreviewReply * reply, NSError ** error))dataCreationBlock;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#else
+#import <QuickLookSupport/QLPreviewReply.h>
+#endif
+
+#import <PDFKit/PDFKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface QLPreviewReply (UI)
+
+/**
+ @abstract
+ Use this method to provide a preview with a PDFDocument
+
+ @param defaultPageSize The size of your pages in the document. If the page size varies, use the first page's size.
+ @param documentCreationBlock Create and return the PDFDocument. Heavy lifting should be done inside of the documentCreationBlock instead of when creating the QLPreviewReply. The QLPreviewReply passed into this block is the same as the one created by this method and is provided for convenience for any further updates to its properties during document creation. Return the PDFDocument if successfully created. Populate error if unsuccessful.
+ */
+- (instancetype)initForPDFWithPageSize:(CGSize)defaultPageSize documentCreationBlock:(PDFDocument * _Nullable (^)(QLPreviewReply * reply, NSError ** error))documentCreationBlock;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QLPreviewingController.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QLPreviewingController.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QLPreviewingController.h 2021-03-16 09:53:43.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QLPreviewingController.h 2021-06-02 11:05:03.000000000 -0400
@@ -11,14 +11,19 @@
NS_ASSUME_NONNULL_BEGIN
+@class QLPreviewReply;
+@class QLFilePreviewRequest;
+
typedef void(^QLPreviewItemLoadingBlock)(NSError * _Nullable error) API_DEPRECATED("Use void (^)(NSError * _Nullable) instead", macos(10.13,10.14)) API_UNAVAILABLE(ios, watchos, tvos);
/**
- The controller that implements the QLPreviewingController protocol must at least implement one of the two following methods:
+ For view based previews, the view controller that implements the QLPreviewingController protocol must at least implement one of the two following methods:
-[QLPreviewingController preparePreviewOfSearchableItemWithIdentifier:queryString:completionHandler:], to generate previews for Spotlight searchable items.
-[QLPreviewingController preparePreviewOfFileAtURL:completionHandler:], to generate previews for file URLs.
The main preview should be presented by the view controller implementing QLPreviewingController. Avoid presenting view controllers from your QLPreviewingController. For Catalyst compatibility, avoid using gesture recognizers that take interactions over large portions of the view to avoid collisions with standard macOS preview behaviors.
+
+ For data-based previews, subclass QLPreviewProvider which conforms to this protocol.
*/
QL_EXPORT @protocol QLPreviewingController <NSObject>
@@ -53,6 +58,12 @@
*/
- (void)preparePreviewOfFileAtURL:(NSURL *)url completionHandler:(void (^)(NSError * _Nullable))handler NS_SWIFT_NAME(preparePreviewOfFile(at:completionHandler:));
+/**
+ @abstract Use this method to provide a QLPreviewReply that provides preview in the form of NSData, NSURL, PDFDocument, or a drawing into a context.
+ @param request An object which contains information about the preview that should be provided. It contains the URL of the file to provide a preview for.
+ @param handler Call the completion handler with a QLPreviewReply if you can provide a preview, or with an NSError if you cannot. If an error is passed or reply is nil, a generic preview will be provided instead. The handler can be called asynchronously after the method has returned.
+ */
+- (void)providePreviewForFileRequest:(QLFilePreviewRequest*)request completionHandler:(void (^)(QLPreviewReply * _Nullable reply, NSError * _Nullable error))handler NS_SWIFT_NAME(providePreview(for:completionHandler:));
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QuickLookUI.apinotes /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QuickLookUI.apinotes
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QuickLookUI.apinotes 2021-03-16 04:44:17.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QuickLookUI.apinotes 2021-06-01 21:22:54.000000000 -0400
@@ -1,13 +1,29 @@
---
Name: QuickLookUI
+Classes:
+ - Name: QLPreviewReply
+ Methods:
+ - Selector: "initWithContextSize:isBitmap:drawingBlock:"
+ MethodKind: Instance
+ SwiftPrivate: true
+ - Selector: "initForPDFWithPageSize:documentCreationBlock:"
+ MethodKind: Instance
+ SwiftPrivate: true
+ - Selector: "initWithDataOfContentType:contentSize:dataCreationBlock:"
+ MethodKind: Instance
+ SwiftPrivate: true
+ Properties:
+ - Name: stringEncoding
+ PropertyKind: Instance
+ SwiftPrivate: true
SwiftVersions:
- Version: 4
Protocols:
- Name: QLPreviewingController
Methods:
- - Selector: 'preparePreviewOfSearchableItemWithIdentifier:queryString:completionHandler:'
+ - Selector: "preparePreviewOfSearchableItemWithIdentifier:queryString:completionHandler:"
MethodKind: Instance
- SwiftName: 'preparePreviewOfSearchableItem(withIdentifier:queryString:completionHandler:)'
+ SwiftName: "preparePreviewOfSearchableItem(withIdentifier:queryString:completionHandler:)"
Parameters:
- Position: 1
Nullability: N
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QuickLookUI.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QuickLookUI.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework/Headers/QuickLookUI.h 2021-03-16 04:44:17.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/QuickLookUI.framework/Headers/QuickLookUI.h 2021-06-01 21:31:57.000000000 -0400
@@ -16,5 +16,8 @@
#import <QuickLookUI/QLPreviewPanel.h>
#import <QuickLookUI/QLPreviewView.h>
#import <QuickLookUI/QLPreviewingController.h>
+#import <QuickLookUI/QLPreviewReply.h>
+#import <QuickLookUI/QLPreviewProvider.h>
+#import <QuickLookUI/QLFilePreviewRequest.h>
#endif /* __QUICKLOOKUI_QUICKLOOKUI__ */
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status