5 // Created by Mac-arena the Bored Zo on 2005-06-01.
6 // Copyright 2005-2006 The Growl Project. All rights reserved.
9 #import <Cocoa/Cocoa.h>
11 @class NSPreferencePane;
13 /*! @class GrowlPlugin
14 * @abstract The base plug-in class.
15 * @discussion All Growl plug-in instances are a kind of this class, including
16 * display plug-ins, which are kinds of <code>GrowlDisplayPlugin</code>.
18 @interface GrowlPlugin : NSObject {
19 NSString *pluginName, *pluginAuthor, *pluginVersion, *pluginDesc;
20 NSBundle *pluginBundle;
21 NSString *pluginPathname;
23 NSPreferencePane *preferencePane;
28 * @method initWithName:author:version:pathname:
29 * @abstract Designated initializer.
30 * @param name The name of the plugin.
31 * @param author The author of the plugin.
32 * @param version The version of the plugin.
33 * @param pathname The pathname of the plugin.
34 * @result An initialized GrowlPlugin object.
36 - (id) initWithName:(NSString *)name author:(NSString *)author version:(NSString *)version pathname:(NSString *)pathname;
39 * @method initWithBundle:
40 * @abstract Initializer for plug-ins in bundles. The name, author, version, and pathname will be obtained from the bundle.
41 * @result An initialized GrowlPlugin object.
43 - (id) initWithBundle:(NSBundle *)bundle;
48 * @abstract Returns the name of the receiver.
54 * @abstract Returns the author of the receiver.
56 - (NSString *) author;
59 * @method pluginDescription
60 * @abstract Returns the description of the receiver.
62 - (NSString *) pluginDescription;
66 * @abstract Returns the version of the receiver.
68 - (NSString *) version;
72 * @abstract Returns the bundle of the receiver.
74 - (NSBundle *) bundle;
78 * @abstract Returns the pathname of the receiver.
80 - (NSString *) pathname;
84 * @abstract Returns the string used to access the preference domain of the receiver.
86 - (NSString *) prefDomain;
89 /*! @method preferencePane
90 * @abstract Return an <code>NSPreferencePane</code> instance that manages
91 * the plugin's preferences.
92 * @discussion Your plug-in should put the controls for its preferences in
93 * this preference pane.
95 * Currently, the size of the preference pane's view should be 354 pixels by
96 * 289 pixels, but you should set the springs of the view and its subviews
97 * under the assumption that it can be resized horizontally and vertically to
100 * The default implementation of this method returns <code>nil</code>.
101 * @result The preference pane. Can be <code>nil</code>.
103 - (NSPreferencePane *) preferencePane;