NSObject(GrowlApplicationBridgeDelegate_InformalProtocol)


Abstract

Methods which may be optionally implemented by the GrowlDelegate.

Discussion

The methods in this informal protocol will only be called if implemented by the delegate.



Methods

-applicationIconDataForGrowl
Return the NSData to treat as the application icon.
-applicationNameForGrowl
Return the name of this application which will be used for Growl bookkeeping.
-growlIsReady
Informs the delegate that Growl has launched.
-growlNotificationTimedOut:
Informs the delegate that a Growl notification timed out.
-growlNotificationWasClicked:
Informs the delegate that a Growl notification was clicked.
-registrationDictionaryForGrowl
Return the dictionary used to register this application with Growl.

applicationIconDataForGrowl


Return the NSData to treat as the application icon.

- (NSData *) applicationIconDataForGrowl;
method result
The NSData to treat as the application icon.
Discussion

The delegate may optionally return an NSData object to use as the application icon; if this is not implemented, the application's own icon is used. This is not generally needed.


applicationNameForGrowl


Return the name of this application which will be used for Growl bookkeeping.

- (NSString *) applicationNameForGrowl;
method result
The name of the application using Growl.
Discussion

This name is used both internally and in the Growl preferences.
This should remain stable between different versions and incarnations of your application. For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and "SurfWriter Lite" are not.
You do not need to implement this method if you are providing the application name elsewhere, meaning in an auto-discoverable plist file in your app bundle (XXX refer to more information on that) or in the result of -registrationDictionaryForGrowl.


growlIsReady


Informs the delegate that Growl has launched.

- (void) growlIsReady;
Discussion

Informs the delegate that Growl (specifically, the GrowlHelperApp) was launched successfully or was already running. The application can take actions with the knowledge that Growl is installed and functional.


growlNotificationTimedOut:


Informs the delegate that a Growl notification timed out.

- (void) growlNotificationTimedOut:(id)clickContext;
Parameter Descriptions
clickContext
The clickContext passed when displaying the notification originally via +[.GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]
Discussion

Informs the delegate that a Growl notification timed out. It is only sent for notifications sent with a non-nil clickContext, so if you want to receive a message when a notification is clicked, clickContext must not be nil when calling +[.GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]


growlNotificationWasClicked:


Informs the delegate that a Growl notification was clicked.

- (void) growlNotificationWasClicked:(id)clickContext;
Parameter Descriptions
clickContext
The clickContext passed when displaying the notification originally via +[.GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]
Discussion

Informs the delegate that a Growl notification was clicked. It is only sent for notifications sent with a non-nil clickContext, so if you want to receive a message when a notification is clicked, clickContext must not be nil when calling +[.GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]


registrationDictionaryForGrowl


Return the dictionary used to register this application with Growl.

- (NSDictionary *) registrationDictionaryForGrowl;
method result
The NSDictionary to use for registration.
Discussion

The returned dictionary gives Growl the complete list of notifications this application will ever send, and it also specifies which notifications should be enabled by default. Each is specified by an array of NSString objects.
For most applications, these two arrays can be the same (if all sent notifications should be displayed by default).
The NSString objects of these arrays will correspond to the notificationName: parameter passed in +[ calls.GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]
The dictionary should have 2 key object pairs: key: GROWL_NOTIFICATIONS_ALL object: NSArray of NSString objects key: GROWL_NOTIFICATIONS_DEFAULT object: NSArray of NSString objects
You do not need to implement this method if you have an auto-discoverable plist file in your app bundle. (XXX refer to more information on that)

© The Growl Project (Last Updated May 14, 2005)