Function

CFUserNotificationCreateRunLoopSource

Creates a run loop source for a user notification.

Declaration

CFRunLoopSourceRef CFUserNotificationCreateRunLoopSource(CFAllocatorRef allocator, CFUserNotificationRef userNotification, CFUserNotificationCallBack callout, CFIndex order);

Parameters

allocator

The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

userNotification

The user notification to use.

callout

The callback function to invoke when the user notification dialog is dismissed.

order

A priority index indicating the order in which run loop sources are processed. User notifications currently ignore this parameter. Pass 0 for this value.

Return Value

The new CFRunLoopSource object. Ownership follows the The Create Rule.

Discussion

A run loop source needs to be added to a run loop before it can fire and call its callback function. To add the source to a run loop, use CFRunLoopAddSource.

See Also

CFUserNotification Miscellaneous Functions

CFUserNotificationCancel

Cancels a user notification dialog.

CFUserNotificationCheckBoxChecked

Returns a flag used to set or test a checkbox’s state.

CFUserNotificationCreate

Creates a CFUserNotification object and displays its notification dialog on screen.

CFUserNotificationDisplayAlert

Displays a user notification dialog and waits for a user response.

CFUserNotificationDisplayNotice

Displays a user notification dialog that does not need a user response.

CFUserNotificationGetResponseDictionary

Returns the dictionary containing all the text field values from a dismissed notification dialog.

CFUserNotificationGetResponseValue

Extracts the values of the text fields from a dismissed notification dialog.

CFUserNotificationGetTypeID

Returns the type identifier for the CFUserNotification opaque type.

CFUserNotificationPopUpSelection

Returns a flag used to set the selected element of a pop-up menu.

CFUserNotificationReceiveResponse

Waits for the user to respond to a notification or for the notification to time out.

CFUserNotificationSecureTextField

Returns a flag used to set the secure state of a text field.

CFUserNotificationUpdate

Updates a displayed user notification dialog with new user interface information.