1 {
2 File: NavigationServices/Navigation.h
3
4 Contains: Navigation Services Interfaces
5
6 Version: NavigationServices-200~178
7
8 Copyright: � 1996-2008 by Apple Computer, Inc., all rights reserved
9
10 Bugs?: For bug reports, consult the following page on
11 the World Wide Web:
12
13 http://bugs.freepascal.org
14
15 }
16 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2009 }
17 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2012 }
18 {
19 Modified for use with Free Pascal
20 Version 308
21 Please report any bugs to <gpc@microbizz.nl>
22 }
23
24 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
25 {$mode macpas}
26 {$modeswitch cblocks}
27 {$packenum 1}
28 {$macro on}
29 {$inline on}
30 {$calling mwpascal}
31
32 unit Navigation;
33 interface
34 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
35 {$setc GAP_INTERFACES_VERSION := $0308}
36
37 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
38 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
39 {$endc}
40
41 {$ifc defined CPUPOWERPC and defined CPUI386}
42 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
43 {$endc}
44 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
45 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
46 {$endc}
47
48 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
49 {$setc __ppc__ := 1}
50 {$elsec}
51 {$setc __ppc__ := 0}
52 {$endc}
53 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
54 {$setc __ppc64__ := 1}
55 {$elsec}
56 {$setc __ppc64__ := 0}
57 {$endc}
58 {$ifc not defined __i386__ and defined CPUI386}
59 {$setc __i386__ := 1}
60 {$elsec}
61 {$setc __i386__ := 0}
62 {$endc}
63 {$ifc not defined __x86_64__ and defined CPUX86_64}
64 {$setc __x86_64__ := 1}
65 {$elsec}
66 {$setc __x86_64__ := 0}
67 {$endc}
68 {$ifc not defined __arm__ and defined CPUARM}
69 {$setc __arm__ := 1}
70 {$elsec}
71 {$setc __arm__ := 0}
72 {$endc}
73 {$ifc not defined __arm64__ and defined CPUAARCH64}
74 {$setc __arm64__ := 1}
75 {$elsec}
76 {$setc __arm64__ := 0}
77 {$endc}
78
79 {$ifc defined cpu64}
80 {$setc __LP64__ := 1}
81 {$elsec}
82 {$setc __LP64__ := 0}
83 {$endc}
84
85
86 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
87 {$error Conflicting definitions for __ppc__ and __i386__}
88 {$endc}
89
90 {$ifc defined __ppc__ and __ppc__}
91 {$setc TARGET_CPU_PPC := TRUE}
92 {$setc TARGET_CPU_PPC64 := FALSE}
93 {$setc TARGET_CPU_X86 := FALSE}
94 {$setc TARGET_CPU_X86_64 := FALSE}
95 {$setc TARGET_CPU_ARM := FALSE}
96 {$setc TARGET_CPU_ARM64 := FALSE}
97 {$setc TARGET_OS_MAC := TRUE}
98 {$setc TARGET_OS_IPHONE := FALSE}
99 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
100 {$setc TARGET_OS_EMBEDDED := FALSE}
101 {$elifc defined __ppc64__ and __ppc64__}
102 {$setc TARGET_CPU_PPC := FALSE}
103 {$setc TARGET_CPU_PPC64 := TRUE}
104 {$setc TARGET_CPU_X86 := FALSE}
105 {$setc TARGET_CPU_X86_64 := FALSE}
106 {$setc TARGET_CPU_ARM := FALSE}
107 {$setc TARGET_CPU_ARM64 := FALSE}
108 {$setc TARGET_OS_MAC := TRUE}
109 {$setc TARGET_OS_IPHONE := FALSE}
110 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
111 {$setc TARGET_OS_EMBEDDED := FALSE}
112 {$elifc defined __i386__ and __i386__}
113 {$setc TARGET_CPU_PPC := FALSE}
114 {$setc TARGET_CPU_PPC64 := FALSE}
115 {$setc TARGET_CPU_X86 := TRUE}
116 {$setc TARGET_CPU_X86_64 := FALSE}
117 {$setc TARGET_CPU_ARM := FALSE}
118 {$setc TARGET_CPU_ARM64 := FALSE}
119 {$ifc defined iphonesim}
120 {$setc TARGET_OS_MAC := FALSE}
121 {$setc TARGET_OS_IPHONE := TRUE}
122 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
123 {$elsec}
124 {$setc TARGET_OS_MAC := TRUE}
125 {$setc TARGET_OS_IPHONE := FALSE}
126 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
127 {$endc}
128 {$setc TARGET_OS_EMBEDDED := FALSE}
129 {$elifc defined __x86_64__ and __x86_64__}
130 {$setc TARGET_CPU_PPC := FALSE}
131 {$setc TARGET_CPU_PPC64 := FALSE}
132 {$setc TARGET_CPU_X86 := FALSE}
133 {$setc TARGET_CPU_X86_64 := TRUE}
134 {$setc TARGET_CPU_ARM := FALSE}
135 {$setc TARGET_CPU_ARM64 := FALSE}
136 {$ifc defined iphonesim}
137 {$setc TARGET_OS_MAC := FALSE}
138 {$setc TARGET_OS_IPHONE := TRUE}
139 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
140 {$elsec}
141 {$setc TARGET_OS_MAC := TRUE}
142 {$setc TARGET_OS_IPHONE := FALSE}
143 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
144 {$endc}
145 {$setc TARGET_OS_EMBEDDED := FALSE}
146 {$elifc defined __arm__ and __arm__}
147 {$setc TARGET_CPU_PPC := FALSE}
148 {$setc TARGET_CPU_PPC64 := FALSE}
149 {$setc TARGET_CPU_X86 := FALSE}
150 {$setc TARGET_CPU_X86_64 := FALSE}
151 {$setc TARGET_CPU_ARM := TRUE}
152 {$setc TARGET_CPU_ARM64 := FALSE}
153 {$setc TARGET_OS_MAC := FALSE}
154 {$setc TARGET_OS_IPHONE := TRUE}
155 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
156 {$setc TARGET_OS_EMBEDDED := TRUE}
157 {$elifc defined __arm64__ and __arm64__}
158 {$setc TARGET_CPU_PPC := FALSE}
159 {$setc TARGET_CPU_PPC64 := FALSE}
160 {$setc TARGET_CPU_X86 := FALSE}
161 {$setc TARGET_CPU_X86_64 := FALSE}
162 {$setc TARGET_CPU_ARM := FALSE}
163 {$setc TARGET_CPU_ARM64 := TRUE}
164 {$ifc defined ios}
165 {$setc TARGET_OS_MAC := FALSE}
166 {$setc TARGET_OS_IPHONE := TRUE}
167 {$setc TARGET_OS_EMBEDDED := TRUE}
168 {$elsec}
169 {$setc TARGET_OS_MAC := TRUE}
170 {$setc TARGET_OS_IPHONE := FALSE}
171 {$setc TARGET_OS_EMBEDDED := FALSE}
172 {$endc}
173 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
174 {$elsec}
175 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
176 {$endc}
177
178 {$ifc defined __LP64__ and __LP64__ }
179 {$setc TARGET_CPU_64 := TRUE}
180 {$elsec}
181 {$setc TARGET_CPU_64 := FALSE}
182 {$endc}
183
184 {$ifc defined FPC_BIG_ENDIAN}
185 {$setc TARGET_RT_BIG_ENDIAN := TRUE}
186 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
187 {$elifc defined FPC_LITTLE_ENDIAN}
188 {$setc TARGET_RT_BIG_ENDIAN := FALSE}
189 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
190 {$elsec}
191 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
192 {$endc}
193 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
194 {$setc CALL_NOT_IN_CARBON := FALSE}
195 {$setc OLDROUTINENAMES := FALSE}
196 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
197 {$setc OPAQUE_UPP_TYPES := TRUE}
198 {$setc OTCARBONAPPLICATION := TRUE}
199 {$setc OTKERNEL := FALSE}
200 {$setc PM_USE_SESSION_APIS := TRUE}
201 {$setc TARGET_API_MAC_CARBON := TRUE}
202 {$setc TARGET_API_MAC_OS8 := FALSE}
203 {$setc TARGET_API_MAC_OSX := TRUE}
204 {$setc TARGET_CARBON := TRUE}
205 {$setc TARGET_CPU_68K := FALSE}
206 {$setc TARGET_CPU_MIPS := FALSE}
207 {$setc TARGET_CPU_SPARC := FALSE}
208 {$setc TARGET_OS_UNIX := FALSE}
209 {$setc TARGET_OS_WIN32 := FALSE}
210 {$setc TARGET_RT_MAC_68881 := FALSE}
211 {$setc TARGET_RT_MAC_CFM := FALSE}
212 {$setc TARGET_RT_MAC_MACHO := TRUE}
213 {$setc TYPED_FUNCTION_POINTERS := TRUE}
214 {$setc TYPE_BOOL := FALSE}
215 {$setc TYPE_EXTENDED := FALSE}
216 {$setc TYPE_LONGLONG := TRUE}
217 uses MacTypes,AEDataModel,CFBase,QuickdrawTypes,Finder,Events,AppleEvents,Translation,MacWindows,CodeFragments,MacErrors,CFArray,CFString;
218 {$endc} {not MACOSALLINCLUDE}
219
220
221 {$ifc TARGET_OS_MAC}
222
223 {$ALIGN MAC68K}
224
225
226 {
227 * Navigation Services
228 *
229 * Discussion:
230 * In Mac OS X 10.5, Navigation Services has been reimplemented atop
231 * Cocoa's NSSavePanel. A NavDialogRef may be cast to an
232 * NSSavePanel* for put dialogs, an NSOpenPanel* for get and choose
233 * dialogs and an NSAlert* for the various ask save changes dialogs.
234 * Once cast to the appropriate Cocoa object you can call Cocoa APIs
235 * on that object normally. For instance, the custom area of the Nav
236 * dialog may be populated with Cocoa NSViews
237 * [(NSSavePanel*)myNavDialogRef setAccesoryView:myNSView].
238 * Exception: Once a dialog is created via the NavgationServices API
239 * it must be invoked with NavDialogRun. Custom preview support is
240 * no longer available on Mac OS X 10.5. NavPreview procedures are
241 * no longer called, kNavCBAdjustPreview Nav event callback messages
242 * are no longer sent and the NavCBRec previewRect field will always
243 * be empty. Navigation Services now depends on QuickLook for
244 * preview rendering. Clients may write a QuickLook plug-in to
245 * generate custom previews for open dialogs as well as Finder and
246 * Spotlight. Because a NavDialogRef is an Objective-C object
247 * underneath, -release or CFRelease may be called on it instead of
248 * NavDialogDispose.
249 }
250 type
251 NavAskSaveChangesAction = UInt32;
252 const
253 { input action codes for NavAskSaveChanges() }
254 kNavSaveChangesClosingDocument = 1;
255 kNavSaveChangesQuittingApplication = 2;
256 kNavSaveChangesOther = 0;
257
258
259 type
260 NavAskSaveChangesResult = UInt32;
261 const
262 { result codes for NavAskSaveChanges() }
263 kNavAskSaveChangesSave = 1;
264 kNavAskSaveChangesCancel = 2;
265 kNavAskSaveChangesDontSave = 3;
266
267
268 type
269 NavAskDiscardChangesResult = UInt32;
270 const
271 { result codes for NavAskDiscardChanges() }
272 kNavAskDiscardChanges = 1;
273 kNavAskDiscardChangesCancel = 2;
274
275
276 type
277 NavFilterModes = SInt16;
278 const
279 { which elements are being filtered for objects: }
280 kNavFilteringBrowserList = 0;
281 kNavFilteringFavorites = 1;
282 kNavFilteringRecents = 2;
283 kNavFilteringShortCutVolumes = 3;
284 kNavFilteringLocationPopup = 4; { for v1.1 or greater }
285
286
287 const
288 kNavFileOrFolderVersion = 1;
289
290 type
291 NavFileOrFolderInfoPtr = ^NavFileOrFolderInfo;
292 NavFileOrFolderInfo = record
293 version: UInt16;
294 isFolder: Boolean;
295 visible: Boolean;
296 creationDate: UInt32;
297 modificationDate: UInt32;
298 case SInt16 of
299 0: (
300 locked: Boolean; { file is locked }
301 resourceOpen: Boolean; { resource fork is opened }
302 dataOpen: Boolean; { data fork is opened }
303 reserved1: Boolean;
304 dataSize: ByteCount; { size of the data fork }
305 resourceSize: ByteCount; { size of the resource fork }
306 finderInfo: FInfo; { more file info: }
307 finderXInfo: FXInfo;
308 );
309 1: (
310 shareable: Boolean;
311 sharePoint: Boolean;
312 mounted: Boolean;
313 readable: Boolean;
314 writeable: Boolean;
315 reserved2: Boolean;
316 numberOfFiles: ItemCount;
317 finderDInfo: DInfo;
318 finderDXInfo: DXInfo;
319 folderType: OSType; { package type, For struct version >= 1 }
320 folderCreator: OSType; { package creator, For struct version >= 1 }
321 reserved3: packed array [0..205] of char;
322 );
323 end;
324
325 NavEventDataInfoPtr = ^NavEventDataInfo;
326 NavEventDataInfo = record
327 case SInt16 of
328 0: (
329 event: EventRecordPtr; { for event processing }
330 );
331 1: (
332 param: UnivPtr; { points to event specific data }
333 );
334 end;
335 type
336 NavEventDataPtr = ^NavEventData;
337 NavEventData = record
338 eventDataParms: NavEventDataInfo; { the event data }
339 itemHit: SInt16; { the dialog item number, for v1.1 or greater }
340 end;
341
342 {
343 * NavDialogRef
344 *
345 * Summary:
346 * Opaque Navigation Services dialog identifier
347 *
348 * Discussion:
349 * A NavDialogRef is an opaque reference to an instance of a
350 * Navigation Services dialog. A new NavDialogRef is returned from
351 * any of the NavCreate*Dialog functions and is later disposed with
352 * the NavDialogDispose function. NavDialogRef is the new name for
353 * the NavContext type, and thus when a client's event proc is
354 * called, the value of the NavCBRec.context field is the same as
355 * the NavDialogRef returned from the corresponding
356 * NavCreate*Dialog. A NavDialogRef is distinct from, and is not
357 * interchangable with, a Dialog Manager DialogRef.
358 }
359 type
360 NavDialogRef = ^__NavDialog; { an opaque type }
361 __NavDialog = record end;
362 NavDialogRefPtr = ^NavDialogRef; { when a var xx:NavDialogRef parameter can be nil, it is changed to xx: NavDialogRefPtr }
363 {$ifc CALL_NOT_IN_CARBON}
364 { NavContext is the old name for NavDialogRef }
365 NavContext = NavDialogRef;
366 {$endc} {CALL_NOT_IN_CARBON}
367
368
369 {
370 * NavUserAction
371 *
372 * Summary:
373 * Indicates an action taken by the user
374 *
375 * Discussion:
376 * When the user clicks a button at the bottom of a Nav Services
377 * dialog (or makes an equivalent mouse or key gesture), a
378 * kNavCBUserAction event is sent to the client's event proc
379 * indicating which action was taken. Often, the action also
380 * dismisses the dialog. User action events are only generated when
381 * using dialogs created from a NavCreate*Dialog function. In the
382 * special case of a modeless GetFile dialog (supported only on Mac
383 * OS X), the user can option-click on the open button to keep the
384 * dialog from being dismissed, but the kNavCBUserAction event is
385 * sent so the client can get the reply record and open the selected
386 * files.
387 }
388 type
389 NavUserAction = UInt32;
390 const
391 {
392 * No action taken. The dialog is still running or was terminated
393 * programmatically.
394 }
395 kNavUserActionNone = 0;
396
397 {
398 * The user cancelled the dialog.
399 }
400 kNavUserActionCancel = 1;
401
402 {
403 * The user clicked the Open button in the GetFile dialog.
404 }
405 kNavUserActionOpen = 2;
406
407 {
408 * The user clicked the Save button in the PutFile dialog.
409 }
410 kNavUserActionSaveAs = 3;
411
412 {
413 * The user clicked the Choose button in the ChooseFile,
414 * ChooseFolder, ChooseVolume or ChooseObject dialogs.
415 }
416 kNavUserActionChoose = 4;
417
418 {
419 * The user clicked the New Folder button in the New Folder dialog.
420 }
421 kNavUserActionNewFolder = 5;
422
423 {
424 * The user clicked the Save button in an AskSaveChanges dialog.
425 }
426 kNavUserActionSaveChanges = 6;
427
428 {
429 * The user clicked the Don't Save button in an AskSaveChanges dialog.
430 }
431 kNavUserActionDontSaveChanges = 7;
432
433 {
434 * The user clicked the Discard button in the AskDiscardChanges
435 * dialog.
436 }
437 kNavUserActionDiscardChanges = 8;
438
439 {
440 * The user clicked the Review Unsaved button in the
441 * AskReviewDocuments dialog (used only on Mac OS X).
442 }
443 kNavUserActionReviewDocuments = 9;
444
445 {
446 * The user clicked the Discard Changes button in the
447 * AskReviewDocuments dialog (used only on Mac OS X).
448 }
449 kNavUserActionDiscardDocuments = 10;
450
451
452 const
453 kNavCBRecVersion = 1;
454
455
456 {
457 * NavCBRec
458 *
459 * Summary:
460 * A structure passed to event and preview callbacks
461 *
462 * Discussion:
463 * The NavCBRec structure is passed to the client's event proc or
464 * custom preview proc. It provides information that is specific to
465 * each event type. New for Carbon: the userAction field.
466 }
467 type
468 NavCBRec = record
469 {
470 * The version of the struct (currently 1)
471 }
472 version: UInt16;
473
474 {
475 * The NavDialogRef this callback with which this call is associated
476 }
477 context: NavDialogRef;
478
479 {
480 * The dialog's window
481 }
482 window: WindowRef;
483
484 {
485 * The custom control area rectangle (window coordinates)
486 }
487 customRect: Rect;
488
489 {
490 * The custom preview area rectangle (window coordinates)
491 }
492 previewRect: Rect;
493
494 {
495 * The event-specific data, including the EventRecord, if any
496 }
497 eventData: NavEventData;
498
499 {
500 * The action taken by the user that generated a kNavCBUserAction
501 * event (Carbon dialogs only)
502 }
503 userAction: NavUserAction;
504
505 {
506 * Reserved for future use
507 }
508 reserved: array [0..217] of SInt8;
509 end;
510 NavCBRecPtr = ^NavCBRec;
511
512 {
513 * NavEventCallbackMessage
514 *
515 * Summary:
516 * Identifies the message type being sent to the client's event proc
517 }
518 type
519 NavEventCallbackMessage = SInt32;
520 const
521 {
522 * An OS event has occurred. A pointer to the EventRecord is in the
523 * eventData.eventDataParms.event field of the NavCBRec.
524 }
525 kNavCBEvent = 0;
526
527 {
528 * Negotiate for custom control space. Client can set change the
529 * customRect field in the NavCBRec to create space for a custom
530 * area. Nav Services will continue to send the kNavCBCustomize
531 * message until the client leaves the customRect field unchanged.
532 }
533 kNavCBCustomize = 1;
534
535 {
536 * This message is sent after custom area negotiation, just before
537 * the dialog is made visible. Add your custom controls when you
538 * receive this message.
539 }
540 kNavCBStart = 2;
541
542 {
543 * This is the last message sent, after the dialog has been hidden.
544 }
545 kNavCBTerminate = 3;
546
547 {
548 * Sent when the dialog has been resized. Check the customRect and or
549 * previewRect values to see if any relayout is needed. Nav Services
550 * automatically moves controls in the custom area.
551 }
552 kNavCBAdjustRect = 4;
553
554 {
555 * The target folder of the dialog has changed. The
556 * NavCBRec.eventData.eventDataParms.param field is an AEDesc*
557 * containing an descriptor of the new location (ususally an FSSpec
558 * or an FSRef).
559 }
560 kNavCBNewLocation = 5;
561
562 {
563 * The target folder has changed to the user's desktop folder.
564 }
565 kNavCBShowDesktop = 6;
566
567 {
568 * The user has selected or deselected a file or folder. The
569 * NavCBRec.eventData.eventDataParms.param field is an AEDescList*
570 * identifying the currently selected items.
571 }
572 kNavCBSelectEntry = 7;
573
574 {
575 * The value of the Show/Format popup menu has changed. The
576 * NavCBRec.eventData.eventDataParms.param is a NavMenuItemSpec*
577 * identifying the menu item selected. If the dialog was created
578 * using the Carbon-only NavCreate*Dialog APIs, then the menuType
579 * field of the NavMenuItemSpec is set to the index into the client's
580 * CFArray of popupExtension strings (see NavDialogCreationOptions).
581 * In these cases, the menuCreator field of the NavManuItemSpec is
582 * set to kNavClientPopupExtensionTag. For system supplied menu items
583 * it will be set to 0. A kNavCBPopupMenuSelect message is also sent
584 * as the dialog opens to notify the client of the initial menu
585 * setting.
586 }
587 kNavCBPopupMenuSelect = 8;
588
589 {
590 * Sent when the user has accepted (Open, Save, etc.).
591 }
592 kNavCBAccept = 9;
593
594 {
595 * Sent when the user has cancelled the dialog.
596 }
597 kNavCBCancel = 10;
598
599 {
600 * ** NOT SENT STARTING IN 10.5 *** The custom preview area state has
601 * changed. The NavCBRec.eventData.eventDataParms.param is a Boolean*
602 * set to true if the preview area is visible or false if it is not.
603 }
604 kNavCBAdjustPreview = 11;
605
606 {
607 * The user has taken one of the actions described in the
608 * NavUserAction definition. The action may or may not dismiss the
609 * dialog. The NavCBRec.userAction field indicates which action was
610 * taken (Carbon dialogs only).
611 }
612 kNavCBUserAction = 12;
613
614 {
615 * The user has opened a folder or chosen a file. The client can
616 * block navigation or dismissal by setting the appropriate action
617 * state with the kNavCtlSetActionState NavCustomControl selector.
618 }
619 kNavCBOpenSelection = $80000000;
620
621
622 type
623 NavCallBackUserData = UnivPtr;
624 { for events and customization: }
625 type
626 NavEventProcPtr = procedure( callBackSelector: NavEventCallbackMessage; callBackParms: NavCBRecPtr; callBackUD: UnivPtr );
627 { for preview support: }
628 type
callBackParmsnull629 NavPreviewProcPtr = function( callBackParms: NavCBRecPtr; callBackUD: UnivPtr ): Boolean;
630 { filtering callback information: }
631 type
varnull632 NavObjectFilterProcPtr = function( var theItem: AEDesc; info: NavFileOrFolderInfoPtr; callBackUD: UnivPtr; filterMode: NavFilterModes ): Boolean;
633 NavEventUPP = NavEventProcPtr;
634 NavPreviewUPP = NavPreviewProcPtr;
635 NavObjectFilterUPP = NavObjectFilterProcPtr;
636 {
637 * NewNavEventUPP()
638 *
639 * Availability:
640 * Mac OS X: in version 10.0 and later in Carbon.framework
641 * CarbonLib: in CarbonLib 1.0 and later
642 * Non-Carbon CFM: available as macro/inline
643 }
NewNavEventUPPnull644 function NewNavEventUPP( userRoutine: NavEventProcPtr ): NavEventUPP; external name '_NewNavEventUPP';
645 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
646
647 {
648 * NewNavPreviewUPP()
649 *
650 * Availability:
651 * Mac OS X: in version 10.0 and later in Carbon.framework
652 * CarbonLib: in CarbonLib 1.0 and later
653 * Non-Carbon CFM: available as macro/inline
654 }
NewNavPreviewUPPnull655 function NewNavPreviewUPP( userRoutine: NavPreviewProcPtr ): NavPreviewUPP; external name '_NewNavPreviewUPP';
656 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
657
658 {
659 * NewNavObjectFilterUPP()
660 *
661 * Availability:
662 * Mac OS X: in version 10.0 and later in Carbon.framework
663 * CarbonLib: in CarbonLib 1.0 and later
664 * Non-Carbon CFM: available as macro/inline
665 }
NewNavObjectFilterUPPnull666 function NewNavObjectFilterUPP( userRoutine: NavObjectFilterProcPtr ): NavObjectFilterUPP; external name '_NewNavObjectFilterUPP';
667 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
668
669 {
670 * DisposeNavEventUPP()
671 *
672 * Availability:
673 * Mac OS X: in version 10.0 and later in Carbon.framework
674 * CarbonLib: in CarbonLib 1.0 and later
675 * Non-Carbon CFM: available as macro/inline
676 }
677 procedure DisposeNavEventUPP( userUPP: NavEventUPP ); external name '_DisposeNavEventUPP';
678 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
679
680 {
681 * DisposeNavPreviewUPP()
682 *
683 * Availability:
684 * Mac OS X: in version 10.0 and later in Carbon.framework
685 * CarbonLib: in CarbonLib 1.0 and later
686 * Non-Carbon CFM: available as macro/inline
687 }
688 procedure DisposeNavPreviewUPP( userUPP: NavPreviewUPP ); external name '_DisposeNavPreviewUPP';
689 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
690
691 {
692 * DisposeNavObjectFilterUPP()
693 *
694 * Availability:
695 * Mac OS X: in version 10.0 and later in Carbon.framework
696 * CarbonLib: in CarbonLib 1.0 and later
697 * Non-Carbon CFM: available as macro/inline
698 }
699 procedure DisposeNavObjectFilterUPP( userUPP: NavObjectFilterUPP ); external name '_DisposeNavObjectFilterUPP';
700 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
701
702 {
703 * InvokeNavEventUPP()
704 *
705 * Availability:
706 * Mac OS X: in version 10.0 and later in Carbon.framework
707 * CarbonLib: in CarbonLib 1.0 and later
708 * Non-Carbon CFM: available as macro/inline
709 }
710 procedure InvokeNavEventUPP( callBackSelector: NavEventCallbackMessage; callBackParms: NavCBRecPtr; callBackUD: UnivPtr; userUPP: NavEventUPP ); external name '_InvokeNavEventUPP';
711 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
712
713 {
714 * InvokeNavPreviewUPP()
715 *
716 * Availability:
717 * Mac OS X: in version 10.0 and later in Carbon.framework
718 * CarbonLib: in CarbonLib 1.0 and later
719 * Non-Carbon CFM: available as macro/inline
720 }
InvokeNavPreviewUPPnull721 function InvokeNavPreviewUPP( callBackParms: NavCBRecPtr; callBackUD: UnivPtr; userUPP: NavPreviewUPP ): Boolean; external name '_InvokeNavPreviewUPP';
722 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
723
724 {
725 * InvokeNavObjectFilterUPP()
726 *
727 * Availability:
728 * Mac OS X: in version 10.0 and later in Carbon.framework
729 * CarbonLib: in CarbonLib 1.0 and later
730 * Non-Carbon CFM: available as macro/inline
731 }
InvokeNavObjectFilterUPPnull732 function InvokeNavObjectFilterUPP( var theItem: AEDesc; info: UnivPtr; callBackUD: UnivPtr; filterMode: NavFilterModes; userUPP: NavObjectFilterUPP ): Boolean; external name '_InvokeNavObjectFilterUPP';
733 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
734
735 type
736 NavCustomControlMessage = SInt32;
737 const
738 kNavCtlShowDesktop = 0; { show desktop, parms = nil }
739 kNavCtlSortBy = 1; { sort key field, parms->NavSortKeyField }
740 kNavCtlSortOrder = 2; { sort order, parms->NavSortOrder }
741 kNavCtlScrollHome = 3; { scroll list home, parms = nil }
742 kNavCtlScrollEnd = 4; { scroll list end, parms = nil }
743 kNavCtlPageUp = 5; { page list up, parms = nil }
744 kNavCtlPageDown = 6; { page list down, parms = nil }
745 kNavCtlGetLocation = 7; { get current location, parms<-AEDesc* }
746 kNavCtlSetLocation = 8; { set current location, parms->AEDesc* }
747 kNavCtlGetSelection = 9; { get current selection, parms<-AEDescList* }
748 kNavCtlSetSelection = 10; { set current selection, parms->AEDescList* }
749 kNavCtlShowSelection = 11; { make selection visible, parms = nil }
750 kNavCtlOpenSelection = 12; { open view of selection, parms = nil }
751 kNavCtlEjectVolume = 13; { eject volume, parms->vRefNum }
752 kNavCtlNewFolder = 14; { create a new folder, parms->StringPtr }
753 kNavCtlCancel = 15; { cancel dialog, parms = nil }
754 kNavCtlAccept = 16; { accept dialog default, parms = nil }
755 kNavCtlIsPreviewShowing = 17; { query preview status, parms<-Boolean }
756 kNavCtlAddControl = 18; { add one control to dialog, parms->ControlHandle }
757 kNavCtlAddControlList = 19; { add control list to dialog, parms->Handle (DITL rsrc) }
758 kNavCtlGetFirstControlID = 20; { get 1st control ID, parms<-UInt16 }
759 kNavCtlSelectCustomType = 21; { select a custom menu item parms->NavMenuItemSpec* }
760 kNavCtlSelectAllType = 22; { select an "All" menu item parms->SInt16 }
761 kNavCtlGetEditFileName = 23; { get save dlog's file name parms<-StringPtr }
762 kNavCtlSetEditFileName = 24; { set save dlog's file name parms->StringPtr }
763 kNavCtlSelectEditFileName = 25; { select save dlog file name parms->ControlEditTextSelectionRec*, v1.1 or greater }
764 kNavCtlBrowserSelectAll = 26; { re-scan the browser list parms = nil, v2.0 or greater }
765 kNavCtlGotoParent = 27; { navigate to parent parms = nil, v2.0 or greater }
766 kNavCtlSetActionState = 28; { restrict navigation parms->NavActionState (flags), v2.0 or greater }
767 kNavCtlBrowserRedraw = 29; { rescan browser list parms = nil, v2.0 or greater }
768 kNavCtlTerminate = 30; { terminate/dismiss dialog parms = nil, v2.0 or greater }
769
770 type
771 NavActionState = UInt32;
772 const
773 kNavNormalState = $00000000; { normal/default state }
774 kNavDontOpenState = $00000001; { disallow opening files/folders }
775 kNavDontSaveState = $00000002; { disallow saving files }
776 kNavDontChooseState = $00000004; { disallow choosing objects }
777 kNavDontNewFolderState = $00000010; { disallow creating new folders }
778
779 type
780 NavPopupMenuItem = UInt16;
781 const
782 kNavAllKnownFiles = 0;
783 kNavAllReadableFiles = 1;
784 kNavAllFiles = 2;
785
786 type
787 NavSortKeyField = UInt16;
788 const
789 kNavSortNameField = 0;
790 kNavSortDateField = 1;
791
792
793 type
794 NavSortOrder = UInt16;
795 const
796 kNavSortAscending = 0;
797 kNavSortDescending = 1;
798
799
800 type
801 NavDialogOptionFlags = OptionBits;
802 const
803 kNavDefaultNavDlogOptions = $000000E4; { use defaults for all the options }
804 kNavNoTypePopup = $00000001; { don't show file type/extension popup on Open/Save }
805 kNavDontAutoTranslate = $00000002; { don't automatically translate on Open }
806 kNavDontAddTranslateItems = $00000004; { don't add translation choices on Open/Save }
807 kNavAllFilesInPopup = $00000010; { "All Files" menu item in the type popup on Open }
808 kNavAllowStationery = $00000020; { Deprecated: Not available in Mac OS X }
809 kNavAllowPreviews = $00000040; { allow preview to show }
810 kNavAllowMultipleFiles = $00000080; { allow multiple items to be selected }
811 kNavAllowInvisibleFiles = $00000100; { allow invisible items to be shown }
812 kNavDontResolveAliases = $00000200; { don't resolve aliases }
813 kNavSelectDefaultLocation = $00000400; { make the default location the browser selection }
814 kNavSelectAllReadableItem = $00000800; { make the dialog select "All Readable Documents" on open }
815 kNavSupportPackages = $00001000; { recognize file system packages, v2.0 or greater }
816 kNavAllowOpenPackages = $00002000; { allow opening of packages, v2.0 or greater }
817 kNavDontAddRecents = $00004000; { don't add chosen objects to the recents list, v2.0 or greater }
818 kNavDontUseCustomFrame = $00008000; { don't draw the custom area bevel frame, v2.0 or greater }
819 kNavDontConfirmReplacement = $00010000; { don't show the "Replace File?" alert on save conflict, v3.0 or greater }
820 kNavPreserveSaveFileExtension = $00020000; { extension in default file name is preserved between dialog invocations and initially hidden, v3.1 or greater }
821
822
823 type
824 NavTranslationOptions = UInt32;
825 const
826 kNavTranslateInPlace = 0; { translate in place, replacing translation source file (default for Save) }
827 kNavTranslateCopy = 1; { translate to a copy of the source file (default for Open) }
828
829
830 const
831 kNavMenuItemSpecVersion = 0;
832
833 type
834 NavMenuItemSpec = record
835 version: UInt16;
836 menuCreator: OSType;
837 menuType: OSType;
838 menuItemName: Str255;
839 reserved: packed array [0..244] of char;
840 end;
841 type
842 NavMenuItemSpecArray = array [0..0] of NavMenuItemSpec;
843 NavMenuItemSpecArrayPtr = ^NavMenuItemSpecArray;
844 NavMenuItemSpecArrayHandle = ^NavMenuItemSpecArrayPtr;
845 NavMenuItemSpecPtr = ^NavMenuItemSpec;
846 NavMenuItemSpecHandle = ^NavMenuItemSpecPtr;
847 const
848 kNavGenericSignature = FourCharCode('****');
849
850 const
851 kNavClientPopupExtensionTag = FourCharCode('extn');
852
853 type
854 NavTypeList = record
855 componentSignature: OSType_fix;
856 reserved: SInt16;
857 osTypeCount: SInt16;
858 osType: array [0..0] of OSType_fix;
859 end;
860 NavTypeListPtr = ^NavTypeList;
861 type
862 NavTypeListHandle = ^NavTypeListPtr;
863 const
864 kNavReplyRecordVersion = 2;
865
866
867 {
868 * NavReplyRecord
869 *
870 * Summary:
871 * A structure describing the results of a Nav Services dialog
872 *
873 * Discussion:
874 * A reply record is the result of a Nav Services file dialog. Using
875 * the older API, which is always modal, the client passes the
876 * address of a reply record when invoking the dialog. In the Carbon
877 * API, dialogs may also be window modal or modeless, so the client
878 * requests the reply record by calling NavDialogGetReply when a
879 * kNavCBUserAction event is received. Either way, a reply record
880 * should be disposed of using NavDisposeReply.
881 }
882 type
883 NavReplyRecordPtr = ^NavReplyRecord;
884 NavReplyRecord = record
885 {
886 * The version of the structure. The first public version of the
887 * structure was version 0. Fields added after version 0, starting
888 * with the saveFileName field, are noted below.
889 }
890 version: UInt16;
891
892 {
893 * True if the reply contains a non-null selection
894 }
895 validRecord: Boolean;
896
897 {
898 * True if this reply is from a PutFile dialog and the file to be
899 * saved already exists and needs to be replaced. The user has
900 * already been warned unless the kNavDontConfirmReplacement option
901 * flag is used.
902 }
903 replacing: Boolean;
904
905 {
906 * True if this reply is from a PutFile dialog and the user wants to
907 * save the file as stationery.
908 }
909 isStationery: Boolean;
910
911 {
912 * True if translation was performed on the file(s) to be opened or
913 * if transtlation will be needed on the file to be saved.
914 }
915 translationNeeded: Boolean;
916
917 {
918 * For GetFile or Choose dialogs, a list of items chosen by the user.
919 * For the older NavPutFile dialog, a list containing one item: an
920 * FSSpec of the file to be saved. ** IMPORTANT NOTE *** For the new
921 * Carbon-only PutFile dialog created with NavCreatePutFileDialog,
922 * the selection is a list containing one item: the DIRECTORY where
923 * the file is to be saved. The file name is obtained from the
924 * saveFileName field. When using the original modal API, each
925 * descriptor will contain an FSSpec (typeFSS). When using the new
926 * Carbon-only dialogs created via the NavCreate*Dialog functions,
927 * each descriptor could contain either an FSSpec (typeFSS, used on
928 * Mac OS 8 or 9) or an FSRef (typeFSRef, used on Mac OS X). This
929 * divergence is caused by the need to use FSRef (for Unicode/HFS+
930 * support) on Mac OS X, while being unable to provide FSRefs on Mac
931 * OS 8.6.
932 }
933 selection: AEDescList;
934
935 {
936 * For NavPutFile: the script system associated with the name of the
937 * file to be saved.
938 }
939 keyScript: ScriptCode;
940
941 {
942 * A handle to an array of type FileTranslationSpec. Each array entry
943 * corresponds to an item in the selection and describes the
944 * translation that was performed (GetFile) or needs to be performed
945 * (PutFile) on that item.
946 }
947 fileTranslation: FileTranslationSpecArrayHandle;
948
949 {
950 * Reserved for private use.
951 }
952 reserved1: UInt32;
953
954 {
955 * Carbon PutFile dialog only: the name of the file to be saved. This
956 * field contains the true file name to saved, even if the extension
957 * will be hidden from the user. This field was added in structure
958 * version 1.
959 }
960 saveFileName: CFStringRef;
961
962 {
963 * The extension on the name of the saved file should be hidden. Once
964 * the file has been saved, the client should call NavCompleteSave.
965 * NavCompleteSave will take care of hiding the extension on the
966 * file. However, the client needs to know that the extension is
967 * hidden so that it can display the document name correctly in the
968 * UI, such as in window titles and menus. This field is only used if
969 * the client has r equested extension preservation using the
970 * kNavPreserveSaveFileExtension dialog option flag. This field was
971 * added in structure version 2.
972 }
973 saveFileExtensionHidden: Boolean;
974
975 {
976 * Reserved for future use.
977 }
978 reserved2: UInt8;
979
980 {
981 * Reserved for future use.
982 }
983 reserved: array [0..224] of SInt8;
984 end;
985 {$ifc not TARGET_CPU_64}
986 {
987 * NavCompleteSave()
988 *
989 * Availability:
990 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
991 * CarbonLib: in CarbonLib 1.0 and later
992 * Non-Carbon CFM: in NavigationLib 1.0 and later
993 }
NavCompleteSavenull994 function NavCompleteSave( const (*var*) reply: NavReplyRecord; howToTranslate: NavTranslationOptions ): OSErr; external name '_NavCompleteSave';
995 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
996
997
998 {
999 * NavCustomControl()
1000 *
1001 * Availability:
1002 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1003 * CarbonLib: in CarbonLib 1.0 and later
1004 * Non-Carbon CFM: in NavigationLib 1.0 and later
1005 }
NavCustomControlnull1006 function NavCustomControl( dialog: NavDialogRef; selector: NavCustomControlMessage; parms: UnivPtr ): OSErr; external name '_NavCustomControl';
1007 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1008
1009
1010 {
1011 * NavCreatePreview() *** DEPRECATED ***
1012 *
1013 * Availability:
1014 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
1015 * CarbonLib: in CarbonLib 1.0 and later
1016 * Non-Carbon CFM: in NavigationLib 2.0 and later
1017 }
NavCreatePreviewnull1018 function NavCreatePreview( var theObject: AEDesc; previewDataType: OSType; previewData: {const} UnivPtr; previewDataSize: Size ): OSErr; external name '_NavCreatePreview';
1019 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1020
1021
1022 {
1023 * NavDisposeReply()
1024 *
1025 * Availability:
1026 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1027 * CarbonLib: in CarbonLib 1.0 and later
1028 * Non-Carbon CFM: in NavigationLib 1.0 and later
1029 }
NavDisposeReplynull1030 function NavDisposeReply( var reply: NavReplyRecord ): OSErr; external name '_NavDisposeReply';
1031 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1032
1033
1034 {$endc} {not TARGET_CPU_64}
1035
1036 { Carbon API }
1037 { Includes support for Unicode and long file names (where available). }
1038
1039 const
1040 kNavDialogCreationOptionsVersion = 0;
1041
1042
1043 {
1044 * NavDialogCreationOptions
1045 *
1046 * Summary:
1047 * Options used to control the appearance and operation of a Nav
1048 * Services dialog
1049 *
1050 * Discussion:
1051 * NavDialogCreationOptions is a preferred replacement for
1052 * NavDialogOptions. The new structure uses CFStrings in place of
1053 * Pascal strings, and adds fields for setting the dialog modality
1054 * and the parent window (for sheet dialogs). A
1055 * NavDialogCreationOptions structure can be initialized using
1056 * NavGetDefaultDialogCreationOptions. Each of the NavCreate*Dialog
1057 * functions accepts a pointer to the client's
1058 * NavDialogCreationOptions structure.
1059 }
1060 type
1061 NavDialogCreationOptionsPtr = ^NavDialogCreationOptions;
1062 NavDialogCreationOptions = record
1063 {
1064 * The version of the struture. Currently, the only valid version is
1065 * 0, containing all the fields described here.
1066 }
1067 version: UInt16;
1068
1069 {
1070 * Options for the dialog. See NavDialogOptionFlags for a description
1071 * of each option.
1072 }
1073 optionFlags: NavDialogOptionFlags;
1074
1075 {
1076 * The screen position at which to place the upper left corner of the
1077 * dialog, in global coordinates. Specify (-1, -1) to use the default
1078 * (persistent) location. Ignored for sheet dialogs.
1079 }
1080 location: Point;
1081
1082 {
1083 * The user-readable name of the client, usually the name of the
1084 * current application. This value is used to construct the default
1085 * window title in the file dialogs, and the message text in the Ask
1086 * dialogs. On Mac OS 9 and earlier, this value is used as a key to
1087 * store persistent per-client dialog settings, so it's always a good
1088 * idea to set this field to a non-NULL value.
1089 }
1090 clientName: CFStringRef;
1091
1092 {
1093 * The custom title for the dialog window. Specify NULL to use the
1094 * default title.
1095 }
1096 windowTitle: CFStringRef;
1097
1098 {
1099 * The custom label for the default (Open/Save/Choose) button.
1100 * Specify NULL to use the default label.
1101 }
1102 actionButtonLabel: CFStringRef;
1103
1104 {
1105 * The custom label for the Cancel button. Specify NULL to use the
1106 * default label.
1107 }
1108 cancelButtonLabel: CFStringRef;
1109
1110 {
1111 * The initial value appearing in the edit text field for the file
1112 * name to be saved (PutFile, NavAskSaveChanges only).
1113 }
1114 saveFileName: CFStringRef;
1115
1116 {
1117 * For the file dialogs, a banner message appearing across the top of
1118 * the dialog. Specify NULL to provide no banner message. For the Ask
1119 * alerts, a custom message to replace the default message.
1120 }
1121 message: CFStringRef;
1122
1123 {
1124 * A key to uniquely identify the dialog's usage context within the
1125 * application. If an application uses the same class of dialog (e.g.
1126 * GetFile or ChooseFile) for more than one purpose, set this field
1127 * to a unique value for each usage in order to give each dialog its
1128 * own persistent settings (e.g. screen rectangle, starting target
1129 * folder).
1130 }
1131 preferenceKey: UInt32;
1132
1133 {
1134 * A CFArray of CFStrings. The strings are added as menu items to the
1135 * Show or Format popup menus in the GetFile or PutFile dialogs,
1136 * respectively.
1137 }
1138 popupExtension: CFArrayRef;
1139
1140 {
1141 * The modality in which to present the dialog. The default modality
1142 * for all dialogs is kWindowModalityAppModal. If
1143 * kWindowModalityWindowModal is specified, then a valid parentWindow
1144 * is required.
1145 }
1146 modality: WindowModality;
1147
1148 {
1149 * The window to which a window-modal (sheet) dialog is to be
1150 * attached.
1151 }
1152 parentWindow: WindowRef;
1153
1154 {
1155 * Reserved for future use.
1156 }
1157 reserved: array [0..15] of SInt8;
1158 end;
1159 {$ifc not TARGET_CPU_64}
1160 {
1161 * NavGetDefaultDialogCreationOptions()
1162 *
1163 * Summary:
1164 * Initialize the input structure to default values
1165 *
1166 * Discussion:
1167 * Provided as a convenience to obtain the preferred default options
1168 * for use in creating any Nav Services dialog.
1169 *
1170 * Parameters:
1171 *
1172 * outOptions:
1173 * A pointer to the client-allocated options structure to
1174 * initialize
1175 *
1176 * Result:
1177 * A status code
1178 *
1179 * Availability:
1180 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1181 * CarbonLib: in CarbonLib 1.1 and later
1182 * Non-Carbon CFM: not available
1183 }
NavGetDefaultDialogCreationOptionsnull1184 function NavGetDefaultDialogCreationOptions( var outOptions: NavDialogCreationOptions ): OSStatus; external name '_NavGetDefaultDialogCreationOptions';
1185 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1186
1187
1188 {
1189 * NavCreateGetFileDialog()
1190 *
1191 * Summary:
1192 * Create a GetFile dialog
1193 *
1194 * Discussion:
1195 * Use this function to create a dialog designed for opening
1196 * document files. This function replaces NavGetFile, allowing new
1197 * window modalities, and adding Unicode support. Upon successful
1198 * creation, the dialog is not visible. Present and run the dialog
1199 * with NavDialogRun. After the dialog is complete, dispose of it
1200 * with NavDialogDispose.
1201 *
1202 * Parameters:
1203 *
1204 * inOptions:
1205 * Options controlling the appearance and behavior of the dialog
1206 *
1207 * inTypeList:
1208 * A creator signature and list of file types to show in the
1209 * dialog file browser. If NULL, show all files.
1210 *
1211 * inEventProc:
1212 * The UPP for the client's event callack, or NULL for no event
1213 * callback
1214 *
1215 * inPreviewProc:
1216 * The UPP for the client's custom file preview callback, or NULL
1217 * for standard previews
1218 *
1219 * inFilterProc:
1220 * The UPP for the client's custom filter callback, or NULL for no
1221 * custom file filtering
1222 *
1223 * inClientData:
1224 * A client-defined context value passed to all callback functions
1225 *
1226 * outDialog:
1227 * Upon successful completion, a reference to the created dialog
1228 *
1229 * Result:
1230 * A status code
1231 *
1232 * Availability:
1233 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1234 * CarbonLib: in CarbonLib 1.1 and later
1235 * Non-Carbon CFM: not available
1236 }
NavCreateGetFileDialognull1237 function NavCreateGetFileDialog( {const} inOptions: NavDialogCreationOptionsPtr { can be NULL }; inTypeList: NavTypeListHandle { can be NULL }; inEventProc: NavEventUPP { can be NULL }; inPreviewProc: NavPreviewUPP { can be NULL }; inFilterProc: NavObjectFilterUPP { can be NULL }; inClientData: UnivPtr { can be NULL }; var outDialog: NavDialogRef ): OSStatus; external name '_NavCreateGetFileDialog';
1238 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1239
1240
1241 {
1242 * NavCreatePutFileDialog()
1243 *
1244 * Summary:
1245 * Create a PutFile dialog
1246 *
1247 * Discussion:
1248 * Use this function to create a dialog designed for setting the
1249 * name and location of a document file prior to saving. This
1250 * function replaces NavPutFile, allowing new window modalities, and
1251 * adding Unicode support. Upon successful creation, the dialog is
1252 * not visible. Present and run the dialog with NavDialogRun. After
1253 * the dialog is complete, dispose of it with NavDialogDispose.
1254 *
1255 * Parameters:
1256 *
1257 * inOptions:
1258 * Options controlling the appearance and behavior of the dialog
1259 *
1260 * inFileType:
1261 * The type of the file to be saved. This parameter is used in
1262 * conjunction with the inFileCreator parameter to look up the
1263 * kind string for the Format popup menu, and to drive the
1264 * identification of translation options.
1265 *
1266 * inFileCreator:
1267 * The creator signature of the file to be saved (see inFileType
1268 * parameter)
1269 *
1270 * inEventProc:
1271 * The UPP for the client's event callack, or NULL for no event
1272 * callback
1273 *
1274 * inClientData:
1275 * A client-defined context value passed to all callback functions
1276 *
1277 * outDialog:
1278 * Upon successful completion, a reference to the created dialog
1279 *
1280 * Result:
1281 * A status code
1282 *
1283 * Availability:
1284 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1285 * CarbonLib: in CarbonLib 1.1 and later
1286 * Non-Carbon CFM: not available
1287 }
NavCreatePutFileDialognull1288 function NavCreatePutFileDialog( {const} inOptions: NavDialogCreationOptionsPtr { can be NULL }; inFileType: OSType; inFileCreator: OSType; inEventProc: NavEventUPP { can be NULL }; inClientData: UnivPtr { can be NULL }; var outDialog: NavDialogRef ): OSStatus; external name '_NavCreatePutFileDialog';
1289 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1290
1291
1292 {
1293 * NavCreateAskReviewDocumentsDialog()
1294 *
1295 * Summary:
1296 * Create an AskReviewDocumentsDialog dialog
1297 *
1298 * Discussion:
1299 * Use this function to create a dialog which tells the user how
1300 * many unsaved documents there are, and asks the user to start
1301 * reviewing the documents, don't save any documents, or cancel.
1302 * This dialog is appropriate to use when an application is quitting
1303 * and there is more than one unsaved document. It is supported only
1304 * on Mac OS X because the HI guidelines for earlier versions of Mac
1305 * OS do not include this dialog as part of the application quit
1306 * sequence. Upon successful creation, the dialog is not visible.
1307 * Present and run the dialog with NavDialogRun. After the dialog is
1308 * complete, dispose of it with NavDialogDispose. Upon dismissal of
1309 * the dialog, this dialog's user action will be set to one of the
1310 * following: kNavUserActionReviewDocuments,
1311 * kNavUserActionDiscardDocuments, or kNavUserActionCancel.
1312 *
1313 * Parameters:
1314 *
1315 * inOptions:
1316 * Options controlling the appearance and behavior of the dialog
1317 *
1318 * inDocumentCount:
1319 * Indicates the number of documents needing review. This number
1320 * appears in the text presented to the user. If for any reason
1321 * the total number of unsaved documents is unknown, specify 0,
1322 * and an ambiguous message will appear. Do not specifiy 1, since
1323 * the HI guidelines call for this alert only when there is more
1324 * than one document to be reviewed.
1325 *
1326 * inEventProc:
1327 * The UPP for the client's event callack, or NULL for no event
1328 * callback
1329 *
1330 * inClientData:
1331 * A client-defined context value passed to all callback functions
1332 *
1333 * outDialog:
1334 * Upon successful completion, a reference to the created dialog
1335 *
1336 * Result:
1337 * A status code
1338 *
1339 * Availability:
1340 * Mac OS X: in version 10.1 and later in Carbon.framework [32-bit only]
1341 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
1342 * Non-Carbon CFM: not available
1343 }
NavCreateAskReviewDocumentsDialognull1344 function NavCreateAskReviewDocumentsDialog( const (*var*) inOptions: NavDialogCreationOptions; inDocumentCount: ItemCount; inEventProc: NavEventUPP { can be NULL }; inClientData: UnivPtr { can be NULL }; var outDialog: NavDialogRef ): OSStatus; external name '_NavCreateAskReviewDocumentsDialog';
1345 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
1346
1347
1348 {
1349 * NavCreateAskSaveChangesDialog()
1350 *
1351 * Summary:
1352 * Create an AskSaveChanges dialog
1353 *
1354 * Discussion:
1355 * Use this function to create a dialog which asks the user to save,
1356 * don't save or cancel closing a document with unsaved changes.
1357 * This function replaces NavAskSaveChanges and
1358 * NavCustomAskSaveChanges, allowing new window modalities, and
1359 * adding Unicode support. Upon successful creation, the dialog is
1360 * not visible. Present and run the dialog with NavDialogRun. After
1361 * the dialog is complete, dispose of it with NavDialogDispose. To
1362 * provide a customized message for the alert, specify an non-NULL
1363 * message value in the options structure.
1364 *
1365 * Parameters:
1366 *
1367 * inOptions:
1368 * Options controlling the appearance and behavior of the dialog
1369 *
1370 * inAction:
1371 * Indicates this usage context for this dialog: closing a
1372 * document or quitting an application. This setting affects the
1373 * message text displayed to the user.
1374 *
1375 * inEventProc:
1376 * The UPP for the client's event callack, or NULL for no event
1377 * callback
1378 *
1379 * inClientData:
1380 * A client-defined context value passed to all callback functions
1381 *
1382 * outDialog:
1383 * Upon successful completion, a reference to the created dialog
1384 *
1385 * Result:
1386 * A status code
1387 *
1388 * Availability:
1389 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1390 * CarbonLib: in CarbonLib 1.1 and later
1391 * Non-Carbon CFM: not available
1392 }
NavCreateAskSaveChangesDialognull1393 function NavCreateAskSaveChangesDialog( const (*var*) inOptions: NavDialogCreationOptions; inAction: NavAskSaveChangesAction; inEventProc: NavEventUPP { can be NULL }; inClientData: UnivPtr { can be NULL }; var outDialog: NavDialogRef ): OSStatus; external name '_NavCreateAskSaveChangesDialog';
1394 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1395
1396
1397 {
1398 * NavCreateAskDiscardChangesDialog()
1399 *
1400 * Summary:
1401 * Create an AskDiscardChanges dialog
1402 *
1403 * Discussion:
1404 * Use this function to create a dialog which asks the user to
1405 * discard changes to a document or cancel. This is most often use
1406 * when the user wants to revert a a document to the last saved
1407 * revision. This function replaces NavAskDiscardChanges, allowing
1408 * new window modalities, and adding Unicode support. Upon
1409 * successful creation, the dialog is not visible. Present and run
1410 * the dialog with NavDialogRun. After the dialog is complete,
1411 * dispose of it with NavDialogDispose.
1412 *
1413 * Parameters:
1414 *
1415 * inOptions:
1416 * Options controlling the appearance and behavior of the dialog
1417 *
1418 * inEventProc:
1419 * The UPP for the client's event callack, or NULL for no event
1420 * callback
1421 *
1422 * inClientData:
1423 * A client-defined context value passed to all callback functions
1424 *
1425 * outDialog:
1426 * Upon successful completion, a reference to the created dialog
1427 *
1428 * Result:
1429 * A status code
1430 *
1431 * Availability:
1432 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1433 * CarbonLib: in CarbonLib 1.1 and later
1434 * Non-Carbon CFM: not available
1435 }
NavCreateAskDiscardChangesDialognull1436 function NavCreateAskDiscardChangesDialog( const (*var*) inOptions: NavDialogCreationOptions; inEventProc: NavEventUPP { can be NULL }; inClientData: UnivPtr { can be NULL }; var outDialog: NavDialogRef ): OSStatus; external name '_NavCreateAskDiscardChangesDialog';
1437 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1438
1439
1440 {
1441 * NavCreateChooseFileDialog()
1442 *
1443 * Summary:
1444 * Create a ChooseFile dialog
1445 *
1446 * Discussion:
1447 * Use this function to create a dialog designed for selecting one
1448 * file as the target of an operation. A ChooseFile dialog is a
1449 * simple version a GetFile dialog. This function replaces
1450 * NavChooseFile, allowing new window modalities, and adding Unicode
1451 * support. Upon successful creation, the dialog is not visible.
1452 * Present and run the dialog with NavDialogRun. After the dialog is
1453 * complete, dispose of it with NavDialogDispose.
1454 *
1455 * Parameters:
1456 *
1457 * inOptions:
1458 * Options controlling the appearance and behavior of the dialog
1459 *
1460 * inTypeList:
1461 * A creator signature and list of file types to show in the
1462 * dialog file browser. If NULL, show all files.
1463 *
1464 * inEventProc:
1465 * The UPP for the client's event callack, or NULL for no event
1466 * callback
1467 *
1468 * inPreviewProc:
1469 * The UPP for the client's custom file preview callback, or NULL
1470 * for standard previews
1471 *
1472 * inFilterProc:
1473 * The UPP for the client's custom filter callback, or NULL for no
1474 * custom file filtering
1475 *
1476 * inClientData:
1477 * A client-defined context value passed to all callback functions
1478 *
1479 * outDialog:
1480 * Upon successful completion, a reference to the created dialog
1481 *
1482 * Result:
1483 * A status code
1484 *
1485 * Availability:
1486 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1487 * CarbonLib: in CarbonLib 1.1 and later
1488 * Non-Carbon CFM: not available
1489 }
NavCreateChooseFileDialognull1490 function NavCreateChooseFileDialog( {const} inOptions: NavDialogCreationOptionsPtr { can be NULL }; inTypeList: NavTypeListHandle { can be NULL }; inEventProc: NavEventUPP { can be NULL }; inPreviewProc: NavPreviewUPP { can be NULL }; inFilterProc: NavObjectFilterUPP { can be NULL }; inClientData: UnivPtr { can be NULL }; var outDialog: NavDialogRef ): OSStatus; external name '_NavCreateChooseFileDialog';
1491 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1492
1493
1494 {
1495 * NavCreateChooseFolderDialog()
1496 *
1497 * Summary:
1498 * Create a ChooseFolder dialog
1499 *
1500 * Discussion:
1501 * Use this function to create a dialog designed for selecting a
1502 * folder as the target of an operation. This function replaces
1503 * NavChooseFolder, allowing new window modalities, and adding
1504 * Unicode support. Upon successful creation, the dialog is not
1505 * visible. Present and run the dialog with NavDialogRun. After the
1506 * dialog is complete, dispose of it with NavDialogDispose.
1507 *
1508 * Parameters:
1509 *
1510 * inOptions:
1511 * Options controlling the appearance and behavior of the dialog
1512 *
1513 * inEventProc:
1514 * The UPP for the client's event callack, or NULL for no event
1515 * callback
1516 *
1517 * inFilterProc:
1518 * The UPP for the client's custom filter callback, or NULL for no
1519 * custom file filtering
1520 *
1521 * inClientData:
1522 * A client-defined context value passed to all callback functions
1523 *
1524 * outDialog:
1525 * Upon successful completion, a reference to the created dialog
1526 *
1527 * Result:
1528 * A status code
1529 *
1530 * Availability:
1531 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1532 * CarbonLib: in CarbonLib 1.1 and later
1533 * Non-Carbon CFM: not available
1534 }
NavCreateChooseFolderDialognull1535 function NavCreateChooseFolderDialog( {const} inOptions: NavDialogCreationOptionsPtr { can be NULL }; inEventProc: NavEventUPP { can be NULL }; inFilterProc: NavObjectFilterUPP { can be NULL }; inClientData: UnivPtr { can be NULL }; var outDialog: NavDialogRef ): OSStatus; external name '_NavCreateChooseFolderDialog';
1536 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1537
1538
1539 {
1540 * NavCreateChooseVolumeDialog()
1541 *
1542 * Summary:
1543 * Create a ChooseVolume dialog
1544 *
1545 * Discussion:
1546 * Use this function to create a dialog designed for selecting a
1547 * volume as the target of an operation. This function replaces
1548 * NavChooseVolume, allowing new window modalities, and adding
1549 * Unicode support. Upon successful creation, the dialog is not
1550 * visible. Present and run the dialog with NavDialogRun. After the
1551 * dialog is complete, dispose of it with NavDialogDispose.
1552 *
1553 * Parameters:
1554 *
1555 * inOptions:
1556 * Options controlling the appearance and behavior of the dialog
1557 *
1558 * inEventProc:
1559 * The UPP for the client's event callack, or NULL for no event
1560 * callback
1561 *
1562 * inFilterProc:
1563 * The UPP for the client's custom filter callback, or NULL for no
1564 * custom file filtering
1565 *
1566 * inClientData:
1567 * A client-defined context value passed to all callback functions
1568 *
1569 * outDialog:
1570 * Upon successful completion, a reference to the created dialog
1571 *
1572 * Result:
1573 * A status code
1574 *
1575 * Availability:
1576 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1577 * CarbonLib: in CarbonLib 1.1 and later
1578 * Non-Carbon CFM: not available
1579 }
NavCreateChooseVolumeDialognull1580 function NavCreateChooseVolumeDialog( {const} inOptions: NavDialogCreationOptionsPtr { can be NULL }; inEventProc: NavEventUPP { can be NULL }; inFilterProc: NavObjectFilterUPP { can be NULL }; inClientData: UnivPtr { can be NULL }; var outDialog: NavDialogRef ): OSStatus; external name '_NavCreateChooseVolumeDialog';
1581 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1582
1583
1584 {
1585 * NavCreateChooseObjectDialog()
1586 *
1587 * Summary:
1588 * Create a ChooseObject dialog
1589 *
1590 * Discussion:
1591 * Use this function to create a dialog designed for selecting a
1592 * file, folder, or volume as the target of an operation. This
1593 * function replaces NavChooseObject, allowing new window
1594 * modalities, and adding Unicode support. Upon successful creation,
1595 * the dialog is not visible. Present and run the dialog with
1596 * NavDialogRun. After the dialog is complete, dispose of it with
1597 * NavDialogDispose.
1598 *
1599 * Parameters:
1600 *
1601 * inOptions:
1602 * Options controlling the appearance and behavior of the dialog
1603 *
1604 * inEventProc:
1605 * The UPP for the client's event callack, or NULL for no event
1606 * callback
1607 *
1608 * inPreviewProc:
1609 * The UPP for the client's custom file preview callback, or NULL
1610 * for standard previews
1611 *
1612 * inFilterProc:
1613 * The UPP for the client's custom filter callback, or NULL for no
1614 * custom file filtering
1615 *
1616 * inClientData:
1617 * A client-defined context value passed to all callback functions
1618 *
1619 * outDialog:
1620 * Upon successful completion, a reference to the created dialog
1621 *
1622 * Result:
1623 * A status code
1624 *
1625 * Availability:
1626 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1627 * CarbonLib: in CarbonLib 1.1 and later
1628 * Non-Carbon CFM: not available
1629 }
NavCreateChooseObjectDialognull1630 function NavCreateChooseObjectDialog( {const} inOptions: NavDialogCreationOptionsPtr { can be NULL }; inEventProc: NavEventUPP { can be NULL }; inPreviewProc: NavPreviewUPP { can be NULL }; inFilterProc: NavObjectFilterUPP { can be NULL }; inClientData: UnivPtr { can be NULL }; var outDialog: NavDialogRef ): OSStatus; external name '_NavCreateChooseObjectDialog';
1631 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1632
1633
1634 {
1635 * NavCreateNewFolderDialog()
1636 *
1637 * Summary:
1638 * Create a NewFolder dialog
1639 *
1640 * Discussion:
1641 * Use this function to create a dialog designed for creating a new
1642 * folder. Nav Services creates the folder as specified by the user
1643 * and returns a reference to the folder in the selection field of
1644 * the reply record. This function replaces NavNewFolder, allowing
1645 * new window modalities, and adding Unicode support. Upon
1646 * successful creation, the dialog is not visible. Present and run
1647 * the dialog with NavDialogRun. After the dialog is complete,
1648 * dispose of it with NavDialogDispose.
1649 *
1650 * Parameters:
1651 *
1652 * inOptions:
1653 * Options controlling the appearance and behavior of the dialog
1654 *
1655 * inEventProc:
1656 * The UPP for the client's event callack, or NULL for no event
1657 * callback
1658 *
1659 * inClientData:
1660 * A client-defined context value passed to all callback functions
1661 *
1662 * outDialog:
1663 * Upon successful completion, a reference to the created dialog
1664 *
1665 * Result:
1666 * A status code
1667 *
1668 * Availability:
1669 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1670 * CarbonLib: in CarbonLib 1.1 and later
1671 * Non-Carbon CFM: not available
1672 }
NavCreateNewFolderDialognull1673 function NavCreateNewFolderDialog( {const} inOptions: NavDialogCreationOptionsPtr { can be NULL }; inEventProc: NavEventUPP { can be NULL }; inClientData: UnivPtr { can be NULL }; var outDialog: NavDialogRef ): OSStatus; external name '_NavCreateNewFolderDialog';
1674 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1675
1676
1677 {
1678 * NavDialogRun()
1679 *
1680 * Summary:
1681 * Show and run a Nav Services dialog
1682 *
1683 * Discussion:
1684 * After a dialog is created with a NavCreate*Dialog function, the
1685 * client can modify the dialog target folder or save file name
1686 * using NavCustomControl with the appropriate selectors. The dialog
1687 * is presented to the user by calling NavDialogRun. If the dialog
1688 * is system modal or application modal (kWindowModalitySystemModal,
1689 * kWindowModalityAppModal), NavDialogRun does not return until the
1690 * dialog has been dismissed. If the dialog is modeless or window
1691 * modal (kWindowModalityNone, kWindowModalityWindowModal),
1692 * NavDialogRun shows the dialog and returns immediately. In order
1693 * to know when the dialog has been dismissed, the client must watch
1694 * for the kNavCBUserAction event sent to the client event proc.
1695 * Note that on Mac OS 9 and earlier, all dialogs are modal, even if
1696 * a modeless or window modal dialog is requested. However, the
1697 * kNavCBUserAction event is still sent to the event proc, so it's
1698 * possible to use a single programming model on OS 9 and OS X
1699 * provided the client assumes NavDialogRun returns immediately
1700 * after showing the dialog.
1701 *
1702 * Parameters:
1703 *
1704 * inDialog:
1705 * The dialog to run
1706 *
1707 * Result:
1708 * A status code
1709 *
1710 * Availability:
1711 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1712 * CarbonLib: in CarbonLib 1.1 and later
1713 * Non-Carbon CFM: not available
1714 }
NavDialogRunnull1715 function NavDialogRun( inDialog: NavDialogRef ): OSStatus; external name '_NavDialogRun';
1716 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1717
1718
1719 {
1720 * NavDialogDispose()
1721 *
1722 * Summary:
1723 * Dispose of a Nav Services dialog
1724 *
1725 * Discussion:
1726 * Call this function when completely finished with a Nav Services
1727 * dialog. After calling NavDialogDispose, the dialog reference is
1728 * no longer valid. NavDialogDispose is safe to call from within a
1729 * callback to the client's Nav Services event proc. On Mac OS X
1730 * 10.5 and later, -release and CFRelease may be used instead.
1731 *
1732 * Parameters:
1733 *
1734 * inDialog:
1735 * The dialog to dispose
1736 *
1737 * Availability:
1738 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1739 * CarbonLib: in CarbonLib 1.1 and later
1740 * Non-Carbon CFM: not available
1741 }
1742 procedure NavDialogDispose( inDialog: NavDialogRef ); external name '_NavDialogDispose';
1743 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1744
1745
1746 {
1747 * NavDialogGetWindow()
1748 *
1749 * Summary:
1750 * Return the window in which a Nav Services dialog appears
1751 *
1752 * Discussion:
1753 * Note that a valid NavDialogRef may not have a window until
1754 * NavDialogRun has been called. If no window exists for the dialog,
1755 * NavDialogGetWindow returns NULL.
1756 *
1757 * Parameters:
1758 *
1759 * inDialog:
1760 * Which dialog
1761 *
1762 * Result:
1763 * The window reference
1764 *
1765 * Availability:
1766 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1767 * CarbonLib: in CarbonLib 1.1 and later
1768 * Non-Carbon CFM: not available
1769 }
NavDialogGetWindownull1770 function NavDialogGetWindow( inDialog: NavDialogRef ): WindowRef; external name '_NavDialogGetWindow';
1771 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1772
1773
1774 {
1775 * NavDialogGetUserAction()
1776 *
1777 * Summary:
1778 * Return the current user action taken by the user
1779 *
1780 * Discussion:
1781 * A user action occurs when the user dismisses the dialog or
1782 * otherwise does something generating a reply record that the
1783 * client needs to act upon. If the user has not taken such an
1784 * action, NavDialogGetUserAction returns kNavUserActionNone. If the
1785 * dialog is terminated using the NavCustomControl selector
1786 * kNavCtlTerminate, the final user action is kNavUserActionNone.
1787 * For file dialogs, if the final user action is not
1788 * kNavUserActionCancel, then there is a valid reply record which
1789 * can be obtained with NavDialogGetReply. Although the user action
1790 * is sent to the client event proc as a kNavCBUserAction event,
1791 * this function is provided as a convenience for clients of modal
1792 * dialogs who may find it easier to get the user action immediately
1793 * after NavDialogRun returns.
1794 *
1795 * Parameters:
1796 *
1797 * inDialog:
1798 * Which dialog
1799 *
1800 * Result:
1801 * The user action
1802 *
1803 * Availability:
1804 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1805 * CarbonLib: in CarbonLib 1.1 and later
1806 * Non-Carbon CFM: not available
1807 }
NavDialogGetUserActionnull1808 function NavDialogGetUserAction( inDialog: NavDialogRef ): NavUserAction; external name '_NavDialogGetUserAction';
1809 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1810
1811
1812 {
1813 * NavDialogGetReply()
1814 *
1815 * Summary:
1816 * Fill in the provided reply record with the results of a user
1817 * action such as kNavUserActionOpen, kNavUserActionSaveAs, or
1818 * kNavUserActionChoose.
1819 *
1820 * Discussion:
1821 * Call this function when a file dialog receives a user action
1822 * other that implies an item or items to open, save, etc. Upon
1823 * successful completion, the reply record describes the item(s)
1824 * that the client needs to act upon. The reply record should later
1825 * be disposed of with NavDisposeReply.
1826 *
1827 * Parameters:
1828 *
1829 * inDialog:
1830 * Which dialog
1831 *
1832 * outReply:
1833 * A pointer to the client-allocated reply record to be filled in
1834 *
1835 * Result:
1836 * A status code
1837 *
1838 * Availability:
1839 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1840 * CarbonLib: in CarbonLib 1.1 and later
1841 * Non-Carbon CFM: not available
1842 }
NavDialogGetReplynull1843 function NavDialogGetReply( inDialog: NavDialogRef; var outReply: NavReplyRecord ): OSStatus; external name '_NavDialogGetReply';
1844 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1845
1846
1847 {
1848 * NavDialogGetSaveFileName()
1849 *
1850 * Summary:
1851 * Return the current value of the file name to be saved in a
1852 * PutFile dialog
1853 *
1854 * Discussion:
1855 * This function can be called at any time on a valid PutFile dialog
1856 * to obtain the current value of the save file name. This function
1857 * is a Unicode-based replacement for the kNavCtlGetEditFileName
1858 * NavCustomControl selector. On Mac OS X, the full file name is
1859 * returned, including any extenison that may be hidden from the
1860 * user.
1861 *
1862 * Parameters:
1863 *
1864 * inPutFileDialog:
1865 * Which dialog
1866 *
1867 * Result:
1868 * The save file name as a CFStringRef. The string is immutable. The
1869 * client should retain the string if the reference is to be held
1870 * beyond the life of the dialog (standard CF retain/release
1871 * semantics).
1872 *
1873 * Availability:
1874 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1875 * CarbonLib: in CarbonLib 1.1 and later
1876 * Non-Carbon CFM: not available
1877 }
NavDialogGetSaveFileNamenull1878 function NavDialogGetSaveFileName( inPutFileDialog: NavDialogRef ): CFStringRef; external name '_NavDialogGetSaveFileName';
1879 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1880
1881
1882 {
1883 * NavDialogSetSaveFileName()
1884 *
1885 * Summary:
1886 * Set the current value of the file name to be saved in a PutFile
1887 * dialog
1888 *
1889 * Discussion:
1890 * This function can be called at any time to set the current save
1891 * file name. Use it to set an initial name before calling
1892 * NavDialogRun or to change the file name dynamically while a
1893 * dialog is running. This function is a Unicode-based replacement
1894 * for the kNavCtlSetEditFileName NavCustomControl selector.
1895 *
1896 * Parameters:
1897 *
1898 * inPutFileDialog:
1899 * Which PutFile dialog
1900 *
1901 * inFileName:
1902 * The file name to use. A copy of the provided string is made for
1903 * use by Navigation Services.
1904 *
1905 * Result:
1906 * A status code
1907 *
1908 * Availability:
1909 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
1910 * CarbonLib: in CarbonLib 1.1 and later
1911 * Non-Carbon CFM: not available
1912 }
NavDialogSetSaveFileNamenull1913 function NavDialogSetSaveFileName( inPutFileDialog: NavDialogRef; inFileName: CFStringRef ): OSStatus; external name '_NavDialogSetSaveFileName';
1914 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1915
1916
1917 {
1918 * NavDialogGetSaveFileExtensionHidden()
1919 *
1920 * Summary:
1921 * Get the current state of the extension hiding in a PutFile dialog
1922 *
1923 * Discussion:
1924 * This function can be called at any time to determine if a PutFile
1925 * dialog is hiding the file extesion (if any) of the file to be
1926 * saved.
1927 *
1928 * Parameters:
1929 *
1930 * inPutFileDialog:
1931 * Which PutFile dialog
1932 *
1933 * Result:
1934 * True if the extension is hidden, false if the extension is
1935 * visible or there is no extension.
1936 *
1937 * Availability:
1938 * Mac OS X: in version 10.1 and later in Carbon.framework [32-bit only]
1939 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
1940 * Non-Carbon CFM: not available
1941 }
NavDialogGetSaveFileExtensionHiddennull1942 function NavDialogGetSaveFileExtensionHidden( inPutFileDialog: NavDialogRef ): Boolean; external name '_NavDialogGetSaveFileExtensionHidden';
1943 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
1944
1945
1946 {
1947 * NavDialogSetSaveFileExtensionHidden()
1948 *
1949 * Summary:
1950 * Set the current state of the extension hiding in a PutFile dialog
1951 *
1952 * Discussion:
1953 * This function can be called at any time to hide or show the
1954 * extension of the file to be saved in a PutFile dialog. If the
1955 * current file name has no extension, then hiding the extension has
1956 * no effect.
1957 *
1958 * Parameters:
1959 *
1960 * inPutFileDialog:
1961 * Which PutFile dialog
1962 *
1963 * inHidden:
1964 * The new value for the hidden extension state
1965 *
1966 * Result:
1967 * A status code
1968 *
1969 * Availability:
1970 * Mac OS X: in version 10.1 and later in Carbon.framework [32-bit only]
1971 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
1972 * Non-Carbon CFM: not available
1973 }
NavDialogSetSaveFileExtensionHiddennull1974 function NavDialogSetSaveFileExtensionHidden( inPutFileDialog: NavDialogRef; inHidden: Boolean ): OSStatus; external name '_NavDialogSetSaveFileExtensionHidden';
1975 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
1976
1977
1978 {
1979 * NavDialogSetFilterTypeIdentifiers()
1980 *
1981 * Summary:
1982 * Set a list Uniform Type Identifers against which all files will
1983 * be automatically filtered.
1984 *
1985 * Discussion:
1986 * This function can be called at any time to filter files shown in
1987 * the dialog based on the list of type identifiers provided. This
1988 * function is only applicable for GetFile and ChooseFile dialogs.
1989 *
1990 * Parameters:
1991 *
1992 * inGetFileDialog:
1993 * Which GetFile or ChooseFile dialog.
1994 *
1995 * inTypeIdentifiers:
1996 * The list of Uniform Type Identifiers describing the file types
1997 * to be shown in the dialog file browser. If an empty array is
1998 * passed, all files will be filtered out. If NULL, no files are
1999 * filtered. The "Enable" popup view will be automatically shown
2000 * and hidden as necessary.
2001 *
2002 * Result:
2003 * A status code
2004 *
2005 * Availability:
2006 * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only]
2007 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2008 * Non-Carbon CFM: not available
2009 }
NavDialogSetFilterTypeIdentifiersnull2010 function NavDialogSetFilterTypeIdentifiers( inGetFileDialog: NavDialogRef; inTypeIdentifiers: CFArrayRef { can be NULL } ): OSStatus; external name '_NavDialogSetFilterTypeIdentifiers';
2011 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2012
2013
2014 //#pragma mark -
2015 {--------------------------------------------------------------------------------------}
2016 { � DEPRECATED }
2017 { All functions below this point are either deprecated (they continue to function }
2018 { but are not the most modern nor most efficient solution to a problem), or they are }
2019 { completely unavailable on Mac OS X. }
2020 {--------------------------------------------------------------------------------------}
2021 {$endc} {not TARGET_CPU_64}
2022
2023 const
2024 kNavDialogOptionsVersion = 0;
2025
2026 type
2027 NavDialogOptionsPtr = ^NavDialogOptions;
2028 NavDialogOptions = record
2029 version: UInt16;
2030 dialogOptionFlags: NavDialogOptionFlags; { option flags for affecting the dialog's behavior }
2031 location: Point; { top-left location of the dialog, or (-1,-1) for default position }
2032 clientName: Str255;
2033 windowTitle: Str255;
2034 actionButtonLabel: Str255; { label of the default button (or null string for default) }
2035 cancelButtonLabel: Str255; { label of the cancel button (or null string for default) }
2036 savedFileName: Str255; { default name for text box in NavPutFile (or null string for default) }
2037 message: Str255; { custom message prompt (or null string for default) }
2038 preferenceKey: UInt32; { a key for to managing preferences for using multiple utility dialogs }
2039 popupExtension: NavMenuItemSpecArrayHandle; { extended popup menu items, an array of NavMenuItemSpecs }
2040 reserved: array [0..493] of SInt8;
2041 end;
2042 {$ifc not TARGET_CPU_64}
2043 {
2044 * NavLoad() *** DEPRECATED ***
2045 *
2046 * Deprecated:
2047 * Not available in Mac OS X.
2048 *
2049 * Availability:
2050 * Mac OS X: not available [32-bit only] but deprecated in 10.5
2051 * CarbonLib: in CarbonLib 1.0 and later
2052 * Non-Carbon CFM: in NavigationLib 1.0 and later
2053 }
NavLoadnull2054 function NavLoad: OSErr; external name '_NavLoad';
2055
2056
2057 {
2058 * NavUnload() *** DEPRECATED ***
2059 *
2060 * Deprecated:
2061 * Not available in Mac OS X.
2062 *
2063 * Availability:
2064 * Mac OS X: not available [32-bit only] but deprecated in 10.5
2065 * CarbonLib: in CarbonLib 1.0 and later
2066 * Non-Carbon CFM: in NavigationLib 1.0 and later
2067 }
NavUnloadnull2068 function NavUnload: OSErr; external name '_NavUnload';
2069
2070
2071 {
2072 * NavLibraryVersion() *** DEPRECATED ***
2073 *
2074 * Deprecated:
2075 * Test against the system version instead.
2076 *
2077 * Availability:
2078 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2079 * CarbonLib: in CarbonLib 1.0 and later
2080 * Non-Carbon CFM: in NavigationLib 1.0 and later
2081 }
NavLibraryVersionnull2082 function NavLibraryVersion: UInt32; external name '_NavLibraryVersion';
2083 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2084
2085
2086 {
2087 * NavGetDefaultDialogOptions() *** DEPRECATED ***
2088 *
2089 * Deprecated:
2090 * Use NavGetDefaultDialogCreationOptions instead.
2091 *
2092 * Availability:
2093 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2094 * CarbonLib: in CarbonLib 1.0 and later
2095 * Non-Carbon CFM: in NavigationLib 1.0 and later
2096 }
NavGetDefaultDialogOptionsnull2097 function NavGetDefaultDialogOptions( var dialogOptions: NavDialogOptions ): OSErr; external name '_NavGetDefaultDialogOptions';
2098 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2099
2100
2101 {
2102 * NavGetFile() *** DEPRECATED ***
2103 *
2104 * Deprecated:
2105 * Use NavCreateGetFileDialog instead.
2106 *
2107 * Availability:
2108 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2109 * CarbonLib: in CarbonLib 1.0 and later
2110 * Non-Carbon CFM: in NavigationLib 1.0 and later
2111 }
NavGetFilenull2112 function NavGetFile( defaultLocation: AEDescPtr { can be NULL }; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr { can be NULL }; eventProc: NavEventUPP { can be NULL }; previewProc: NavPreviewUPP { can be NULL }; filterProc: NavObjectFilterUPP { can be NULL }; typeList: NavTypeListHandle { can be NULL }; callBackUD: UnivPtr { can be NULL } ): OSErr; external name '_NavGetFile';
2113 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2114
2115
2116 {
2117 * NavPutFile() *** DEPRECATED ***
2118 *
2119 * Deprecated:
2120 * Use NavCreatePutFileDialog instead.
2121 *
2122 * Availability:
2123 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2124 * CarbonLib: in CarbonLib 1.0 and later
2125 * Non-Carbon CFM: in NavigationLib 1.0 and later
2126 }
NavPutFilenull2127 function NavPutFile( defaultLocation: AEDescPtr { can be NULL }; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr { can be NULL }; eventProc: NavEventUPP { can be NULL }; fileType: OSType; fileCreator: OSType; callBackUD: UnivPtr { can be NULL } ): OSErr; external name '_NavPutFile';
2128 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2129
2130
2131 {
2132 * NavAskSaveChanges() *** DEPRECATED ***
2133 *
2134 * Deprecated:
2135 * Use NavCreateAskSaveChangesDialog instead.
2136 *
2137 * Availability:
2138 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2139 * CarbonLib: in CarbonLib 1.0 and later
2140 * Non-Carbon CFM: in NavigationLib 1.0 and later
2141 }
NavAskSaveChangesnull2142 function NavAskSaveChanges( var dialogOptions: NavDialogOptions; action: NavAskSaveChangesAction; var reply: NavAskSaveChangesResult; eventProc: NavEventUPP { can be NULL }; callBackUD: UnivPtr { can be NULL } ): OSErr; external name '_NavAskSaveChanges';
2143 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2144
2145
2146 {
2147 * NavCustomAskSaveChanges() *** DEPRECATED ***
2148 *
2149 * Deprecated:
2150 * Use NavCreateAskSaveChangesDialog instead.
2151 *
2152 * Availability:
2153 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2154 * CarbonLib: in CarbonLib 1.0 and later
2155 * Non-Carbon CFM: in NavigationLib 1.0 and later
2156 }
NavCustomAskSaveChangesnull2157 function NavCustomAskSaveChanges( var dialogOptions: NavDialogOptions; var reply: NavAskSaveChangesResult; eventProc: NavEventUPP { can be NULL }; callBackUD: UnivPtr { can be NULL } ): OSErr; external name '_NavCustomAskSaveChanges';
2158 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2159
2160
2161 {
2162 * NavAskDiscardChanges() *** DEPRECATED ***
2163 *
2164 * Deprecated:
2165 * Use NavCreateAskDiscardChangesDialog instead.
2166 *
2167 * Availability:
2168 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2169 * CarbonLib: in CarbonLib 1.0 and later
2170 * Non-Carbon CFM: in NavigationLib 1.0 and later
2171 }
NavAskDiscardChangesnull2172 function NavAskDiscardChanges( var dialogOptions: NavDialogOptions; var reply: NavAskDiscardChangesResult; eventProc: NavEventUPP { can be NULL }; callBackUD: UnivPtr { can be NULL } ): OSErr; external name '_NavAskDiscardChanges';
2173 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2174
2175
2176 {
2177 * NavChooseFile() *** DEPRECATED ***
2178 *
2179 * Deprecated:
2180 * Use NavCreateChooseFileDialog instead.
2181 *
2182 * Availability:
2183 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2184 * CarbonLib: in CarbonLib 1.0 and later
2185 * Non-Carbon CFM: in NavigationLib 1.0 and later
2186 }
NavChooseFilenull2187 function NavChooseFile( defaultLocation: AEDescPtr { can be NULL }; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr { can be NULL }; eventProc: NavEventUPP { can be NULL }; previewProc: NavPreviewUPP { can be NULL }; filterProc: NavObjectFilterUPP { can be NULL }; typeList: NavTypeListHandle { can be NULL }; callBackUD: UnivPtr { can be NULL } ): OSErr; external name '_NavChooseFile';
2188 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2189
2190
2191 {
2192 * NavChooseFolder() *** DEPRECATED ***
2193 *
2194 * Deprecated:
2195 * Use NavCreateChooseFolderDialog instead.
2196 *
2197 * Availability:
2198 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2199 * CarbonLib: in CarbonLib 1.0 and later
2200 * Non-Carbon CFM: in NavigationLib 1.0 and later
2201 }
NavChooseFoldernull2202 function NavChooseFolder( defaultLocation: AEDescPtr { can be NULL }; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr { can be NULL }; eventProc: NavEventUPP { can be NULL }; filterProc: NavObjectFilterUPP { can be NULL }; callBackUD: UnivPtr { can be NULL } ): OSErr; external name '_NavChooseFolder';
2203 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2204
2205
2206 {
2207 * NavChooseVolume() *** DEPRECATED ***
2208 *
2209 * Deprecated:
2210 * Use NavCreateChooseVolumeDialog instead.
2211 *
2212 * Availability:
2213 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2214 * CarbonLib: in CarbonLib 1.0 and later
2215 * Non-Carbon CFM: in NavigationLib 1.0 and later
2216 }
NavChooseVolumenull2217 function NavChooseVolume( defaultSelection: AEDescPtr { can be NULL }; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr { can be NULL }; eventProc: NavEventUPP { can be NULL }; filterProc: NavObjectFilterUPP { can be NULL }; callBackUD: UnivPtr { can be NULL } ): OSErr; external name '_NavChooseVolume';
2218 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2219
2220
2221 {
2222 * NavChooseObject() *** DEPRECATED ***
2223 *
2224 * Deprecated:
2225 * Use NavCreateChooseObjectDialog instead.
2226 *
2227 * Availability:
2228 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2229 * CarbonLib: in CarbonLib 1.0 and later
2230 * Non-Carbon CFM: in NavigationLib 1.0 and later
2231 }
NavChooseObjectnull2232 function NavChooseObject( defaultLocation: AEDescPtr { can be NULL }; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr { can be NULL }; eventProc: NavEventUPP { can be NULL }; filterProc: NavObjectFilterUPP { can be NULL }; callBackUD: UnivPtr { can be NULL } ): OSErr; external name '_NavChooseObject';
2233 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2234
2235
2236 {
2237 * NavNewFolder() *** DEPRECATED ***
2238 *
2239 * Deprecated:
2240 * Use NavCreateNewFolderDialog instead.
2241 *
2242 * Availability:
2243 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2244 * CarbonLib: in CarbonLib 1.0 and later
2245 * Non-Carbon CFM: in NavigationLib 1.0 and later
2246 }
NavNewFoldernull2247 function NavNewFolder( defaultLocation: AEDescPtr { can be NULL }; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr { can be NULL }; eventProc: NavEventUPP { can be NULL }; callBackUD: UnivPtr { can be NULL } ): OSErr; external name '_NavNewFolder';
2248 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2249
2250
2251 {
2252 * NavTranslateFile() *** DEPRECATED ***
2253 *
2254 * Deprecated:
2255 * Navigation Services does not include Translation Manager support
2256 * on Mac OS X.
2257 *
2258 * Availability:
2259 * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
2260 * CarbonLib: in CarbonLib 1.0 and later
2261 * Non-Carbon CFM: in NavigationLib 1.0 and later
2262 }
NavTranslateFilenull2263 function NavTranslateFile( const (*var*) reply: NavReplyRecord; howToTranslate: NavTranslationOptions ): OSErr; external name '_NavTranslateFile';
2264 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2265
2266
2267 {
2268 * NavServicesCanRun() *** DEPRECATED ***
2269 *
2270 * Deprecated:
2271 * Navigation Services can always run on Mac OS X.
2272 *
2273 * Availability:
2274 * Mac OS X: not available [32-bit only] but deprecated in 10.5
2275 * CarbonLib: in CarbonLib 1.0 and later
2276 * Non-Carbon CFM: in NavigationLib 1.0 and later
2277 }
NavServicesCanRunnull2278 function NavServicesCanRun: Boolean; external name '_NavServicesCanRun';
2279
2280
2281 {$endc} {not TARGET_CPU_64}
2282
2283 {$ifc TARGET_RT_MAC_CFM}
2284 {
2285 NavServicesAvailable() is a macro available only in C/C++.
2286 To get the same functionality from pascal or assembly, you need
2287 to test if NavigationLib functions are not NULL and call NavServicesCanRun()
2288 which will test if NavServices is properly installed. For instance:
2289
2290 gNavServicesAvailable = FALSE;
2291 IF @NavLibraryVersion <> kUnresolvedCFragSymbolAddress THEN
2292 gNavServicesAvailable = NavServicesCanRun;
2293 end
2294
2295 }
2296 {$elsec}
2297 {$ifc TARGET_RT_MAC_MACHO}
2298 { Navigation is always available on OS X }
2299 {$elsec}
2300 { NavServicesAvailable() is implemented in Navigation.o for classic 68K clients }
2301 {$ifc CALL_NOT_IN_CARBON}
2302 { NavServicesAvailable() is implemented in Navigation.o for classic 68K clients}
2303 {
2304 * NavServicesAvailable()
2305 *
2306 * Availability:
2307 * Mac OS X: not available
2308 * CarbonLib: not available
2309 * Non-Carbon CFM: not available
2310 }
2311
2312 {$endc} {CALL_NOT_IN_CARBON}
2313 {$endc} {TARGET_RT_MAC_MACHO}
2314 {$endc} {TARGET_RT_MAC_CFM}
2315
2316
2317 {$endc} {TARGET_OS_MAC}
2318
2319 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
2320
2321 end.
2322 {$endc} {not MACOSALLINCLUDE}
2323