Navigation.pas 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712
  1. {
  2. File: Navigation.p
  3. Contains: Navigation Services Interfaces
  4. Version: Technology: Navigation 3.0
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1996-2002 by Apple Computer, Inc., all rights reserved
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit Navigation;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,AEDataModel,CFBase,Quickdraw,Finder,Events,AppleEvents,Translation,MacWindows,CodeFragments,MacErrors,CFArray,CFString;
  92. {#I+}
  93. {$ALIGN MAC68K}
  94. type
  95. NavAskSaveChangesAction = UInt32;
  96. const
  97. { input action codes for NavAskSaveChanges() }
  98. kNavSaveChangesClosingDocument = 1;
  99. kNavSaveChangesQuittingApplication = 2;
  100. kNavSaveChangesOther = 0;
  101. type
  102. NavAskSaveChangesResult = UInt32;
  103. const
  104. { result codes for NavAskSaveChanges() }
  105. kNavAskSaveChangesSave = 1;
  106. kNavAskSaveChangesCancel = 2;
  107. kNavAskSaveChangesDontSave = 3;
  108. type
  109. NavAskDiscardChangesResult = UInt32;
  110. const
  111. { result codes for NavAskDiscardChanges() }
  112. kNavAskDiscardChanges = 1;
  113. kNavAskDiscardChangesCancel = 2;
  114. type
  115. NavFilterModes = SInt16;
  116. const
  117. { which elements are being filtered for objects: }
  118. kNavFilteringBrowserList = 0;
  119. kNavFilteringFavorites = 1;
  120. kNavFilteringRecents = 2;
  121. kNavFilteringShortCutVolumes = 3;
  122. kNavFilteringLocationPopup = 4; { for v1.1 or greater }
  123. kNavFileOrFolderVersion = 1;
  124. type
  125. NavFileOrFolderInfoPtr = ^NavFileOrFolderInfo;
  126. NavFileOrFolderInfo = record
  127. version: UInt16;
  128. isFolder: boolean;
  129. visible: boolean;
  130. creationDate: UInt32;
  131. modificationDate: UInt32;
  132. case SInt16 of
  133. 0: (
  134. locked: boolean; { file is locked }
  135. resourceOpen: boolean; { resource fork is opened }
  136. dataOpen: boolean; { data fork is opened }
  137. reserved1: boolean;
  138. dataSize: UInt32; { size of the data fork }
  139. resourceSize: UInt32; { size of the resource fork }
  140. finderInfo: FInfo; { more file info: }
  141. finderXInfo: FXInfo;
  142. );
  143. 1: (
  144. shareable: boolean;
  145. sharePoint: boolean;
  146. mounted: boolean;
  147. readable: boolean;
  148. writeable: boolean;
  149. reserved2: boolean;
  150. numberOfFiles: UInt32;
  151. finderDInfo: DInfo;
  152. finderDXInfo: DXInfo;
  153. folderType: OSType; { package type, For struct version >= 1 }
  154. folderCreator: OSType; { package creator, For struct version >= 1 }
  155. reserved3: packed array [0..205] of char;
  156. );
  157. end;
  158. NavEventDataInfoPtr = ^NavEventDataInfo;
  159. NavEventDataInfo = record
  160. case SInt16 of
  161. 0: (
  162. event: EventRecordPtr; { for event processing }
  163. );
  164. 1: (
  165. param: Ptr; { points to event specific data }
  166. );
  167. end;
  168. NavEventDataPtr = ^NavEventData;
  169. NavEventData = record
  170. eventDataParms: NavEventDataInfo; { the event data }
  171. itemHit: SInt16; { the dialog item number, for v1.1 or greater }
  172. end;
  173. {
  174. * NavDialogRef
  175. *
  176. * Summary:
  177. * Opaque Navigation Services dialog identifier
  178. *
  179. * Discussion:
  180. * A NavDialogRef is an opaque reference to an instance of a
  181. * Navigation Services dialog. A new NavDialogRef is returned from
  182. * any of the NavCreate*Dialog functions and is later disposed with
  183. * the NavDialogDispose function. NavDialogRef is the new name for
  184. * the NavContext type, and thus when a client's event proc is
  185. * called, the value of the NavCBRec.context field is the same as
  186. * the NavDialogRef returned from the corresponding
  187. * NavCreate*Dialog. A NavDialogRef is distinct from, and is not
  188. * interchangable with, a Dialog Manager DialogRef.
  189. }
  190. NavDialogRef = ^SInt32; { an opaque 32-bit type }
  191. NavDialogRefPtr = ^NavDialogRef; { when a var xx:NavDialogRef parameter can be nil, it is changed to xx: NavDialogRefPtr }
  192. {$ifc CALL_NOT_IN_CARBON}
  193. { NavContext is the old name for NavDialogRef }
  194. NavContext = NavDialogRef;
  195. {$endc} {CALL_NOT_IN_CARBON}
  196. {
  197. * NavUserAction
  198. *
  199. * Summary:
  200. * Indicates an action taken by the user
  201. *
  202. * Discussion:
  203. * When the user clicks a button at the bottom of a Nav Services
  204. * dialog (or makes an equivalent mouse or key gesture), a
  205. * kNavCBUserAction event is sent to the client's event proc
  206. * indicating which action was taken. Often, the action also
  207. * dismisses the dialog. User action events are only generated when
  208. * using dialogs created from a NavCreate*Dialog function. In the
  209. * special case of a modeless GetFile dialog (supported only on Mac
  210. * OS X), the user can option-click on the open button to keep the
  211. * dialog from being dismissed, but the kNavCBUserAction event is
  212. * sent so the client can get the reply record and open the selected
  213. * files.
  214. }
  215. NavUserAction = UInt32;
  216. const
  217. kNavUserActionNone = 0;
  218. kNavUserActionCancel = 1;
  219. kNavUserActionOpen = 2;
  220. kNavUserActionSaveAs = 3;
  221. kNavUserActionChoose = 4;
  222. kNavUserActionNewFolder = 5;
  223. kNavUserActionSaveChanges = 6;
  224. kNavUserActionDontSaveChanges = 7;
  225. kNavUserActionDiscardChanges = 8;
  226. kNavUserActionReviewDocuments = 9;
  227. kNavUserActionDiscardDocuments = 10;
  228. kNavCBRecVersion = 1;
  229. {
  230. * NavCBRec
  231. *
  232. * Summary:
  233. * A structure passed to event and preview callbacks
  234. *
  235. * Discussion:
  236. * The NavCBRec structure is passed to the client's event proc or
  237. * custom preview proc. It provides information that is specific to
  238. * each event type. New for Carbon: the userAction field.
  239. }
  240. type
  241. NavCBRecPtr = ^NavCBRec;
  242. NavCBRec = record
  243. version: UInt16;
  244. context: NavDialogRef;
  245. window: WindowRef;
  246. customRect: Rect;
  247. previewRect: Rect;
  248. eventData: NavEventData;
  249. userAction: NavUserAction;
  250. reserved: packed array [0..217] of char;
  251. end;
  252. {
  253. * NavEventCallbackMessage
  254. *
  255. * Summary:
  256. * Identifies the message type being sent to the client's event proc
  257. }
  258. NavEventCallbackMessage = SInt32;
  259. const
  260. kNavCBEvent = 0;
  261. kNavCBCustomize = 1;
  262. kNavCBStart = 2;
  263. kNavCBTerminate = 3;
  264. kNavCBAdjustRect = 4;
  265. kNavCBNewLocation = 5;
  266. kNavCBShowDesktop = 6;
  267. kNavCBSelectEntry = 7;
  268. kNavCBPopupMenuSelect = 8;
  269. kNavCBAccept = 9;
  270. kNavCBCancel = 10;
  271. kNavCBAdjustPreview = 11;
  272. kNavCBUserAction = 12;
  273. kNavCBOpenSelection = $80000000;
  274. type
  275. NavCallBackUserData = Ptr;
  276. { for events and customization: }
  277. {$ifc TYPED_FUNCTION_POINTERS}
  278. NavEventProcPtr = procedure(callBackSelector: NavEventCallbackMessage; callBackParms: NavCBRecPtr; callBackUD: UnivPtr);
  279. {$elsec}
  280. NavEventProcPtr = ProcPtr;
  281. {$endc}
  282. { for preview support: }
  283. {$ifc TYPED_FUNCTION_POINTERS}
  284. NavPreviewProcPtr = function(callBackParms: NavCBRecPtr; callBackUD: UnivPtr): boolean;
  285. {$elsec}
  286. NavPreviewProcPtr = ProcPtr;
  287. {$endc}
  288. { filtering callback information: }
  289. {$ifc TYPED_FUNCTION_POINTERS}
  290. NavObjectFilterProcPtr = function(var theItem: AEDesc; info: NavFileOrFolderInfoPtr; callBackUD: UnivPtr; filterMode: NavFilterModes): boolean;
  291. {$elsec}
  292. NavObjectFilterProcPtr = ProcPtr;
  293. {$endc}
  294. {$ifc OPAQUE_UPP_TYPES}
  295. NavEventUPP = ^SInt32; { an opaque UPP }
  296. {$elsec}
  297. NavEventUPP = UniversalProcPtr;
  298. {$endc}
  299. {$ifc OPAQUE_UPP_TYPES}
  300. NavPreviewUPP = ^SInt32; { an opaque UPP }
  301. {$elsec}
  302. NavPreviewUPP = UniversalProcPtr;
  303. {$endc}
  304. {$ifc OPAQUE_UPP_TYPES}
  305. NavObjectFilterUPP = ^SInt32; { an opaque UPP }
  306. {$elsec}
  307. NavObjectFilterUPP = UniversalProcPtr;
  308. {$endc}
  309. const
  310. uppNavEventProcInfo = $00000FC0;
  311. uppNavPreviewProcInfo = $000003D0;
  312. uppNavObjectFilterProcInfo = $00002FD0;
  313. {
  314. * NewNavEventUPP()
  315. *
  316. * Availability:
  317. * Non-Carbon CFM: available as macro/inline
  318. * CarbonLib: in CarbonLib 1.0 and later
  319. * Mac OS X: in version 10.0 and later
  320. }
  321. function NewNavEventUPP(userRoutine: NavEventProcPtr): NavEventUPP; external name '_NewNavEventUPP'; { old name was NewNavEventProc }
  322. {
  323. * NewNavPreviewUPP()
  324. *
  325. * Availability:
  326. * Non-Carbon CFM: available as macro/inline
  327. * CarbonLib: in CarbonLib 1.0 and later
  328. * Mac OS X: in version 10.0 and later
  329. }
  330. function NewNavPreviewUPP(userRoutine: NavPreviewProcPtr): NavPreviewUPP; external name '_NewNavPreviewUPP'; { old name was NewNavPreviewProc }
  331. {
  332. * NewNavObjectFilterUPP()
  333. *
  334. * Availability:
  335. * Non-Carbon CFM: available as macro/inline
  336. * CarbonLib: in CarbonLib 1.0 and later
  337. * Mac OS X: in version 10.0 and later
  338. }
  339. function NewNavObjectFilterUPP(userRoutine: NavObjectFilterProcPtr): NavObjectFilterUPP; external name '_NewNavObjectFilterUPP'; { old name was NewNavObjectFilterProc }
  340. {
  341. * DisposeNavEventUPP()
  342. *
  343. * Availability:
  344. * Non-Carbon CFM: available as macro/inline
  345. * CarbonLib: in CarbonLib 1.0 and later
  346. * Mac OS X: in version 10.0 and later
  347. }
  348. procedure DisposeNavEventUPP(userUPP: NavEventUPP); external name '_DisposeNavEventUPP';
  349. {
  350. * DisposeNavPreviewUPP()
  351. *
  352. * Availability:
  353. * Non-Carbon CFM: available as macro/inline
  354. * CarbonLib: in CarbonLib 1.0 and later
  355. * Mac OS X: in version 10.0 and later
  356. }
  357. procedure DisposeNavPreviewUPP(userUPP: NavPreviewUPP); external name '_DisposeNavPreviewUPP';
  358. {
  359. * DisposeNavObjectFilterUPP()
  360. *
  361. * Availability:
  362. * Non-Carbon CFM: available as macro/inline
  363. * CarbonLib: in CarbonLib 1.0 and later
  364. * Mac OS X: in version 10.0 and later
  365. }
  366. procedure DisposeNavObjectFilterUPP(userUPP: NavObjectFilterUPP); external name '_DisposeNavObjectFilterUPP';
  367. {
  368. * InvokeNavEventUPP()
  369. *
  370. * Availability:
  371. * Non-Carbon CFM: available as macro/inline
  372. * CarbonLib: in CarbonLib 1.0 and later
  373. * Mac OS X: in version 10.0 and later
  374. }
  375. procedure InvokeNavEventUPP(callBackSelector: NavEventCallbackMessage; callBackParms: NavCBRecPtr; callBackUD: UnivPtr; userRoutine: NavEventUPP); external name '_InvokeNavEventUPP'; { old name was CallNavEventProc }
  376. {
  377. * InvokeNavPreviewUPP()
  378. *
  379. * Availability:
  380. * Non-Carbon CFM: available as macro/inline
  381. * CarbonLib: in CarbonLib 1.0 and later
  382. * Mac OS X: in version 10.0 and later
  383. }
  384. function InvokeNavPreviewUPP(callBackParms: NavCBRecPtr; callBackUD: UnivPtr; userRoutine: NavPreviewUPP): boolean; external name '_InvokeNavPreviewUPP'; { old name was CallNavPreviewProc }
  385. {
  386. * InvokeNavObjectFilterUPP()
  387. *
  388. * Availability:
  389. * Non-Carbon CFM: available as macro/inline
  390. * CarbonLib: in CarbonLib 1.0 and later
  391. * Mac OS X: in version 10.0 and later
  392. }
  393. function InvokeNavObjectFilterUPP(var theItem: AEDesc; info: UnivPtr; callBackUD: UnivPtr; filterMode: NavFilterModes; userRoutine: NavObjectFilterUPP): boolean; external name '_InvokeNavObjectFilterUPP'; { old name was CallNavObjectFilterProc }
  394. type
  395. NavCustomControlMessage = SInt32;
  396. const
  397. kNavCtlShowDesktop = 0; { show desktop, parms = nil }
  398. kNavCtlSortBy = 1; { sort key field, parms->NavSortKeyField }
  399. kNavCtlSortOrder = 2; { sort order, parms->NavSortOrder }
  400. kNavCtlScrollHome = 3; { scroll list home, parms = nil }
  401. kNavCtlScrollEnd = 4; { scroll list end, parms = nil }
  402. kNavCtlPageUp = 5; { page list up, parms = nil }
  403. kNavCtlPageDown = 6; { page list down, parms = nil }
  404. kNavCtlGetLocation = 7; { get current location, parms<-AEDesc* }
  405. kNavCtlSetLocation = 8; { set current location, parms->AEDesc* }
  406. kNavCtlGetSelection = 9; { get current selection, parms<-AEDescList* }
  407. kNavCtlSetSelection = 10; { set current selection, parms->AEDescList* }
  408. kNavCtlShowSelection = 11; { make selection visible, parms = nil }
  409. kNavCtlOpenSelection = 12; { open view of selection, parms = nil }
  410. kNavCtlEjectVolume = 13; { eject volume, parms->vRefNum }
  411. kNavCtlNewFolder = 14; { create a new folder, parms->StringPtr }
  412. kNavCtlCancel = 15; { cancel dialog, parms = nil }
  413. kNavCtlAccept = 16; { accept dialog default, parms = nil }
  414. kNavCtlIsPreviewShowing = 17; { query preview status, parms<-Boolean }
  415. kNavCtlAddControl = 18; { add one control to dialog, parms->ControlHandle }
  416. kNavCtlAddControlList = 19; { add control list to dialog, parms->Handle (DITL rsrc) }
  417. kNavCtlGetFirstControlID = 20; { get 1st control ID, parms<-UInt16 }
  418. kNavCtlSelectCustomType = 21; { select a custom menu item parms->NavMenuItemSpec* }
  419. kNavCtlSelectAllType = 22; { select an "All" menu item parms->SInt16 }
  420. kNavCtlGetEditFileName = 23; { get save dlog's file name parms<-StringPtr }
  421. kNavCtlSetEditFileName = 24; { set save dlog's file name parms->StringPtr }
  422. kNavCtlSelectEditFileName = 25; { select save dlog file name parms->ControlEditTextSelectionRec*, v1.1 or greater }
  423. kNavCtlBrowserSelectAll = 26; { re-scan the browser list parms = nil, v2.0 or greater }
  424. kNavCtlGotoParent = 27; { navigate to parent parms = nil, v2.0 or greater }
  425. kNavCtlSetActionState = 28; { restrict navigation parms->NavActionState (flags), v2.0 or greater }
  426. kNavCtlBrowserRedraw = 29; { rescan browser list parms = nil, v2.0 or greater }
  427. kNavCtlTerminate = 30; { terminate/dismiss dialog parms = nil, v2.0 or greater }
  428. type
  429. NavActionState = UInt32;
  430. const
  431. kNavNormalState = $00000000; { normal/default state }
  432. kNavDontOpenState = $00000001; { disallow opening files/folders }
  433. kNavDontSaveState = $00000002; { disallow saving files }
  434. kNavDontChooseState = $00000004; { disallow choosing objects }
  435. kNavDontNewFolderState = $00000010; { disallow creating new folders }
  436. type
  437. NavPopupMenuItem = UInt16;
  438. const
  439. kNavAllKnownFiles = 0;
  440. kNavAllReadableFiles = 1;
  441. kNavAllFiles = 2;
  442. type
  443. NavSortKeyField = UInt16;
  444. const
  445. kNavSortNameField = 0;
  446. kNavSortDateField = 1;
  447. type
  448. NavSortOrder = UInt16;
  449. const
  450. kNavSortAscending = 0;
  451. kNavSortDescending = 1;
  452. type
  453. NavDialogOptionFlags = UInt32;
  454. const
  455. kNavDefaultNavDlogOptions = $000000E4; { use defaults for all the options }
  456. kNavNoTypePopup = $00000001; { don't show file type/extension popup on Open/Save }
  457. kNavDontAutoTranslate = $00000002; { don't automatically translate on Open }
  458. kNavDontAddTranslateItems = $00000004; { don't add translation choices on Open/Save }
  459. kNavAllFilesInPopup = $00000010; { "All Files" menu item in the type popup on Open }
  460. kNavAllowStationery = $00000020; { allow saving of stationery files }
  461. kNavAllowPreviews = $00000040; { allow preview to show }
  462. kNavAllowMultipleFiles = $00000080; { allow multiple items to be selected }
  463. kNavAllowInvisibleFiles = $00000100; { allow invisible items to be shown }
  464. kNavDontResolveAliases = $00000200; { don't resolve aliases }
  465. kNavSelectDefaultLocation = $00000400; { make the default location the browser selection }
  466. kNavSelectAllReadableItem = $00000800; { make the dialog select "All Readable Documents" on open }
  467. kNavSupportPackages = $00001000; { recognize file system packages, v2.0 or greater }
  468. kNavAllowOpenPackages = $00002000; { allow opening of packages, v2.0 or greater }
  469. kNavDontAddRecents = $00004000; { don't add chosen objects to the recents list, v2.0 or greater }
  470. kNavDontUseCustomFrame = $00008000; { don't draw the custom area bevel frame, v2.0 or greater }
  471. kNavDontConfirmReplacement = $00010000; { don't show the "Replace File?" alert on save conflict, v3.0 or greater }
  472. kNavPreserveSaveFileExtension = $00020000; { extension in default file name is preserved and initially hidden, v3.1 or greater }
  473. type
  474. NavTranslationOptions = UInt32;
  475. const
  476. kNavTranslateInPlace = 0; { translate in place, replacing translation source file (default for Save) }
  477. kNavTranslateCopy = 1; { translate to a copy of the source file (default for Open) }
  478. kNavMenuItemSpecVersion = 0;
  479. type
  480. NavMenuItemSpecPtr = ^NavMenuItemSpec;
  481. NavMenuItemSpec = record
  482. version: UInt16;
  483. menuCreator: OSType;
  484. menuType: OSType;
  485. menuItemName: Str255;
  486. reserved: packed array [0..244] of char;
  487. end;
  488. NavMenuItemSpecArray = array [0..0] of NavMenuItemSpec;
  489. NavMenuItemSpecArrayPtr = ^NavMenuItemSpecArray;
  490. NavMenuItemSpecArrayHandle = ^NavMenuItemSpecArrayPtr;
  491. NavMenuItemSpecHandle = NavMenuItemSpecArrayHandle;
  492. const
  493. kNavGenericSignature = $2A2A2A2A (* '****' *);
  494. type
  495. NavTypeListPtr = ^NavTypeList;
  496. NavTypeList = record
  497. componentSignature: OSType_fix;
  498. reserved: SInt16;
  499. osTypeCount: SInt16;
  500. osType: array [0..0] of OSType_fix;
  501. end;
  502. NavTypeListHandle = ^NavTypeListPtr;
  503. const
  504. kNavDialogOptionsVersion = 0;
  505. type
  506. NavDialogOptionsPtr = ^NavDialogOptions;
  507. NavDialogOptions = record
  508. version: UInt16;
  509. dialogOptionFlags: NavDialogOptionFlags; { option flags for affecting the dialog's behavior }
  510. location: Point; { top-left location of the dialog, or (-1,-1) for default position }
  511. clientName: Str255;
  512. windowTitle: Str255;
  513. actionButtonLabel: Str255; { label of the default button (or null string for default) }
  514. cancelButtonLabel: Str255; { label of the cancel button (or null string for default) }
  515. savedFileName: Str255; { default name for text box in NavPutFile (or null string for default) }
  516. message: Str255; { custom message prompt (or null string for default) }
  517. preferenceKey: UInt32; { a key for to managing preferences for using multiple utility dialogs }
  518. popupExtension: NavMenuItemSpecArrayHandle; { extended popup menu items, an array of NavMenuItemSpecs }
  519. reserved: packed array [0..493] of char;
  520. end;
  521. const
  522. kNavReplyRecordVersion = 2;
  523. {
  524. * NavReplyRecord
  525. *
  526. * Summary:
  527. * A structure describing the results of a Nav Services dialog
  528. *
  529. * Discussion:
  530. * A reply record is the result of a Nav Services file dialog. Using
  531. * the older API, which is always modal, the client passes the
  532. * address of a reply record when invoking the dialog. In the Carbon
  533. * API, dialogs may also be window modal or modeless, so the client
  534. * requests the reply record by calling NavDialogGetReply when a
  535. * kNavCBUserAction event is received. Either way, a reply record
  536. * should be disposed of using NavDisposeReply.
  537. }
  538. type
  539. NavReplyRecordPtr = ^NavReplyRecord;
  540. NavReplyRecord = record
  541. version: UInt16;
  542. validRecord: boolean;
  543. replacing: boolean;
  544. isStationery: boolean;
  545. translationNeeded: boolean;
  546. selection: AEDescList;
  547. keyScript: ScriptCode;
  548. fileTranslation: FileTranslationSpecArrayHandle;
  549. reserved1: UInt32;
  550. saveFileName: CFStringRef;
  551. saveFileExtensionHidden: boolean;
  552. reserved2: SInt8;
  553. reserved: packed array [0..224] of char;
  554. end;
  555. {
  556. * NavLoad()
  557. *
  558. * Availability:
  559. * Non-Carbon CFM: in NavigationLib 1.0 and later
  560. * CarbonLib: in CarbonLib 1.0 and later
  561. * Mac OS X: not available
  562. }
  563. function NavLoad: OSErr; external name '_NavLoad';
  564. {
  565. * NavUnload()
  566. *
  567. * Availability:
  568. * Non-Carbon CFM: in NavigationLib 1.0 and later
  569. * CarbonLib: in CarbonLib 1.0 and later
  570. * Mac OS X: not available
  571. }
  572. function NavUnload: OSErr; external name '_NavUnload';
  573. {
  574. * NavLibraryVersion()
  575. *
  576. * Availability:
  577. * Non-Carbon CFM: in NavigationLib 1.0 and later
  578. * CarbonLib: in CarbonLib 1.0 and later
  579. * Mac OS X: in version 10.0 and later
  580. }
  581. function NavLibraryVersion: UInt32; external name '_NavLibraryVersion';
  582. {
  583. * NavGetDefaultDialogOptions()
  584. *
  585. * Availability:
  586. * Non-Carbon CFM: in NavigationLib 1.0 and later
  587. * CarbonLib: in CarbonLib 1.0 and later
  588. * Mac OS X: in version 10.0 and later
  589. }
  590. function NavGetDefaultDialogOptions(var dialogOptions: NavDialogOptions): OSErr; external name '_NavGetDefaultDialogOptions';
  591. {
  592. * NavGetFile()
  593. *
  594. * Availability:
  595. * Non-Carbon CFM: in NavigationLib 1.0 and later
  596. * CarbonLib: in CarbonLib 1.0 and later
  597. * Mac OS X: in version 10.0 and later
  598. }
  599. function NavGetFile(defaultLocation: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; previewProc: NavPreviewUPP; filterProc: NavObjectFilterUPP; typeList: NavTypeListHandle; callBackUD: UnivPtr): OSErr; external name '_NavGetFile';
  600. {
  601. * NavPutFile()
  602. *
  603. * Availability:
  604. * Non-Carbon CFM: in NavigationLib 1.0 and later
  605. * CarbonLib: in CarbonLib 1.0 and later
  606. * Mac OS X: in version 10.0 and later
  607. }
  608. function NavPutFile(defaultLocation: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; fileType: OSType; fileCreator: OSType; callBackUD: UnivPtr): OSErr; external name '_NavPutFile';
  609. {
  610. * NavAskSaveChanges()
  611. *
  612. * Availability:
  613. * Non-Carbon CFM: in NavigationLib 1.0 and later
  614. * CarbonLib: in CarbonLib 1.0 and later
  615. * Mac OS X: in version 10.0 and later
  616. }
  617. function NavAskSaveChanges(var dialogOptions: NavDialogOptions; action: NavAskSaveChangesAction; var reply: NavAskSaveChangesResult; eventProc: NavEventUPP; callBackUD: UnivPtr): OSErr; external name '_NavAskSaveChanges';
  618. {
  619. * NavCustomAskSaveChanges()
  620. *
  621. * Availability:
  622. * Non-Carbon CFM: in NavigationLib 1.0 and later
  623. * CarbonLib: in CarbonLib 1.0 and later
  624. * Mac OS X: in version 10.0 and later
  625. }
  626. function NavCustomAskSaveChanges(var dialogOptions: NavDialogOptions; var reply: NavAskSaveChangesResult; eventProc: NavEventUPP; callBackUD: UnivPtr): OSErr; external name '_NavCustomAskSaveChanges';
  627. {
  628. * NavAskDiscardChanges()
  629. *
  630. * Availability:
  631. * Non-Carbon CFM: in NavigationLib 1.0 and later
  632. * CarbonLib: in CarbonLib 1.0 and later
  633. * Mac OS X: in version 10.0 and later
  634. }
  635. function NavAskDiscardChanges(var dialogOptions: NavDialogOptions; var reply: NavAskDiscardChangesResult; eventProc: NavEventUPP; callBackUD: UnivPtr): OSErr; external name '_NavAskDiscardChanges';
  636. {
  637. * NavChooseFile()
  638. *
  639. * Availability:
  640. * Non-Carbon CFM: in NavigationLib 1.0 and later
  641. * CarbonLib: in CarbonLib 1.0 and later
  642. * Mac OS X: in version 10.0 and later
  643. }
  644. function NavChooseFile(defaultLocation: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; previewProc: NavPreviewUPP; filterProc: NavObjectFilterUPP; typeList: NavTypeListHandle; callBackUD: UnivPtr): OSErr; external name '_NavChooseFile';
  645. {
  646. * NavChooseFolder()
  647. *
  648. * Availability:
  649. * Non-Carbon CFM: in NavigationLib 1.0 and later
  650. * CarbonLib: in CarbonLib 1.0 and later
  651. * Mac OS X: in version 10.0 and later
  652. }
  653. function NavChooseFolder(defaultLocation: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; filterProc: NavObjectFilterUPP; callBackUD: UnivPtr): OSErr; external name '_NavChooseFolder';
  654. {
  655. * NavChooseVolume()
  656. *
  657. * Availability:
  658. * Non-Carbon CFM: in NavigationLib 1.0 and later
  659. * CarbonLib: in CarbonLib 1.0 and later
  660. * Mac OS X: in version 10.0 and later
  661. }
  662. function NavChooseVolume(defaultSelection: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; filterProc: NavObjectFilterUPP; callBackUD: UnivPtr): OSErr; external name '_NavChooseVolume';
  663. {
  664. * NavChooseObject()
  665. *
  666. * Availability:
  667. * Non-Carbon CFM: in NavigationLib 1.0 and later
  668. * CarbonLib: in CarbonLib 1.0 and later
  669. * Mac OS X: in version 10.0 and later
  670. }
  671. function NavChooseObject(defaultLocation: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; filterProc: NavObjectFilterUPP; callBackUD: UnivPtr): OSErr; external name '_NavChooseObject';
  672. {
  673. * NavNewFolder()
  674. *
  675. * Availability:
  676. * Non-Carbon CFM: in NavigationLib 1.0 and later
  677. * CarbonLib: in CarbonLib 1.0 and later
  678. * Mac OS X: in version 10.0 and later
  679. }
  680. function NavNewFolder(defaultLocation: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; callBackUD: UnivPtr): OSErr; external name '_NavNewFolder';
  681. {
  682. * NavTranslateFile()
  683. *
  684. * Availability:
  685. * Non-Carbon CFM: in NavigationLib 1.0 and later
  686. * CarbonLib: in CarbonLib 1.0 and later
  687. * Mac OS X: in version 10.0 and later
  688. }
  689. function NavTranslateFile(var reply: NavReplyRecord; howToTranslate: NavTranslationOptions): OSErr; external name '_NavTranslateFile';
  690. {
  691. * NavCompleteSave()
  692. *
  693. * Availability:
  694. * Non-Carbon CFM: in NavigationLib 1.0 and later
  695. * CarbonLib: in CarbonLib 1.0 and later
  696. * Mac OS X: in version 10.0 and later
  697. }
  698. function NavCompleteSave(var reply: NavReplyRecord; howToTranslate: NavTranslationOptions): OSErr; external name '_NavCompleteSave';
  699. {
  700. * NavCustomControl()
  701. *
  702. * Availability:
  703. * Non-Carbon CFM: in NavigationLib 1.0 and later
  704. * CarbonLib: in CarbonLib 1.0 and later
  705. * Mac OS X: in version 10.0 and later
  706. }
  707. function NavCustomControl(dialog: NavDialogRef; selector: NavCustomControlMessage; parms: UnivPtr): OSErr; external name '_NavCustomControl';
  708. {
  709. * NavCreatePreview()
  710. *
  711. * Availability:
  712. * Non-Carbon CFM: in NavigationLib 2.0 and later
  713. * CarbonLib: in CarbonLib 1.0 and later
  714. * Mac OS X: in version 10.0 and later
  715. }
  716. function NavCreatePreview(var theObject: AEDesc; previewDataType: OSType; previewData: UnivPtr; previewDataSize: Size): OSErr; external name '_NavCreatePreview';
  717. {
  718. * NavDisposeReply()
  719. *
  720. * Availability:
  721. * Non-Carbon CFM: in NavigationLib 1.0 and later
  722. * CarbonLib: in CarbonLib 1.0 and later
  723. * Mac OS X: in version 10.0 and later
  724. }
  725. function NavDisposeReply(var reply: NavReplyRecord): OSErr; external name '_NavDisposeReply';
  726. {
  727. * NavServicesCanRun()
  728. *
  729. * Availability:
  730. * Non-Carbon CFM: in NavigationLib 1.0 and later
  731. * CarbonLib: in CarbonLib 1.0 and later
  732. * Mac OS X: not available
  733. }
  734. function NavServicesCanRun: boolean; external name '_NavServicesCanRun';
  735. {$ifc TARGET_RT_MAC_CFM}
  736. {
  737. NavServicesAvailable() is a macro available only in C/C++.
  738. To get the same functionality from pascal or assembly, you need
  739. to test if NavigationLib functions are not NULL and call NavServicesCanRun()
  740. which will test if NavServices is properly installed. For instance:
  741. gNavServicesAvailable = FALSE;
  742. IF @NavLibraryVersion <> kUnresolvedCFragSymbolAddress THEN
  743. gNavServicesAvailable = NavServicesCanRun;
  744. end
  745. }
  746. {$elsec}
  747. {$ifc TARGET_RT_MAC_MACHO}
  748. { Navigation is always available on OS X }
  749. {$elsec}
  750. { NavServicesAvailable() is implemented in Navigation.o for classic 68K clients }
  751. {$ifc CALL_NOT_IN_CARBON}
  752. {
  753. * NavServicesAvailable()
  754. *
  755. * Availability:
  756. * Non-Carbon CFM: not available
  757. * CarbonLib: not available
  758. * Mac OS X: not available
  759. }
  760. function NavServicesAvailable: boolean; external name '_NavServicesAvailable';
  761. {$endc} {CALL_NOT_IN_CARBON}
  762. {$endc}
  763. {$endc}
  764. { Carbon API }
  765. { Includes support for Unicode and long file names (where available). }
  766. const
  767. kNavDialogCreationOptionsVersion = 0;
  768. {
  769. * NavDialogCreationOptions
  770. *
  771. * Summary:
  772. * Options used to control the appearance and operation of a Nav
  773. * Services dialog
  774. *
  775. * Discussion:
  776. * NavDialogCreationOptions is a preferred replacement for
  777. * NavDialogOptions. The new structure uses CFStrings in place of
  778. * Pascal strings, and adds fields for setting the dialog modality
  779. * and the parent window (for sheet dialogs). A
  780. * NavDialogCreationOptions structure can be initialized using
  781. * NavDialogGetDefaultCreationOptions. Each of the NavCreate*Dialog
  782. * functions accepts a pointer to the client's
  783. * NavDialogCreationOptions structure.
  784. }
  785. type
  786. NavDialogCreationOptionsPtr = ^NavDialogCreationOptions;
  787. NavDialogCreationOptions = record
  788. version: UInt16;
  789. optionFlags: NavDialogOptionFlags;
  790. location: Point;
  791. clientName: CFStringRef;
  792. windowTitle: CFStringRef;
  793. actionButtonLabel: CFStringRef;
  794. cancelButtonLabel: CFStringRef;
  795. saveFileName: CFStringRef;
  796. message: CFStringRef;
  797. preferenceKey: UInt32;
  798. popupExtension: CFArrayRef;
  799. modality: WindowModality;
  800. parentWindow: WindowRef;
  801. reserved: packed array [0..15] of char;
  802. end;
  803. {
  804. * NavGetDefaultDialogCreationOptions()
  805. *
  806. * Summary:
  807. * Initialize the input structure to default values
  808. *
  809. * Discussion:
  810. * Provided as a convenience to obtain the preferred default options
  811. * for use in creating any Nav Services dialog.
  812. *
  813. * Parameters:
  814. *
  815. * outOptions:
  816. * A pointer to the client-allocated options structure to
  817. * initialize
  818. *
  819. * Result:
  820. * A status code
  821. *
  822. * Availability:
  823. * Non-Carbon CFM: not available
  824. * CarbonLib: in CarbonLib 1.1 and later
  825. * Mac OS X: in version 10.0 and later
  826. }
  827. function NavGetDefaultDialogCreationOptions(var outOptions: NavDialogCreationOptions): OSStatus; external name '_NavGetDefaultDialogCreationOptions';
  828. {
  829. * NavCreateGetFileDialog()
  830. *
  831. * Summary:
  832. * Create a GetFile dialog
  833. *
  834. * Discussion:
  835. * Use this function to create a dialog designed for opening
  836. * document files. This function replaces NavGetFile, allowing new
  837. * window modalities, and adding Unicode support. Upon successful
  838. * creation, the dialog is not visible. Present and run the dialog
  839. * with NavDialogRun. After the dialog is complete, dispose of it
  840. * with NavDialogDispose.
  841. *
  842. * Parameters:
  843. *
  844. * inOptions:
  845. * Options controlling the appearance and behavior of the dialog
  846. *
  847. * inTypeList:
  848. * A creator signature and list of file types to show in the
  849. * dialog file browser. If NULL, show all files.
  850. *
  851. * inEventProc:
  852. * The UPP for the client's event callack, or NULL for no event
  853. * callback
  854. *
  855. * inPreviewProc:
  856. * The UPP for the client's custom file preview callback, or NULL
  857. * for standard previews
  858. *
  859. * inFilterProc:
  860. * The UPP for the client's custom filter callback, or NULL for no
  861. * custom file filtering
  862. *
  863. * inClientData:
  864. * A client-defined context value passed to all callback functions
  865. *
  866. * outDialog:
  867. * Upon successful completion, a reference to the created dialog
  868. *
  869. * Result:
  870. * A status code
  871. *
  872. * Availability:
  873. * Non-Carbon CFM: not available
  874. * CarbonLib: in CarbonLib 1.1 and later
  875. * Mac OS X: in version 10.0 and later
  876. }
  877. function NavCreateGetFileDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inTypeList: NavTypeListHandle; inEventProc: NavEventUPP; inPreviewProc: NavPreviewUPP; inFilterProc: NavObjectFilterUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateGetFileDialog';
  878. {
  879. * NavCreatePutFileDialog()
  880. *
  881. * Summary:
  882. * Create a PutFile dialog
  883. *
  884. * Discussion:
  885. * Use this function to create a dialog designed for setting the
  886. * name and location of a document file prior to saving. This
  887. * function replaces NavPutFile, allowing new window modalities, and
  888. * adding Unicode support. Upon successful creation, the dialog is
  889. * not visible. Present and run the dialog with NavDialogRun. After
  890. * the dialog is complete, dispose of it with NavDialogDispose.
  891. *
  892. * Parameters:
  893. *
  894. * inOptions:
  895. * Options controlling the appearance and behavior of the dialog
  896. *
  897. * inFileType:
  898. * The type of the file to be saved. This parameter is used in
  899. * conjunction with the inFileCreator parameter to look up the
  900. * kind string for the Format popup menu, and to drive the
  901. * identification of translation options.
  902. *
  903. * inFileCreator:
  904. * The creator signature of the file to be saved (see inFileType
  905. * parameter)
  906. *
  907. * inEventProc:
  908. * The UPP for the client's event callack, or NULL for no event
  909. * callback
  910. *
  911. * inClientData:
  912. * A client-defined context value passed to all callback functions
  913. *
  914. * outDialog:
  915. * Upon successful completion, a reference to the created dialog
  916. *
  917. * Result:
  918. * A status code
  919. *
  920. * Availability:
  921. * Non-Carbon CFM: not available
  922. * CarbonLib: in CarbonLib 1.1 and later
  923. * Mac OS X: in version 10.0 and later
  924. }
  925. function NavCreatePutFileDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inFileType: OSType; inFileCreator: OSType; inEventProc: NavEventUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreatePutFileDialog';
  926. {
  927. * NavCreateAskReviewDocumentsDialog()
  928. *
  929. * Summary:
  930. * Create an AskReviewDocumentsDialog dialog
  931. *
  932. * Discussion:
  933. * Use this function to create a dialog which tells the user how
  934. * many unsaved documents there are, and asks the user to start
  935. * reviewing the documents, don't save any documents, or cancel.
  936. * This dialog is appropriate to use when an application is quitting
  937. * and there is more than one unsaved document. It is supported only
  938. * on Mac OS X because the HI guidelines for earlier versions of Mac
  939. * OS do not include this dialog as part of the application quit
  940. * sequence. Upon successful creation, the dialog is not visible.
  941. * Present and run the dialog with NavDialogRun. After the dialog is
  942. * complete, dispose of it with NavDialogDispose. Upon dismissal of
  943. * the dialog, this dialog's user action will be set to one of the
  944. * following: kNavUserActionReviewDocuments,
  945. * kNavUserActionDiscardDocuments, or kNavUserActionCancel.
  946. *
  947. * Parameters:
  948. *
  949. * inOptions:
  950. * Options controlling the appearance and behavior of the dialog
  951. *
  952. * inDocumentCount:
  953. * Indicates the number of documents needing review. This number
  954. * appears in the text presented to the user. If for any reason
  955. * the total number of unsaved documents is unknown, specify 0,
  956. * and an ambiguous message will appear. Do not specifiy 1, since
  957. * the HI guidelines call for this alert only when there is more
  958. * than one document to be reviewed.
  959. *
  960. * inEventProc:
  961. * The UPP for the client's event callack, or NULL for no event
  962. * callback
  963. *
  964. * inClientData:
  965. * A client-defined context value passed to all callback functions
  966. *
  967. * outDialog:
  968. * Upon successful completion, a reference to the created dialog
  969. *
  970. * Result:
  971. * A status code
  972. *
  973. * Availability:
  974. * Non-Carbon CFM: not available
  975. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  976. * Mac OS X: in version 10.1 and later
  977. }
  978. function NavCreateAskReviewDocumentsDialog(const (*var*) inOptions: NavDialogCreationOptions; inDocumentCount: UInt32; inEventProc: NavEventUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateAskReviewDocumentsDialog';
  979. {
  980. * NavCreateAskSaveChangesDialog()
  981. *
  982. * Summary:
  983. * Create an AskSaveChanges dialog
  984. *
  985. * Discussion:
  986. * Use this function to create a dialog which asks the user to save,
  987. * don't save or cancel closing a document with unsaved changes.
  988. * This function replaces NavAskSaveChanges and
  989. * NavCustomAskSaveChanges, allowing new window modalities, and
  990. * adding Unicode support. Upon successful creation, the dialog is
  991. * not visible. Present and run the dialog with NavDialogRun. After
  992. * the dialog is complete, dispose of it with NavDialogDispose. To
  993. * provide a customized message for the alert, specify an non-NULL
  994. * message value in the options structure.
  995. *
  996. * Parameters:
  997. *
  998. * inOptions:
  999. * Options controlling the appearance and behavior of the dialog
  1000. *
  1001. * inAction:
  1002. * Indicates this usage context for this dialog: closing a
  1003. * document or quitting an application. This setting affects the
  1004. * message text displayed to the user.
  1005. *
  1006. * inEventProc:
  1007. * The UPP for the client's event callack, or NULL for no event
  1008. * callback
  1009. *
  1010. * inClientData:
  1011. * A client-defined context value passed to all callback functions
  1012. *
  1013. * outDialog:
  1014. * Upon successful completion, a reference to the created dialog
  1015. *
  1016. * Result:
  1017. * A status code
  1018. *
  1019. * Availability:
  1020. * Non-Carbon CFM: not available
  1021. * CarbonLib: in CarbonLib 1.1 and later
  1022. * Mac OS X: in version 10.0 and later
  1023. }
  1024. function NavCreateAskSaveChangesDialog(const (*var*) inOptions: NavDialogCreationOptions; inAction: NavAskSaveChangesAction; inEventProc: NavEventUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateAskSaveChangesDialog';
  1025. {
  1026. * NavCreateAskDiscardChangesDialog()
  1027. *
  1028. * Summary:
  1029. * Create an AskDiscardChanges dialog
  1030. *
  1031. * Discussion:
  1032. * Use this function to create a dialog which asks the user to
  1033. * discard changes to a document or cancel. This is most often use
  1034. * when the user wants to revert a a document to the last saved
  1035. * revision. This function replaces NavAskDiscardChanges, allowing
  1036. * new window modalities, and adding Unicode support. Upon
  1037. * successful creation, the dialog is not visible. Present and run
  1038. * the dialog with NavDialogRun. After the dialog is complete,
  1039. * dispose of it with NavDialogDispose.
  1040. *
  1041. * Parameters:
  1042. *
  1043. * inOptions:
  1044. * Options controlling the appearance and behavior of the dialog
  1045. *
  1046. * inEventProc:
  1047. * The UPP for the client's event callack, or NULL for no event
  1048. * callback
  1049. *
  1050. * inClientData:
  1051. * A client-defined context value passed to all callback functions
  1052. *
  1053. * outDialog:
  1054. * Upon successful completion, a reference to the created dialog
  1055. *
  1056. * Result:
  1057. * A status code
  1058. *
  1059. * Availability:
  1060. * Non-Carbon CFM: not available
  1061. * CarbonLib: in CarbonLib 1.1 and later
  1062. * Mac OS X: in version 10.0 and later
  1063. }
  1064. function NavCreateAskDiscardChangesDialog(const (*var*) inOptions: NavDialogCreationOptions; inEventProc: NavEventUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateAskDiscardChangesDialog';
  1065. {
  1066. * NavCreateChooseFileDialog()
  1067. *
  1068. * Summary:
  1069. * Create a ChooseFile dialog
  1070. *
  1071. * Discussion:
  1072. * Use this function to create a dialog designed for selecting one
  1073. * file as the target of an operation. A ChooseFile dialog is a
  1074. * simple version a GetFile dialog. This function replaces
  1075. * NavChooseFile, allowing new window modalities, and adding Unicode
  1076. * support. Upon successful creation, the dialog is not visible.
  1077. * Present and run the dialog with NavDialogRun. After the dialog is
  1078. * complete, dispose of it with NavDialogDispose.
  1079. *
  1080. * Parameters:
  1081. *
  1082. * inOptions:
  1083. * Options controlling the appearance and behavior of the dialog
  1084. *
  1085. * inTypeList:
  1086. * A creator signature and list of file types to show in the
  1087. * dialog file browser. If NULL, show all files.
  1088. *
  1089. * inEventProc:
  1090. * The UPP for the client's event callack, or NULL for no event
  1091. * callback
  1092. *
  1093. * inPreviewProc:
  1094. * The UPP for the client's custom file preview callback, or NULL
  1095. * for standard previews
  1096. *
  1097. * inFilterProc:
  1098. * The UPP for the client's custom filter callback, or NULL for no
  1099. * custom file filtering
  1100. *
  1101. * inClientData:
  1102. * A client-defined context value passed to all callback functions
  1103. *
  1104. * outDialog:
  1105. * Upon successful completion, a reference to the created dialog
  1106. *
  1107. * Result:
  1108. * A status code
  1109. *
  1110. * Availability:
  1111. * Non-Carbon CFM: not available
  1112. * CarbonLib: in CarbonLib 1.1 and later
  1113. * Mac OS X: in version 10.0 and later
  1114. }
  1115. function NavCreateChooseFileDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inTypeList: NavTypeListHandle; inEventProc: NavEventUPP; inPreviewProc: NavPreviewUPP; inFilterProc: NavObjectFilterUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateChooseFileDialog';
  1116. {
  1117. * NavCreateChooseFolderDialog()
  1118. *
  1119. * Summary:
  1120. * Create a ChooseFolder dialog
  1121. *
  1122. * Discussion:
  1123. * Use this function to create a dialog designed for selecting a
  1124. * folder as the target of an operation. This function replaces
  1125. * NavChooseFolder, allowing new window modalities, and adding
  1126. * Unicode support. Upon successful creation, the dialog is not
  1127. * visible. Present and run the dialog with NavDialogRun. After the
  1128. * dialog is complete, dispose of it with NavDialogDispose.
  1129. *
  1130. * Parameters:
  1131. *
  1132. * inOptions:
  1133. * Options controlling the appearance and behavior of the dialog
  1134. *
  1135. * inEventProc:
  1136. * The UPP for the client's event callack, or NULL for no event
  1137. * callback
  1138. *
  1139. * inFilterProc:
  1140. * The UPP for the client's custom filter callback, or NULL for no
  1141. * custom file filtering
  1142. *
  1143. * inClientData:
  1144. * A client-defined context value passed to all callback functions
  1145. *
  1146. * outDialog:
  1147. * Upon successful completion, a reference to the created dialog
  1148. *
  1149. * Result:
  1150. * A status code
  1151. *
  1152. * Availability:
  1153. * Non-Carbon CFM: not available
  1154. * CarbonLib: in CarbonLib 1.1 and later
  1155. * Mac OS X: in version 10.0 and later
  1156. }
  1157. function NavCreateChooseFolderDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inEventProc: NavEventUPP; inFilterProc: NavObjectFilterUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateChooseFolderDialog';
  1158. {
  1159. * NavCreateChooseVolumeDialog()
  1160. *
  1161. * Summary:
  1162. * Create a ChooseVolume dialog
  1163. *
  1164. * Discussion:
  1165. * Use this function to create a dialog designed for selecting a
  1166. * volume as the target of an operation. This function replaces
  1167. * NavChooseVolume, allowing new window modalities, and adding
  1168. * Unicode support. Upon successful creation, the dialog is not
  1169. * visible. Present and run the dialog with NavDialogRun. After the
  1170. * dialog is complete, dispose of it with NavDialogDispose.
  1171. *
  1172. * Parameters:
  1173. *
  1174. * inOptions:
  1175. * Options controlling the appearance and behavior of the dialog
  1176. *
  1177. * inEventProc:
  1178. * The UPP for the client's event callack, or NULL for no event
  1179. * callback
  1180. *
  1181. * inFilterProc:
  1182. * The UPP for the client's custom filter callback, or NULL for no
  1183. * custom file filtering
  1184. *
  1185. * inClientData:
  1186. * A client-defined context value passed to all callback functions
  1187. *
  1188. * outDialog:
  1189. * Upon successful completion, a reference to the created dialog
  1190. *
  1191. * Result:
  1192. * A status code
  1193. *
  1194. * Availability:
  1195. * Non-Carbon CFM: not available
  1196. * CarbonLib: in CarbonLib 1.1 and later
  1197. * Mac OS X: in version 10.0 and later
  1198. }
  1199. function NavCreateChooseVolumeDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inEventProc: NavEventUPP; inFilterProc: NavObjectFilterUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateChooseVolumeDialog';
  1200. {
  1201. * NavCreateChooseObjectDialog()
  1202. *
  1203. * Summary:
  1204. * Create a ChooseObject dialog
  1205. *
  1206. * Discussion:
  1207. * Use this function to create a dialog designed for selecting a
  1208. * file, folder, or volume as the target of an operation. This
  1209. * function replaces NavChooseObject, allowing new window
  1210. * modalities, and adding Unicode support. Upon successful creation,
  1211. * the dialog is not visible. Present and run the dialog with
  1212. * NavDialogRun. After the dialog is complete, dispose of it with
  1213. * NavDialogDispose.
  1214. *
  1215. * Parameters:
  1216. *
  1217. * inOptions:
  1218. * Options controlling the appearance and behavior of the dialog
  1219. *
  1220. * inEventProc:
  1221. * The UPP for the client's event callack, or NULL for no event
  1222. * callback
  1223. *
  1224. * inPreviewProc:
  1225. * The UPP for the client's custom file preview callback, or NULL
  1226. * for standard previews
  1227. *
  1228. * inFilterProc:
  1229. * The UPP for the client's custom filter callback, or NULL for no
  1230. * custom file filtering
  1231. *
  1232. * inClientData:
  1233. * A client-defined context value passed to all callback functions
  1234. *
  1235. * outDialog:
  1236. * Upon successful completion, a reference to the created dialog
  1237. *
  1238. * Result:
  1239. * A status code
  1240. *
  1241. * Availability:
  1242. * Non-Carbon CFM: not available
  1243. * CarbonLib: in CarbonLib 1.1 and later
  1244. * Mac OS X: in version 10.0 and later
  1245. }
  1246. function NavCreateChooseObjectDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inEventProc: NavEventUPP; inPreviewProc: NavPreviewUPP; inFilterProc: NavObjectFilterUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateChooseObjectDialog';
  1247. {
  1248. * NavCreateNewFolderDialog()
  1249. *
  1250. * Summary:
  1251. * Create a NewFolder dialog
  1252. *
  1253. * Discussion:
  1254. * Use this function to create a dialog designed for creating a new
  1255. * folder. Nav Services creates the folder as specified by the user
  1256. * and returns a reference to the folder in the selection field of
  1257. * the reply record. This function replaces NavNewFolder, allowing
  1258. * new window modalities, and adding Unicode support. Upon
  1259. * successful creation, the dialog is not visible. Present and run
  1260. * the dialog with NavDialogRun. After the dialog is complete,
  1261. * dispose of it with NavDialogDispose.
  1262. *
  1263. * Parameters:
  1264. *
  1265. * inOptions:
  1266. * Options controlling the appearance and behavior of the dialog
  1267. *
  1268. * inEventProc:
  1269. * The UPP for the client's event callack, or NULL for no event
  1270. * callback
  1271. *
  1272. * inClientData:
  1273. * A client-defined context value passed to all callback functions
  1274. *
  1275. * outDialog:
  1276. * Upon successful completion, a reference to the created dialog
  1277. *
  1278. * Result:
  1279. * A status code
  1280. *
  1281. * Availability:
  1282. * Non-Carbon CFM: not available
  1283. * CarbonLib: in CarbonLib 1.1 and later
  1284. * Mac OS X: in version 10.0 and later
  1285. }
  1286. function NavCreateNewFolderDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inEventProc: NavEventUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateNewFolderDialog';
  1287. {
  1288. * NavDialogRun()
  1289. *
  1290. * Summary:
  1291. * Show and run a Nav Services dialog
  1292. *
  1293. * Discussion:
  1294. * After a dialog is created with a NavCreate*Dialog function, the
  1295. * client can modify the dialog target folder or save file name
  1296. * using NavCustomControl with the appropriate selectors. The dialog
  1297. * is presented to the user by calling NavDialogRun. If the dialog
  1298. * is system modal or application modal (kWindowModalitySystemModal,
  1299. * kWindowModalityAppModal), NavDialogRun does not return until the
  1300. * dialog has been dismissed. If the dialog is modeless or window
  1301. * modal (kWindowModalityNone, kWindowModalityWindowModal),
  1302. * NavDialogRun shows the dialog and returns immediately. In order
  1303. * to know when the dialog has been dismissed, the client must watch
  1304. * for the kNavCBUserAction event sent to the client event proc.
  1305. * Note that on Mac OS 9 and earlier, all dialogs are modal, even if
  1306. * a modeless or window modal dialog is requested. However, the
  1307. * kNavCBUserAction event is still sent to the event proc, so it's
  1308. * possible to use a single programming model on OS 9 and OS X
  1309. * provided the client assumes NavDialogRun returns immediately
  1310. * after showing the dialog.
  1311. *
  1312. * Parameters:
  1313. *
  1314. * inDialog:
  1315. * The dialog to run
  1316. *
  1317. * Result:
  1318. * A status code
  1319. *
  1320. * Availability:
  1321. * Non-Carbon CFM: not available
  1322. * CarbonLib: in CarbonLib 1.1 and later
  1323. * Mac OS X: in version 10.0 and later
  1324. }
  1325. function NavDialogRun(inDialog: NavDialogRef): OSStatus; external name '_NavDialogRun';
  1326. {
  1327. * NavDialogDispose()
  1328. *
  1329. * Summary:
  1330. * Dispose of a Nav Services dialog
  1331. *
  1332. * Discussion:
  1333. * Call this function when completely finished with a Nav Services
  1334. * dialog. After calling NavDialogDispose, the dialog reference is
  1335. * no longer valid. NavDialogDispose is safe to call from within a
  1336. * callback to the client's Nav Services event proc.
  1337. *
  1338. * Parameters:
  1339. *
  1340. * inDialog:
  1341. * The dialog to dispose
  1342. *
  1343. * Availability:
  1344. * Non-Carbon CFM: not available
  1345. * CarbonLib: in CarbonLib 1.1 and later
  1346. * Mac OS X: in version 10.0 and later
  1347. }
  1348. procedure NavDialogDispose(inDialog: NavDialogRef); external name '_NavDialogDispose';
  1349. {
  1350. * NavDialogGetWindow()
  1351. *
  1352. * Summary:
  1353. * Return the window in which a Nav Services dialog appears
  1354. *
  1355. * Discussion:
  1356. * Note that a valid NavDialogRef may not have a window until
  1357. * NavDialogRun has been called. If no window exists for the dialog,
  1358. * NavDialogGetWindow returns NULL.
  1359. *
  1360. * Parameters:
  1361. *
  1362. * inDialog:
  1363. * Which dialog
  1364. *
  1365. * Result:
  1366. * The window reference
  1367. *
  1368. * Availability:
  1369. * Non-Carbon CFM: not available
  1370. * CarbonLib: in CarbonLib 1.1 and later
  1371. * Mac OS X: in version 10.0 and later
  1372. }
  1373. function NavDialogGetWindow(inDialog: NavDialogRef): WindowRef; external name '_NavDialogGetWindow';
  1374. {
  1375. * NavDialogGetUserAction()
  1376. *
  1377. * Summary:
  1378. * Return the current user action taken by the user
  1379. *
  1380. * Discussion:
  1381. * A user action occurs when the user dismisses the dialog or
  1382. * otherwise does something generating a reply record that the
  1383. * client needs to act upon. If the user has not taken such an
  1384. * action, NavDialogGetUserAction returns kNavUserActionNone. If the
  1385. * dialog is terminated using the NavCustomControl selector
  1386. * kNavCtlTerminate, the final user action is kNavUserActionNone.
  1387. * For file dialogs, if the final user action is not
  1388. * kNavUserActionCancel, then there is a valid reply record which
  1389. * can be obtained with NavDialogGetReply. Although the user action
  1390. * is sent to the client event proc as a kNavCBUserAction event,
  1391. * this function is provided as a convenience for clients of modal
  1392. * dialogs who may find it easier to get the user action immediately
  1393. * after NavDialogRun returns.
  1394. *
  1395. * Parameters:
  1396. *
  1397. * inDialog:
  1398. * Which dialog
  1399. *
  1400. * Result:
  1401. * The user action
  1402. *
  1403. * Availability:
  1404. * Non-Carbon CFM: not available
  1405. * CarbonLib: in CarbonLib 1.1 and later
  1406. * Mac OS X: in version 10.0 and later
  1407. }
  1408. function NavDialogGetUserAction(inDialog: NavDialogRef): NavUserAction; external name '_NavDialogGetUserAction';
  1409. {
  1410. * NavDialogGetReply()
  1411. *
  1412. * Summary:
  1413. * Fill in the provided reply record with the results of a user
  1414. * action such as kNavUserActionOpen, kNavUserActionSaveAs, or
  1415. * kNavUserActionChoose.
  1416. *
  1417. * Discussion:
  1418. * Call this function when a file dialog receives a user action
  1419. * other that implies an item or items to open, save, etc. Upon
  1420. * successful completion, the reply record describes the item(s)
  1421. * that the client needs to act upon. The reply record should later
  1422. * be disposed of with NavDisposeReply.
  1423. *
  1424. * Parameters:
  1425. *
  1426. * inDialog:
  1427. * Which dialog
  1428. *
  1429. * outReply:
  1430. * A pointer to the client-allocated reply record to be filled in
  1431. *
  1432. * Result:
  1433. * A status code
  1434. *
  1435. * Availability:
  1436. * Non-Carbon CFM: not available
  1437. * CarbonLib: in CarbonLib 1.1 and later
  1438. * Mac OS X: in version 10.0 and later
  1439. }
  1440. function NavDialogGetReply(inDialog: NavDialogRef; var outReply: NavReplyRecord): OSStatus; external name '_NavDialogGetReply';
  1441. {
  1442. * NavDialogGetSaveFileName()
  1443. *
  1444. * Summary:
  1445. * Return the current value of the file name to be saved in a
  1446. * PutFile dialog
  1447. *
  1448. * Discussion:
  1449. * This function can be called at any time on a valid PutFile dialog
  1450. * to obtain the current value of the save file name. This function
  1451. * is a Unicode-based replacement for the kNavCtlGetEditFileName
  1452. * NavCustomControl selector. On Mac OS X, the full file name is
  1453. * returned, including any extenison that may be hidden from the
  1454. * user.
  1455. *
  1456. * Parameters:
  1457. *
  1458. * inPutFileDialog:
  1459. * Which dialog
  1460. *
  1461. * Result:
  1462. * The save file name as a CFStringRef. The string is immutable. The
  1463. * client should retain the string if the reference is to be held
  1464. * beyond the life of the dialog (standard CF retain/release
  1465. * semantics).
  1466. *
  1467. * Availability:
  1468. * Non-Carbon CFM: not available
  1469. * CarbonLib: in CarbonLib 1.1 and later
  1470. * Mac OS X: in version 10.0 and later
  1471. }
  1472. function NavDialogGetSaveFileName(inPutFileDialog: NavDialogRef): CFStringRef; external name '_NavDialogGetSaveFileName';
  1473. {
  1474. * NavDialogSetSaveFileName()
  1475. *
  1476. * Summary:
  1477. * Set the current value of the file name to be saved in a PutFile
  1478. * dialog
  1479. *
  1480. * Discussion:
  1481. * This function can be called at any time to set the current save
  1482. * file name. Use it to set an initial name before calling
  1483. * NavDialogRun or to change the file name dynamically while a
  1484. * dialog is running. This function is a Unicode-based replacement
  1485. * for the kNavCtlSetEditFileName NavCustomControl selector.
  1486. *
  1487. * Parameters:
  1488. *
  1489. * inPutFileDialog:
  1490. * Which PutFile dialog
  1491. *
  1492. * inFileName:
  1493. * The file name to use
  1494. *
  1495. * Result:
  1496. * A status code
  1497. *
  1498. * Availability:
  1499. * Non-Carbon CFM: not available
  1500. * CarbonLib: in CarbonLib 1.1 and later
  1501. * Mac OS X: in version 10.0 and later
  1502. }
  1503. function NavDialogSetSaveFileName(inPutFileDialog: NavDialogRef; inFileName: CFStringRef): OSStatus; external name '_NavDialogSetSaveFileName';
  1504. {
  1505. * NavDialogGetSaveFileExtensionHidden()
  1506. *
  1507. * Summary:
  1508. * Get the current state of the extension hiding in a PutFile dialog
  1509. *
  1510. * Discussion:
  1511. * This function can be called at any time to determine if a PutFile
  1512. * dialog is hiding the file extesion (if any) of the file to be
  1513. * saved.
  1514. *
  1515. * Parameters:
  1516. *
  1517. * inPutFileDialog:
  1518. * Which PutFile dialog
  1519. *
  1520. * Result:
  1521. * True if the extension is hidden, false if the extension is
  1522. * visible or there is no extension.
  1523. *
  1524. * Availability:
  1525. * Non-Carbon CFM: not available
  1526. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  1527. * Mac OS X: in version 10.1 and later
  1528. }
  1529. function NavDialogGetSaveFileExtensionHidden(inPutFileDialog: NavDialogRef): boolean; external name '_NavDialogGetSaveFileExtensionHidden';
  1530. {
  1531. * NavDialogSetSaveFileExtensionHidden()
  1532. *
  1533. * Summary:
  1534. * Set the current state of the extension hiding in a PutFile dialog
  1535. *
  1536. * Discussion:
  1537. * This function can be called at any time to hide or show the
  1538. * extension of the file to be saved in a PutFile dialog. If the
  1539. * current file name has no extension, then hiding the extension has
  1540. * no effect.
  1541. *
  1542. * Parameters:
  1543. *
  1544. * inPutFileDialog:
  1545. * Which PutFile dialog
  1546. *
  1547. * inHidden:
  1548. * The new value for the hidden extension state
  1549. *
  1550. * Result:
  1551. * A status code
  1552. *
  1553. * Availability:
  1554. * Non-Carbon CFM: not available
  1555. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  1556. * Mac OS X: in version 10.1 and later
  1557. }
  1558. function NavDialogSetSaveFileExtensionHidden(inPutFileDialog: NavDialogRef; inHidden: boolean): OSStatus; external name '_NavDialogSetSaveFileExtensionHidden';
  1559. {$ALIGN MAC68K}
  1560. end.