/* * LBImageProcessingProtocol.h * Lightbox * * Created by Josh Anon on Sat Dec 07 2002. * Copyright (c) 2002 Josh Anon. All rights reserved. * */ #import #ifndef LBImagePluginCompleted #define LBImagePluginCompleted 1 #define LBImagePluginCancelled 0 #endif @protocol LBImageProcessingProtocol < NSObject > //what will appear in the menu +(NSString*)name; //return YES if you can process an uncoverted, given type (e.g. crw, canon tif, nef, etc.) +(BOOL)handlesRawType:(NSString*)extension; //return YES if you can process the converted type +(BOOL)handlesConvertedType:(NSString*)extension; //for menu validation--do you accept > 1 image? +(BOOL)acceptsMultipleImages; //called to load the bundle +(BOOL)initializeClass:(NSBundle*)theBundle; //once cocoa gets unloading bundle support, Lightbox'll call this to unload +(void)terminateClass; //show the working window while plugin is running +(BOOL)showWorkingWindow; //current protocol version is 1 +(int)version; //Lightbox will call this to init the plugin -(id)init; //hands in array of dictionaries //dictionaries contain {imagePath = /path/to/image, // thumbnailPath = /path/to/thumbnail, // thumbnailRotation = angle (NSNumber/float) indicating rotation for thumb // loadedImage = NSImage (if available/already loaded) //count might still be > 1 even if you say you don't accept multiple images -(void)setImages:(NSArray*)images; //from what window did we choose the plugin? Might be from preview window, or it //might be from organizer -(void)setParentWindow:(NSWindow*)window; //return either LBImagePluginCompleted or LBImagePluginCancelled -(int)run; //updated thumbnail images in same order as images array -(NSArray*)thumbnails; //for letting your plugin provide undo -(void)setUndoManager:(NSUndoManager*)undoM; @end