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

📄 growlapplicationbridge-carbon.h

📁 网络扫描工具。无限网络路由入侵
💻 H
📖 第 1 页 / 共 3 页
字号:
////  GrowlApplicationBridge-Carbon.h//  Growl////  Created by Mac-arena the Bored Zo on Wed Jun 18 2004.//  Based on GrowlApplicationBridge.h by Evan Schoenberg.//  This source code is in the public domain. You may freely link it into any//    program.//#ifndef _GROWLAPPLICATIONBRIDGE_CARBON_H_#define _GROWLAPPLICATIONBRIDGE_CARBON_H_#include <sys/cdefs.h>#include <Carbon/Carbon.h>/*!	@header GrowlApplicationBridge-Carbon.h *	@abstract	Declares an API that Carbon applications can use to interact with Growl. *	@discussion	GrowlApplicationBridge uses a delegate to provide information //XXX *	 to Growl (such as your application's name and what notifications it may *	 post) and to provide information to your application (such as that Growl *	 is listening for notifications or that a notification has been clicked). * *	 You can set the Growldelegate with Growl_SetDelegate and find out the *	 current delegate with Growl_GetDelegate. See struct Growl_Delegate for more *	 information about the delegate. */__BEGIN_DECLS/*!	@struct Growl_Delegate *	@abstract Delegate to supply GrowlApplicationBridge with information and respond to events. *	@discussion The Growl delegate provides your interface to *	 GrowlApplicationBridge. When GrowlApplicationBridge needs information about *	 your application, it looks for it in the delegate; when Growl or the user *	 does something that you might be interested in, GrowlApplicationBridge *	 looks for a callback in the delegate and calls it if present *	 (meaning, if it is not <code>NULL</code>). *	XXX on all of that *  @field size The size of the delegate structure. * 	@field applicationName The name of your application. * 	@field registrationDictionary A dictionary describing your application and the notifications it can send out. * 	@field applicationIconData Your application's icon. * 	@field growlInstallationWindowTitle The title of the installation window. * 	@field growlInstallationInformation Text to display in the installation window. * 	@field growlUpdateWindowTitle The title of the update window. * 	@field growlUpdateInformation Text to display in the update window. * 	@field referenceCount A count of owners of the delegate. * 	@field retain Called when GrowlApplicationBridge receives this delegate. * 	@field release Called when GrowlApplicationBridge no longer needs this delegate. * 	@field growlIsReady Called when GrowlHelperApp is listening for notifications. * 	@field growlNotificationWasClicked Called when a Growl notification is clicked. *  @field growlNotificationTimedOut Called when a Growl notification timed out. */struct Growl_Delegate {	/*	@discussion This should be sizeof(struct Growl_Delegate).	 */	size_t size;	/*All of these attributes are optional.	 *Optional attributes can be NULL; required attributes that	 *	 are NULL cause setting the Growl delegate to fail.	 *XXX - move optional/required status into the discussion for each field	 */	/* 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.	 *	 * This can be <code>NULL</code> if it is provided elsewhere, namely in an	 *	 auto-discoverable plist file in your app bundle	 *	 (XXX refer to more information on that) or in registrationDictionary.	 */	CFStringRef applicationName;	/*	 * Must contain at least these keys:	 *	GROWL_NOTIFICATIONS_ALL (CFArray):	 *		Contains the names of all notifications your application may post.	 *	 * Can also contain these keys:	 *	GROWL_NOTIFICATIONS_DEFAULT (CFArray):	 *		Names of notifications that should be enabled by default.	 *		If omitted, GROWL_NOTIFICATIONS_ALL will be used.	 *	GROWL_APP_NAME (CFString):	 *		Same as the applicationName member of this structure.	 *		If both are present, the applicationName member shall prevail.	 *		If this key is present, you may omit applicationName (set it to <code>NULL</code>).	 *	GROWL_APP_ICON (CFData):	 *		Same as the iconData member of this structure.	 *		If both are present, the iconData member shall prevail.	 *		If this key is present, you may omit iconData (set it to <code>NULL</code>).	 *	 * If you change the contents of this dictionary after setting the delegate,	 *	be sure to call Growl_Reregister.	 *	 * This can be <code>NULL</code> if you have an auto-discoverable plist file in your app	 *	 bundle. (XXX refer to more information on that)	 */	CFDictionaryRef registrationDictionary;	/* The 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.	 *	 *	 If this is not supplied, Growl will look up your application's icon by	 *	 its application name.	 */	CFDataRef applicationIconData;	/* Installer display attributes	 *	 * These four attributes are used by the Growl installer, if this framework	 *	supports it.	 * For any of these being <code>NULL</code>, a localised default will be	 *	supplied.	 */	/*	If this is <code>NULL</code>, Growl will use a default,	 *	 localized title.	 *	 *	 Only used if you're using Growl-WithInstaller.framework. Otherwise,	 *	 this member is ignored.	 */	CFStringRef growlInstallationWindowTitle;	/*	This information may be as long or short as desired (the	 *	 window will be sized to fit it).  If Growl is not installed, 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 <code>NULL</code>, Growl will use a default, localized	 *	 explanation.	 *	 *	 Only used if you're using Growl-WithInstaller.framework. Otherwise,	 *	 this member is ignored.	 */	CFStringRef growlInstallationInformation;	/*	If this is <code>NULL</code>, Growl will use a default,	 *	 localized title.	 *	 *	 Only used if you're using Growl-WithInstaller.framework. Otherwise,	 *	 this member is ignored.	 */	CFStringRef growlUpdateWindowTitle;	/*	This information may be as long or short as desired (the	 *	 window will be sized to fit it).  If an older version of Growl is	 *	 installed, 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 <code>NULL</code>, Growl will use a default, localized	 *	 explanation.	 *	 *	 Only used if you're using Growl-WithInstaller.framework. Otherwise,	 *	 this member is ignored.	 */	CFStringRef growlUpdateInformation;	/*	This member is provided for use by your retain and release	 *	 callbacks (see below).	 *	 *	 GrowlApplicationBridge never directly uses this member. Instead, it	 *	 calls your retain callback (if non-<code>NULL</code>) and your release	 *	 callback (if non-<code>NULL</code>).	 */	unsigned referenceCount;	//Functions. Currently all of these are optional (any of them can be NULL).	/*	When you call Growl_SetDelegate(newDelegate), it will call	 *	 oldDelegate->release(oldDelegate), and then it will call	 *	 newDelegate->retain(newDelegate), and the return value from retain	 *	 is what will be set as the delegate.	 *	 (This means that this member works like CFRetain and -[NSObject retain].)	 *	 This member is optional (it can be <code>NULL</code>).	 *	 For a delegate allocated with malloc, this member would be	 *	 <code>NULL</code>.	 *	@result	A delegate to which GrowlApplicationBridge holds a reference.	 */	void *(*retain)(void *);	/*	When you call Growl_SetDelegate(newDelegate), it will call	 *	 oldDelegate->release(oldDelegate), and then it will call	 *	 newDelegate->retain(newDelegate), and the return value from retain	 *	 is what will be set as the delegate.	 *	 (This means that this member works like CFRelease and	 *	  -[NSObject release].)	 *	 This member is optional (it can be NULL).	 *	 For a delegate allocated with malloc, this member might be	 *	 <code>free</code>(3).	 */	void (*release)(void *);	/*	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)(void);	/*	Informs the delegate that a Growl notification was clicked. It is only	 *	 sent for notifications sent with a non-<code>NULL</code> clickContext,	 *	 so if you want to receive a message when a notification is clicked,	 *	 clickContext must not be <code>NULL</code> when calling	 *	 Growl_PostNotification or	 *	 Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext.	 */	void (*growlNotificationWasClicked)(CFPropertyListRef clickContext);	/*	Informs the delegate that a Growl notification timed out. It is only	 *	 sent for notifications sent with a non-<code>NULL</code> clickContext,	 *	 so if you want to receive a message when a notification is clicked,	 *	 clickContext must not be <code>NULL</code> when calling	 *	 Growl_PostNotification or	 *	 Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext.	 */	void (*growlNotificationTimedOut)(CFPropertyListRef clickContext);};/*!	@struct Growl_Notification *	@abstract Structure describing a Growl notification. *	@discussion XXX * 	@field size The size of the notification structure. * 	@field name Identifies the notification. * 	@field title Short synopsis of the notification. *  @field description Additional text. * 	@field iconData An icon for the notification. * 	@field priority An indicator of the notification's importance. * 	@field reserved Bits reserved for future usage. * 	@field isSticky Requests that a notification stay on-screen until dismissed explicitly. * 	@field clickContext An identifier to be passed to your click callback when a notification is clicked. * 	@field clickCallback A callback to call when the notification is clicked. */struct Growl_Notification {	/*	This should be sizeof(struct Growl_Notification).	 */ 	size_t size;	/*	The notification name distinguishes one type of	 *	 notification from another. The name should be human-readable, as it	 *	 will be displayed in the Growl preference pane.	 *	 *	 The name is used in the GROWL_NOTIFICATIONS_ALL and	 *	 GROWL_NOTIFICATIONS_DEFAULT arrays in the registration dictionary, and	 *	 in this member of the Growl_Notification structure.	 */	CFStringRef name;	/*	A notification's title describes the notification briefly.	 *	 It should be easy to read quickly by the user.	 */

⌨️ 快捷键说明

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