Updated Growl framework to 1.1.2.

CQTexperiment
vspader 2008-05-31 15:43:45 +00:00
parent b790c09c8f
commit 713382ebce
5 changed files with 159 additions and 43 deletions

View File

@ -14,6 +14,10 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
#ifndef GROWL_EXPORT
#define GROWL_EXPORT __attribute__((visibility("default")))
#endif
/*! @header GrowlApplicationBridge-Carbon.h /*! @header GrowlApplicationBridge-Carbon.h
* @abstract Declares an API that Carbon applications can use to interact with Growl. * @abstract Declares an API that Carbon applications can use to interact with Growl.
* @discussion GrowlApplicationBridge uses a delegate to provide information //XXX * @discussion GrowlApplicationBridge uses a delegate to provide information //XXX
@ -323,6 +327,8 @@ struct Growl_Notification {
* 0.7. * 0.7.
*/ */
void (*clickCallback)(CFPropertyListRef clickContext); void (*clickCallback)(CFPropertyListRef clickContext);
CFStringRef identifier;
}; };
#pragma mark - #pragma mark -
@ -374,6 +380,8 @@ struct Growl_Notification {
(notification)->reserved = 0U; \ (notification)->reserved = 0U; \
(notification)->isSticky = false; \ (notification)->isSticky = false; \
(notification)->clickContext = NULL; \ (notification)->clickContext = NULL; \
(notification)->clickCallback = NULL; \
(notification)->identifier = NULL; \
} \ } \
} while(0) } while(0)
@ -417,7 +425,7 @@ struct Growl_Notification {
* structure, except possibly the referenceCount by calling the retain and * structure, except possibly the referenceCount by calling the retain and
* release members. * release members.
*/ */
Boolean Growl_SetDelegate(struct Growl_Delegate *newDelegate); GROWL_EXPORT Boolean Growl_SetDelegate(struct Growl_Delegate *newDelegate);
/*! @function Growl_GetDelegate /*! @function Growl_GetDelegate
* @abstract Returns the current Growl delegate, if any. * @abstract Returns the current Growl delegate, if any.
@ -430,7 +438,7 @@ Boolean Growl_SetDelegate(struct Growl_Delegate *newDelegate);
* delegate on your behalf. You are responsible for retaining and releasing * delegate on your behalf. You are responsible for retaining and releasing
* the delegate as needed. * the delegate as needed.
*/ */
struct Growl_Delegate *Growl_GetDelegate(void); GROWL_EXPORT struct Growl_Delegate *Growl_GetDelegate(void);
#pragma mark - #pragma mark -
@ -452,7 +460,7 @@ struct Growl_Delegate *Growl_GetDelegate(void);
* If the user does choose to install Growl, the requested notification will * If the user does choose to install Growl, the requested notification will
* be displayed once Growl is installed and running. * be displayed once Growl is installed and running.
*/ */
void Growl_PostNotification(const struct Growl_Notification *notification); GROWL_EXPORT void Growl_PostNotification(const struct Growl_Notification *notification);
/*! @function Growl_PostNotificationWithDictionary /*! @function Growl_PostNotificationWithDictionary
* @abstract Notifies using a userInfo dictionary suitable for passing to * @abstract Notifies using a userInfo dictionary suitable for passing to
@ -468,7 +476,7 @@ void Growl_PostNotification(const struct Growl_Notification *notification);
* to using CFDistributedNotificationCenter. The keys for this dictionary * to using CFDistributedNotificationCenter. The keys for this dictionary
* can be found in GrowlDefines.h. * can be found in GrowlDefines.h.
*/ */
void Growl_PostNotificationWithDictionary(CFDictionaryRef userInfo); GROWL_EXPORT void Growl_PostNotificationWithDictionary(CFDictionaryRef userInfo);
/*! @function Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext /*! @function Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext
* @abstract Posts a Growl notification using parameter values. * @abstract Posts a Growl notification using parameter values.
@ -491,7 +499,7 @@ void Growl_PostNotificationWithDictionary(CFDictionaryRef userInfo);
* The icon data can be in any format supported by NSImage. As of Mac OS X * The icon data can be in any format supported by NSImage. As of Mac OS X
* 10.3, this includes the .icns, TIFF, JPEG, GIF, PNG, PDF, and PICT formats. * 10.3, this includes the .icns, TIFF, JPEG, GIF, PNG, PDF, and PICT formats.
*/ */
void Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext( GROWL_EXPORT void Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext(
/*inhale*/ /*inhale*/
CFStringRef title, CFStringRef title,
CFStringRef description, CFStringRef description,
@ -525,7 +533,7 @@ void Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext(
* This function was introduced in Growl.framework 0.7. * This function was introduced in Growl.framework 0.7.
* @result <code>false</code> if registration failed (e.g. if Growl isn't installed). * @result <code>false</code> if registration failed (e.g. if Growl isn't installed).
*/ */
Boolean Growl_RegisterWithDictionary(CFDictionaryRef regDict); GROWL_EXPORT Boolean Growl_RegisterWithDictionary(CFDictionaryRef regDict);
/*! @function Growl_Reregister /*! @function Growl_Reregister
* @abstract Updates your registration with Growl. * @abstract Updates your registration with Growl.
@ -543,7 +551,7 @@ Boolean Growl_RegisterWithDictionary(CFDictionaryRef regDict);
* This function is now implemented using * This function is now implemented using
* <code>Growl_RegisterWithDictionary</code>. * <code>Growl_RegisterWithDictionary</code>.
*/ */
void Growl_Reregister(void); GROWL_EXPORT void Growl_Reregister(void);
#pragma mark - #pragma mark -
@ -563,14 +571,14 @@ void Growl_Reregister(void);
* @param flag <code>true</code> if you want GrowlApplicationBridge to register with * @param flag <code>true</code> if you want GrowlApplicationBridge to register with
* Growl when next it is ready; <code>false</code> if not. * Growl when next it is ready; <code>false</code> if not.
*/ */
void Growl_SetWillRegisterWhenGrowlIsReady(Boolean flag); GROWL_EXPORT void Growl_SetWillRegisterWhenGrowlIsReady(Boolean flag);
/*! @function Growl_WillRegisterWhenGrowlIsReady /*! @function Growl_WillRegisterWhenGrowlIsReady
* @abstract Reports whether GrowlApplicationBridge will register with Growl * @abstract Reports whether GrowlApplicationBridge will register with Growl
* when Growl next launches. * when Growl next launches.
* @result <code>true</code> if GrowlApplicationBridge will register with * @result <code>true</code> if GrowlApplicationBridge will register with
* Growl when next it posts GROWL_IS_READY; <code>false</code> if not. * Growl when next it posts GROWL_IS_READY; <code>false</code> if not.
*/ */
Boolean Growl_WillRegisterWhenGrowlIsReady(void); GROWL_EXPORT Boolean Growl_WillRegisterWhenGrowlIsReady(void);
#pragma mark - #pragma mark -
@ -585,14 +593,14 @@ Boolean Growl_WillRegisterWhenGrowlIsReady(void);
* This function does not attempt to clean up the dictionary in any way - for * This function does not attempt to clean up the dictionary in any way - for
* example, if it is missing the <code>GROWL_APP_NAME</code> key, the result * example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
* will be missing it too. Use * will be missing it too. Use
* <code>Growl_CreateRegistrationDictionaryByFillingInDictionary:</code> or * <code>Growl_CreateRegistrationDictionaryByFillingInDictionary</code> or
* <code>Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys</code> * <code>Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys</code>
* to try to fill in missing keys. * to try to fill in missing keys.
* *
* This function was introduced in Growl.framework 0.7. * This function was introduced in Growl.framework 0.7.
* @result A registration dictionary. * @result A registration dictionary.
*/ */
CFDictionaryRef Growl_CopyRegistrationDictionaryFromDelegate(void); GROWL_EXPORT CFDictionaryRef Growl_CopyRegistrationDictionaryFromDelegate(void);
/*! @function Growl_CopyRegistrationDictionaryFromBundle /*! @function Growl_CopyRegistrationDictionaryFromBundle
* @abstract Looks in a bundle for a registration dictionary. * @abstract Looks in a bundle for a registration dictionary.
@ -613,7 +621,7 @@ CFDictionaryRef Growl_CopyRegistrationDictionaryFromDelegate(void);
* This function was introduced in Growl.framework 0.7. * This function was introduced in Growl.framework 0.7.
* @result A registration dictionary. * @result A registration dictionary.
*/ */
CFDictionaryRef Growl_CopyRegistrationDictionaryFromBundle(CFBundleRef bundle); GROWL_EXPORT CFDictionaryRef Growl_CopyRegistrationDictionaryFromBundle(CFBundleRef bundle);
/*! @function Growl_CreateBestRegistrationDictionary /*! @function Growl_CreateBestRegistrationDictionary
* @abstract Obtains a registration dictionary, filled out to the best of * @abstract Obtains a registration dictionary, filled out to the best of
@ -639,7 +647,7 @@ CFDictionaryRef Growl_CopyRegistrationDictionaryFromBundle(CFBundleRef bundle);
* This function was introduced in Growl.framework 0.7. * This function was introduced in Growl.framework 0.7.
* @result A registration dictionary. * @result A registration dictionary.
*/ */
CFDictionaryRef Growl_CreateBestRegistrationDictionary(void); GROWL_EXPORT CFDictionaryRef Growl_CreateBestRegistrationDictionary(void);
#pragma mark - #pragma mark -
@ -664,7 +672,7 @@ CFDictionaryRef Growl_CreateBestRegistrationDictionary(void);
* *
* This function was introduced in Growl.framework 0.7. * This function was introduced in Growl.framework 0.7.
*/ */
CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionary(CFDictionaryRef regDict); GROWL_EXPORT CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionary(CFDictionaryRef regDict);
/*! @function Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys /*! @function Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys
* @abstract Tries to fill in missing keys in a registration dictionary. * @abstract Tries to fill in missing keys in a registration dictionary.
* @param regDict The dictionary to fill in. * @param regDict The dictionary to fill in.
@ -686,7 +694,21 @@ CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionary(CFDictio
* *
* This function was introduced in Growl.framework 0.7. * This function was introduced in Growl.framework 0.7.
*/ */
CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys(CFDictionaryRef regDict, CFSetRef keys); GROWL_EXPORT CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys(CFDictionaryRef regDict, CFSetRef keys);
/*! @brief Tries to fill in missing keys in a notification dictionary.
* @param notifDict The dictionary to fill in.
* @return The dictionary with the keys filled in. This will be a separate instance from \a notifDict.
* @discussion This function examines the \a notifDict for missing keys, and
* tries to get them from the last known registration dictionary. As of 1.1,
* the keys that it will look for are:
*
* \li <code>GROWL_APP_NAME</code>
* \li <code>GROWL_APP_ICON</code>
*
* @since Growl.framework 1.1
*/
GROWL_EXPORT CFDictionaryRef Growl_CreateNotificationDictionaryByFillingInDictionary(CFDictionaryRef notifDict);
#pragma mark - #pragma mark -
@ -697,14 +719,14 @@ CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionaryRestricte
* installed. * installed.
* @result Returns true if Growl is installed, false otherwise. * @result Returns true if Growl is installed, false otherwise.
*/ */
Boolean Growl_IsInstalled(void); GROWL_EXPORT Boolean Growl_IsInstalled(void);
/*! @function Growl_IsRunning /*! @function Growl_IsRunning
* @abstract Cycles through the process list to find whether GrowlHelperApp * @abstract Cycles through the process list to find whether GrowlHelperApp
* is running. * is running.
* @result Returns true if Growl is running, false otherwise. * @result Returns true if Growl is running, false otherwise.
*/ */
Boolean Growl_IsRunning(void); GROWL_EXPORT Boolean Growl_IsRunning(void);
#pragma mark - #pragma mark -
@ -738,7 +760,7 @@ typedef void (*GrowlLaunchCallback)(void *context);
* acceptable for context to be <code>NULL</code>. The callback itself can be * acceptable for context to be <code>NULL</code>. The callback itself can be
* <code>NULL</code> if you don't want one. * <code>NULL</code> if you don't want one.
*/ */
Boolean Growl_LaunchIfInstalled(GrowlLaunchCallback callback, void *context); GROWL_EXPORT Boolean Growl_LaunchIfInstalled(GrowlLaunchCallback callback, void *context);
#pragma mark - #pragma mark -
#pragma mark Constants #pragma mark Constants

View File

@ -3,7 +3,7 @@
// Growl // Growl
// //
// Created by Evan Schoenberg on Wed Jun 16 2004. // Created by Evan Schoenberg on Wed Jun 16 2004.
// Copyright 2004-2005 The Growl Project. All rights reserved. // Copyright 2004-2006 The Growl Project. All rights reserved.
// //
/*! /*!
@ -17,23 +17,12 @@
#define __GrowlApplicationBridge_h__ #define __GrowlApplicationBridge_h__
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#import "GrowlDefines.h" #import "GrowlDefines.h"
//Forward declarations //Forward declarations
@protocol GrowlApplicationBridgeDelegate; @protocol GrowlApplicationBridgeDelegate;
/*!
* @defined GROWL_PREFPANE_BUNDLE_IDENTIFIER
* @discussion The bundle identifier for the Growl prefpane.
*/
#define GROWL_PREFPANE_BUNDLE_IDENTIFIER @"com.growl.prefpanel"
/*!
* @defined GROWL_PREFPANE_NAME
* @discussion The file name of the Growl prefpane.
*/
#define GROWL_PREFPANE_NAME @"Growl.prefPane"
//Internal notification when the user chooses not to install (to avoid continuing to cache notifications awaiting installation) //Internal notification when the user chooses not to install (to avoid continuing to cache notifications awaiting installation)
#define GROWL_USER_CHOSE_NOT_TO_INSTALL_NOTIFICATION @"User chose not to install" #define GROWL_USER_CHOSE_NOT_TO_INSTALL_NOTIFICATION @"User chose not to install"
@ -176,6 +165,40 @@
clickContext:(id)clickContext clickContext:(id)clickContext
identifier:(NSString *)identifier; identifier:(NSString *)identifier;
/*!
* @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:identifier:
* @abstract Send a Growl notification.
* @discussion This is the preferred means for sending a Growl notification.
* The notification name and at least one of the title and description are
* required (all three are preferred). All other parameters may be
* <code>nil</code> (or 0 or NO as appropriate) to accept default values.
*
* If using the Growl-WithInstaller framework, if Growl is not installed the
* user will be prompted to install Growl. If the user cancels, this method
* will have no effect until the next application session, at which time when
* it is called the user will be prompted again. The user is also given the
* option to not be prompted again. If the user does choose to install Growl,
* the requested notification will be displayed once Growl is installed and
* running.
*
* @param title The title of the notification displayed to the user.
* @param description The full description of the notification displayed to the user.
* @param notifName The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane.
* @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.
* @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.
* @param isSticky If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications.
* @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).
* @param identifier An identifier for this notification. Notifications with equal identifiers are coalesced.
*/
+ (void) notifyWithTitle:(NSString *)title
description:(NSString *)description
notificationName:(NSString *)notifName
iconData:(NSData *)iconData
priority:(signed int)priority
isSticky:(BOOL)isSticky
clickContext:(id)clickContext
identifier:(NSString *)identifier;
/*! @method notifyWithDictionary: /*! @method notifyWithDictionary:
* @abstract Notifies using a userInfo dictionary suitable for passing to * @abstract Notifies using a userInfo dictionary suitable for passing to
* <code>NSDistributedNotificationCenter</code>. * <code>NSDistributedNotificationCenter</code>.
@ -371,6 +394,21 @@
*/ */
+ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict restrictToKeys:(NSSet *)keys; + (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict restrictToKeys:(NSSet *)keys;
/*! @brief Tries to fill in missing keys in a notification dictionary.
* @param notifDict The dictionary to fill in.
* @return The dictionary with the keys filled in. This will be a separate instance from \a notifDict.
* @discussion This function examines the \a notifDict for missing keys, and
* tries to get them from the last known registration dictionary. As of 1.1,
* the keys that it will look for are:
*
* \li <code>GROWL_APP_NAME</code>
* \li <code>GROWL_APP_ICON</code>
*
* @since Growl.framework 1.1
*/
+ (NSDictionary *) notificationDictionaryByFillingInDictionary:(NSDictionary *)regDict;
+ (NSDictionary *) frameworkInfoDictionary;
@end @end
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -417,10 +455,13 @@
* <code>+[GrowlApplicationBridge * <code>+[GrowlApplicationBridge
* notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]</code> calls. * notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]</code> calls.
* *
* The dictionary should have 2 key object pairs: * The dictionary should have the required key object pairs:
* key: GROWL_NOTIFICATIONS_ALL object: <code>NSArray</code> of <code>NSString</code> objects * key: GROWL_NOTIFICATIONS_ALL object: <code>NSArray</code> of <code>NSString</code> objects
* key: GROWL_NOTIFICATIONS_DEFAULT object: <code>NSArray</code> of <code>NSString</code> objects * key: GROWL_NOTIFICATIONS_DEFAULT object: <code>NSArray</code> of <code>NSString</code> objects
* *
* The dictionary may have the following key object pairs:
* key: GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES object: <code>NSDictionary</code> of key: notification name object: human-readable notification name
*
* You do not need to implement this method if you have an auto-discoverable * 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) * plist file in your app bundle. (XXX refer to more information on that)
* *
@ -447,6 +488,18 @@
*/ */
- (NSString *) applicationNameForGrowl; - (NSString *) applicationNameForGrowl;
/*!
* @method applicationIconForGrowl
* @abstract Return the <code>NSImage</code> to treat as the application icon.
* @discussion The delegate may optionally return an <code>NSImage</code>
* object to use as the application icon. If this method is not implemented,
* {{{-applicationIconDataForGrowl}}} is tried. If that method is not
* implemented, the application's own icon is used. Neither method is
* generally needed.
* @result The <code>NSImage</code> to treat as the application icon.
*/
- (NSImage *) applicationIconForGrowl;
/*! /*!
* @method applicationIconDataForGrowl * @method applicationIconDataForGrowl
* @abstract Return the <code>NSData</code> to treat as the application icon. * @abstract Return the <code>NSData</code> to treat as the application icon.
@ -454,6 +507,7 @@
* object to use as the application icon; if this is not implemented, the * object to use as the application icon; if this is not implemented, the
* application's own icon is used. This is not generally needed. * application's own icon is used. This is not generally needed.
* @result The <code>NSData</code> to treat as the application icon. * @result The <code>NSData</code> to treat as the application icon.
* @deprecated In version 1.1, in favor of {{{-applicationIconForGrowl}}}.
*/ */
- (NSData *) applicationIconDataForGrowl; - (NSData *) applicationIconDataForGrowl;
@ -461,9 +515,8 @@
* @method growlIsReady * @method growlIsReady
* @abstract Informs the delegate that Growl has launched. * @abstract Informs the delegate that Growl has launched.
* @discussion Informs the delegate that Growl (specifically, the * @discussion Informs the delegate that Growl (specifically, the
* GrowlHelperApp) was launched successfully or was already running. The * GrowlHelperApp) was launched successfully. The application can take actions
* application can take actions with the knowledge that Growl is installed and * with the knowledge that Growl is installed and functional.
* functional.
*/ */
- (void) growlIsReady; - (void) growlIsReady;

View File

@ -7,10 +7,10 @@
#ifdef __OBJC__ #ifdef __OBJC__
#define XSTR(x) (@x) #define XSTR(x) (@x)
#define STRING NSString * #define STRING_TYPE NSString *
#else #else
#define XSTR CFSTR #define XSTR CFSTR
#define STRING CFStringRef #define STRING_TYPE CFStringRef
#endif #endif
/*! @header GrowlDefines.h /*! @header GrowlDefines.h
@ -48,6 +48,14 @@
* "SurfWriter Lite" are not. * "SurfWriter Lite" are not.
*/ */
#define GROWL_APP_NAME XSTR("ApplicationName") #define GROWL_APP_NAME XSTR("ApplicationName")
/*! @defined GROWL_APP_ID
* @abstract The bundle identifier of your application.
* @discussion The bundle identifier of your application. This key should
* be unique for your application while there may be several applications
* with the same GROWL_APP_NAME.
* This key is optional.
*/
#define GROWL_APP_ID XSTR("ApplicationId")
/*! @defined GROWL_APP_ICON /*! @defined GROWL_APP_ICON
* @abstract The image data for your application's icon. * @abstract The image data for your application's icon.
* @discussion Image data representing your application's icon. This may be * @discussion Image data representing your application's icon. This may be
@ -74,6 +82,26 @@
* notification names. * notification names.
*/ */
#define GROWL_NOTIFICATIONS_ALL XSTR("AllNotifications") #define GROWL_NOTIFICATIONS_ALL XSTR("AllNotifications")
/*! @defined GROWL_NOTIFICATIONS_HUMAN_READABLE_DESCRIPTIONS
* @abstract A dictionary of human-readable names for your notifications.
* @discussion By default, the Growl UI will display notifications by the names given in GROWL_NOTIFICATIONS_ALL
* which correspond to the GROWL_NOTIFICATION_NAME. This dictionary specifies the human-readable name to display.
* The keys of the dictionary are GROWL_NOTIFICATION_NAME strings; the objects are the human-readable versions.
* For any GROWL_NOTIFICATION_NAME not specific in this dictionary, the GROWL_NOTIFICATION_NAME will be displayed.
*
* This key is optional.
*/
#define GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES XSTR("HumanReadableNames")
/*! @defined GROWL_NOTIFICATIONS_DESCRIPTIONS
* @abstract A dictionary of descriptions of _when_ each notification occurs
* @discussion This is an NSDictionary whose keys are GROWL_NOTIFICATION_NAME strings and whose objects are
* descriptions of _when_ each notification occurs, such as "You received a new mail message" or
* "A file finished downloading".
*
* This key is optional.
*/
#define GROWL_NOTIFICATIONS_DESCRIPTIONS XSTR("NotificationDescriptions")
/*! @defined GROWL_TICKET_VERSION /*! @defined GROWL_TICKET_VERSION
* @abstract The version of your registration ticket. * @abstract The version of your registration ticket.
* @discussion Include this key in a ticket plist file that you put in your * @discussion Include this key in a ticket plist file that you put in your
@ -97,9 +125,10 @@
/*! @defined GROWL_NOTIFICATION_NAME /*! @defined GROWL_NOTIFICATION_NAME
* @abstract The name of the notification. * @abstract The name of the notification.
* @discussion The name of the notification. This should be human-readable, as * @discussion The name of the notification. Note that if you do not define
* it's shown in the prefpane, in the list of notifications your application * GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES when registering your ticket originally this name
* supports. */ * will the one displayed within the Growl preference pane and should be human-readable.
*/
#define GROWL_NOTIFICATION_NAME XSTR("NotificationName") #define GROWL_NOTIFICATION_NAME XSTR("NotificationName")
/*! @defined GROWL_NOTIFICATION_TITLE /*! @defined GROWL_NOTIFICATION_TITLE
* @abstract The title to display in the notification. * @abstract The title to display in the notification.
@ -186,6 +215,15 @@
*/ */
#define GROWL_APP_PID XSTR("ApplicationPID") #define GROWL_APP_PID XSTR("ApplicationPID")
/*! @defined GROWL_NOTIFICATION_PROGRESS
* @abstract If this key is set, it should contain a double value wrapped
* in a NSNumber which describes some sort of progress (from 0.0 to 100.0).
* If this is key is not set, no progress bar is shown.
*
* Optional. Not supported by all display plugins.
*/
#define GROWL_NOTIFICATION_PROGRESS XSTR("NotificationProgress")
// Notifications // Notifications
#pragma mark Notifications #pragma mark Notifications
@ -304,4 +342,7 @@
*/ */
#define GROWL_REG_DICT_EXTENSION XSTR("growlRegDict") #define GROWL_REG_DICT_EXTENSION XSTR("growlRegDict")
#define GROWL_POSITION_PREFERENCE_KEY @"GrowlSelectedPosition"
#endif //ndef _GROWLDEFINES_H #endif //ndef _GROWLDEFINES_H

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
@ -13,11 +13,11 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.7.6</string> <string>1.1.2</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>GRRR</string> <string>GRRR</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>0.7.6</string> <string>1.1.2</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
<string>GrowlApplicationBridge</string> <string>GrowlApplicationBridge</string>
</dict> </dict>