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
NSLStandardGetURL
dialog 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 byurl
will be listed in the dialog box displayed byNSLStandardGetURL
. If you want to change the text of the URL, setdisplayString
to the value you want.
Discussion
When calling
NSLStandardGetURL
, you can provide anNSLURLFilterProcPtr
callback function for filtering the search results before they are displayed in theNSLStandardGetURL
dialog box. Only those URLs for which your
NSLURLFilterProcPtr
callback function returnsTRUE
will appear in the right column of the dialog box displayed byNSLStandardGetURL
. You can use thedisplayString
parameter to modify the text of each URL that appears in theNSLStandardGetURL
dialog 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
EventRecord
that 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 anNSLEventProcPtr
callback function for receiving system events whileNSLStandardGetURL
displays its dialog box. Your system event callback function will receive events while theNSLStandardGetURL
dialog box is being displayed. If you do not provide anNSLEventProcPtr
callback function, your application will not receive events.When your
NSLEventProcPtr
callback 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