Navigation.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:30k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       Navigation.h
  3.  
  4.      Contains:   Navigation Services Interfaces
  5.  
  6.      Version:    Technology: Navigation 2.0
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1996-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __NAVIGATION__
  18. #define __NAVIGATION__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __APPLEEVENTS__
  23. #include "AppleEvents.h"
  24. #endif
  25. #ifndef __TRANSLATION__
  26. #include "Translation.h"
  27. #endif
  28. #ifndef __MACWINDOWS__
  29. #include "MacWindows.h"
  30. #endif
  31. #ifndef __CODEFRAGMENTS__
  32. #include "CodeFragments.h"
  33. #endif
  34. #ifndef __MACERRORS__
  35. #include "MacErrors.h"
  36. #endif
  37. #if PRAGMA_ONCE
  38. #pragma once
  39. #endif
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. #if PRAGMA_IMPORT
  44. #pragma import on
  45. #endif
  46. #if PRAGMA_STRUCT_ALIGN
  47.     #pragma options align=mac68k
  48. #elif PRAGMA_STRUCT_PACKPUSH
  49.     #pragma pack(push, 2)
  50. #elif PRAGMA_STRUCT_PACK
  51.     #pragma pack(2)
  52. #endif
  53. enum {
  54.     kNavDialogOptionsVersion    = 0,
  55.     kNavReplyRecordVersion      = 0,
  56.     kNavCBRecVersion            = 0,
  57.     kNavFileOrFolderVersion     = 1,
  58.     kNavMenuItemSpecVersion     = 0
  59. };
  60. typedef UInt16                          NavDataVersion;
  61. typedef UInt32 NavAskSaveChangesAction;
  62. enum {
  63.                                                                 /* input action codes for NavAskSaveChanges() */
  64.     kNavSaveChangesClosingDocument = 1,
  65.     kNavSaveChangesQuittingApplication = 2,
  66.     kNavSaveChangesOther        = 0
  67. };
  68. typedef UInt32 NavAskSaveChangesResult;
  69. enum {
  70.                                                                 /* result codes for NavAskSaveChanges() */
  71.     kNavAskSaveChangesSave      = 1,
  72.     kNavAskSaveChangesCancel    = 2,
  73.     kNavAskSaveChangesDontSave  = 3
  74. };
  75. typedef UInt32 NavAskDiscardChangesResult;
  76. enum {
  77.                                                                 /* result codes for NavAskDiscardChanges() */
  78.     kNavAskDiscardChanges       = 1,
  79.     kNavAskDiscardChangesCancel = 2
  80. };
  81. typedef SInt16 NavFilterModes;
  82. enum {
  83.                                                                 /* which elements are being filtered for objects: */
  84.     kNavFilteringBrowserList    = 0,
  85.     kNavFilteringFavorites      = 1,
  86.     kNavFilteringRecents        = 2,
  87.     kNavFilteringShortCutVolumes = 3,
  88.     kNavFilteringLocationPopup  = 4                             /* for v1.1 or greater */
  89. };
  90. struct NavFileOrFolderInfo {
  91.     UInt16                          version;
  92.     Boolean                         isFolder;
  93.     Boolean                         visible;
  94.     UInt32                          creationDate;
  95.     UInt32                          modificationDate;
  96.     union {
  97.         struct {
  98.             Boolean                         locked;             /* file is locked */
  99.             Boolean                         resourceOpen;       /* resource fork is opened */
  100.             Boolean                         dataOpen;           /* data fork is opened */
  101.             Boolean                         reserved1;
  102.             UInt32                          dataSize;           /* size of the data fork */
  103.             UInt32                          resourceSize;       /* size of the resource fork */
  104.             FInfo                           finderInfo;         /* more file info: */
  105.             FXInfo                          finderXInfo;
  106.         }                                 fileInfo;
  107.         struct {
  108.             Boolean                         shareable;
  109.             Boolean                         sharePoint;
  110.             Boolean                         mounted;
  111.             Boolean                         readable;
  112.             Boolean                         writeable;
  113.             Boolean                         reserved2;
  114.             UInt32                          numberOfFiles;
  115.             DInfo                           finderDInfo;
  116.             DXInfo                          finderDXInfo;
  117.             OSType                          folderType;
  118.             OSType                          folderCreator;
  119.             char                            reserved3[206];
  120.         }                                 folderInfo;
  121.     }                                 fileAndFolder;
  122. };
  123. typedef struct NavFileOrFolderInfo      NavFileOrFolderInfo;
  124. union NavEventDataInfo {
  125.     EventRecord *                   event;                      /* for event processing */
  126.     void *                          param;                      /* points to event specific data */
  127. };
  128. typedef union NavEventDataInfo          NavEventDataInfo;
  129. struct NavEventData {
  130.     NavEventDataInfo                eventDataParms;             /* the event data */
  131.     SInt16                          itemHit;                    /* the dialog item number, for v1.1 or greater */
  132. };
  133. typedef struct NavEventData             NavEventData;
  134. typedef UInt32                          NavContext;
  135. struct NavCBRec {
  136.     UInt16                          version;
  137.     NavContext                      context;                    /* used by customization code to call Navigation Services */
  138.     WindowPtr                       window;                     /* the dialog */
  139.     Rect                            customRect;                 /* local coordinate rectangle of customization area */
  140.     Rect                            previewRect;                /* local coordinate rectangle of the preview area */
  141.     NavEventData                    eventData;
  142.     char                            reserved[222];
  143. };
  144. typedef struct NavCBRec                 NavCBRec;
  145. typedef NavCBRec *                      NavCBRecPtr;
  146. enum {
  147.     kNavCBEvent                 = 0,                            /* an event has occurred (update, idle events, etc.) */
  148.     kNavCBCustomize             = 1,                            /* protocol for negotiating customization space */
  149.     kNavCBStart                 = 2,                            /* the navigation dialog is starting up */
  150.     kNavCBTerminate             = 3,                            /* the navigation dialog is closing down */
  151.     kNavCBAdjustRect            = 4,                            /* the navigation dialog is being resized */
  152.     kNavCBNewLocation           = 5,                            /* user has chosen a new location in the browser */
  153.     kNavCBShowDesktop           = 6,                            /* user has navigated to the desktop */
  154.     kNavCBSelectEntry           = 7,                            /* user has made a selection in the browser */
  155.     kNavCBPopupMenuSelect       = 8,                            /* signifies that a popup menu selection was made */
  156.     kNavCBAccept                = 9,                            /* user has accepted the navigation dialog */
  157.     kNavCBCancel                = 10,                           /* user has cancelled the navigation dialog */
  158.     kNavCBAdjustPreview         = 11,                           /* preview button was clicked or the preview was resized */
  159.     kNavCBOpenSelection         = (long)0x80000000              /* user has opened or chosen an object, v2.0 or greater */
  160. };
  161. typedef SInt32                          NavEventCallbackMessage;
  162. typedef void *                          NavCallBackUserData;
  163. /* for events and customization: */
  164. typedef CALLBACK_API( void , NavEventProcPtr )(NavEventCallbackMessage callBackSelector, NavCBRecPtr callBackParms, void *callBackUD);
  165. /* for preview support: */
  166. typedef CALLBACK_API( Boolean , NavPreviewProcPtr )(NavCBRecPtr callBackParms, void *callBackUD);
  167. /* filtering callback information: */
  168. typedef CALLBACK_API( Boolean , NavObjectFilterProcPtr )(AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode);
  169. typedef STACK_UPP_TYPE(NavEventProcPtr)                         NavEventUPP;
  170. typedef STACK_UPP_TYPE(NavPreviewProcPtr)                       NavPreviewUPP;
  171. typedef STACK_UPP_TYPE(NavObjectFilterProcPtr)                  NavObjectFilterUPP;
  172. #if OPAQUE_UPP_TYPES
  173.     EXTERN_API(NavEventUPP)
  174.     NewNavEventUPP                 (NavEventProcPtr         userRoutine);
  175.     EXTERN_API(NavPreviewUPP)
  176.     NewNavPreviewUPP               (NavPreviewProcPtr       userRoutine);
  177.     EXTERN_API(NavObjectFilterUPP)
  178.     NewNavObjectFilterUPP          (NavObjectFilterProcPtr  userRoutine);
  179.     EXTERN_API(void)
  180.     DisposeNavEventUPP             (NavEventUPP             userUPP);
  181.     EXTERN_API(void)
  182.     DisposeNavPreviewUPP           (NavPreviewUPP           userUPP);
  183.     EXTERN_API(void)
  184.     DisposeNavObjectFilterUPP      (NavObjectFilterUPP      userUPP);
  185.     EXTERN_API(void)
  186.     InvokeNavEventUPP              (NavEventCallbackMessage callBackSelector,
  187.                                     NavCBRecPtr             callBackParms,
  188.                                     void *                  callBackUD,
  189.                                     NavEventUPP             userUPP);
  190.     EXTERN_API(Boolean)
  191.     InvokeNavPreviewUPP            (NavCBRecPtr             callBackParms,
  192.                                     void *                  callBackUD,
  193.                                     NavPreviewUPP           userUPP);
  194.     EXTERN_API(Boolean)
  195.     InvokeNavObjectFilterUPP       (AEDesc *                theItem,
  196.                                     void *                  info,
  197.                                     void *                  callBackUD,
  198.                                     NavFilterModes          filterMode,
  199.                                     NavObjectFilterUPP      userUPP);
  200. #else
  201.     enum { uppNavEventProcInfo = 0x00000FC0 };                      /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
  202.     enum { uppNavPreviewProcInfo = 0x000003D0 };                    /* pascal 1_byte Func(4_bytes, 4_bytes) */
  203.     enum { uppNavObjectFilterProcInfo = 0x00002FD0 };               /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
  204.     #define NewNavEventUPP(userRoutine)                             (NavEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNavEventProcInfo, GetCurrentArchitecture())
  205.     #define NewNavPreviewUPP(userRoutine)                           (NavPreviewUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNavPreviewProcInfo, GetCurrentArchitecture())
  206.     #define NewNavObjectFilterUPP(userRoutine)                      (NavObjectFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNavObjectFilterProcInfo, GetCurrentArchitecture())
  207.     #define DisposeNavEventUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  208.     #define DisposeNavPreviewUPP(userUPP)                           DisposeRoutineDescriptor(userUPP)
  209.     #define DisposeNavObjectFilterUPP(userUPP)                      DisposeRoutineDescriptor(userUPP)
  210.     #define InvokeNavEventUPP(callBackSelector, callBackParms, callBackUD, userUPP)  CALL_THREE_PARAMETER_UPP((userUPP), uppNavEventProcInfo, (callBackSelector), (callBackParms), (callBackUD))
  211.     #define InvokeNavPreviewUPP(callBackParms, callBackUD, userUPP)  (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppNavPreviewProcInfo, (callBackParms), (callBackUD))
  212.     #define InvokeNavObjectFilterUPP(theItem, info, callBackUD, filterMode, userUPP)  (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppNavObjectFilterProcInfo, (theItem), (info), (callBackUD), (filterMode))
  213. #endif
  214. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  215. #define NewNavEventProc(userRoutine)                            NewNavEventUPP(userRoutine)
  216. #define NewNavPreviewProc(userRoutine)                          NewNavPreviewUPP(userRoutine)
  217. #define NewNavObjectFilterProc(userRoutine)                     NewNavObjectFilterUPP(userRoutine)
  218. #define CallNavEventProc(userRoutine, callBackSelector, callBackParms, callBackUD) InvokeNavEventUPP(callBackSelector, callBackParms, callBackUD, userRoutine)
  219. #define CallNavPreviewProc(userRoutine, callBackParms, callBackUD) InvokeNavPreviewUPP(callBackParms, callBackUD, userRoutine)
  220. #define CallNavObjectFilterProc(userRoutine, theItem, info, callBackUD, filterMode) InvokeNavObjectFilterUPP(theItem, info, callBackUD, filterMode, userRoutine)
  221. typedef SInt32 NavCustomControlMessage;
  222. enum {
  223.     kNavCtlShowDesktop          = 0,                            /*    show desktop,           parms = nil */
  224.     kNavCtlSortBy               = 1,                            /*    sort key field,       parms->NavSortKeyField */
  225.     kNavCtlSortOrder            = 2,                            /*    sort order,              parms->NavSortOrder */
  226.     kNavCtlScrollHome           = 3,                            /*    scroll list home,       parms = nil */
  227.     kNavCtlScrollEnd            = 4,                            /*    scroll list end,      parms = nil */
  228.     kNavCtlPageUp               = 5,                            /*    page list up,          parms = nil */
  229.     kNavCtlPageDown             = 6,                            /*    page list down,          parms = nil */
  230.     kNavCtlGetLocation          = 7,                            /*    get current location,   parms<-AEDesc */
  231.     kNavCtlSetLocation          = 8,                            /*    set current location,   parms->AEDesc */
  232.     kNavCtlGetSelection         = 9,                            /*    get current selection,     parms<-AEDescList */
  233.     kNavCtlSetSelection         = 10,                           /*    set current selection,     parms->AEDescList */
  234.     kNavCtlShowSelection        = 11,                           /*    make selection visible,       parms = nil */
  235.     kNavCtlOpenSelection        = 12,                           /*    open view of selection,       parms = nil */
  236.     kNavCtlEjectVolume          = 13,                           /*    eject volume,          parms->vRefNum */
  237.     kNavCtlNewFolder            = 14,                           /*    create a new folder,     parms->StringPtr */
  238.     kNavCtlCancel               = 15,                           /*    cancel dialog,          parms = nil */
  239.     kNavCtlAccept               = 16,                           /*    accept dialog default,     parms = nil */
  240.     kNavCtlIsPreviewShowing     = 17,                           /*    query preview status,   parms<-Boolean */
  241.     kNavCtlAddControl           = 18,                           /*  add one control to dialog,    parms->ControlHandle */
  242.     kNavCtlAddControlList       = 19,                           /*    add control list to dialog,    parms->Handle (DITL rsrc) */
  243.     kNavCtlGetFirstControlID    = 20,                           /*    get 1st control ID,         parms<-UInt16 */
  244.     kNavCtlSelectCustomType     = 21,                           /*    select a custom menu item  parms->NavMenuItemSpec */
  245.     kNavCtlSelectAllType        = 22,                           /*  select an "All" menu item parms->SInt16 */
  246.     kNavCtlGetEditFileName      = 23,                           /*    get save dlog's file name  parms<-StringPtr */
  247.     kNavCtlSetEditFileName      = 24,                           /*    set save dlog's file name  parms->StringPtr */
  248.     kNavCtlSelectEditFileName   = 25,                           /*    select save dlog file name parms->ControlEditTextSelectionRec, v1.1 or greater */
  249.     kNavCtlBrowserSelectAll     = 26,                           /*  re-scan the browser list  parms = nil, v2.0 or greater */
  250.     kNavCtlGotoParent           = 27,                           /*  navigate to parent         parms = nil, v2.0 or greater */
  251.     kNavCtlSetActionState       = 28,                           /*  restrict navigation      parms->NavActionState (flags), v2.0 or greater */
  252.     kNavCtlBrowserRedraw        = 29,                           /*  rescan browser list      parms = nil, v2.0 or greater */
  253.     kNavCtlTerminate            = 30                            /*  terminate/dismiss dialog  parms = nil, v2.0 or greater */
  254. };
  255. typedef UInt32 NavActionState;
  256. enum {
  257.     kNavNormalState             = 0x00000000,                   /* normal/default state */
  258.     kNavDontOpenState           = 0x00000001,                   /* disallow opening files/folders */
  259.     kNavDontSaveState           = 0x00000002,                   /* disallow saving files */
  260.     kNavDontChooseState         = 0x00000004,                   /* disallow choosing objects */
  261.     kNavDontNewFolderState      = 0x00000010                    /* disallow creating new folders */
  262. };
  263. typedef UInt16 NavPopupMenuItem;
  264. enum {
  265.     kNavAllKnownFiles           = 0,
  266.     kNavAllReadableFiles        = 1,
  267.     kNavAllFiles                = 2
  268. };
  269. typedef UInt16 NavSortKeyField;
  270. enum {
  271.     kNavSortNameField           = 0,
  272.     kNavSortDateField           = 1
  273. };
  274. typedef UInt16 NavSortOrder;
  275. enum {
  276.     kNavSortAscending           = 0,
  277.     kNavSortDescending          = 1
  278. };
  279. typedef UInt32 NavDialogOptionFlags;
  280. enum {
  281.     kNavDefaultNavDlogOptions   = 0x000000E4,                   /* use defaults for all the options */
  282.     kNavNoTypePopup             = 0x00000001,                   /* don't show file type/extension popup on Open/Save */
  283.     kNavDontAutoTranslate       = 0x00000002,                   /* don't automatically translate on Open */
  284.     kNavDontAddTranslateItems   = 0x00000004,                   /* don't add translation choices on Open/Save */
  285.     kNavAllFilesInPopup         = 0x00000010,                   /* "All Files" menu item in the type popup on Open */
  286.     kNavAllowStationery         = 0x00000020,                   /* allow saving of stationery files */
  287.     kNavAllowPreviews           = 0x00000040,                   /* allow preview to show */
  288.     kNavAllowMultipleFiles      = 0x00000080,                   /* allow multiple items to be selected */
  289.     kNavAllowInvisibleFiles     = 0x00000100,                   /* allow invisible items to be shown */
  290.     kNavDontResolveAliases      = 0x00000200,                   /* don't resolve aliases */
  291.     kNavSelectDefaultLocation   = 0x00000400,                   /* make the default location the browser selection */
  292.     kNavSelectAllReadableItem   = 0x00000800,                   /* make the dialog select "All Readable Documents" on open */
  293.     kNavSupportPackages         = 0x00001000,                   /* recognize file system packages, v2.0 or greater */
  294.     kNavAllowOpenPackages       = 0x00002000,                   /* allow opening of packages, v2.0 or greater */
  295.     kNavDontAddRecents          = 0x00004000,                   /* don't add chosen objects to the recents list, v2.0 or greater */
  296.     kNavDontUseCustomFrame      = 0x00008000                    /* don't add the bevelled custom frame, v2.0 or greater */
  297. };
  298. typedef UInt32 NavTranslationOptions;
  299. enum {
  300.     kNavTranslateInPlace        = 0,                            /*    translate in place, replacing translation source file (default for Save) */
  301.     kNavTranslateCopy           = 1                             /*    translate to a copy of the source file (default for Open) */
  302. };
  303. struct NavMenuItemSpec {
  304.     UInt16                          version;
  305.     OSType                          menuCreator;
  306.     OSType                          menuType;
  307.     Str255                          menuItemName;
  308.     char                            reserved[245];
  309. };
  310. typedef struct NavMenuItemSpec          NavMenuItemSpec;
  311. typedef NavMenuItemSpec *               NavMenuItemSpecArrayPtr;
  312. typedef NavMenuItemSpecArrayPtr *       NavMenuItemSpecArrayHandle;
  313. typedef NavMenuItemSpecArrayPtr         NavMenuItemSpecPtr;
  314. typedef NavMenuItemSpecArrayHandle      NavMenuItemSpecHandle;
  315. enum {
  316.     kNavGenericSignature        = FOUR_CHAR_CODE('****')
  317. };
  318. struct NavTypeList {
  319.     OSType                          componentSignature;
  320.     short                           reserved;
  321.     short                           osTypeCount;
  322.     OSType                          osType[1];
  323. };
  324. typedef struct NavTypeList              NavTypeList;
  325. typedef NavTypeList *                   NavTypeListPtr;
  326. typedef NavTypeListPtr *                NavTypeListHandle;
  327. struct NavDialogOptions {
  328.     UInt16                          version;
  329.     NavDialogOptionFlags            dialogOptionFlags;          /* option flags for affecting the dialog's behavior */
  330.     Point                           location;                   /* top-left location of the dialog, or {-1,-1} for default position */
  331.     Str255                          clientName;
  332.     Str255                          windowTitle;
  333.     Str255                          actionButtonLabel;          /* label of the default button (or null string for default) */
  334.     Str255                          cancelButtonLabel;          /* label of the cancel button (or null string for default) */
  335.     Str255                          savedFileName;              /* default name for text box in NavPutFile (or null string for default) */
  336.     Str255                          message;                    /* custom message prompt (or null string for default) */
  337.     UInt32                          preferenceKey;              /* a key for to managing preferences for using multiple utility dialogs */
  338.     NavMenuItemSpecArrayHandle      popupExtension;             /* extended popup menu items, an array of NavMenuItemSpecs */
  339.     char                            reserved[494];
  340. };
  341. typedef struct NavDialogOptions         NavDialogOptions;
  342. /* data returned by the utility dialogs: */
  343. struct NavReplyRecord {
  344.     UInt16                          version;
  345.     Boolean                         validRecord;                /* open/save: true if the user confirmed a selection, false on cancel */
  346.     Boolean                         replacing;                  /* save: true if the user is overwriting an existing object for save */
  347.     Boolean                         isStationery;               /* save: true if the user wants to save an object as stationery */
  348.     Boolean                         translationNeeded;          /* save: translation is 'needed', open: translation 'has taken place' */
  349.     AEDescList                      selection;                  /* open/save: list of AppleEvent descriptors of the chosen object(s) */
  350.     ScriptCode                      keyScript;                  /* open/save: script in which the name of each item in 'selection' is to be displayed */
  351.     FileTranslationSpecArrayHandle  fileTranslation;            /* open/save: list of file translation specs of the chosen object(s), if translation is needed */
  352.     UInt32                          reserved1;
  353.     char                            reserved[231];
  354. };
  355. typedef struct NavReplyRecord           NavReplyRecord;
  356. EXTERN_API( OSErr )
  357. NavLoad                         (void);
  358. EXTERN_API( OSErr )
  359. NavUnload                       (void);
  360. EXTERN_API( UInt32 )
  361. NavLibraryVersion               (void);
  362. EXTERN_API( OSErr )
  363. NavGetDefaultDialogOptions      (NavDialogOptions *     dialogOptions);
  364. EXTERN_API( OSErr )
  365. NavGetFile                      (AEDesc *               defaultLocation, /* can be NULL */
  366.                                  NavReplyRecord *       reply,
  367.                                  NavDialogOptions *     dialogOptions,
  368.                                  NavEventUPP            eventProc, /* can be NULL */
  369.                                  NavPreviewUPP          previewProc, /* can be NULL */
  370.                                  NavObjectFilterUPP     filterProc, /* can be NULL */
  371.                                  NavTypeListHandle      typeList, /* can be NULL */
  372.                                  void *                 callBackUD) /* can be NULL */;
  373. EXTERN_API( OSErr )
  374. NavPutFile                      (AEDesc *               defaultLocation, /* can be NULL */
  375.                                  NavReplyRecord *       reply,
  376.                                  NavDialogOptions *     dialogOptions,
  377.                                  NavEventUPP            eventProc, /* can be NULL */
  378.                                  OSType                 fileType,
  379.                                  OSType                 fileCreator,
  380.                                  void *                 callBackUD) /* can be NULL */;
  381. EXTERN_API( OSErr )
  382. NavAskSaveChanges               (NavDialogOptions *     dialogOptions,
  383.                                  NavAskSaveChangesAction  action,
  384.                                  NavAskSaveChangesResult * reply,
  385.                                  NavEventUPP            eventProc, /* can be NULL */
  386.                                  void *                 callBackUD) /* can be NULL */;
  387. EXTERN_API( OSErr )
  388. NavCustomAskSaveChanges         (NavDialogOptions *     dialogOptions,
  389.                                  NavAskSaveChangesResult * reply,
  390.                                  NavEventUPP            eventProc, /* can be NULL */
  391.                                  void *                 callBackUD) /* can be NULL */;
  392. EXTERN_API( OSErr )
  393. NavAskDiscardChanges            (NavDialogOptions *     dialogOptions,
  394.                                  NavAskDiscardChangesResult * reply,
  395.                                  NavEventUPP            eventProc, /* can be NULL */
  396.                                  void *                 callBackUD) /* can be NULL */;
  397. EXTERN_API( OSErr )
  398. NavChooseFile                   (AEDesc *               defaultLocation, /* can be NULL */
  399.                                  NavReplyRecord *       reply,
  400.                                  NavDialogOptions *     dialogOptions,
  401.                                  NavEventUPP            eventProc, /* can be NULL */
  402.                                  NavPreviewUPP          previewProc, /* can be NULL */
  403.                                  NavObjectFilterUPP     filterProc, /* can be NULL */
  404.                                  NavTypeListHandle      typeList, /* can be NULL */
  405.                                  void *                 callBackUD) /* can be NULL */;
  406. EXTERN_API( OSErr )
  407. NavChooseFolder                 (AEDesc *               defaultLocation, /* can be NULL */
  408.                                  NavReplyRecord *       reply,
  409.                                  NavDialogOptions *     dialogOptions,
  410.                                  NavEventUPP            eventProc, /* can be NULL */
  411.                                  NavObjectFilterUPP     filterProc, /* can be NULL */
  412.                                  void *                 callBackUD) /* can be NULL */;
  413. EXTERN_API( OSErr )
  414. NavChooseVolume                 (AEDesc *               defaultSelection, /* can be NULL */
  415.                                  NavReplyRecord *       reply,
  416.                                  NavDialogOptions *     dialogOptions,
  417.                                  NavEventUPP            eventProc, /* can be NULL */
  418.                                  NavObjectFilterUPP     filterProc, /* can be NULL */
  419.                                  void *                 callBackUD) /* can be NULL */;
  420. EXTERN_API( OSErr )
  421. NavChooseObject                 (AEDesc *               defaultLocation, /* can be NULL */
  422.                                  NavReplyRecord *       reply,
  423.                                  NavDialogOptions *     dialogOptions,
  424.                                  NavEventUPP            eventProc, /* can be NULL */
  425.                                  NavObjectFilterUPP     filterProc, /* can be NULL */
  426.                                  void *                 callBackUD) /* can be NULL */;
  427. EXTERN_API( OSErr )
  428. NavNewFolder                    (AEDesc *               defaultLocation, /* can be NULL */
  429.                                  NavReplyRecord *       reply,
  430.                                  NavDialogOptions *     dialogOptions,
  431.                                  NavEventUPP            eventProc, /* can be NULL */
  432.                                  void *                 callBackUD) /* can be NULL */;
  433. EXTERN_API( OSErr )
  434. NavTranslateFile                (NavReplyRecord *       reply,
  435.                                  NavTranslationOptions  howToTranslate);
  436. EXTERN_API( OSErr )
  437. NavCompleteSave                 (NavReplyRecord *       reply,
  438.                                  NavTranslationOptions  howToTranslate);
  439. EXTERN_API( OSErr )
  440. NavCustomControl                (NavContext             context,
  441.                                  NavCustomControlMessage  selector,
  442.                                  void *                 parms);
  443. EXTERN_API( OSErr )
  444. NavCreatePreview                (AEDesc *               theObject,
  445.                                  OSType                 previewDataType,
  446.                                  const void *           previewData,
  447.                                  Size                   previewDataSize);
  448. EXTERN_API( OSErr )
  449. NavDisposeReply                 (NavReplyRecord *       reply);
  450. EXTERN_API( Boolean )
  451. NavServicesCanRun               (void);
  452. #if TARGET_RT_MAC_CFM
  453. #ifdef __cplusplus
  454.     inline pascal Boolean NavServicesAvailable() { return ((NavLibraryVersion != (void*)kUnresolvedCFragSymbolAddress) && NavServicesCanRun()); }
  455. #else
  456.     #define NavServicesAvailable()  ((NavLibraryVersion != (void*)kUnresolvedCFragSymbolAddress) && NavServicesCanRun())
  457. #endif
  458. #elif TARGET_RT_MAC_MACHO
  459. /* Navigation is always available on OS X */
  460. #ifdef __cplusplus
  461.     inline pascal Boolean NavServicesAvailable() { return true; }
  462. #else
  463.     #define NavServicesAvailable()  (true)
  464. #endif
  465. #else
  466. /* NavServicesAvailable() is implemented in Navigation.o for classic 68K clients*/
  467. #if CALL_NOT_IN_CARBON
  468. EXTERN_API( Boolean )
  469. NavServicesAvailable            (void);
  470. #endif  /* CALL_NOT_IN_CARBON */
  471. #endif  /*  */
  472. #if PRAGMA_STRUCT_ALIGN
  473.     #pragma options align=reset
  474. #elif PRAGMA_STRUCT_PACKPUSH
  475.     #pragma pack(pop)
  476. #elif PRAGMA_STRUCT_PACK
  477.     #pragma pack()
  478. #endif
  479. #ifdef PRAGMA_IMPORT_OFF
  480. #pragma import off
  481. #elif PRAGMA_IMPORT
  482. #pragma import reset
  483. #endif
  484. #ifdef __cplusplus
  485. }
  486. #endif
  487. #endif /* __NAVIGATION__ */