CFUserNotification.h [plain text]
#if !defined(__COREFOUNDATION_CFUSERNOTIFICATION__)
#define __COREFOUNDATION_CFUSERNOTIFICATION__ 1
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFDate.h>
#include <CoreFoundation/CFDictionary.h>
#include <CoreFoundation/CFString.h>
#include <CoreFoundation/CFURL.h>
#include <CoreFoundation/CFRunLoop.h>
CF_EXTERN_C_BEGIN
typedef struct __CFUserNotification * CFUserNotificationRef;
typedef void (*CFUserNotificationCallBack)(CFUserNotificationRef userNotification, CFOptionFlags responseFlags);
CF_EXPORT
CFTypeID CFUserNotificationGetTypeID(void);
CF_EXPORT
CFUserNotificationRef CFUserNotificationCreate(CFAllocatorRef allocator, CFTimeInterval timeout, CFOptionFlags flags, SInt32 *error, CFDictionaryRef dictionary);
CF_EXPORT
SInt32 CFUserNotificationReceiveResponse(CFUserNotificationRef userNotification, CFTimeInterval timeout, CFOptionFlags *responseFlags);
CF_EXPORT
CFStringRef CFUserNotificationGetResponseValue(CFUserNotificationRef userNotification, CFStringRef key, CFIndex idx);
CF_EXPORT
CFDictionaryRef CFUserNotificationGetResponseDictionary(CFUserNotificationRef userNotification);
CF_EXPORT
SInt32 CFUserNotificationUpdate(CFUserNotificationRef userNotification, CFTimeInterval timeout, CFOptionFlags flags, CFDictionaryRef dictionary);
CF_EXPORT
SInt32 CFUserNotificationCancel(CFUserNotificationRef userNotification);
CF_EXPORT
CFRunLoopSourceRef CFUserNotificationCreateRunLoopSource(CFAllocatorRef allocator, CFUserNotificationRef userNotification, CFUserNotificationCallBack callout, CFIndex order);
CF_EXPORT
SInt32 CFUserNotificationDisplayNotice(CFTimeInterval timeout, CFOptionFlags flags, CFURLRef iconURL, CFURLRef soundURL, CFURLRef localizationURL, CFStringRef alertHeader, CFStringRef alertMessage, CFStringRef defaultButtonTitle);
CF_EXPORT
SInt32 CFUserNotificationDisplayAlert(CFTimeInterval timeout, CFOptionFlags flags, CFURLRef iconURL, CFURLRef soundURL, CFURLRef localizationURL, CFStringRef alertHeader, CFStringRef alertMessage, CFStringRef defaultButtonTitle, CFStringRef alternateButtonTitle, CFStringRef otherButtonTitle, CFOptionFlags *responseFlags);
enum {
kCFUserNotificationStopAlertLevel = 0,
kCFUserNotificationNoteAlertLevel = 1,
kCFUserNotificationCautionAlertLevel = 2,
kCFUserNotificationPlainAlertLevel = 3
};
enum {
kCFUserNotificationDefaultResponse = 0,
kCFUserNotificationAlternateResponse = 1,
kCFUserNotificationOtherResponse = 2,
kCFUserNotificationCancelResponse = 3
};
enum {
kCFUserNotificationNoDefaultButtonFlag = (1UL << 5),
kCFUserNotificationUseRadioButtonsFlag = (1UL << 6)
};
CF_INLINE CFOptionFlags CFUserNotificationCheckBoxChecked(CFIndex i) {return ((CFOptionFlags)(1UL << (8 + i)));}
CF_INLINE CFOptionFlags CFUserNotificationSecureTextField(CFIndex i) {return ((CFOptionFlags)(1UL << (16 + i)));}
CF_INLINE CFOptionFlags CFUserNotificationPopUpSelection(CFIndex n) {return ((CFOptionFlags)(n << 24));}
CF_EXPORT
const CFStringRef kCFUserNotificationIconURLKey;
CF_EXPORT
const CFStringRef kCFUserNotificationSoundURLKey;
CF_EXPORT
const CFStringRef kCFUserNotificationLocalizationURLKey;
CF_EXPORT
const CFStringRef kCFUserNotificationAlertHeaderKey;
CF_EXPORT
const CFStringRef kCFUserNotificationAlertMessageKey;
CF_EXPORT
const CFStringRef kCFUserNotificationDefaultButtonTitleKey;
CF_EXPORT
const CFStringRef kCFUserNotificationAlternateButtonTitleKey;
CF_EXPORT
const CFStringRef kCFUserNotificationOtherButtonTitleKey;
CF_EXPORT
const CFStringRef kCFUserNotificationProgressIndicatorValueKey;
CF_EXPORT
const CFStringRef kCFUserNotificationPopUpTitlesKey;
CF_EXPORT
const CFStringRef kCFUserNotificationTextFieldTitlesKey;
CF_EXPORT
const CFStringRef kCFUserNotificationCheckBoxTitlesKey;
CF_EXPORT
const CFStringRef kCFUserNotificationTextFieldValuesKey;
CF_EXPORT
const CFStringRef kCFUserNotificationPopUpSelectionKey CF_AVAILABLE(10_3, NA);
#if (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)
CF_EXPORT
const CFStringRef kCFUserNotificationAlertTopMostKey;
CF_EXPORT
const CFStringRef kCFUserNotificationKeyboardTypesKey;
#endif
CF_EXTERN_C_END
#endif