/SparkleShare/Mac/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h

http://github.com/hbons/SparkleShare · C++ Header · 575 lines · 72 code · 53 blank · 450 comment · 0 complexity · bfca7add70ffc8a1aa3ac0dda693eeaf MD5 · raw file

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