1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
// Lynkeos
// $Id: MyPluginsController.h 585 2018-09-08 21:30:37Z j-etienne $
//
// Created by Jean-Etienne LAMIAUD on Fri Mar 2, 2007.
// Copyright (c) 2007-2013. Jean-Etienne LAMIAUD
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
/*!
* @header
* @abstract Plugin controller singleton class
*/
#ifndef __MYPLUGINSCONTROLLER_H
#define __MYPLUGINSCONTROLLER_H
#import <Foundation/Foundation.h>
#include "LynkeosProcessingView.h"
//! Name of the help file in each plugin
extern NSString * const LynkeosPluginHelpFile;
/*!
* @abstract Utility class which registers a reader with its priority for one file type
*/
@interface LynkeosReaderRegistry : NSObject
{
@public
//! The priority this reader has for opening this kind of file
int priority;
Class reader; //!< One file reader
}
@end
/*!
* @abstract Container for a processing
*/
@interface LynkeosProcessingViewRegistry : NSObject
{
@public
Class controller; //!< The processing view controller
id <NSObject> config; //!< Optional configuration object
NSString* ident; //!< A class unique identifier
}
@end
/*!
* @abstract This singleton loads every plugins and retrieves the helpers
* classes they provide.
*/
@interface MyPluginsController : NSObject
#if !GNUSTEP
<NSToolbarDelegate>
#endif
{
//! The readers, organized by file type as arrays sorted by priority
//! @{
NSMutableDictionary *_imageReadersDict;
NSMutableDictionary *_movieReadersDict;
//! @}
//! The writers classes
//! @{
NSMutableArray *_imageWritersList;
NSMutableArray *_movieWritersList;
//! @}
//! The processing view classes
NSMutableArray *_processingViewsList;
//! The preference classes
NSMutableArray *_preferencesList;
//! The interpolators classes
NSMutableArray *_interpolatorsList;
//! Plugins bundle list
NSMutableArray *_bundlesList;
}
/*!
* @abstract Retrieves the singleton instance of MyPluginController
* @result The lone instance
*/
+ (MyPluginsController*) defaultPluginController;
/*!
* @abstract Register a processing view controller
* @param c the processing view class
* @param config a configuration object
* @param ident a class unique identifier for this controller
*/
- (void) registerProcessingViewController:(Class)c
withConfiguration:(id)config
identifier:(NSString*)ident;
/*!
* @abstract Access the list of image readers classes
* @result The image readers class dictionary, organized by file type as arrays
* sorted by priority
*/
- (NSDictionary*) getImageReaders;
/*!
* @abstract Access the list of movie readers classes
* @result The movie readers class dictionary, organized by file type as arrays
* sorted by priority
*/
- (NSDictionary*) getMovieReaders;
/*!
* @abstract Access the list of image writers classes
* @result The image writer class array
*/
- (NSArray*) getImageWriters;
/*!
* @abstract Access the list of movie writers classes
* @result The movie writers class array
*/
- (NSArray*) getMovieWriters;
/*!
* @abstract Access the list of processing view classes
* @result The processing view class array
*/
- (NSArray*) getProcessingViews;
/*!
* @abstract Access the list of user preference classes
* @result The preferences class array
*/
- (NSArray*) getPreferencesPanes;
/*!
* @abstract Access the list of interpolators classes
* @result The interpolators class array
*/
- (NSArray*) getInterpolators;
/*!
* @abstract Access the list of loaded bundles
* @result The bundles array
*/
- (NSArray*) getLoadedBundles;
@end
#endif
|