[Mono-osx] Quick Look support in MonoMac
fak at kruegersystems.com
Thu Jan 20 00:46:01 EST 2011
I am writing to inquire into the inclusion of QuickLook bundles into MonoMac
QuickLook bundles are little plugins loaded by the Quick Look daemon in OS X
to generate thumbnails and previews of documents. The are little Mach-O
executables that implement 4 functions. These functions are supposed to be
written in a re-entrant fashion since they will be used over and over on
possibly 1 thread. (This behavior can be prevented, but it would be best if
we support it.)
It would be a wonderful dream world if I could create an assembly that
contains a class that implements those 4 functions and have that packaged up
into a bundle and included in my MonoMac app.
Any thoughts on how much work it would be to create such a packager?
Below are some notes I gathered while looking into what exactly the
generator bundle is composed of.
Create Quick Look Plug-in
1. Xcode -> New Project -> System Plug-in -> Quick Look Plug-in
2. Name it "Alpha"
Architectures: Standard (32/64-bit Universal)
Base SDK: Mac OS X 10.6
Valid Architectures: i386 ppc ppc64 ppc7400 ppc970 x86_64
File Type: MH_BUNDLE
Flags: MH_NOUNDEFS | MH_DYLDLINK | MH_TWOLEVEL
Implements the following functions:
OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef
preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options)
void CancelPreviewGeneration(void* thisInterface, QLPreviewRequestRef
OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef
thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef
options, CGSize maxSize)
void CancelThumbnailGeneration(void* thisInterface, QLThumbnailRequestRef
You can store a Quick Look generator in an application bundle (in
MyApp.app/Contents/Library/QuickLook/) or in one of the standard file-system
* ~/Library/QuickLook—third party generators, accessible only to logged-in
* /Library/QuickLook—third party generators, accessible to all users of the
* /System/Library/QuickLook—Apple-provided generators, accessible to all
users of the system
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx