source: trunk/macosx/Growl.Framework/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h @ 10121

Last change on this file since 10121 was 10121, checked in by livings124, 12 years ago

add Growl 1.2.1

File size: 26.8 KB
Line 
1//
2//  GrowlApplicationBridge.h
3//  Growl
4//
5//  Created by Evan Schoenberg on Wed Jun 16 2004.
6//  Copyright 2004-2006 The Growl Project. All rights reserved.
7//
8
9/*!
10 *      @header         GrowlApplicationBridge.h
11 *      @abstract   Defines the GrowlApplicationBridge class.
12 *      @discussion This header defines the GrowlApplicationBridge class as well as
13 *       the GROWL_PREFPANE_BUNDLE_IDENTIFIER constant.
14 */
15
16#ifndef __GrowlApplicationBridge_h__
17#define __GrowlApplicationBridge_h__
18
19#import <Foundation/Foundation.h>
20#import <AppKit/AppKit.h>
21#import "GrowlDefines.h"
22
23//Forward declarations
24@protocol GrowlApplicationBridgeDelegate;
25
26//Internal notification when the user chooses not to install (to avoid continuing to cache notifications awaiting installation)
27#define GROWL_USER_CHOSE_NOT_TO_INSTALL_NOTIFICATION @"User chose not to install"
28
29//------------------------------------------------------------------------------
30#pragma mark -
31
32/*!
33 *      @class      GrowlApplicationBridge
34 *      @abstract   A class used to interface with Growl.
35 *      @discussion This class provides a means to interface with Growl.
36 *
37 *       Currently it provides a way to detect if Growl is installed and launch the
38 *       GrowlHelperApp if it's not already running.
39 */
40@interface GrowlApplicationBridge : NSObject {
41
42}
43
44/*!
45 *      @method isGrowlInstalled
46 *      @abstract Detects whether Growl is installed.
47 *      @discussion Determines if the Growl prefpane and its helper app are installed.
48 *      @result Returns YES if Growl is installed, NO otherwise.
49 */
50+ (BOOL) isGrowlInstalled;
51
52/*!
53 *      @method isGrowlRunning
54 *      @abstract Detects whether GrowlHelperApp is currently running.
55 *      @discussion Cycles through the process list to find whether GrowlHelperApp is running and returns its findings.
56 *      @result Returns YES if GrowlHelperApp is running, NO otherwise.
57 */
58+ (BOOL) isGrowlRunning;
59
60#pragma mark -
61
62/*!
63 *      @method setGrowlDelegate:
64 *      @abstract Set the object which will be responsible for providing and receiving Growl information.
65 *      @discussion This must be called before using GrowlApplicationBridge.
66 *
67 *       The methods in the GrowlApplicationBridgeDelegate protocol are required
68 *       and return the basic information needed to register with Growl.
69 *
70 *       The methods in the GrowlApplicationBridgeDelegate_InformalProtocol
71 *       informal protocol are individually optional.  They provide a greater
72 *       degree of interaction between the application and growl such as informing
73 *       the application when one of its Growl notifications is clicked by the user.
74 *
75 *       The methods in the GrowlApplicationBridgeDelegate_Installation_InformalProtocol
76 *       informal protocol are individually optional and are only applicable when
77 *       using the Growl-WithInstaller.framework which allows for automated Growl
78 *       installation.
79 *
80 *       When this method is called, data will be collected from inDelegate, Growl
81 *       will be launched if it is not already running, and the application will be
82 *       registered with Growl.
83 *
84 *       If using the Growl-WithInstaller framework, if Growl is already installed
85 *       but this copy of the framework has an updated version of Growl, the user
86 *       will be prompted to update automatically.
87 *
88 *      @param inDelegate The delegate for the GrowlApplicationBridge. It must conform to the GrowlApplicationBridgeDelegate protocol.
89 */
90+ (void) setGrowlDelegate:(NSObject<GrowlApplicationBridgeDelegate> *)inDelegate;
91
92/*!
93 *      @method growlDelegate
94 *      @abstract Return the object responsible for providing and receiving Growl information.
95 *      @discussion See setGrowlDelegate: for details.
96 *      @result The Growl delegate.
97 */
98+ (NSObject<GrowlApplicationBridgeDelegate> *) growlDelegate;
99
100#pragma mark -
101
102/*!
103 *      @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:
104 *      @abstract Send a Growl notification.
105 *      @discussion This is the preferred means for sending a Growl notification.
106 *       The notification name and at least one of the title and description are
107 *       required (all three are preferred).  All other parameters may be
108 *       <code>nil</code> (or 0 or NO as appropriate) to accept default values.
109 *
110 *       If using the Growl-WithInstaller framework, if Growl is not installed the
111 *       user will be prompted to install Growl. If the user cancels, this method
112 *       will have no effect until the next application session, at which time when
113 *       it is called the user will be prompted again. The user is also given the
114 *       option to not be prompted again.  If the user does choose to install Growl,
115 *       the requested notification will be displayed once Growl is installed and
116 *       running.
117 *
118 *      @param title            The title of the notification displayed to the user.
119 *      @param description      The full description of the notification displayed to the user.
120 *      @param notifName        The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane.
121 *      @param iconData         <code>NSData</code> object to show with the notification as its icon. If <code>nil</code>, the application's icon will be used instead.
122 *      @param priority         The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority.
123 *      @param isSticky         If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications.
124 *      @param clickContext     A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of <code>NSString</code>, <code>NSArray</code>, <code>NSNumber</code>, <code>NSDictionary</code>, and <code>NSData</code> types).
125 */
126+ (void) notifyWithTitle:(NSString *)title
127                         description:(NSString *)description
128                notificationName:(NSString *)notifName
129                                iconData:(NSData *)iconData
130                                priority:(signed int)priority
131                                isSticky:(BOOL)isSticky
132                        clickContext:(id)clickContext;
133
134/*!
135 *      @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:identifier:
136 *      @abstract Send a Growl notification.
137 *      @discussion This is the preferred means for sending a Growl notification.
138 *       The notification name and at least one of the title and description are
139 *       required (all three are preferred).  All other parameters may be
140 *       <code>nil</code> (or 0 or NO as appropriate) to accept default values.
141 *
142 *       If using the Growl-WithInstaller framework, if Growl is not installed the
143 *       user will be prompted to install Growl. If the user cancels, this method
144 *       will have no effect until the next application session, at which time when
145 *       it is called the user will be prompted again. The user is also given the
146 *       option to not be prompted again.  If the user does choose to install Growl,
147 *       the requested notification will be displayed once Growl is installed and
148 *       running.
149 *
150 *      @param title            The title of the notification displayed to the user.
151 *      @param description      The full description of the notification displayed to the user.
152 *      @param notifName        The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane.
153 *      @param iconData         <code>NSData</code> object to show with the notification as its icon. If <code>nil</code>, the application's icon will be used instead.
154 *      @param priority         The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority.
155 *      @param isSticky         If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications.
156 *      @param clickContext     A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of <code>NSString</code>, <code>NSArray</code>, <code>NSNumber</code>, <code>NSDictionary</code>, and <code>NSData</code> types).
157 *      @param identifier       An identifier for this notification. Notifications with equal identifiers are coalesced.
158 */
159+ (void) notifyWithTitle:(NSString *)title
160                         description:(NSString *)description
161                notificationName:(NSString *)notifName
162                                iconData:(NSData *)iconData
163                                priority:(signed int)priority
164                                isSticky:(BOOL)isSticky
165                        clickContext:(id)clickContext
166                          identifier:(NSString *)identifier;
167
168/*!     @method notifyWithDictionary:
169 *      @abstract       Notifies using a userInfo dictionary suitable for passing to
170 *       <code>NSDistributedNotificationCenter</code>.
171 *      @param  userInfo        The dictionary to notify with.
172 *      @discussion     Before Growl 0.6, your application would have posted
173 *       notifications using <code>NSDistributedNotificationCenter</code> by
174 *       creating a userInfo dictionary with the notification data. This had the
175 *       advantage of allowing you to add other data to the dictionary for programs
176 *       besides Growl that might be listening.
177 *
178 *       This method allows you to use such dictionaries without being restricted
179 *       to using <code>NSDistributedNotificationCenter</code>. The keys for this dictionary
180 *       can be found in GrowlDefines.h.
181 */
182+ (void) notifyWithDictionary:(NSDictionary *)userInfo;
183
184#pragma mark -
185
186/*!     @method registerWithDictionary:
187 *      @abstract       Register your application with Growl without setting a delegate.
188 *      @discussion     When you call this method with a dictionary,
189 *       GrowlApplicationBridge registers your application using that dictionary.
190 *       If you pass <code>nil</code>, GrowlApplicationBridge will ask the delegate
191 *       (if there is one) for a dictionary, and if that doesn't work, it will look
192 *       in your application's bundle for an auto-discoverable plist.
193 *       (XXX refer to more information on that)
194 *
195 *       If you pass a dictionary to this method, it must include the
196 *       <code>GROWL_APP_NAME</code> key, unless a delegate is set.
197 *
198 *       This method is mainly an alternative to the delegate system introduced
199 *       with Growl 0.6. Without a delegate, you cannot receive callbacks such as
200 *       <code>-growlIsReady</code> (since they are sent to the delegate). You can,
201 *       however, set a delegate after registering without one.
202 *
203 *       This method was introduced in Growl.framework 0.7.
204 */
205+ (BOOL) registerWithDictionary:(NSDictionary *)regDict;
206
207/*!     @method reregisterGrowlNotifications
208 *      @abstract       Reregister the notifications for this application.
209 *      @discussion     This method does not normally need to be called.  If your
210 *       application changes what notifications it is registering with Growl, call
211 *       this method to have the Growl delegate's
212 *       <code>-registrationDictionaryForGrowl</code> method called again and the
213 *       Growl registration information updated.
214 *
215 *       This method is now implemented using <code>-registerWithDictionary:</code>.
216 */
217+ (void) reregisterGrowlNotifications;
218
219#pragma mark -
220
221/*!     @method setWillRegisterWhenGrowlIsReady:
222 *      @abstract       Tells GrowlApplicationBridge to register with Growl when Growl
223 *       launches (or not).
224 *      @discussion     When Growl has started listening for notifications, it posts a
225 *       <code>GROWL_IS_READY</code> notification on the Distributed Notification
226 *       Center. GrowlApplicationBridge listens for this notification, using it to
227 *       perform various tasks (such as calling your delegate's
228 *       <code>-growlIsReady</code> method, if it has one). If this method is
229 *       called with <code>YES</code>, one of those tasks will be to reregister
230 *       with Growl (in the manner of <code>-reregisterGrowlNotifications</code>).
231 *
232 *       This attribute is automatically set back to <code>NO</code> (the default)
233 *       after every <code>GROWL_IS_READY</code> notification.
234 *      @param  flag    <code>YES</code> if you want GrowlApplicationBridge to register with
235 *       Growl when next it is ready; <code>NO</code> if not.
236 */
237+ (void) setWillRegisterWhenGrowlIsReady:(BOOL)flag;
238/*!     @method willRegisterWhenGrowlIsReady
239 *      @abstract       Reports whether GrowlApplicationBridge will register with Growl
240 *       when Growl next launches.
241 *      @result <code>YES</code> if GrowlApplicationBridge will register with Growl
242 *       when next it posts GROWL_IS_READY; <code>NO</code> if not.
243 */
244+ (BOOL) willRegisterWhenGrowlIsReady;
245
246#pragma mark -
247
248/*!     @method registrationDictionaryFromDelegate
249 *      @abstract       Asks the delegate for a registration dictionary.
250 *      @discussion     If no delegate is set, or if the delegate's
251 *       <code>-registrationDictionaryForGrowl</code> method returns
252 *       <code>nil</code>, this method returns <code>nil</code>.
253 *
254 *       This method does not attempt to clean up the dictionary in any way - for
255 *       example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
256 *       will be missing it too. Use <code>+[GrowlApplicationBridge
257 *       registrationDictionaryByFillingInDictionary:]</code> or
258 *       <code>+[GrowlApplicationBridge
259 *       registrationDictionaryByFillingInDictionary:restrictToKeys:]</code> to try
260 *       to fill in missing keys.
261 *
262 *       This method was introduced in Growl.framework 0.7.
263 *      @result A registration dictionary.
264 */
265+ (NSDictionary *) registrationDictionaryFromDelegate;
266
267/*!     @method registrationDictionaryFromBundle:
268 *      @abstract       Looks in a bundle for a registration dictionary.
269 *      @discussion     This method looks in a bundle for an auto-discoverable
270 *       registration dictionary file using <code>-[NSBundle
271 *       pathForResource:ofType:]</code>. If it finds one, it loads the file using
272 *       <code>+[NSDictionary dictionaryWithContentsOfFile:]</code> and returns the
273 *       result.
274 *
275 *       If you pass <code>nil</code> as the bundle, the main bundle is examined.
276 *
277 *       This method does not attempt to clean up the dictionary in any way - for
278 *       example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
279 *       will be missing it too. Use <code>+[GrowlApplicationBridge
280 *       registrationDictionaryByFillingInDictionary:]</code> or
281 *       <code>+[GrowlApplicationBridge
282 *       registrationDictionaryByFillingInDictionary:restrictToKeys:]</code> to try
283 *       to fill in missing keys.
284 *
285 *       This method was introduced in Growl.framework 0.7.
286 *      @result A registration dictionary.
287 */
288+ (NSDictionary *) registrationDictionaryFromBundle:(NSBundle *)bundle;
289
290/*!     @method bestRegistrationDictionary
291 *      @abstract       Obtains a registration dictionary, filled out to the best of
292 *       GrowlApplicationBridge's knowledge.
293 *      @discussion     This method creates a registration dictionary as best
294 *       GrowlApplicationBridge knows how.
295 *
296 *       First, GrowlApplicationBridge contacts the Growl delegate (if there is
297 *       one) and gets the registration dictionary from that. If no such dictionary
298 *       was obtained, GrowlApplicationBridge looks in your application's main
299 *       bundle for an auto-discoverable registration dictionary file. If that
300 *       doesn't exist either, this method returns <code>nil</code>.
301 *
302 *       Second, GrowlApplicationBridge calls
303 *       <code>+registrationDictionaryByFillingInDictionary:</code> with whatever
304 *       dictionary was obtained. The result of that method is the result of this
305 *       method.
306 *
307 *       GrowlApplicationBridge uses this method when you call
308 *       <code>+setGrowlDelegate:</code>, or when you call
309 *       <code>+registerWithDictionary:</code> with <code>nil</code>.
310 *
311 *       This method was introduced in Growl.framework 0.7.
312 *      @result A registration dictionary.
313 */
314+ (NSDictionary *) bestRegistrationDictionary;
315
316#pragma mark -
317
318/*!     @method registrationDictionaryByFillingInDictionary:
319 *      @abstract       Tries to fill in missing keys in a registration dictionary.
320 *      @discussion     This method examines the passed-in dictionary for missing keys,
321 *       and tries to work out correct values for them. As of 0.7, it uses:
322 *
323 *       Key                                                                 Value
324 *       ---                                                                 -----
325 *       <code>GROWL_APP_NAME</code>                 <code>CFBundleExecutableName</code>
326 *       <code>GROWL_APP_ICON</code>                 The icon of the application.
327 *       <code>GROWL_APP_LOCATION</code>             The location of the application.
328 *       <code>GROWL_NOTIFICATIONS_DEFAULT</code>    <code>GROWL_NOTIFICATIONS_ALL</code>
329 *
330 *       Keys are only filled in if missing; if a key is present in the dictionary,
331 *       its value will not be changed.
332 *
333 *       This method was introduced in Growl.framework 0.7.
334 *      @param  regDict The dictionary to fill in.
335 *      @result The dictionary with the keys filled in. This is an autoreleased
336 *       copy of <code>regDict</code>.
337 */
338+ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict;
339/*!     @method registrationDictionaryByFillingInDictionary:restrictToKeys:
340 *      @abstract       Tries to fill in missing keys in a registration dictionary.
341 *      @discussion     This method examines the passed-in dictionary for missing keys,
342 *       and tries to work out correct values for them. As of 0.7, it uses:
343 *
344 *       Key                                                                 Value
345 *       ---                                                                 -----
346 *       <code>GROWL_APP_NAME</code>                 <code>CFBundleExecutableName</code>
347 *       <code>GROWL_APP_ICON</code>                 The icon of the application.
348 *       <code>GROWL_APP_LOCATION</code>             The location of the application.
349 *       <code>GROWL_NOTIFICATIONS_DEFAULT</code>    <code>GROWL_NOTIFICATIONS_ALL</code>
350 *
351 *       Only those keys that are listed in <code>keys</code> will be filled in.
352 *       Other missing keys are ignored. Also, keys are only filled in if missing;
353 *       if a key is present in the dictionary, its value will not be changed.
354 *
355 *       This method was introduced in Growl.framework 0.7.
356 *      @param  regDict The dictionary to fill in.
357 *      @param  keys    The keys to fill in. If <code>nil</code>, any missing keys are filled in.
358 *      @result The dictionary with the keys filled in. This is an autoreleased
359 *       copy of <code>regDict</code>.
360 */
361+ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict restrictToKeys:(NSSet *)keys;
362
363/*!     @brief  Tries to fill in missing keys in a notification dictionary.
364 *      @param  notifDict       The dictionary to fill in.
365 *      @return The dictionary with the keys filled in. This will be a separate instance from \a notifDict.
366 *      @discussion     This function examines the \a notifDict for missing keys, and
367 *       tries to get them from the last known registration dictionary. As of 1.1,
368 *       the keys that it will look for are:
369 *
370 *       \li <code>GROWL_APP_NAME</code>
371 *       \li <code>GROWL_APP_ICON</code>
372 *
373 *      @since Growl.framework 1.1
374 */
375+ (NSDictionary *) notificationDictionaryByFillingInDictionary:(NSDictionary *)regDict;
376
377+ (NSDictionary *) frameworkInfoDictionary;
378@end
379
380//------------------------------------------------------------------------------
381#pragma mark -
382
383/*!
384 *      @protocol GrowlApplicationBridgeDelegate
385 *      @abstract Required protocol for the Growl delegate.
386 *      @discussion The methods in this protocol are required and are called
387 *       automatically as needed by GrowlApplicationBridge. See
388 *       <code>+[GrowlApplicationBridge setGrowlDelegate:]</code>.
389 *       See also <code>GrowlApplicationBridgeDelegate_InformalProtocol</code>.
390 */
391
392@protocol GrowlApplicationBridgeDelegate
393
394// -registrationDictionaryForGrowl has moved to the informal protocol as of 0.7.
395
396@end
397
398//------------------------------------------------------------------------------
399#pragma mark -
400
401/*!
402 *      @category NSObject(GrowlApplicationBridgeDelegate_InformalProtocol)
403 *      @abstract Methods which may be optionally implemented by the GrowlDelegate.
404 *      @discussion The methods in this informal protocol will only be called if implemented by the delegate.
405 */
406@interface NSObject (GrowlApplicationBridgeDelegate_InformalProtocol)
407
408/*!
409 *      @method registrationDictionaryForGrowl
410 *      @abstract Return the dictionary used to register this application with Growl.
411 *      @discussion The returned dictionary gives Growl the complete list of
412 *       notifications this application will ever send, and it also specifies which
413 *       notifications should be enabled by default.  Each is specified by an array
414 *       of <code>NSString</code> objects.
415 *
416 *       For most applications, these two arrays can be the same (if all sent
417 *       notifications should be displayed by default).
418 *
419 *       The <code>NSString</code> objects of these arrays will correspond to the
420 *       <code>notificationName:</code> parameter passed in
421 *       <code>+[GrowlApplicationBridge
422 *       notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]</code> calls.
423 *
424 *       The dictionary should have the required key object pairs:
425 *       key: GROWL_NOTIFICATIONS_ALL           object: <code>NSArray</code> of <code>NSString</code> objects
426 *       key: GROWL_NOTIFICATIONS_DEFAULT       object: <code>NSArray</code> of <code>NSString</code> objects
427 *
428 *   The dictionary may have the following key object pairs:
429 *   key: GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES      object: <code>NSDictionary</code> of key: notification name             object: human-readable notification name
430 *
431 *       You do not need to implement this method if you have an auto-discoverable
432 *       plist file in your app bundle. (XXX refer to more information on that)
433 *
434 *      @result The <code>NSDictionary</code> to use for registration.
435 */
436- (NSDictionary *) registrationDictionaryForGrowl;
437
438/*!
439 *      @method applicationNameForGrowl
440 *      @abstract Return the name of this application which will be used for Growl bookkeeping.
441 *      @discussion This name is used both internally and in the Growl preferences.
442 *
443 *       This should remain stable between different versions and incarnations of
444 *       your application.
445 *       For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and
446 *       "SurfWriter Lite" are not.
447 *
448 *       You do not need to implement this method if you are providing the
449 *       application name elsewhere, meaning in an auto-discoverable plist file in
450 *       your app bundle (XXX refer to more information on that) or in the result
451 *       of -registrationDictionaryForGrowl.
452 *
453 *      @result The name of the application using Growl.
454 */
455- (NSString *) applicationNameForGrowl;
456
457/*!
458 *      @method applicationIconForGrowl
459 *      @abstract Return the <code>NSImage</code> to treat as the application icon.
460 *      @discussion The delegate may optionally return an <code>NSImage</code>
461 *       object to use as the application icon. If this method is not implemented,
462 *       {{{-applicationIconDataForGrowl}}} is tried. If that method is not
463 *       implemented, the application's own icon is used. Neither method is
464 *       generally needed.
465 *      @result The <code>NSImage</code> to treat as the application icon.
466 */
467- (NSImage *) applicationIconForGrowl;
468
469/*!
470 *      @method applicationIconDataForGrowl
471 *      @abstract Return the <code>NSData</code> to treat as the application icon.
472 *      @discussion The delegate may optionally return an <code>NSData</code>
473 *       object to use as the application icon; if this is not implemented, the
474 *       application's own icon is used.  This is not generally needed.
475 *      @result The <code>NSData</code> to treat as the application icon.
476 *      @deprecated In version 1.1, in favor of {{{-applicationIconForGrowl}}}.
477 */
478- (NSData *) applicationIconDataForGrowl;
479
480/*!
481 *      @method growlIsReady
482 *      @abstract Informs the delegate that Growl has launched.
483 *      @discussion Informs the delegate that Growl (specifically, the
484 *       GrowlHelperApp) was launched successfully. The application can take actions
485 *   with the knowledge that Growl is installed and functional.
486 */
487- (void) growlIsReady;
488
489/*!
490 *      @method growlNotificationWasClicked:
491 *      @abstract Informs the delegate that a Growl notification was clicked.
492 *      @discussion Informs the delegate that a Growl notification was clicked.  It
493 *       is only sent for notifications sent with a non-<code>nil</code>
494 *       clickContext, so if you want to receive a message when a notification is
495 *       clicked, clickContext must not be <code>nil</code> when calling
496 *       <code>+[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]</code>.
497 *      @param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:].
498 */
499- (void) growlNotificationWasClicked:(id)clickContext;
500
501/*!
502 *      @method growlNotificationTimedOut:
503 *      @abstract Informs the delegate that a Growl notification timed out.
504 *      @discussion Informs the delegate that a Growl notification timed out. It
505 *       is only sent for notifications sent with a non-<code>nil</code>
506 *       clickContext, so if you want to receive a message when a notification is
507 *       clicked, clickContext must not be <code>nil</code> when calling
508 *       <code>+[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]</code>.
509 *      @param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:].
510 */
511- (void) growlNotificationTimedOut:(id)clickContext;
512
513@end
514
515#pragma mark -
516/*!
517 *      @category NSObject(GrowlApplicationBridgeDelegate_Installation_InformalProtocol)
518 *      @abstract Methods which may be optionally implemented by the Growl delegate when used with Growl-WithInstaller.framework.
519 *      @discussion The methods in this informal protocol will only be called if
520 *       implemented by the delegate.  They allow greater control of the information
521 *       presented to the user when installing or upgrading Growl from within your
522 *       application when using Growl-WithInstaller.framework.
523 */
524@interface NSObject (GrowlApplicationBridgeDelegate_Installation_InformalProtocol)
525
526/*!
527 *      @method growlInstallationWindowTitle
528 *      @abstract Return the title of the installation window.
529 *      @discussion If not implemented, Growl will use a default, localized title.
530 *      @result An NSString object to use as the title.
531 */
532- (NSString *)growlInstallationWindowTitle;
533
534/*!
535 *      @method growlUpdateWindowTitle
536 *      @abstract Return the title of the upgrade window.
537 *      @discussion If not implemented, Growl will use a default, localized title.
538 *      @result An NSString object to use as the title.
539 */
540- (NSString *)growlUpdateWindowTitle;
541
542/*!
543 *      @method growlInstallationInformation
544 *      @abstract Return the information to display when installing.
545 *      @discussion This information may be as long or short as desired (the window
546 *       will be sized to fit it).  It will be displayed to the user as an
547 *       explanation of what Growl is and what it can do in your application.  It
548 *       should probably note that no download is required to install.
549 *
550 *       If this is not implemented, Growl will use a default, localized explanation.
551 *      @result An NSAttributedString object to display.
552 */
553- (NSAttributedString *)growlInstallationInformation;
554
555/*!
556 *      @method growlUpdateInformation
557 *      @abstract Return the information to display when upgrading.
558 *      @discussion This information may be as long or short as desired (the window
559 *       will be sized to fit it).  It will be displayed to the user as an
560 *       explanation that an updated version of Growl is included in your
561 *       application and no download is required.
562 *
563 *       If this is not implemented, Growl will use a default, localized explanation.
564 *      @result An NSAttributedString object to display.
565 */
566- (NSAttributedString *)growlUpdateInformation;
567
568@end
569
570//private
571@interface GrowlApplicationBridge (GrowlInstallationPrompt_private)
572+ (void) _userChoseNotToInstallGrowl;
573@end
574
575#endif /* __GrowlApplicationBridge_h__ */
Note: See TracBrowser for help on using the repository browser.