Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 46 lines (36 sloc) 1.771 kb
dc5be1c Initial check-in.
uli authored
1 //
2 // UKPluginRegistry.h
3 // UliKit
4 //
5 // Created by Uli Kusterer on 24.10.04.
6 // Copyright 2004 M. Uli Kusterer. All rights reserved.
7 //
8
9 #import <Cocoa/Cocoa.h>
10
11
12 @interface UKPluginRegistry : NSObject
13 {
14 NSMutableArray* plugins; // List of available plugins, with dictionaries for each.
15 NSMutableDictionary* pluginPaths; // Key is file path, value is entry in plugins.
16 BOOL instantiate; // Instantiate the principal class of each plugin.
17 }
18
19 +(id) sharedRegistry;
20
21 // The following loads from all Application Support/AppName/PlugIns/ folders as well as the PlugIns folder in the app bundle:
22 -(void) loadPluginsOfType: (NSString*)ext; // Usually you only need to call this.
23 -(void) loadPluginsFromPath: (NSString*)folder ofType: (NSString*)ext;
24 -(NSMutableDictionary*) loadPluginForPath: (NSString*)currPath; // Returns dictionary for loaded plugin.
25
26 -(NSArray*) loadedPlugins; // Array of plugin dictionaries.
27
28 -(BOOL) instantiate;
29 -(void) setInstantiate: (BOOL)n;
30
31 @end
32
33 /*
34 Each plugin is represented by an NSMutableDictionary to which you can add your
35 own entries as needed. The keys UKPluginRegistry adds to this dictionary are:
36
37 bundle - NSBundle instance for this plugin.
38 image - Icon (NSImage) of the plugin (for display in toolbars etc.)
39 name - Display name of the plugin (for display in lists, toolbars etc.)
40 path - Full path to the bundle.
41 class - The principal class (type "Class") for this bundle, so you
42 can instantiate it.
43 instance - If instantiate == YES, this contains an instance of the
44 principal class, instantiated using alloc+init.
45 info.plist - The keys from the bundle's Info.plist file, localized.
46 */
Something went wrong with that request. Please try again.