Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[quicklook] Update up to beta 4 #2374

Merged
merged 2 commits into from
Jul 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions src/quicklook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<NSError> handler);

[Export ("preparePreviewOfFileAtURL:completionHandler:")]
void PreparePreviewOfFile (NSUrl url, Action<NSError> handler);
}

[iOS (11,0)]
[BaseType (typeof (NSObject))]
interface QLThumbnailProvider {
[Export ("provideThumbnailForFileRequest:completionHandler:")]
void ProvideThumbnail (QLFileThumbnailRequest request, Action<QLThumbnailReply, NSError> handler);
}

[iOS (11,0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface QLThumbnailReply {
[Static]
[Export ("replyWithContextSize:drawingBlock:")]
QLThumbnailReply CreateReply (CGSize contextSize, Func<CGContext, bool> drawingBlock);

[Static]
[Export ("replyWithContextSize:currentContextDrawingBlock:")]
QLThumbnailReply CreateReply (CGSize contextSize, Func<bool> 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 {
Expand Down