Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
Network Services Location Manager Miscellaneous Callbacks
NSLFilterProcPtr
Defines a pointer to a filter callback function. Your filter callback function determines if a URL should be displayed in the
NSLStandardGetURLdialog box.typedef Boolean (*NSLURLFilterProcPtr)( char *url, Str255 displayString);
If you name your function
MyNSLFilterProcPtr, you would declare it like this:Boolean MyNSLURLFilterProcPtr ( char* url, Str255 displayString);
Parameters
- url
A pointer to a string containing the URL to filter. Any data in a URL that follows the tag “?NAME=” has been removed from the URL.
- displayString
A value of type
Str255. If your filter callback returnsTRUE, the URL pointed to byurlwill be listed in the dialog box displayed byNSLStandardGetURL. If you want to change the text of the URL, setdisplayStringto the value you want.
Discussion
When calling
NSLStandardGetURL, you can provide anNSLURLFilterProcPtrcallback function for filtering the search results before they are displayed in theNSLStandardGetURLdialog box. Only those URLs for which yourNSLURLFilterProcPtrcallback function returnsTRUEwill appear in the right column of the dialog box displayed byNSLStandardGetURL. You can use thedisplayStringparameter to modify the text of each URL that appears in theNSLStandardGetURLdialog box.NSLEventProcPtr
Defines a pointer to a system event callback function.
typedef void (*NSLEventFilterProcPtr)( EventRecord *newEvent, void *userContext);
If you name your function
MyNSLEventProcPtr, you would declare it like this:void MyNSLEventProcPtr ( EventRecord *newEvent, void *userContext);
Parameters
- newEvent
A pointer to a structure of type
EventRecordthat describes the event that triggered the execution of this callback function.- displayString
An untyped pointer to arbitrary data that your application previously passed to
NSLStandardGetURL.
Discussion
When calling
NSLStandardGetURL, you can provide anNSLEventProcPtrcallback function for receiving system events whileNSLStandardGetURLdisplays its dialog box. Your system event callback function will receive events while theNSLStandardGetURLdialog box is being displayed. If you do not provide anNSLEventProcPtrcallback function, your application will not receive events.When your
NSLEventProcPtrcallback function is called, it should process the event immediately and return.
Copyright © 2006 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2006-05-23