⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 growlapplicationbridge.h

📁 lumaqq
💻 H
📖 第 1 页 / 共 2 页
字号:
 *	@discussion	This method looks in a bundle for an auto-discoverable *	 registration dictionary file using <code>-[NSBundle *	 pathForResource:ofType:]</code>. If it finds one, it loads the file using *	 <code>+[NSDictionary dictionaryWithContentsOfFile:]</code> and returns the *	 result. * *	 If you pass <code>nil</code> as the bundle, the main bundle is examined. * *	 This method 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 *	 will be missing it too. Use <code>+[GrowlApplicationBridge *	 registrationDictionaryByFillingInDictionary:]</code> or *	 <code>+[GrowlApplicationBridge *	 registrationDictionaryByFillingInDictionary:restrictToKeys:]</code> to try *	 to fill in missing keys. * *	 This method was introduced in Growl.framework 0.7. *	@result A registration dictionary. */+ (NSDictionary *) registrationDictionaryFromBundle:(NSBundle *)bundle;/*!	@method	bestRegistrationDictionary *	@abstract	Obtains a registration dictionary, filled out to the best of *	 GrowlApplicationBridge's knowledge. *	@discussion	This method creates a registration dictionary as best *	 GrowlApplicationBridge knows how. * *	 First, GrowlApplicationBridge contacts the Growl delegate (if there is *	 one) and gets the registration dictionary from that. If no such dictionary *	 was obtained, GrowlApplicationBridge looks in your application's main *	 bundle for an auto-discoverable registration dictionary file. If that *	 doesn't exist either, this method returns <code>nil</code>. * *	 Second, GrowlApplicationBridge calls *	 <code>+registrationDictionaryByFillingInDictionary:</code> with whatever *	 dictionary was obtained. The result of that method is the result of this *	 method. * *	 GrowlApplicationBridge uses this method when you call *	 <code>+setGrowlDelegate:</code>, or when you call *	 <code>+registerWithDictionary:</code> with <code>nil</code>. * *	 This method was introduced in Growl.framework 0.7. *	@result	A registration dictionary. */+ (NSDictionary *) bestRegistrationDictionary;#pragma mark -/*!	@method	registrationDictionaryByFillingInDictionary: *	@abstract	Tries to fill in missing keys in a registration dictionary. *	@discussion	This method examines the passed-in dictionary for missing keys, *	 and tries to work out correct values for them. As of 0.7, it uses: * *	 Key							             Value *	 ---							             ----- *	 <code>GROWL_APP_NAME</code>                 <code>CFBundleExecutableName</code> *	 <code>GROWL_APP_ICON</code>                 The icon of the application. *	 <code>GROWL_APP_LOCATION</code>             The location of the application. *	 <code>GROWL_NOTIFICATIONS_DEFAULT</code>    <code>GROWL_NOTIFICATIONS_ALL</code> * *	 Keys are only filled in if missing; if a key is present in the dictionary, *	 its value will not be changed. * *	 This method was introduced in Growl.framework 0.7. *	@param	regDict	The dictionary to fill in. *	@result	The dictionary with the keys filled in. This is an autoreleased *	 copy of <code>regDict</code>. */+ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict;/*!	@method	registrationDictionaryByFillingInDictionary:restrictToKeys: *	@abstract	Tries to fill in missing keys in a registration dictionary. *	@discussion	This method examines the passed-in dictionary for missing keys, *	 and tries to work out correct values for them. As of 0.7, it uses: * *	 Key							             Value *	 ---							             ----- *	 <code>GROWL_APP_NAME</code>                 <code>CFBundleExecutableName</code> *	 <code>GROWL_APP_ICON</code>                 The icon of the application. *	 <code>GROWL_APP_LOCATION</code>             The location of the application. *	 <code>GROWL_NOTIFICATIONS_DEFAULT</code>    <code>GROWL_NOTIFICATIONS_ALL</code> * *	 Only those keys that are listed in <code>keys</code> will be filled in. *	 Other missing keys are ignored. Also, keys are only filled in if missing; *	 if a key is present in the dictionary, its value will not be changed. * *	 This method was introduced in Growl.framework 0.7. *	@param	regDict	The dictionary to fill in. *	@param	keys	The keys to fill in. If <code>nil</code>, any missing keys are filled in. *	@result	The dictionary with the keys filled in. This is an autoreleased *	 copy of <code>regDict</code>. */+ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict restrictToKeys:(NSSet *)keys;@end//------------------------------------------------------------------------------#pragma mark -/*! *	@protocol GrowlApplicationBridgeDelegate *	@abstract Required protocol for the Growl delegate. *	@discussion The methods in this protocol are required and are called *	 automatically as needed by GrowlApplicationBridge. See *	 <code>+[GrowlApplicationBridge setGrowlDelegate:]</code>. *	 See also <code>GrowlApplicationBridgeDelegate_InformalProtocol</code>. */@protocol GrowlApplicationBridgeDelegate// -registrationDictionaryForGrowl has moved to the informal protocol as of 0.7.@end//------------------------------------------------------------------------------#pragma mark -/*! *	@category NSObject(GrowlApplicationBridgeDelegate_InformalProtocol) *	@abstract Methods which may be optionally implemented by the GrowlDelegate. *	@discussion The methods in this informal protocol will only be called if implemented by the delegate. */@interface NSObject (GrowlApplicationBridgeDelegate_InformalProtocol)/*! *	@method registrationDictionaryForGrowl *	@abstract Return the dictionary used to register this application with Growl. *	@discussion The returned dictionary gives Growl the complete list of *	 notifications this application will ever send, and it also specifies which *	 notifications should be enabled by default.  Each is specified by an array *	 of <code>NSString</code> objects. * *	 For most applications, these two arrays can be the same (if all sent *	 notifications should be displayed by default). * *	 The <code>NSString</code> objects of these arrays will correspond to the *	 <code>notificationName:</code> parameter passed in *	 <code>+[GrowlApplicationBridge *	 notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]</code> calls. * *	 The dictionary should have 2 key object pairs: *	 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 * *	 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) * *	@result The <code>NSDictionary</code> to use for registration. */- (NSDictionary *) registrationDictionaryForGrowl;/*! *	@method applicationNameForGrowl *	@abstract Return the name of this application which will be used for Growl bookkeeping. *	@discussion This name is used both internally and in the Growl preferences. * *	 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. * *	 You do not need to implement this method if you are providing the *	 application name elsewhere, meaning in an auto-discoverable plist file in *	 your app bundle (XXX refer to more information on that) or in the result *	 of -registrationDictionaryForGrowl. * *	@result The name of the application using Growl. */- (NSString *) applicationNameForGrowl;/*! *	@method applicationIconDataForGrowl *	@abstract Return the <code>NSData</code> to treat as the application icon. *	@discussion The delegate may optionally return an <code>NSData</code> *	 object to use as the application icon; if this is not implemented, the *	 application's own icon is used.  This is not generally needed. *	@result The <code>NSData</code> to treat as the application icon. */- (NSData *) applicationIconDataForGrowl;/*! *	@method growlIsReady *	@abstract Informs the delegate that Growl has launched. *	@discussion Informs the delegate that Growl (specifically, the *	 GrowlHelperApp) was launched successfully or was already running.  The *	 application can take actions with the knowledge that Growl is installed and *	 functional. */- (void) growlIsReady;/*! *	@method growlNotificationWasClicked: *	@abstract Informs the delegate that a Growl notification was clicked. *	@discussion Informs the delegate that a Growl notification was clicked.  It *	 is only sent for notifications sent with a non-<code>nil</code> *	 clickContext, so if you want to receive a message when a notification is *	 clicked, clickContext must not be <code>nil</code> when calling *	 <code>+[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]</code>. *	@param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]. */- (void) growlNotificationWasClicked:(id)clickContext;/*! *	@method growlNotificationTimedOut: *	@abstract Informs the delegate that a Growl notification timed out. *	@discussion Informs the delegate that a Growl notification timed out. It *	 is only sent for notifications sent with a non-<code>nil</code> *	 clickContext, so if you want to receive a message when a notification is *	 clicked, clickContext must not be <code>nil</code> when calling *	 <code>+[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]</code>. *	@param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]. */- (void) growlNotificationTimedOut:(id)clickContext;@end#pragma mark -/*! *	@category NSObject(GrowlApplicationBridgeDelegate_Installation_InformalProtocol) *	@abstract Methods which may be optionally implemented by the Growl delegate when used with Growl-WithInstaller.framework. *	@discussion The methods in this informal protocol will only be called if *	 implemented by the delegate.  They allow greater control of the information *	 presented to the user when installing or upgrading Growl from within your *	 application when using Growl-WithInstaller.framework. */@interface NSObject (GrowlApplicationBridgeDelegate_Installation_InformalProtocol)/*! *	@method growlInstallationWindowTitle *	@abstract Return the title of the installation window. *	@discussion If not implemented, Growl will use a default, localized title. *	@result An NSString object to use as the title. */- (NSString *)growlInstallationWindowTitle;/*! *	@method growlUpdateWindowTitle *	@abstract Return the title of the upgrade window. *	@discussion If not implemented, Growl will use a default, localized title. *	@result An NSString object to use as the title. */- (NSString *)growlUpdateWindowTitle;/*! *	@method growlInstallationInformation *	@abstract Return the information to display when installing. *	@discussion This information may be as long or short as desired (the window *	 will be sized to fit it).  It will be displayed to the user as an *	 explanation of what Growl is and what it can do in your application.  It *	 should probably note that no download is required to install. * *	 If this is not implemented, Growl will use a default, localized explanation. *	@result An NSAttributedString object to display. */- (NSAttributedString *)growlInstallationInformation;/*! *	@method growlUpdateInformation *	@abstract Return the information to display when upgrading. *	@discussion This information may be as long or short as desired (the window *	 will be sized to fit it).  It will be displayed to the user as an *	 explanation that an updated version of Growl is included in your *	 application and no download is required. * *	 If this is not implemented, Growl will use a default, localized explanation. *	@result An NSAttributedString object to display. */- (NSAttributedString *)growlUpdateInformation;@end//private@interface GrowlApplicationBridge (GrowlInstallationPrompt_private)+ (void) _userChoseNotToInstallGrowl;@end#endif /* __GrowlApplicationBridge_h__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -