![]() |
NavObjectFilterProcPtr |
||||
Header: | Navigation.h | Carbon status: | Supported | |
Determines whether file objects should be displayed in the browser list and navigation menus.
typedef Boolean(* NavObjectFilterProcPtr) ( AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode );
You would declare your function like this if you were to name it MyNavObjectFilterCallback:
Boolean MyNavObjectFilterCallback ( AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode );
A pointer to an Apple event descriptor structure (AEDesc). Navigation Services uses this structure to provide information about the object being passed to your filter function.
Note: Always check the Apple event descriptor type before deciding if an object needs to be filtered. Never assume that objects are type 'typeFSS', because the browser or pop-up menus may contain objects of other types. Make sure that your function only returns false if it recognizes the object. For more information, see Obtaining Object Descriptions.
A pointer to a structure of type NavFileOrFolderInfo. Navigation Services uses this structure to provide file or folder information about the item being passed to your filter function. This information is only valid for objects which are HFS file objects.
A pointer to a value set by your application when it calls a Navigation Services function such as NavGetFile. When Navigation Services calls your filter function, the callBackUD value is passed back to your application in this parameter.
A value representing which list of objects is currently being filtered. For a description of the constants used to represent these values, see
A Boolean value. If your application returns true, Navigation Services displays the object. If your application returns false, Navigation Services does not display the object.
Register your filter function by passing a Universal Procedure Pointer (UPP) in the filterProc parameter of a function such as NavGetFile. You obtain this UPP by calling the macro NewNavObjectFilterProc and passing a pointer to your filter function. Navigation Services calls your filter function to determine whether a file object should be displayed in the browser list or the pop-up menus.
If you use a filter function in conjunction with built-in translation, you should provide a list of file types in the typeList parameter of a file-opening function such as NavGetFile to inform Navigation Services which document types your application can open. If you provide a list of file types in the typeList parameter, take care to ensure that your filter function does not accidentally filter out any document type described in the list. For more information, see Filtering File Objects.
If your filter function returns a result of true, Navigation Services displays the object. This is the opposite of Standard File filter functions.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)