GROWL_APP_LOCATION |
The location of this application.
#define GROWL_APP_LOCATION XSTR( "AppLocation")
Contains either the POSIX path to the application, or a file-data dictionary (as used by the Dock). contains the file's alias record and its pathname.
GROWL_PROTOCOL_VERSION |
The current version of the Growl network-notifications protocol (without encryption).
#define GROWL_PROTOCOL_VERSION 1
GROWL_PROTOCOL_VERSION_AES128 |
The current version of the Growl network-notifications protocol (with AES-128 encryption).
#define GROWL_PROTOCOL_VERSION_AES128 2
GROWL_SCREENSHOT_MODE |
Preference and notification key controlling whether to save a screenshot of the notification.
#define GROWL_SCREENSHOT_MODE XSTR( "ScreenshotMode")
This is for GHA's private usage. If your application puts this
key into a notification dictionary, GHA will clobber it. This key is only
allowed in the notification dictionaries GHA passes to displays.
If this key contains an object whose boolValue is not NO, the display is
asked to save a screenshot of the notification to
~/Library/Application\ Support/Growl/Screenshots.
GROWL_TCP_PORT |
The TCP listen port for Growl notification servers.
#define GROWL_TCP_PORT 23052
GROWL_TYPE_NOTIFICATION |
The packet type of notification packets with MD5 authentication.
#define GROWL_TYPE_NOTIFICATION 1
GROWL_TYPE_NOTIFICATION_NOAUTH |
The packet type of notification packets without authentication.
#define GROWL_TYPE_NOTIFICATION_NOAUTH 5
GROWL_TYPE_NOTIFICATION_SHA256 |
The packet type of notification packets with SHA-256 authentication.
#define GROWL_TYPE_NOTIFICATION_SHA256 3
GROWL_TYPE_REGISTRATION |
The packet type of registration packets with MD5 authentication.
#define GROWL_TYPE_REGISTRATION 0
GROWL_TYPE_REGISTRATION_NOAUTH |
The packet type of registration packets without authentication.
#define GROWL_TYPE_REGISTRATION_NOAUTH 4
GROWL_TYPE_REGISTRATION_SHA256 |
The packet type of registration packets with SHA-256 authentication.
#define GROWL_TYPE_REGISTRATION_SHA256 2
GROWL_UDP_PORT |
The UDP listen port for Growl notification servers.
#define GROWL_UDP_PORT 9887
GrowlEnabledKey |
Preference key controlling whether Growl is enabled.
#define GrowlEnabledKey XSTR( "GrowlEnabled")
If this is false, then when GrowlHelperApp is launched to open a Growl registration dictionary file, GrowlHelperApp will quit when it has finished processing the file instead of listening for notifications.
READ_GROWL_PREF_BOOL |
Reads the given Boolean from the plug-in's preferences.
#define READ_GROWL_PREF_BOOL( key, domain, result) do { \ CFBooleanRef boolValue = NULL; \ READ_GROWL_PREF_VALUE( key, domain, CFBooleanRef, &boolValue); \ if ( boolValue) { \ *result = CFBooleanGetValue( boolValue); \ CFRelease( boolValue); \ } } while( 0)
key
- The preference key to read the Boolean from.
domain
- The bundle ID of the plug-in.
result
- A pointer to a Boolean type. Left unchanged if the value doesn't exist.
This is a wrapper around READ_GROWL_PREF_VALUE() intended for use with Booleans.
READ_GROWL_PREF_FLOAT |
Reads the given float from the plug-in's preferences.
#define READ_GROWL_PREF_FLOAT( key, domain, result) do { \ CFNumberRef floatValue = NULL; \ READ_GROWL_PREF_VALUE( key, domain, CFNumberRef, &floatValue); \ if ( floatValue) { \ CFNumberGetValue( floatValue, kCFNumberFloatType, result); \ CFRelease( floatValue); \ } } while( 0)
key
- The preference key to read the float from.
domain
- The bundle ID of the plug-in.
result
- A pointer to a float. Leaves unchanged if the value doesn't exist.
This is a wrapper around READ_GROWL_PREF_VALUE() intended for use with floats.
READ_GROWL_PREF_INT |
Reads the given integer from the plug-in's preferences.
#define READ_GROWL_PREF_INT( key, domain, result) do { \ CFNumberRef intValue = NULL; \ READ_GROWL_PREF_VALUE( key, domain, CFNumberRef, &intValue); \ if ( intValue) { \ CFNumberGetValue( intValue, kCFNumberIntType, result); \ CFRelease( intValue); \ } } while( 0)
key
- The preference key to read the integer from.
domain
- The bundle ID of the plug-in.
result
- A pointer to an integer. Leaves unchanged if the value doesn't exist.
This is a wrapper around READ_GROWL_PREF_VALUE() intended for use with integers.
READ_GROWL_PREF_VALUE |
Reads the given pref value from the plug-in's preferences.
#define READ_GROWL_PREF_VALUE( key, domain, type, result) do { \ CFDictionaryRef prefs = ( CFDictionaryRef)CFPreferencesCopyAppValue(( CFStringRef)domain, \ CFSTR( "com.Growl.GrowlHelperApp")); \ if ( prefs) { \ if ( CFDictionaryContainsKey( prefs, key)) { \ *result = ( type)CFDictionaryGetValue( prefs, key); \ CFRetain( *result); \ } \ CFRelease( prefs); } \ } while( 0)
key
- The preference key to read the value of.
domain
- The bundle ID of the plug-in.
type
- The type of the result expected.
result
- A pointer to an id. Set to the value if exists, left unchanged if not.
If the value is set, you are responsible for releasing it.
This macro is intended for use by plug-ins. It reads the value for the given key from the plug-in's preferences (which are stored in a dictionary inside of GrowlHelperApp's prefs).
SYNCHRONIZE_GROWL_PREFS |
Synchronizes Growl prefs so they're up-to-date.
#define SYNCHRONIZE_GROWL_PREFS( ) CFPreferencesAppSynchronize( CFSTR( "com.Growl.GrowlHelperApp"))
This macro is intended for use by GrowlHelperApp and by plug-ins (when the prefpane is selected).
UPDATE_GROWL_PREFS |
Tells GrowlHelperApp to update its prefs.
#define UPDATE_GROWL_PREFS( ) do { \ SYNCHRONIZE_GROWL_PREFS( ); \ NSNumber *pid = [[NSNumber alloc] initWithInt:[[NSProcessInfo processInfo] processIdentifier]]; \ NSDictionary *userInfo = [[NSDictionary alloc] initWithObjectsAndKeys:\ pid, @"pid",\ nil];\ [pid release];\ [[NSDistributedNotificationCenter defaultCenter]\ postNotificationName:@"GrowlPreferencesChanged" object:@"GrowlUserDefaults" userInfo:userInfo]; \ [userInfo release];\ } while( 0)
This macro is intended for use by plug-ins. It sends a notification to tell GrowlHelperApp to update its preferences.
WRITE_GROWL_PREF_BOOL |
Writes the given Boolean to the plug-in's preferences.
#define WRITE_GROWL_PREF_BOOL( key, value, domain) do { \ CFBooleanRef boolValue; \ if ( value) { \ boolValue = kCFBooleanTrue; \ } else { \ boolValue = kCFBooleanFalse; \ }\ WRITE_GROWL_PREF_VALUE( key, boolValue, domain); } while( 0)
key
- The preference key to write the Boolean for.
value
- The Boolean value to write to the preferences.
domain
- The bundle ID of the plug-in.
This is a wrapper around WRITE_GROWL_PREF_VALUE() intended for use with Booleans.
WRITE_GROWL_PREF_FLOAT |
Writes the given float to the plug-in's preferences.
#define WRITE_GROWL_PREF_FLOAT( key, value, domain) do { \ CFNumberRef floatValue = CFNumberCreate( NULL, kCFNumberFloatType, &value); \ WRITE_GROWL_PREF_VALUE( key, floatValue, domain); \ CFRelease( floatValue); } while( 0)
key
- The preference key to write the float for.
value
- The float value to write to the preferences.
domain
- The bundle ID of the plug-in.
This is a wrapper around WRITE_GROWL_PREF_VALUE() intended for use with floats.
WRITE_GROWL_PREF_INT |
Writes the given integer to the plug-in's preferences.
#define WRITE_GROWL_PREF_INT( key, value, domain) do { \ CFNumberRef intValue = CFNumberCreate( NULL, kCFNumberIntType, &value); \ WRITE_GROWL_PREF_VALUE( key, intValue, domain); \ CFRelease( intValue); } while( 0)
key
- The preference key to write the integer for.
value
- The integer value to write to the preferences.
domain
- The bundle ID of the plug-in.
This is a wrapper around WRITE_GROWL_PREF_VALUE() intended for use with integers.
WRITE_GROWL_PREF_VALUE |
Writes the given pref value to the plug-in's preferences.
#define WRITE_GROWL_PREF_VALUE( key, value, domain) do { \ CFDictionaryRef staticPrefs = ( CFDictionaryRef)CFPreferencesCopyAppValue(( CFStringRef)domain, \ CFSTR( "com.Growl.GrowlHelperApp")); \ CFMutableDictionaryRef prefs; \ if ( staticPrefs == NULL) { \ prefs = CFDictionaryCreateMutable( NULL, 0, NULL, NULL); \ } else { \ prefs = CFDictionaryCreateMutableCopy( NULL, 0, staticPrefs); \ CFRelease( staticPrefs); \ }\ CFDictionarySetValue( prefs, key, value); \ CFPreferencesSetAppValue(( CFStringRef)domain, prefs, CFSTR( "com.Growl.GrowlHelperApp")); \ CFRelease( prefs); } while( 0)
key
- The preference key to write the value of.
value
- The value to write to the preferences. It should be either a CoreFoundation type or toll-free bridged with one.
domain
- The bundle ID of the plug-in.
This macro is intended for use by plug-ins. It writes the given value to the plug-in's preferences.
© The Growl Project (Last Updated May 14, 2005)