Defines

macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h File Reference

Go to the source code of this file.

Defines

#define XSTR   CFSTR
#define GROWL_APP_NAME   XSTR("ApplicationName")
#define GROWL_APP_ID   XSTR("ApplicationId")
#define GROWL_APP_ICON_DATA   XSTR("ApplicationIcon")
#define GROWL_NOTIFICATIONS_DEFAULT   XSTR("DefaultNotifications")
#define GROWL_NOTIFICATIONS_ALL   XSTR("AllNotifications")
#define GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES   XSTR("HumanReadableNames")
#define GROWL_NOTIFICATIONS_DESCRIPTIONS   XSTR("NotificationDescriptions")
#define GROWL_NOTIFICATIONS_ICONS   XSTR("NotificationIcons")
#define GROWL_TICKET_VERSION   XSTR("TicketVersion")
#define GROWL_NOTIFICATION_NAME   XSTR("NotificationName")
#define GROWL_NOTIFICATION_TITLE   XSTR("NotificationTitle")
#define GROWL_NOTIFICATION_DESCRIPTION   XSTR("NotificationDescription")
#define GROWL_NOTIFICATION_ICON_DATA   XSTR("NotificationIcon")
#define GROWL_NOTIFICATION_APP_ICON_DATA   XSTR("NotificationAppIcon")
#define GROWL_NOTIFICATION_PRIORITY   XSTR("NotificationPriority")
#define GROWL_NOTIFICATION_STICKY   XSTR("NotificationSticky")
#define GROWL_NOTIFICATION_CLICK_CONTEXT   XSTR("NotificationClickContext")
#define GROWL_NOTIFICATION_IDENTIFIER   XSTR("GrowlNotificationIdentifier")
#define GROWL_APP_PID   XSTR("ApplicationPID")
#define GROWL_NOTIFICATION_PROGRESS   XSTR("NotificationProgress")
#define GROWL_NOTIFICATION_ALREADY_SHOWN   XSTR("AlreadyShown")
#define GROWL_APP_REGISTRATION   XSTR("GrowlApplicationRegistrationNotification")
#define GROWL_APP_REGISTRATION_CONF   XSTR("GrowlApplicationRegistrationConfirmationNotification")
#define GROWL_NOTIFICATION   XSTR("GrowlNotification")
#define GROWL_PING   XSTR("Honey, Mind Taking Out The Trash")
#define GROWL_PONG   XSTR("What Do You Want From Me, Woman")
#define GROWL_IS_READY   XSTR("Lend Me Some Sugar; I Am Your Neighbor!")
#define GROWL_DISTRIBUTED_NOTIFICATION_CLICKED_SUFFIX   XSTR("GrowlClicked!")
#define GROWL_DISTRIBUTED_NOTIFICATION_TIMED_OUT_SUFFIX   XSTR("GrowlTimedOut!")
#define GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_ON   XSTR("GrowlNotificationCenterOn!")
#define GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_OFF   XSTR("GrowlNotificationCenterOff!")
#define GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_QUERY   XSTR("GrowlNotificationCenterYN?")
#define GROWL_KEY_CLICKED_CONTEXT   XSTR("ClickedContext")
#define GROWL_REG_DICT_EXTENSION   XSTR("growlRegDict")
#define GROWL_POSITION_PREFERENCE_KEY   @"GrowlSelectedPosition"
#define GROWL_PLUGIN_CONFIG_ID   XSTR("GrowlPluginConfigurationID")

Define Documentation

#define GROWL_APP_ICON_DATA   XSTR("ApplicationIcon")

GROWL_APP_ICON_DATA The image data for your application's icon. Image data representing your application's icon. This may be superimposed on a notification icon as a badge, used as the notification icon when a notification-specific icon is not supplied, or ignored altogether, depending on the display. Must be in a format supported by NSImage, such as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF.

Optional. Not supported by all display plugins.

#define GROWL_APP_ID   XSTR("ApplicationId")

GROWL_APP_ID The bundle identifier of your application. 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_NAME   XSTR("ApplicationName")

GrowlDefines.h Defines all the notification keys. Defines all the keys used for registration with Growl and for Growl notifications.

Most applications should use the functions or methods of Growl.framework instead of posting notifications such as those described here. 2004-01-25

Registration userInfo keys

GROWL_APP_NAME The name of your application. The name of your application. 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.

#define GROWL_APP_PID   XSTR("ApplicationPID")

GROWL_APP_PID The process identifier of the process which sends this notification. If this field is set, the application will only receive clicked and timed out notifications which originate from this process.

Optional.

#define GROWL_APP_REGISTRATION   XSTR("GrowlApplicationRegistrationNotification")

Notification names

GROWL_APP_REGISTRATION The distributed notification for registering your application. This is the name of the distributed notification that can be used to register applications with Growl.

The userInfo dictionary for this notification can contain these keys:

  • GROWL_APP_NAME
  • GROWL_APP_ICON_DATA
  • GROWL_NOTIFICATIONS_ALL
  • GROWL_NOTIFICATIONS_DEFAULT

No longer recommended as of Growl 0.6. An alternate method of registering is to use Growl.framework's delegate system. See +[GrowlApplicationBridge setGrowlDelegate:] or Growl_SetDelegate for more information.

#define GROWL_APP_REGISTRATION_CONF   XSTR("GrowlApplicationRegistrationConfirmationNotification")

GROWL_APP_REGISTRATION_CONF The distributed notification for confirming registration. The name of the distributed notification sent to confirm the registration. Used by the Growl preference pane. Your application probably does not need to use this notification.

#define GROWL_DISTRIBUTED_NOTIFICATION_CLICKED_SUFFIX   XSTR("GrowlClicked!")

GROWL_DISTRIBUTED_NOTIFICATION_CLICKED_SUFFIX Part of the name of the distributed notification sent when a supported notification is clicked. When a Growl notification with a click context is clicked on by the user, Growl posts a distributed notification whose name is in the format: [NSString stringWithFormat:"%@-d-%", appName, pid, GROWL_DISTRIBUTED_NOTIFICATION_CLICKED_SUFFIX] The GrowlApplicationBridge responds to this notification by calling a callback in its delegate.

#define GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_OFF   XSTR("GrowlNotificationCenterOff!")

GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_OFF The distributed notification sent when the Notification Center support is toggled off in Growl 2.0 When the user enables Notification Center support in Growl 2.0, this notification is sent to inform all running apps that they should no longer speak to Notification Center directly.

#define GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_ON   XSTR("GrowlNotificationCenterOn!")

GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_ON The distributed notification sent when the Notification Center support is toggled on in Growl 2.0 When the user enables Notification Center support in Growl 2.0, this notification is sent to inform all running apps that they should now speak to Notification Center directly.

#define GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_QUERY   XSTR("GrowlNotificationCenterYN?")

GROWL_DISTRIBUTED_NOTIFICATION_NOTIFICATIONCENTER_QUERY The distributed notification sent by an application to query Growl 2.0's notification center support. When an app starts up, it will send this query to get Growl 2.0 to spit out whether notification center support is on or off.

#define GROWL_DISTRIBUTED_NOTIFICATION_TIMED_OUT_SUFFIX   XSTR("GrowlTimedOut!")

GROWL_DISTRIBUTED_NOTIFICATION_TIMED_OUT_SUFFIX Part of the name of the distributed notification sent when a supported notification times out without being clicked. When a Growl notification with a click context times out, Growl posts a distributed notification whose name is in the format: [NSString stringWithFormat:"%@-d-%", appName, pid, GROWL_DISTRIBUTED_NOTIFICATION_TIMED_OUT_SUFFIX] The GrowlApplicationBridge responds to this notification by calling a callback in its delegate. NOTE: The user may have actually clicked the 'close' button; this triggers an *immediate* time-out of the notification.

#define GROWL_IS_READY   XSTR("Lend Me Some Sugar; I Am Your Neighbor!")

GROWL_IS_READY The distributed notification sent when Growl starts up. GrowlHelperApp posts this when it has begin listening on all of its sources for new notifications. GrowlApplicationBridge (in Growl.framework), upon receiving this notification, reregisters using the registration dictionary supplied by its delegate.

#define GROWL_KEY_CLICKED_CONTEXT   XSTR("ClickedContext")

Other symbols

GROWL_KEY_CLICKED_CONTEXT Used internally as the key for the clickedContext passed over DNC. This key is used in GROWL_NOTIFICATION_CLICKED, and contains the click context that was supplied in the original notification.

#define GROWL_NOTIFICATION   XSTR("GrowlNotification")

GROWL_NOTIFICATION The distributed notification for Growl notifications. This is what it all comes down to. This is the name of the distributed notification that your application posts to actually send a Growl notification.

The userInfo dictionary for this notification can contain these keys:

  • GROWL_NOTIFICATION_NAME (required)
  • GROWL_NOTIFICATION_TITLE (required)
  • GROWL_NOTIFICATION_DESCRIPTION (required)
  • GROWL_NOTIFICATION_ICON
  • GROWL_NOTIFICATION_APP_ICON
  • GROWL_NOTIFICATION_PRIORITY
  • GROWL_NOTIFICATION_STICKY
  • GROWL_NOTIFICATION_CLICK_CONTEXT
  • GROWL_APP_NAME (required)

No longer recommended as of Growl 0.6. Three alternate methods of posting notifications are +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:], Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext, and Growl_PostNotification.

#define GROWL_NOTIFICATION_ALREADY_SHOWN   XSTR("AlreadyShown")

GROWL_NOTIFICATION_ALREADY_SHOWN If this key is set, it should contain a bool value wrapped in a NSNumber which describes whether the notification has already been displayed, for instance by built in Notification Center support. This value can be used to allow display plugins to skip a notification, while still allowing Growl actions to run on them.

Optional. Not supported by all display plugins.

#define GROWL_NOTIFICATION_APP_ICON_DATA   XSTR("NotificationAppIcon")

GROWL_NOTIFICATION_APP_ICON Image data for the application icon, in case GROWL_APP_ICON does not apply for some reason. Image data be in a format supported by NSImage, such as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF.

Optional. Not supported by all display plugins.

#define GROWL_NOTIFICATION_CLICK_CONTEXT   XSTR("NotificationClickContext")

GROWL_NOTIFICATION_CLICK_CONTEXT Identifies which notification was clicked. An identifier for the notification for clicking purposes.

This will be passed back to the application when the notification is clicked. It must be plist-encodable (a data, dictionary, array, number, or string object), and it should be unique for each notification you post. A good click context would be a UUID string returned by NSProcessInfo or CFUUID.

Optional. Not supported by all display plugins.

#define GROWL_NOTIFICATION_DESCRIPTION   XSTR("NotificationDescription")

GROWL_NOTIFICATION_DESCRIPTION The description to display in the notification. The description should be longer and more verbose than the title. The description usually tells the subject of the action, e.g. "Growl-0.6.dmg downloaded in 5.02 minutes".

#define GROWL_NOTIFICATION_ICON_DATA   XSTR("NotificationIcon")

GROWL_NOTIFICATION_ICON Image data for the notification icon. Image data must be in a format supported by NSImage, such as TIFF, PNG, GIF, JPEG, BMP, PICT, or PDF.

Optional. Not supported by all display plugins.

#define GROWL_NOTIFICATION_IDENTIFIER   XSTR("GrowlNotificationIdentifier")

GROWL_NOTIFICATION_IDENTIFIER An identifier for the notification for coalescing purposes. Notifications with the same identifier fall into the same class; only the last notification of a class is displayed on the screen. If a notification of the same class is currently being displayed, it is replaced by this notification.

Optional. Not supported by all display plugins.

#define GROWL_NOTIFICATION_NAME   XSTR("NotificationName")

Notification userInfo keys

GROWL_NOTIFICATION_NAME The name of the notification. The name of the notification. Note that if you do not define GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES when registering your ticket originally this name will the one displayed within the Growl preference pane and should be human-readable.

#define GROWL_NOTIFICATION_PRIORITY   XSTR("NotificationPriority")

GROWL_NOTIFICATION_PRIORITY The priority of the notification as an integer number from -2 to +2 (+2 being highest).

Optional. Not supported by all display plugins.

#define GROWL_NOTIFICATION_PROGRESS   XSTR("NotificationProgress")

GROWL_NOTIFICATION_PROGRESS 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_STICKY   XSTR("NotificationSticky")

GROWL_NOTIFICATION_STICKY A Boolean number controlling whether the notification is sticky.

Optional. Not supported by all display plugins.

#define GROWL_NOTIFICATION_TITLE   XSTR("NotificationTitle")

GROWL_NOTIFICATION_TITLE The title to display in the notification. The title of the notification. Should be very brief. The title usually says what happened, e.g. "Download complete".

#define GROWL_NOTIFICATIONS_ALL   XSTR("AllNotifications")

GROWL_NOTIFICATIONS_ALL The array of all notifications your application can send. These are the names of all of the notifications that your application may post. See GROWL_NOTIFICATION_NAME for a discussion of good notification names.

#define GROWL_NOTIFICATIONS_DEFAULT   XSTR("DefaultNotifications")

GROWL_NOTIFICATIONS_DEFAULT The array of notifications to turn on by default. These are the names of the notifications that should be enabled by default when your application registers for the first time. If your application reregisters, Growl will look here for any new notification names found in GROWL_NOTIFICATIONS_ALL, but ignore any others.

#define GROWL_NOTIFICATIONS_DESCRIPTIONS   XSTR("NotificationDescriptions")

GROWL_NOTIFICATIONS_DESCRIPTIONS A dictionary of descriptions of _when_ each notification occurs 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_HUMAN_READABLE_NAMES   XSTR("HumanReadableNames")

GROWL_NOTIFICATIONS_HUMAN_READABLE_DESCRIPTIONS A dictionary of human-readable names for your notifications. 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_ICONS   XSTR("NotificationIcons")

GROWL_NOTIFICATIONS_ICONS A dictionary of icons for each notification This is an NSDictionary whose keys are GROWL_NOTIFICATION_NAME strings and whose objects are icons for each notification, for GNTP spec

This key is optional.

#define GROWL_PING   XSTR("Honey, Mind Taking Out The Trash")

GROWL_PING A distributed notification to check whether Growl is running. This is used by the Growl preference pane. If it receives a GROWL_PONG, the preference pane takes this to mean that Growl is running.

#define GROWL_PLUGIN_CONFIG_ID   XSTR("GrowlPluginConfigurationID")
#define GROWL_PONG   XSTR("What Do You Want From Me, Woman")

GROWL_PONG The distributed notification sent in reply to GROWL_PING. GrowlHelperApp posts this in reply to GROWL_PING.

#define GROWL_POSITION_PREFERENCE_KEY   @"GrowlSelectedPosition"
#define GROWL_REG_DICT_EXTENSION   XSTR("growlRegDict")

GROWL_REG_DICT_EXTENSION The filename extension for registration dictionaries. The GrowlApplicationBridge in Growl.framework registers with Growl by creating a file with the extension of .(GROWL_REG_DICT_EXTENSION) and opening it in the GrowlHelperApp. This happens whether or not Growl is running; if it was stopped, it quits immediately without listening for notifications.

#define GROWL_TICKET_VERSION   XSTR("TicketVersion")

GROWL_TICKET_VERSION The version of your registration ticket. Include this key in a ticket plist file that you put in your application bundle for auto-discovery. The current ticket version is 1.

#define XSTR   CFSTR