Class QLPreviewReply

  • All Implemented Interfaces:
    NSObject

    public class QLPreviewReply
    extends NSObject
    To provide a data-based preview, you have to return a QLPreviewReply object. API-Since: 15.0
    • Constructor Detail

      • QLPreviewReply

        protected QLPreviewReply​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static QLPreviewReply allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • attachments

        @NotNull
        public @NotNull NSDictionary<java.lang.String,​? extends QLPreviewReplyAttachment> attachments()
        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).
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • initForPDFWithPageSizeDocumentCreationBlock

        public QLPreviewReply initForPDFWithPageSizeDocumentCreationBlock​(CGSize defaultPageSize,
                                                                          @NotNull
                                                                          @NotNull QLPreviewReply.Block_initForPDFWithPageSizeDocumentCreationBlock documentCreationBlock)
        Use this method to provide a preview with a PDFDocument
        Parameters:
        defaultPageSize - The size of your pages in the document. If the page size varies, use the first page's size.
        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.
      • initWithContextSizeIsBitmapDrawingBlock

        public QLPreviewReply initWithContextSizeIsBitmapDrawingBlock​(CGSize contextSize,
                                                                      boolean isBitmap,
                                                                      @NotNull
                                                                      @NotNull QLPreviewReply.Block_initWithContextSizeIsBitmapDrawingBlock drawingBlock)
        Use this method to provide a preview by drawing into a context.
        Parameters:
        contextSize - The size of your image.
        isBitmap - Whether the context should be bitmap or vector.
        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.
      • initWithDataOfContentTypeContentSizeDataCreationBlock

        public QLPreviewReply initWithDataOfContentTypeContentSizeDataCreationBlock​(@NotNull
                                                                                    @NotNull UTType contentType,
                                                                                    CGSize contentSize,
                                                                                    @NotNull
                                                                                    @NotNull QLPreviewReply.Block_initWithDataOfContentTypeContentSizeDataCreationBlock dataCreationBlock)
        Use this method to provide a preview with data of a supported format.
        Parameters:
        contentType - The content type of the data.
        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.
        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.
      • initWithFileURL

        public QLPreviewReply initWithFileURL​(@NotNull
                                              @NotNull NSURL fileURL)
        Use this method to provide a preview by providing a URL to a file of a supported type.
        Parameters:
        fileURL - A file URL representing a preview of the previewed URL. Currently supported types include: UTTypeImage, UTTypePDF, UTTypeHTML, UTTypeXML, UTTypePlainText, UTTypeRTF, UTTypeRTFD, UTTypeMovie, UTTypeAudio
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setAttachments

        public void setAttachments​(@NotNull
                                   @NotNull NSDictionary<java.lang.String,​? extends QLPreviewReplyAttachment> value)
        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).
      • setStringEncoding

        public void setStringEncoding​(long value)
        String encoding for text or html based previews. Defaults to NSUTF8StringEncoding.
      • setTitle

        public void setTitle​(@NotNull
                             @NotNull java.lang.String value)
        Custom display title for the preview. If left as the empty string, QuickLook will use the file name.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • stringEncoding

        public long stringEncoding()
        String encoding for text or html based previews. Defaults to NSUTF8StringEncoding.
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • title

        @NotNull
        public @NotNull java.lang.String title()
        Custom display title for the preview. If left as the empty string, QuickLook will use the file name.
      • version_static

        public static long version_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.