From eeff5d415cc3260e09fc6dac877f95afd5e5111a Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Wed, 26 Jul 2017 11:58:36 -0400 Subject: [PATCH 1/2] [quicklook] Update up to beta 4 --- src/quicklook.cs | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/quicklook.cs b/src/quicklook.cs index c0fdec953752..8b0de3a57a6a 100644 --- a/src/quicklook.cs +++ b/src/quicklook.cs @@ -143,6 +143,53 @@ interface QLPreviewItem { [Export ("previewItemTitle")] string ItemTitle { get; } } + + [iOS (11,0)] + [Protocol] + interface QLPreviewingController { + [Export ("preparePreviewOfSearchableItemWithIdentifier:queryString:completionHandler:")] + void PreparePreviewOfSearchableItem (string identifier, [NullAllowed] string queryString, Action handler); + + [Export ("preparePreviewOfFileAtURL:completionHandler:")] + void PreparePreviewOfFile (NSUrl url, Action handler); + } + + [iOS (11,0)] + [BaseType (typeof (NSObject))] + interface QLThumbnailProvider { + [Export ("provideThumbnailForFileRequest:completionHandler:")] + void ProvideThumbnail (QLFileThumbnailRequest request, Action handler); + } + + [iOS (11,0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface QLThumbnailReply { + [Static] + [Export ("replyWithContextSize:drawingBlock:")] + QLThumbnailReply CreateReply (CGSize contextSize, Func drawingBlock); + + [Static] + [Export ("replyWithContextSize:currentContextDrawingBlock:")] + QLThumbnailReply CreateReply (CGSize contextSize, Func drawingBlock); + + [Static] + [Export ("replyWithImageFileURL:")] + QLThumbnailReply CreateReply (NSUrl fileURL); + } + + [iOS (11,0)] + [BaseType (typeof (NSObject))] + interface QLFileThumbnailRequest { + [Export ("maximumSize")] + CGSize MaximumSize { get; } + + [Export ("scale")] + nfloat Scale { get; } + + [Export ("fileURL", ArgumentSemantic.Copy)] + NSUrl FileUrl { get; } + } #else [Static] interface QLThumbnailImage { From 824bbfce72333598a177cc87bc150250aa60459d Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Wed, 26 Jul 2017 21:13:26 -0400 Subject: [PATCH 2/2] [quicklook] Fix casing for Url --- src/quicklook.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quicklook.cs b/src/quicklook.cs index 8b0de3a57a6a..a2b6f42053b2 100644 --- a/src/quicklook.cs +++ b/src/quicklook.cs @@ -175,7 +175,7 @@ interface QLThumbnailReply { [Static] [Export ("replyWithImageFileURL:")] - QLThumbnailReply CreateReply (NSUrl fileURL); + QLThumbnailReply CreateReply (NSUrl fileUrl); } [iOS (11,0)]