Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1256 lines
42 KiB

  1. /*
  2. File: Navigation.h
  3. Contains: Navigation Services Interfaces
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1996-2001 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __NAVIGATION__
  11. #define __NAVIGATION__
  12. #ifndef __MACTYPES__
  13. #include <MacTypes.h>
  14. #endif
  15. #ifndef __MACERRORS__
  16. #include <MacErrors.h>
  17. #endif
  18. #ifndef __CODEFRAGMENTS__
  19. #include <CodeFragments.h>
  20. #endif
  21. #ifndef __TRANSLATION__
  22. #include <Translation.h>
  23. #endif
  24. #ifndef __MACWINDOWS__
  25. #include <MacWindows.h>
  26. #endif
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. #if PRAGMA_IMPORT
  34. #pragma import on
  35. #endif
  36. #if PRAGMA_STRUCT_ALIGN
  37. #pragma options align=mac68k
  38. #elif PRAGMA_STRUCT_PACKPUSH
  39. #pragma pack(push, 2)
  40. #elif PRAGMA_STRUCT_PACK
  41. #pragma pack(2)
  42. #endif
  43. typedef UInt32 NavAskSaveChangesAction;
  44. enum {
  45. /* input action codes for NavAskSaveChanges() */
  46. kNavSaveChangesClosingDocument = 1,
  47. kNavSaveChangesQuittingApplication = 2,
  48. kNavSaveChangesOther = 0
  49. };
  50. typedef UInt32 NavAskSaveChangesResult;
  51. enum {
  52. /* result codes for NavAskSaveChanges() */
  53. kNavAskSaveChangesSave = 1,
  54. kNavAskSaveChangesCancel = 2,
  55. kNavAskSaveChangesDontSave = 3
  56. };
  57. typedef UInt32 NavAskDiscardChangesResult;
  58. enum {
  59. /* result codes for NavAskDiscardChanges() */
  60. kNavAskDiscardChanges = 1,
  61. kNavAskDiscardChangesCancel = 2
  62. };
  63. typedef SInt16 NavFilterModes;
  64. enum {
  65. /* which elements are being filtered for objects: */
  66. kNavFilteringBrowserList = 0,
  67. kNavFilteringFavorites = 1,
  68. kNavFilteringRecents = 2,
  69. kNavFilteringShortCutVolumes = 3,
  70. kNavFilteringLocationPopup = 4 /* for v1.1 or greater */
  71. };
  72. enum {
  73. kNavFileOrFolderVersion = 1
  74. };
  75. struct NavFileOrFolderInfo {
  76. UInt16 version;
  77. Boolean isFolder;
  78. Boolean visible;
  79. UInt32 creationDate;
  80. UInt32 modificationDate;
  81. union {
  82. struct {
  83. Boolean locked; /* file is locked */
  84. Boolean resourceOpen; /* resource fork is opened */
  85. Boolean dataOpen; /* data fork is opened */
  86. Boolean reserved1;
  87. UInt32 dataSize; /* size of the data fork */
  88. UInt32 resourceSize; /* size of the resource fork */
  89. FInfo finderInfo; /* more file info: */
  90. FXInfo finderXInfo;
  91. } fileInfo;
  92. struct {
  93. Boolean shareable;
  94. Boolean sharePoint;
  95. Boolean mounted;
  96. Boolean readable;
  97. Boolean writeable;
  98. Boolean reserved2;
  99. UInt32 numberOfFiles;
  100. DInfo finderDInfo;
  101. DXInfo finderDXInfo;
  102. OSType folderType; /* package type, For struct version >= 1 */
  103. OSType folderCreator; /* package creator, For struct version >= 1 */
  104. char reserved3[206];
  105. } folderInfo;
  106. } fileAndFolder;
  107. };
  108. typedef struct NavFileOrFolderInfo NavFileOrFolderInfo;
  109. union NavEventDataInfo {
  110. EventRecord * event; /* for event processing */
  111. void * param; /* points to event specific data */
  112. };
  113. typedef union NavEventDataInfo NavEventDataInfo;
  114. struct NavEventData {
  115. NavEventDataInfo eventDataParms; /* the event data */
  116. SInt16 itemHit; /* the dialog item number, for v1.1 or greater */
  117. };
  118. typedef struct NavEventData NavEventData;
  119. /*
  120. * NavDialogRef
  121. *
  122. * Summary:
  123. * Opaque Navigation Services dialog identifier
  124. *
  125. * Discussion:
  126. * A NavDialogRef is an opaque reference to an instance of a
  127. * Navigation Services dialog. A new NavDialogRef is returned from
  128. * any of the NavCreate*Dialog functions and is later disposed with
  129. * the NavDialogDispose function. NavDialogRef is the new name for
  130. * the NavContext type, and thus when a client's event proc is
  131. * called, the value of the NavCBRec.context field is the same as
  132. * the NavDialogRef returned from the corresponding
  133. * NavCreate*Dialog. A NavDialogRef is distinct from, and is not
  134. * interchangable with, a Dialog Manager DialogRef.
  135. */
  136. typedef struct __NavDialog* NavDialogRef;
  137. #if CALL_NOT_IN_CARBON
  138. /* NavContext is the old name for NavDialogRef */
  139. typedef NavDialogRef NavContext;
  140. #endif /* CALL_NOT_IN_CARBON */
  141. /*
  142. * NavUserAction
  143. *
  144. * Summary:
  145. * Indicates an action taken by the user
  146. *
  147. * Discussion:
  148. * When the user clicks a button at the bottom of a Nav Services
  149. * dialog (or makes an equivalent mouse or key gesture), a
  150. * kNavCBUserAction event is sent to the client's event proc
  151. * indicating which action was taken. Often, the action also
  152. * dismisses the dialog. User action events are only generated when
  153. * using dialogs created from a NavCreate*Dialog function. In the
  154. * special case of a modeless GetFile dialog (supported only on Mac
  155. * OS X), the user can option-click on the open button to keep the
  156. * dialog from being dismissed, but the kNavCBUserAction event is
  157. * sent so the client can get the reply record and open the selected
  158. * files.
  159. */
  160. typedef UInt32 NavUserAction;
  161. enum {
  162. /*
  163. * No action taken. The dialog is still running or was terminated
  164. * programmatically.
  165. */
  166. kNavUserActionNone = 0,
  167. /*
  168. * The user cancelled the dialog.
  169. */
  170. kNavUserActionCancel = 1,
  171. /*
  172. * The user clicked the Open button in the GetFile dialog.
  173. */
  174. kNavUserActionOpen = 2,
  175. /*
  176. * The user clicked the Save button in the PutFile dialog.
  177. */
  178. kNavUserActionSaveAs = 3,
  179. /*
  180. * The user clicked the Choose button in the ChooseFile,
  181. * ChooseFolder, ChooseVolume or ChooseObject dialogs.
  182. */
  183. kNavUserActionChoose = 4,
  184. /*
  185. * The user clicked the New Folder button in the New Folder dialog.
  186. */
  187. kNavUserActionNewFolder = 5,
  188. /*
  189. * The user clicked the Save button in an AskSaveChanges dialog.
  190. */
  191. kNavUserActionSaveChanges = 6,
  192. /*
  193. * The user clicked the Don't Save button in an AskSaveChanges dialog.
  194. */
  195. kNavUserActionDontSaveChanges = 7,
  196. /*
  197. * The user clicked the Discard button in the AskDiscardChanges
  198. * dialog.
  199. */
  200. kNavUserActionDiscardChanges = 8,
  201. /*
  202. * The user clicked the Review Unsaved button in the
  203. * AskReviewDocuments dialog (used only on Mac OS X).
  204. */
  205. kNavUserActionReviewDocuments = 9,
  206. /*
  207. * The user clicked the Discard Changes button in the
  208. * AskReviewDocuments dialog (used only on Mac OS X).
  209. */
  210. kNavUserActionDiscardDocuments = 10
  211. };
  212. enum {
  213. kNavCBRecVersion = 1
  214. };
  215. /*
  216. * NavCBRec
  217. *
  218. * Summary:
  219. * A structure passed to event and preview callbacks
  220. *
  221. * Discussion:
  222. * The NavCBRec structure is passed to the client's event proc or
  223. * custom preview proc. It provides information that is specific to
  224. * each event type. New for Carbon: the userAction field.
  225. */
  226. struct NavCBRec {
  227. /*
  228. * The version of the struct (currently 1)
  229. */
  230. UInt16 version;
  231. /*
  232. * The NavDialogRef this callback with which this call is associated
  233. */
  234. NavDialogRef context;
  235. /*
  236. * The dialog's window
  237. */
  238. WindowRef window;
  239. /*
  240. * The custom control area rectangle (window coordinates)
  241. */
  242. Rect customRect;
  243. /*
  244. * The custom preview area rectangle (window coordinates)
  245. */
  246. Rect previewRect;
  247. /*
  248. * The event-specific data, including the EventRecord, if any
  249. */
  250. NavEventData eventData;
  251. /*
  252. * The action taken by the user that generated a kNavCBUserAction
  253. * event (Carbon dialogs only)
  254. */
  255. NavUserAction userAction;
  256. /*
  257. * Reserved for future use
  258. */
  259. char reserved[218];
  260. };
  261. typedef struct NavCBRec NavCBRec;
  262. typedef NavCBRec * NavCBRecPtr;
  263. /*
  264. * NavEventCallbackMessage
  265. *
  266. * Summary:
  267. * Identifies the message type being sent to the client's event proc
  268. */
  269. typedef SInt32 NavEventCallbackMessage;
  270. enum {
  271. /*
  272. * An OS event has occurred. A pointer to the EventRecord is in the
  273. * eventData.eventDataParms.event field of the NavCBRec.
  274. */
  275. kNavCBEvent = 0,
  276. /*
  277. * Negotiate for custom control space. Client can set change the
  278. * customRect field in the NavCBRec to create space for a custom
  279. * area. Nav Services will continue to send the kNavCBCustomize
  280. * message until the client leaves the customRect field unchanged.
  281. */
  282. kNavCBCustomize = 1,
  283. /*
  284. * This message is sent after custom area negotiation, just before
  285. * the dialog is made visible. Add your custom controls when you
  286. * receive this message.
  287. */
  288. kNavCBStart = 2,
  289. /*
  290. * This is the last message sent, after the dialog has been hidden.
  291. */
  292. kNavCBTerminate = 3,
  293. /*
  294. * Sent when the dialog has been resized. Check the customRect and or
  295. * previewRect values to see if any relayout is needed. Nav Services
  296. * automatically moves controls in the custom area.
  297. */
  298. kNavCBAdjustRect = 4,
  299. /*
  300. * The target folder of the dialog has changed. The
  301. * NavCBRec.eventData.eventDataParms.param field is an AEDesc*
  302. * containing an descriptor of the new location (ususally an FSSpec
  303. * or an FSRef).
  304. */
  305. kNavCBNewLocation = 5,
  306. /*
  307. * The target folder has changed to the user's desktop folder.
  308. */
  309. kNavCBShowDesktop = 6,
  310. /*
  311. * The user has selected or deselected a file or folder. The
  312. * NavCBRec.eventData.eventDataParms.param field is an AEDescList*
  313. * identifying the currently selected items.
  314. */
  315. kNavCBSelectEntry = 7,
  316. /*
  317. * The value of the Show/Format popup menu has changed. The
  318. * NavCBRec.eventData.eventDataParms.param is a NavMenuItemSpec*
  319. * identifying the menu item selected. If the dialog was created
  320. * using the Carbon-only NavCreate*Dialog APIs, then the menuType
  321. * field of the NavMenuItemSpec is set to the index into the client's
  322. * CFArray of popupExtension strings (see NavDialogCreationOptions).
  323. */
  324. kNavCBPopupMenuSelect = 8,
  325. /*
  326. * Sent when the user has accepted (Open, Save, etc.).
  327. */
  328. kNavCBAccept = 9,
  329. /*
  330. * Sent when the user has cancelled the dialog.
  331. */
  332. kNavCBCancel = 10,
  333. /*
  334. * The custom preview area state has changed. The
  335. * NavCBRec.eventData.eventDataParms.param is a Boolean* set to true
  336. * if the preview area is visible or false if it is not.
  337. */
  338. kNavCBAdjustPreview = 11,
  339. /*
  340. * The user has taken one of the actions described in the
  341. * NavUserAction definition. The action may or may not dismiss the
  342. * dialog. The NavCBRec.userAction field indicates which action was
  343. * taken (Carbon dialogs only).
  344. */
  345. kNavCBUserAction = 12,
  346. /*
  347. * The user has opened a folder or chosen a file. The client can
  348. * block navigation or dismissal by setting the appropriate action
  349. * state with the kNavCtlSetActionState NavCustomControl selector.
  350. */
  351. kNavCBOpenSelection = (long)0x80000000
  352. };
  353. typedef void * NavCallBackUserData;
  354. /* for events and customization: */
  355. typedef CALLBACK_API( void , NavEventProcPtr )(NavEventCallbackMessage callBackSelector, NavCBRecPtr callBackParms, void *callBackUD);
  356. /* for preview support: */
  357. typedef CALLBACK_API( Boolean , NavPreviewProcPtr )(NavCBRecPtr callBackParms, void *callBackUD);
  358. /* filtering callback information: */
  359. typedef CALLBACK_API( Boolean , NavObjectFilterProcPtr )(AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode);
  360. typedef STACK_UPP_TYPE(NavEventProcPtr) NavEventUPP;
  361. typedef STACK_UPP_TYPE(NavPreviewProcPtr) NavPreviewUPP;
  362. typedef STACK_UPP_TYPE(NavObjectFilterProcPtr) NavObjectFilterUPP;
  363. /*
  364. * NewNavEventUPP()
  365. *
  366. * Availability:
  367. * Non-Carbon CFM: available as macro/inline
  368. * CarbonLib: in CarbonLib 1.0 and later
  369. * Mac OS X: in version 10.0 and later
  370. */
  371. EXTERN_API_C( NavEventUPP )
  372. NewNavEventUPP(NavEventProcPtr userRoutine);
  373. #if !OPAQUE_UPP_TYPES
  374. enum { uppNavEventProcInfo = 0x00000FC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
  375. #ifdef __cplusplus
  376. inline DEFINE_API_C(NavEventUPP) NewNavEventUPP(NavEventProcPtr userRoutine) { return (NavEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNavEventProcInfo, GetCurrentArchitecture()); }
  377. #else
  378. #define NewNavEventUPP(userRoutine) (NavEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNavEventProcInfo, GetCurrentArchitecture())
  379. #endif
  380. #endif
  381. /*
  382. * NewNavPreviewUPP()
  383. *
  384. * Availability:
  385. * Non-Carbon CFM: available as macro/inline
  386. * CarbonLib: in CarbonLib 1.0 and later
  387. * Mac OS X: in version 10.0 and later
  388. */
  389. EXTERN_API_C( NavPreviewUPP )
  390. NewNavPreviewUPP(NavPreviewProcPtr userRoutine);
  391. #if !OPAQUE_UPP_TYPES
  392. enum { uppNavPreviewProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
  393. #ifdef __cplusplus
  394. inline DEFINE_API_C(NavPreviewUPP) NewNavPreviewUPP(NavPreviewProcPtr userRoutine) { return (NavPreviewUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNavPreviewProcInfo, GetCurrentArchitecture()); }
  395. #else
  396. #define NewNavPreviewUPP(userRoutine) (NavPreviewUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNavPreviewProcInfo, GetCurrentArchitecture())
  397. #endif
  398. #endif
  399. /*
  400. * NewNavObjectFilterUPP()
  401. *
  402. * Availability:
  403. * Non-Carbon CFM: available as macro/inline
  404. * CarbonLib: in CarbonLib 1.0 and later
  405. * Mac OS X: in version 10.0 and later
  406. */
  407. EXTERN_API_C( NavObjectFilterUPP )
  408. NewNavObjectFilterUPP(NavObjectFilterProcPtr userRoutine);
  409. #if !OPAQUE_UPP_TYPES
  410. enum { uppNavObjectFilterProcInfo = 0x00002FD0 }; /* pascal 1_byte Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
  411. #ifdef __cplusplus
  412. inline DEFINE_API_C(NavObjectFilterUPP) NewNavObjectFilterUPP(NavObjectFilterProcPtr userRoutine) { return (NavObjectFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNavObjectFilterProcInfo, GetCurrentArchitecture()); }
  413. #else
  414. #define NewNavObjectFilterUPP(userRoutine) (NavObjectFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNavObjectFilterProcInfo, GetCurrentArchitecture())
  415. #endif
  416. #endif
  417. /*
  418. * DisposeNavEventUPP()
  419. *
  420. * Availability:
  421. * Non-Carbon CFM: available as macro/inline
  422. * CarbonLib: in CarbonLib 1.0 and later
  423. * Mac OS X: in version 10.0 and later
  424. */
  425. EXTERN_API_C( void )
  426. DisposeNavEventUPP(NavEventUPP userUPP);
  427. #if !OPAQUE_UPP_TYPES
  428. #ifdef __cplusplus
  429. inline DEFINE_API_C(void) DisposeNavEventUPP(NavEventUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  430. #else
  431. #define DisposeNavEventUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  432. #endif
  433. #endif
  434. /*
  435. * DisposeNavPreviewUPP()
  436. *
  437. * Availability:
  438. * Non-Carbon CFM: available as macro/inline
  439. * CarbonLib: in CarbonLib 1.0 and later
  440. * Mac OS X: in version 10.0 and later
  441. */
  442. EXTERN_API_C( void )
  443. DisposeNavPreviewUPP(NavPreviewUPP userUPP);
  444. #if !OPAQUE_UPP_TYPES
  445. #ifdef __cplusplus
  446. inline DEFINE_API_C(void) DisposeNavPreviewUPP(NavPreviewUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  447. #else
  448. #define DisposeNavPreviewUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  449. #endif
  450. #endif
  451. /*
  452. * DisposeNavObjectFilterUPP()
  453. *
  454. * Availability:
  455. * Non-Carbon CFM: available as macro/inline
  456. * CarbonLib: in CarbonLib 1.0 and later
  457. * Mac OS X: in version 10.0 and later
  458. */
  459. EXTERN_API_C( void )
  460. DisposeNavObjectFilterUPP(NavObjectFilterUPP userUPP);
  461. #if !OPAQUE_UPP_TYPES
  462. #ifdef __cplusplus
  463. inline DEFINE_API_C(void) DisposeNavObjectFilterUPP(NavObjectFilterUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  464. #else
  465. #define DisposeNavObjectFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  466. #endif
  467. #endif
  468. /*
  469. * InvokeNavEventUPP()
  470. *
  471. * Availability:
  472. * Non-Carbon CFM: available as macro/inline
  473. * CarbonLib: in CarbonLib 1.0 and later
  474. * Mac OS X: in version 10.0 and later
  475. */
  476. EXTERN_API_C( void )
  477. InvokeNavEventUPP(
  478. NavEventCallbackMessage callBackSelector,
  479. NavCBRecPtr callBackParms,
  480. void * callBackUD,
  481. NavEventUPP userUPP);
  482. #if !OPAQUE_UPP_TYPES
  483. #ifdef __cplusplus
  484. inline DEFINE_API_C(void) InvokeNavEventUPP(NavEventCallbackMessage callBackSelector, NavCBRecPtr callBackParms, void * callBackUD, NavEventUPP userUPP) { CALL_THREE_PARAMETER_UPP(userUPP, uppNavEventProcInfo, callBackSelector, callBackParms, callBackUD); }
  485. #else
  486. #define InvokeNavEventUPP(callBackSelector, callBackParms, callBackUD, userUPP) CALL_THREE_PARAMETER_UPP((userUPP), uppNavEventProcInfo, (callBackSelector), (callBackParms), (callBackUD))
  487. #endif
  488. #endif
  489. /*
  490. * InvokeNavPreviewUPP()
  491. *
  492. * Availability:
  493. * Non-Carbon CFM: available as macro/inline
  494. * CarbonLib: in CarbonLib 1.0 and later
  495. * Mac OS X: in version 10.0 and later
  496. */
  497. EXTERN_API_C( Boolean )
  498. InvokeNavPreviewUPP(
  499. NavCBRecPtr callBackParms,
  500. void * callBackUD,
  501. NavPreviewUPP userUPP);
  502. #if !OPAQUE_UPP_TYPES
  503. #ifdef __cplusplus
  504. inline DEFINE_API_C(Boolean) InvokeNavPreviewUPP(NavCBRecPtr callBackParms, void * callBackUD, NavPreviewUPP userUPP) { return (Boolean)CALL_TWO_PARAMETER_UPP(userUPP, uppNavPreviewProcInfo, callBackParms, callBackUD); }
  505. #else
  506. #define InvokeNavPreviewUPP(callBackParms, callBackUD, userUPP) (Boolean)CALL_TWO_PARAMETER_UPP((userUPP), uppNavPreviewProcInfo, (callBackParms), (callBackUD))
  507. #endif
  508. #endif
  509. /*
  510. * InvokeNavObjectFilterUPP()
  511. *
  512. * Availability:
  513. * Non-Carbon CFM: available as macro/inline
  514. * CarbonLib: in CarbonLib 1.0 and later
  515. * Mac OS X: in version 10.0 and later
  516. */
  517. EXTERN_API_C( Boolean )
  518. InvokeNavObjectFilterUPP(
  519. AEDesc * theItem,
  520. void * info,
  521. void * callBackUD,
  522. NavFilterModes filterMode,
  523. NavObjectFilterUPP userUPP);
  524. #if !OPAQUE_UPP_TYPES
  525. #ifdef __cplusplus
  526. inline DEFINE_API_C(Boolean) InvokeNavObjectFilterUPP(AEDesc * theItem, void * info, void * callBackUD, NavFilterModes filterMode, NavObjectFilterUPP userUPP) { return (Boolean)CALL_FOUR_PARAMETER_UPP(userUPP, uppNavObjectFilterProcInfo, theItem, info, callBackUD, filterMode); }
  527. #else
  528. #define InvokeNavObjectFilterUPP(theItem, info, callBackUD, filterMode, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppNavObjectFilterProcInfo, (theItem), (info), (callBackUD), (filterMode))
  529. #endif
  530. #endif
  531. #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
  532. /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
  533. #define NewNavEventProc(userRoutine) NewNavEventUPP(userRoutine)
  534. #define NewNavPreviewProc(userRoutine) NewNavPreviewUPP(userRoutine)
  535. #define NewNavObjectFilterProc(userRoutine) NewNavObjectFilterUPP(userRoutine)
  536. #define CallNavEventProc(userRoutine, callBackSelector, callBackParms, callBackUD) InvokeNavEventUPP(callBackSelector, callBackParms, callBackUD, userRoutine)
  537. #define CallNavPreviewProc(userRoutine, callBackParms, callBackUD) InvokeNavPreviewUPP(callBackParms, callBackUD, userRoutine)
  538. #define CallNavObjectFilterProc(userRoutine, theItem, info, callBackUD, filterMode) InvokeNavObjectFilterUPP(theItem, info, callBackUD, filterMode, userRoutine)
  539. #endif /* CALL_NOT_IN_CARBON */
  540. typedef SInt32 NavCustomControlMessage;
  541. enum {
  542. kNavCtlShowDesktop = 0, /* show desktop, parms = nil */
  543. kNavCtlSortBy = 1, /* sort key field, parms->NavSortKeyField */
  544. kNavCtlSortOrder = 2, /* sort order, parms->NavSortOrder */
  545. kNavCtlScrollHome = 3, /* scroll list home, parms = nil */
  546. kNavCtlScrollEnd = 4, /* scroll list end, parms = nil */
  547. kNavCtlPageUp = 5, /* page list up, parms = nil */
  548. kNavCtlPageDown = 6, /* page list down, parms = nil */
  549. kNavCtlGetLocation = 7, /* get current location, parms<-AEDesc* */
  550. kNavCtlSetLocation = 8, /* set current location, parms->AEDesc* */
  551. kNavCtlGetSelection = 9, /* get current selection, parms<-AEDescList* */
  552. kNavCtlSetSelection = 10, /* set current selection, parms->AEDescList* */
  553. kNavCtlShowSelection = 11, /* make selection visible, parms = nil */
  554. kNavCtlOpenSelection = 12, /* open view of selection, parms = nil */
  555. kNavCtlEjectVolume = 13, /* eject volume, parms->vRefNum */
  556. kNavCtlNewFolder = 14, /* create a new folder, parms->StringPtr */
  557. kNavCtlCancel = 15, /* cancel dialog, parms = nil */
  558. kNavCtlAccept = 16, /* accept dialog default, parms = nil */
  559. kNavCtlIsPreviewShowing = 17, /* query preview status, parms<-Boolean */
  560. kNavCtlAddControl = 18, /* add one control to dialog, parms->ControlHandle */
  561. kNavCtlAddControlList = 19, /* add control list to dialog, parms->Handle (DITL rsrc) */
  562. kNavCtlGetFirstControlID = 20, /* get 1st control ID, parms<-UInt16 */
  563. kNavCtlSelectCustomType = 21, /* select a custom menu item parms->NavMenuItemSpec* */
  564. kNavCtlSelectAllType = 22, /* select an "All" menu item parms->SInt16 */
  565. kNavCtlGetEditFileName = 23, /* get save dlog's file name parms<-StringPtr */
  566. kNavCtlSetEditFileName = 24, /* set save dlog's file name parms->StringPtr */
  567. kNavCtlSelectEditFileName = 25, /* select save dlog file name parms->ControlEditTextSelectionRec*, v1.1 or greater */
  568. kNavCtlBrowserSelectAll = 26, /* re-scan the browser list parms = nil, v2.0 or greater */
  569. kNavCtlGotoParent = 27, /* navigate to parent parms = nil, v2.0 or greater */
  570. kNavCtlSetActionState = 28, /* restrict navigation parms->NavActionState (flags), v2.0 or greater */
  571. kNavCtlBrowserRedraw = 29, /* rescan browser list parms = nil, v2.0 or greater */
  572. kNavCtlTerminate = 30 /* terminate/dismiss dialog parms = nil, v2.0 or greater */
  573. };
  574. typedef UInt32 NavActionState;
  575. enum {
  576. kNavNormalState = 0x00000000, /* normal/default state */
  577. kNavDontOpenState = 0x00000001, /* disallow opening files/folders */
  578. kNavDontSaveState = 0x00000002, /* disallow saving files */
  579. kNavDontChooseState = 0x00000004, /* disallow choosing objects */
  580. kNavDontNewFolderState = 0x00000010 /* disallow creating new folders */
  581. };
  582. typedef UInt16 NavPopupMenuItem;
  583. enum {
  584. kNavAllKnownFiles = 0,
  585. kNavAllReadableFiles = 1,
  586. kNavAllFiles = 2
  587. };
  588. typedef UInt16 NavSortKeyField;
  589. enum {
  590. kNavSortNameField = 0,
  591. kNavSortDateField = 1
  592. };
  593. typedef UInt16 NavSortOrder;
  594. enum {
  595. kNavSortAscending = 0,
  596. kNavSortDescending = 1
  597. };
  598. typedef UInt32 NavDialogOptionFlags;
  599. enum {
  600. kNavDefaultNavDlogOptions = 0x000000E4, /* use defaults for all the options */
  601. kNavNoTypePopup = 0x00000001, /* don't show file type/extension popup on Open/Save */
  602. kNavDontAutoTranslate = 0x00000002, /* don't automatically translate on Open */
  603. kNavDontAddTranslateItems = 0x00000004, /* don't add translation choices on Open/Save */
  604. kNavAllFilesInPopup = 0x00000010, /* "All Files" menu item in the type popup on Open */
  605. kNavAllowStationery = 0x00000020, /* allow saving of stationery files */
  606. kNavAllowPreviews = 0x00000040, /* allow preview to show */
  607. kNavAllowMultipleFiles = 0x00000080, /* allow multiple items to be selected */
  608. kNavAllowInvisibleFiles = 0x00000100, /* allow invisible items to be shown */
  609. kNavDontResolveAliases = 0x00000200, /* don't resolve aliases */
  610. kNavSelectDefaultLocation = 0x00000400, /* make the default location the browser selection */
  611. kNavSelectAllReadableItem = 0x00000800, /* make the dialog select "All Readable Documents" on open */
  612. kNavSupportPackages = 0x00001000, /* recognize file system packages, v2.0 or greater */
  613. kNavAllowOpenPackages = 0x00002000, /* allow opening of packages, v2.0 or greater */
  614. kNavDontAddRecents = 0x00004000, /* don't add chosen objects to the recents list, v2.0 or greater */
  615. kNavDontUseCustomFrame = 0x00008000, /* don't draw the custom area bevel frame, v2.0 or greater */
  616. kNavDontConfirmReplacement = 0x00010000, /* don't show the "Replace File?" alert on save conflict, v3.0 or greater */
  617. kNavPreserveSaveFileExtension = 0x00020000 /* extension in default file name is preserved and initially hidden, v3.1 or greater */
  618. };
  619. typedef UInt32 NavTranslationOptions;
  620. enum {
  621. kNavTranslateInPlace = 0, /* translate in place, replacing translation source file (default for Save) */
  622. kNavTranslateCopy = 1 /* translate to a copy of the source file (default for Open) */
  623. };
  624. enum {
  625. kNavMenuItemSpecVersion = 0
  626. };
  627. struct NavMenuItemSpec {
  628. UInt16 version;
  629. OSType menuCreator;
  630. OSType menuType;
  631. Str255 menuItemName;
  632. char reserved[245];
  633. };
  634. typedef struct NavMenuItemSpec NavMenuItemSpec;
  635. typedef NavMenuItemSpec * NavMenuItemSpecArrayPtr;
  636. typedef NavMenuItemSpecArrayPtr * NavMenuItemSpecArrayHandle;
  637. typedef NavMenuItemSpecArrayPtr NavMenuItemSpecPtr;
  638. typedef NavMenuItemSpecArrayHandle NavMenuItemSpecHandle;
  639. enum {
  640. kNavGenericSignature = FOUR_CHAR_CODE('****')
  641. };
  642. struct NavTypeList {
  643. OSType componentSignature;
  644. short reserved;
  645. short osTypeCount;
  646. OSType osType[1];
  647. };
  648. typedef struct NavTypeList NavTypeList;
  649. typedef NavTypeList * NavTypeListPtr;
  650. typedef NavTypeListPtr * NavTypeListHandle;
  651. enum {
  652. kNavDialogOptionsVersion = 0
  653. };
  654. struct NavDialogOptions {
  655. UInt16 version;
  656. NavDialogOptionFlags dialogOptionFlags; /* option flags for affecting the dialog's behavior */
  657. Point location; /* top-left location of the dialog, or {-1,-1} for default position */
  658. Str255 clientName;
  659. Str255 windowTitle;
  660. Str255 actionButtonLabel; /* label of the default button (or null string for default) */
  661. Str255 cancelButtonLabel; /* label of the cancel button (or null string for default) */
  662. Str255 savedFileName; /* default name for text box in NavPutFile (or null string for default) */
  663. Str255 message; /* custom message prompt (or null string for default) */
  664. UInt32 preferenceKey; /* a key for to managing preferences for using multiple utility dialogs */
  665. NavMenuItemSpecArrayHandle popupExtension; /* extended popup menu items, an array of NavMenuItemSpecs */
  666. char reserved[494];
  667. };
  668. typedef struct NavDialogOptions NavDialogOptions;
  669. enum {
  670. kNavReplyRecordVersion = 2
  671. };
  672. /*
  673. * NavReplyRecord
  674. *
  675. * Summary:
  676. * A structure describing the results of a Nav Services dialog
  677. *
  678. * Discussion:
  679. * A reply record is the result of a Nav Services file dialog. Using
  680. * the older API, which is always modal, the client passes the
  681. * address of a reply record when invoking the dialog. In the Carbon
  682. * API, dialogs may also be window modal or modeless, so the client
  683. * requests the reply record by calling NavDialogGetReply when a
  684. * kNavCBUserAction event is received. Either way, a reply record
  685. * should be disposed of using NavDisposeReply.
  686. */
  687. struct NavReplyRecord {
  688. /*
  689. * The version of the structure. The first public version of the
  690. * structure was version 0. Fields added after version 0, starting
  691. * with the saveFileName field, are noted below.
  692. */
  693. UInt16 version;
  694. /*
  695. * True if the reply contains a non-null selection
  696. */
  697. Boolean validRecord;
  698. /*
  699. * True if this reply is from a PutFile dialog and the file to be
  700. * saved already exists and needs to be replaced. The user has
  701. * already been warned unless the kNavDontConfirmReplacement option
  702. * flag is used.
  703. */
  704. Boolean replacing;
  705. /*
  706. * True if this reply is from a PutFile dialog and the user wants to
  707. * save the file as stationery.
  708. */
  709. Boolean isStationery;
  710. /*
  711. * True if translation was performed on the file(s) to be opened or
  712. * if transtlation will be needed on the file to be saved.
  713. */
  714. Boolean translationNeeded;
  715. /*
  716. * For GetFile or Choose dialogs, a list of items chosen by the user.
  717. * For the older NavPutFile dialog, a list containing one item: an
  718. * FSSpec of the file to be saved. ** IMPORTANT NOTE *** For the new
  719. * Carbon-only PutFile dialog created with NavCreatePutFileDialog,
  720. * the selection is a list containing one item: the DIRECTORY where
  721. * the file is to be saved. The file name is obtained from the
  722. * saveFileName field. When using the original modal API, each
  723. * descriptor will contain an FSSpec (typeFSS). When using the new
  724. * Carbon-only dialogs created via the NavCreate*Dialog functions,
  725. * each descriptor could contain either an FSSpec (typeFSS, used on
  726. * Mac OS 8 or 9) or an FSRef (typeFSRef, used on Mac OS X). This
  727. * divergence is caused by the need to use FSRef (for Unicode/HFS+
  728. * support) on Mac OS X, while being unable to provide FSRefs on Mac
  729. * OS 8.6.
  730. */
  731. AEDescList selection;
  732. /*
  733. * For NavPutFile: the script system associated with the name of the
  734. * file to be saved.
  735. */
  736. ScriptCode keyScript;
  737. /*
  738. * A handle to an array of type FileTranslationSpec. Each array entry
  739. * corresponds to an item in the selection and describes the
  740. * translation that was performed (GetFile) or needs to be performed
  741. * (PutFile) on that item.
  742. */
  743. FileTranslationSpecArrayHandle fileTranslation;
  744. /*
  745. * Reserved for private use.
  746. */
  747. UInt32 reserved1;
  748. /*
  749. * Carbon PutFile dialog only: the name of the file to be saved. This
  750. * field contains the true file name to saved, even if the extension
  751. * will be hidden from the user. This field was added in structure
  752. * version 1.
  753. */
  754. CFStringRef saveFileName;
  755. /*
  756. * The extension on the name of the saved file should be hidden. Once
  757. * the file has been saved, the client should call NavCompleteSave.
  758. * NavCompleteSave will take care of hiding the extension on the
  759. * file. However, the client needs to know that the extension is
  760. * hidden so that it can display the document name correctly in the
  761. * UI, such as in window titles and menus. This field is only used if
  762. * the client has r equested extension preservation using the
  763. * kNavPreserveSaveFileExtension dialog option flag. This field was
  764. * added in structure version 2.
  765. */
  766. Boolean saveFileExtensionHidden;
  767. /*
  768. * Reserved for future use.
  769. */
  770. UInt8 reserved2;
  771. /*
  772. * Reserved for future use.
  773. */
  774. char reserved[225];
  775. };
  776. typedef struct NavReplyRecord NavReplyRecord;
  777. /*
  778. * NavLoad()
  779. *
  780. * Availability:
  781. * Non-Carbon CFM: in NavigationLib 1.0 and later
  782. * CarbonLib: in CarbonLib 1.0 and later
  783. * Mac OS X: not available
  784. */
  785. EXTERN_API( OSErr )
  786. NavLoad(void);
  787. /*
  788. * NavUnload()
  789. *
  790. * Availability:
  791. * Non-Carbon CFM: in NavigationLib 1.0 and later
  792. * CarbonLib: in CarbonLib 1.0 and later
  793. * Mac OS X: not available
  794. */
  795. EXTERN_API( OSErr )
  796. NavUnload(void);
  797. /*
  798. * NavLibraryVersion()
  799. *
  800. * Availability:
  801. * Non-Carbon CFM: in NavigationLib 1.0 and later
  802. * CarbonLib: in CarbonLib 1.0 and later
  803. * Mac OS X: in version 10.0 and later
  804. */
  805. EXTERN_API( UInt32 )
  806. NavLibraryVersion(void);
  807. /*
  808. * NavGetDefaultDialogOptions()
  809. *
  810. * Availability:
  811. * Non-Carbon CFM: in NavigationLib 1.0 and later
  812. * CarbonLib: in CarbonLib 1.0 and later
  813. * Mac OS X: in version 10.0 and later
  814. */
  815. EXTERN_API( OSErr )
  816. NavGetDefaultDialogOptions(NavDialogOptions * dialogOptions);
  817. /*
  818. * NavGetFile()
  819. *
  820. * Availability:
  821. * Non-Carbon CFM: in NavigationLib 1.0 and later
  822. * CarbonLib: in CarbonLib 1.0 and later
  823. * Mac OS X: in version 10.0 and later
  824. */
  825. EXTERN_API( OSErr )
  826. NavGetFile(
  827. AEDesc * defaultLocation, /* can be NULL */
  828. NavReplyRecord * reply,
  829. NavDialogOptions * dialogOptions, /* can be NULL */
  830. NavEventUPP eventProc, /* can be NULL */
  831. NavPreviewUPP previewProc, /* can be NULL */
  832. NavObjectFilterUPP filterProc, /* can be NULL */
  833. NavTypeListHandle typeList, /* can be NULL */
  834. void * callBackUD); /* can be NULL */
  835. /*
  836. * NavPutFile()
  837. *
  838. * Availability:
  839. * Non-Carbon CFM: in NavigationLib 1.0 and later
  840. * CarbonLib: in CarbonLib 1.0 and later
  841. * Mac OS X: in version 10.0 and later
  842. */
  843. EXTERN_API( OSErr )
  844. NavPutFile(
  845. AEDesc * defaultLocation, /* can be NULL */
  846. NavReplyRecord * reply,
  847. NavDialogOptions * dialogOptions, /* can be NULL */
  848. NavEventUPP eventProc, /* can be NULL */
  849. OSType fileType,
  850. OSType fileCreator,
  851. void * callBackUD); /* can be NULL */
  852. /*
  853. * NavAskSaveChanges()
  854. *
  855. * Availability:
  856. * Non-Carbon CFM: in NavigationLib 1.0 and later
  857. * CarbonLib: in CarbonLib 1.0 and later
  858. * Mac OS X: in version 10.0 and later
  859. */
  860. EXTERN_API( OSErr )
  861. NavAskSaveChanges(
  862. NavDialogOptions * dialogOptions,
  863. NavAskSaveChangesAction action,
  864. NavAskSaveChangesResult * reply,
  865. NavEventUPP eventProc, /* can be NULL */
  866. void * callBackUD); /* can be NULL */
  867. /*
  868. * NavCustomAskSaveChanges()
  869. *
  870. * Availability:
  871. * Non-Carbon CFM: in NavigationLib 1.0 and later
  872. * CarbonLib: in CarbonLib 1.0 and later
  873. * Mac OS X: in version 10.0 and later
  874. */
  875. EXTERN_API( OSErr )
  876. NavCustomAskSaveChanges(
  877. NavDialogOptions * dialogOptions,
  878. NavAskSaveChangesResult * reply,
  879. NavEventUPP eventProc, /* can be NULL */
  880. void * callBackUD); /* can be NULL */
  881. /*
  882. * NavAskDiscardChanges()
  883. *
  884. * Availability:
  885. * Non-Carbon CFM: in NavigationLib 1.0 and later
  886. * CarbonLib: in CarbonLib 1.0 and later
  887. * Mac OS X: in version 10.0 and later
  888. */
  889. EXTERN_API( OSErr )
  890. NavAskDiscardChanges(
  891. NavDialogOptions * dialogOptions,
  892. NavAskDiscardChangesResult * reply,
  893. NavEventUPP eventProc, /* can be NULL */
  894. void * callBackUD); /* can be NULL */
  895. /*
  896. * NavChooseFile()
  897. *
  898. * Availability:
  899. * Non-Carbon CFM: in NavigationLib 1.0 and later
  900. * CarbonLib: in CarbonLib 1.0 and later
  901. * Mac OS X: in version 10.0 and later
  902. */
  903. EXTERN_API( OSErr )
  904. NavChooseFile(
  905. AEDesc * defaultLocation, /* can be NULL */
  906. NavReplyRecord * reply,
  907. NavDialogOptions * dialogOptions, /* can be NULL */
  908. NavEventUPP eventProc, /* can be NULL */
  909. NavPreviewUPP previewProc, /* can be NULL */
  910. NavObjectFilterUPP filterProc, /* can be NULL */
  911. NavTypeListHandle typeList, /* can be NULL */
  912. void * callBackUD); /* can be NULL */
  913. /*
  914. * NavChooseFolder()
  915. *
  916. * Availability:
  917. * Non-Carbon CFM: in NavigationLib 1.0 and later
  918. * CarbonLib: in CarbonLib 1.0 and later
  919. * Mac OS X: in version 10.0 and later
  920. */
  921. EXTERN_API( OSErr )
  922. NavChooseFolder(
  923. AEDesc * defaultLocation, /* can be NULL */
  924. NavReplyRecord * reply,
  925. NavDialogOptions * dialogOptions, /* can be NULL */
  926. NavEventUPP eventProc, /* can be NULL */
  927. NavObjectFilterUPP filterProc, /* can be NULL */
  928. void * callBackUD); /* can be NULL */
  929. /*
  930. * NavChooseVolume()
  931. *
  932. * Availability:
  933. * Non-Carbon CFM: in NavigationLib 1.0 and later
  934. * CarbonLib: in CarbonLib 1.0 and later
  935. * Mac OS X: in version 10.0 and later
  936. */
  937. EXTERN_API( OSErr )
  938. NavChooseVolume(
  939. AEDesc * defaultSelection, /* can be NULL */
  940. NavReplyRecord * reply,
  941. NavDialogOptions * dialogOptions, /* can be NULL */
  942. NavEventUPP eventProc, /* can be NULL */
  943. NavObjectFilterUPP filterProc, /* can be NULL */
  944. void * callBackUD); /* can be NULL */
  945. /*
  946. * NavChooseObject()
  947. *
  948. * Availability:
  949. * Non-Carbon CFM: in NavigationLib 1.0 and later
  950. * CarbonLib: in CarbonLib 1.0 and later
  951. * Mac OS X: in version 10.0 and later
  952. */
  953. EXTERN_API( OSErr )
  954. NavChooseObject(
  955. AEDesc * defaultLocation, /* can be NULL */
  956. NavReplyRecord * reply,
  957. NavDialogOptions * dialogOptions, /* can be NULL */
  958. NavEventUPP eventProc, /* can be NULL */
  959. NavObjectFilterUPP filterProc, /* can be NULL */
  960. void * callBackUD); /* can be NULL */
  961. /*
  962. * NavNewFolder()
  963. *
  964. * Availability:
  965. * Non-Carbon CFM: in NavigationLib 1.0 and later
  966. * CarbonLib: in CarbonLib 1.0 and later
  967. * Mac OS X: in version 10.0 and later
  968. */
  969. EXTERN_API( OSErr )
  970. NavNewFolder(
  971. AEDesc * defaultLocation, /* can be NULL */
  972. NavReplyRecord * reply,
  973. NavDialogOptions * dialogOptions, /* can be NULL */
  974. NavEventUPP eventProc, /* can be NULL */
  975. void * callBackUD); /* can be NULL */
  976. /*
  977. * NavTranslateFile()
  978. *
  979. * Availability:
  980. * Non-Carbon CFM: in NavigationLib 1.0 and later
  981. * CarbonLib: in CarbonLib 1.0 and later
  982. * Mac OS X: in version 10.0 and later
  983. */
  984. EXTERN_API( OSErr )
  985. NavTranslateFile(
  986. NavReplyRecord * reply,
  987. NavTranslationOptions howToTranslate);
  988. /*
  989. * NavCompleteSave()
  990. *
  991. * Availability:
  992. * Non-Carbon CFM: in NavigationLib 1.0 and later
  993. * CarbonLib: in CarbonLib 1.0 and later
  994. * Mac OS X: in version 10.0 and later
  995. */
  996. EXTERN_API( OSErr )
  997. NavCompleteSave(
  998. NavReplyRecord * reply,
  999. NavTranslationOptions howToTranslate);
  1000. /*
  1001. * NavCustomControl()
  1002. *
  1003. * Availability:
  1004. * Non-Carbon CFM: in NavigationLib 1.0 and later
  1005. * CarbonLib: in CarbonLib 1.0 and later
  1006. * Mac OS X: in version 10.0 and later
  1007. */
  1008. EXTERN_API( OSErr )
  1009. NavCustomControl(
  1010. NavDialogRef dialog,
  1011. NavCustomControlMessage selector,
  1012. void * parms);
  1013. /*
  1014. * NavCreatePreview()
  1015. *
  1016. * Availability:
  1017. * Non-Carbon CFM: in NavigationLib 2.0 and later
  1018. * CarbonLib: in CarbonLib 1.0 and later
  1019. * Mac OS X: in version 10.0 and later
  1020. */
  1021. EXTERN_API( OSErr )
  1022. NavCreatePreview(
  1023. AEDesc * theObject,
  1024. OSType previewDataType,
  1025. const void * previewData,
  1026. Size previewDataSize);
  1027. /*
  1028. * NavDisposeReply()
  1029. *
  1030. * Availability:
  1031. * Non-Carbon CFM: in NavigationLib 1.0 and later
  1032. * CarbonLib: in CarbonLib 1.0 and later
  1033. * Mac OS X: in version 10.0 and later
  1034. */
  1035. EXTERN_API( OSErr )
  1036. NavDisposeReply(NavReplyRecord * reply);
  1037. /*
  1038. * NavServicesCanRun()
  1039. *
  1040. * Availability:
  1041. * Non-Carbon CFM: in NavigationLib 1.0 and later
  1042. * CarbonLib: in CarbonLib 1.0 and later
  1043. * Mac OS X: not available
  1044. */
  1045. EXTERN_API( Boolean )
  1046. NavServicesCanRun(void);
  1047. #if TARGET_RT_MAC_CFM
  1048. #ifdef __cplusplus
  1049. inline pascal Boolean NavServicesAvailable() { return ((NavLibraryVersion != (void*)kUnresolvedCFragSymbolAddress) && NavServicesCanRun()); }
  1050. #else
  1051. #define NavServicesAvailable() ((NavLibraryVersion != (void*)kUnresolvedCFragSymbolAddress) && NavServicesCanRun())
  1052. #endif
  1053. #elif TARGET_RT_MAC_MACHO
  1054. /* Navigation is always available on OS X */
  1055. #ifdef __cplusplus
  1056. inline pascal Boolean NavServicesAvailable() { return true; }
  1057. #else
  1058. #define NavServicesAvailable() (true)
  1059. #endif
  1060. #else
  1061. /* NavServicesAvailable() is implemented in Navigation.o for classic 68K clients*/
  1062. #if CALL_NOT_IN_CARBON
  1063. /*
  1064. * NavServicesAvailable()
  1065. *
  1066. * Availability:
  1067. * Non-Carbon CFM: not available
  1068. * CarbonLib: not available
  1069. * Mac OS X: not available
  1070. */
  1071. EXTERN_API( Boolean )
  1072. NavServicesAvailable(void);
  1073. #endif /* CALL_NOT_IN_CARBON */
  1074. #endif /* */
  1075. #if PRAGMA_STRUCT_ALIGN
  1076. #pragma options align=reset
  1077. #elif PRAGMA_STRUCT_PACKPUSH
  1078. #pragma pack(pop)
  1079. #elif PRAGMA_STRUCT_PACK
  1080. #pragma pack()
  1081. #endif
  1082. #ifdef PRAGMA_IMPORT_OFF
  1083. #pragma import off
  1084. #elif PRAGMA_IMPORT
  1085. #pragma import reset
  1086. #endif
  1087. #ifdef __cplusplus
  1088. }
  1089. #endif
  1090. #endif /* __NAVIGATION__ */