Dialogs.pas 59 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892
  1. {
  2. File: HIToolbox/Dialogs.h
  3. Contains: Dialog Manager interfaces.
  4. Version: HIToolbox-219.4.81~2
  5. Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, August 2005 }
  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 Dialogs;
  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,CFBase,CarbonEventsCore,Quickdraw,MixedMode,Events,MacWindows,TextEdit,Controls,MacErrors,CarbonEvents;
  92. {$ALIGN MAC68K}
  93. const
  94. { new, more standard names for dialog item types}
  95. kControlDialogItem = 4;
  96. kButtonDialogItem = kControlDialogItem or 0;
  97. kCheckBoxDialogItem = kControlDialogItem or 1;
  98. kRadioButtonDialogItem = kControlDialogItem or 2;
  99. kResourceControlDialogItem = kControlDialogItem or 3;
  100. kStaticTextDialogItem = 8;
  101. kEditTextDialogItem = 16;
  102. kIconDialogItem = 32;
  103. kPictureDialogItem = 64;
  104. kUserDialogItem = 0;
  105. kHelpDialogItem = 1;
  106. kItemDisableBit = 128;
  107. const
  108. { old names for dialog item types}
  109. ctrlItem = 4;
  110. btnCtrl = 0;
  111. chkCtrl = 1;
  112. radCtrl = 2;
  113. resCtrl = 3;
  114. statText = 8;
  115. editText = 16;
  116. iconItem = 32;
  117. picItem = 64;
  118. userItem = 0;
  119. itemDisable = 128;
  120. const
  121. { standard dialog item numbers}
  122. kStdOkItemIndex = 1;
  123. kStdCancelItemIndex = 2; { old names}
  124. ok = kStdOkItemIndex;
  125. cancel = kStdCancelItemIndex;
  126. const
  127. { standard icon resource id's }
  128. kStopIcon = 0;
  129. kNoteIcon = 1;
  130. kCautionIcon = 2; { old names}
  131. stopIcon = kStopIcon;
  132. noteIcon = kNoteIcon;
  133. cautionIcon = kCautionIcon;
  134. { Dialog Item List Manipulation Constants }
  135. type
  136. DITLMethod = SInt16;
  137. const
  138. overlayDITL = 0;
  139. appendDITLRight = 1;
  140. appendDITLBottom = 2;
  141. type
  142. StageList = SInt16;
  143. { DialogPtr is obsolete. Use DialogRef instead.}
  144. type
  145. DialogRef = DialogPtr;
  146. type
  147. DialogTemplatePtr = ^DialogTemplate;
  148. DialogTemplate = record
  149. boundsRect: Rect;
  150. procID: SInt16;
  151. visible: Boolean;
  152. filler1: Boolean;
  153. goAwayFlag: Boolean;
  154. filler2: Boolean;
  155. refCon: SInt32;
  156. itemsID: SInt16;
  157. title: Str255;
  158. end;
  159. type
  160. DialogTPtr = DialogTemplatePtr;
  161. type
  162. DialogTHndl = ^DialogTPtr;
  163. type
  164. AlertTemplatePtr = ^AlertTemplate;
  165. AlertTemplate = record
  166. boundsRect: Rect;
  167. itemsID: SInt16;
  168. stages: StageList;
  169. end;
  170. type
  171. AlertTPtr = AlertTemplatePtr;
  172. type
  173. AlertTHndl = ^AlertTPtr;
  174. { new type abstractions for the dialog manager }
  175. type
  176. DialogItemIndexZeroBased = SInt16;
  177. type
  178. DialogItemIndex = SInt16;
  179. type
  180. DialogItemType = SInt16;
  181. { dialog manager callbacks }
  182. type
  183. SoundProcPtr = procedure( soundNumber: SInt16 );
  184. type
  185. ModalFilterProcPtr = function( theDialog: DialogRef; var theEvent: EventRecord; var itemHit: DialogItemIndex ): Boolean;
  186. { ModalFilterYDProcPtr was previously in StandardFile.h }
  187. type
  188. ModalFilterYDProcPtr = function( theDialog: DialogRef; var theEvent: EventRecord; var itemHit: SInt16; yourDataPtr: UnivPtr ): Boolean;
  189. type
  190. UserItemProcPtr = procedure( theDialog: DialogRef; itemNo: DialogItemIndex );
  191. type
  192. SoundUPP = SoundProcPtr;
  193. type
  194. ModalFilterUPP = ModalFilterProcPtr;
  195. type
  196. ModalFilterYDUPP = ModalFilterYDProcPtr;
  197. type
  198. UserItemUPP = UserItemProcPtr;
  199. {
  200. * NewSoundUPP()
  201. *
  202. * Availability:
  203. * Mac OS X: not available
  204. * CarbonLib: not available
  205. * Non-Carbon CFM: available as macro/inline
  206. }
  207. {
  208. * NewModalFilterUPP()
  209. *
  210. * Availability:
  211. * Mac OS X: in version 10.0 and later in Carbon.framework
  212. * CarbonLib: in CarbonLib 1.0 and later
  213. * Non-Carbon CFM: available as macro/inline
  214. }
  215. function NewModalFilterUPP( userRoutine: ModalFilterProcPtr ): ModalFilterUPP; external name '_NewModalFilterUPP';
  216. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  217. {
  218. * NewModalFilterYDUPP()
  219. *
  220. * Availability:
  221. * Mac OS X: in version 10.0 and later in Carbon.framework
  222. * CarbonLib: in CarbonLib 1.0.2 and later
  223. * Non-Carbon CFM: available as macro/inline
  224. }
  225. function NewModalFilterYDUPP( userRoutine: ModalFilterYDProcPtr ): ModalFilterYDUPP; external name '_NewModalFilterYDUPP';
  226. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  227. {
  228. * NewUserItemUPP()
  229. *
  230. * Availability:
  231. * Mac OS X: in version 10.0 and later in Carbon.framework
  232. * CarbonLib: in CarbonLib 1.0 and later
  233. * Non-Carbon CFM: available as macro/inline
  234. }
  235. function NewUserItemUPP( userRoutine: UserItemProcPtr ): UserItemUPP; external name '_NewUserItemUPP';
  236. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  237. {
  238. * DisposeSoundUPP()
  239. *
  240. * Availability:
  241. * Mac OS X: not available
  242. * CarbonLib: not available
  243. * Non-Carbon CFM: available as macro/inline
  244. }
  245. {
  246. * DisposeModalFilterUPP()
  247. *
  248. * Availability:
  249. * Mac OS X: in version 10.0 and later in Carbon.framework
  250. * CarbonLib: in CarbonLib 1.0 and later
  251. * Non-Carbon CFM: available as macro/inline
  252. }
  253. procedure DisposeModalFilterUPP( userUPP: ModalFilterUPP ); external name '_DisposeModalFilterUPP';
  254. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  255. {
  256. * DisposeModalFilterYDUPP()
  257. *
  258. * Availability:
  259. * Mac OS X: in version 10.0 and later in Carbon.framework
  260. * CarbonLib: in CarbonLib 1.0.2 and later
  261. * Non-Carbon CFM: available as macro/inline
  262. }
  263. procedure DisposeModalFilterYDUPP( userUPP: ModalFilterYDUPP ); external name '_DisposeModalFilterYDUPP';
  264. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  265. {
  266. * DisposeUserItemUPP()
  267. *
  268. * Availability:
  269. * Mac OS X: in version 10.0 and later in Carbon.framework
  270. * CarbonLib: in CarbonLib 1.0 and later
  271. * Non-Carbon CFM: available as macro/inline
  272. }
  273. procedure DisposeUserItemUPP( userUPP: UserItemUPP ); external name '_DisposeUserItemUPP';
  274. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  275. {
  276. * InvokeSoundUPP()
  277. *
  278. * Availability:
  279. * Mac OS X: not available
  280. * CarbonLib: not available
  281. * Non-Carbon CFM: available as macro/inline
  282. }
  283. {
  284. * InvokeModalFilterUPP()
  285. *
  286. * Availability:
  287. * Mac OS X: in version 10.0 and later in Carbon.framework
  288. * CarbonLib: in CarbonLib 1.0 and later
  289. * Non-Carbon CFM: available as macro/inline
  290. }
  291. function InvokeModalFilterUPP( theDialog: DialogRef; var theEvent: EventRecord; var itemHit: DialogItemIndex; userUPP: ModalFilterUPP ): Boolean; external name '_InvokeModalFilterUPP';
  292. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  293. {
  294. * InvokeModalFilterYDUPP()
  295. *
  296. * Availability:
  297. * Mac OS X: in version 10.0 and later in Carbon.framework
  298. * CarbonLib: in CarbonLib 1.0.2 and later
  299. * Non-Carbon CFM: available as macro/inline
  300. }
  301. function InvokeModalFilterYDUPP( theDialog: DialogRef; var theEvent: EventRecord; var itemHit: SInt16; yourDataPtr: UnivPtr; userUPP: ModalFilterYDUPP ): Boolean; external name '_InvokeModalFilterYDUPP';
  302. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  303. {
  304. * InvokeUserItemUPP()
  305. *
  306. * Availability:
  307. * Mac OS X: in version 10.0 and later in Carbon.framework
  308. * CarbonLib: in CarbonLib 1.0 and later
  309. * Non-Carbon CFM: available as macro/inline
  310. }
  311. procedure InvokeUserItemUPP( theDialog: DialogRef; itemNo: DialogItemIndex; userUPP: UserItemUPP ); external name '_InvokeUserItemUPP';
  312. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  313. {
  314. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  315. ¥ Following types are valid with Appearance 1.0 and later
  316. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  317. }
  318. const
  319. { Alert types to pass into StandardAlert }
  320. kAlertStopAlert = 0;
  321. kAlertNoteAlert = 1;
  322. kAlertCautionAlert = 2;
  323. kAlertPlainAlert = 3;
  324. type
  325. AlertType = SInt16;
  326. const
  327. kAlertDefaultOKText = -1; { "OK"}
  328. kAlertDefaultCancelText = -1; { "Cancel"}
  329. kAlertDefaultOtherText = -1; { "Don't Save"}
  330. { StandardAlert alert button numbers }
  331. const
  332. kAlertStdAlertOKButton = 1;
  333. kAlertStdAlertCancelButton = 2;
  334. kAlertStdAlertOtherButton = 3;
  335. kAlertStdAlertHelpButton = 4;
  336. const
  337. { Dialog Flags for use in NewFeaturesDialog or dlgx resource }
  338. kDialogFlagsUseThemeBackground = 1 shl 0;
  339. kDialogFlagsUseControlHierarchy = 1 shl 1;
  340. kDialogFlagsHandleMovableModal = 1 shl 2;
  341. kDialogFlagsUseThemeControls = 1 shl 3;
  342. const
  343. { Alert Flags for use in alrx resource }
  344. kAlertFlagsUseThemeBackground = 1 shl 0;
  345. kAlertFlagsUseControlHierarchy = 1 shl 1;
  346. kAlertFlagsAlertIsMovable = 1 shl 2;
  347. kAlertFlagsUseThemeControls = 1 shl 3;
  348. { For dftb resource }
  349. const
  350. kDialogFontNoFontStyle = 0;
  351. kDialogFontUseFontMask = $0001;
  352. kDialogFontUseFaceMask = $0002;
  353. kDialogFontUseSizeMask = $0004;
  354. kDialogFontUseForeColorMask = $0008;
  355. kDialogFontUseBackColorMask = $0010;
  356. kDialogFontUseModeMask = $0020;
  357. kDialogFontUseJustMask = $0040;
  358. kDialogFontUseAllMask = $00FF;
  359. kDialogFontAddFontSizeMask = $0100;
  360. kDialogFontUseFontNameMask = $0200;
  361. kDialogFontAddToMetaFontMask = $0400;
  362. { Also for dftb resource. This one is available in Mac OS X or later. }
  363. { It corresponds directly to kControlUseThemeFontIDMask from Controls.h. }
  364. const
  365. kDialogFontUseThemeFontIDMask = $0080;
  366. type
  367. AlertStdAlertParamRecPtr = ^AlertStdAlertParamRec;
  368. AlertStdAlertParamRec = record
  369. movable: Boolean; { Make alert movable modal }
  370. helpButton: Boolean; { Is there a help button? }
  371. filterProc: ModalFilterUPP; { Event filter }
  372. defaultText: ConstStringPtr; { Text for button in OK position }
  373. cancelText: ConstStringPtr; { Text for button in cancel position }
  374. otherText: ConstStringPtr; { Text for button in left position }
  375. defaultButton: SInt16; { Which button behaves as the default }
  376. cancelButton: SInt16; { Which one behaves as cancel (can be 0) }
  377. position: UInt16; { Position (kWindowDefaultPosition in this case }
  378. { equals kWindowAlertPositionParentWindowScreen) }
  379. end;
  380. type
  381. AlertStdAlertParamPtr = AlertStdAlertParamRecPtr;
  382. const
  383. kHICommandOther = $6F746872 (* 'othr' *); { sent by standard sheet dialogs when the "other" button is pressed }
  384. const
  385. kStdCFStringAlertVersionOne = 1; { current version of AlertStdCFStringAlertParamRec }
  386. {
  387. * Summary:
  388. * Flags to CreateStandardAlert that are specified in the
  389. * AlertStdCFStringAlertParamRec.flags field.
  390. }
  391. const
  392. {
  393. * Applies to StandardSheet only. Do not dispose of the sheet window
  394. * after closing it; allows the sheet to be re-used again in a later
  395. * call to ShowSheetWindow.
  396. }
  397. kStdAlertDoNotDisposeSheet = 1 shl 0;
  398. {
  399. * Applies to StandardSheet only. Causes the sheet window to be
  400. * hidden immediately without animation effects when the default
  401. * button is chosen by the user.
  402. }
  403. kStdAlertDoNotAnimateOnDefault = 1 shl 1;
  404. {
  405. * Applies to StandardSheet only. Causes the sheet window to be
  406. * hidden immediately without animation effects when the cancel
  407. * button is chosen by the user.
  408. }
  409. kStdAlertDoNotAnimateOnCancel = 1 shl 2;
  410. {
  411. * Applies to StandardSheet only. Causes the sheet window to be
  412. * hidden immediately without animation effects when the other button
  413. * is chosen by the user.
  414. }
  415. kStdAlertDoNotAnimateOnOther = 1 shl 3;
  416. {
  417. * Allows dialog to stay up even after clicking the Help button.
  418. * Normally, it would close immediately. It is not necessary to set
  419. * this option for sheets, as they merely send the HICommandHelp
  420. * command to the target provided. RunStandardAlert will return with
  421. * the help button item in the itemHit parameter, but the window will
  422. * remain up. You can then perform whatever help function you wish
  423. * and then call RunStandardAlert again. This option is available in
  424. * Mac OS X 10.4 or later.
  425. }
  426. kStdAlertDoNotCloseOnHelp = 1 shl 4;
  427. type
  428. AlertStdCFStringAlertParamRec = record
  429. version: UInt32; { kStdCFStringAlertVersionOne }
  430. movable: Boolean; { Make alert movable modal }
  431. helpButton: Boolean; { Is there a help button? }
  432. defaultText: CFStringRef; { Text for button in OK position }
  433. cancelText: CFStringRef; { Text for button in cancel position }
  434. otherText: CFStringRef; { Text for button in left position }
  435. defaultButton: SInt16; { Which button behaves as the default }
  436. cancelButton: SInt16; { Which one behaves as cancel (can be 0) }
  437. position: UInt16; { Position (kWindowDefaultPosition in this case }
  438. { equals kWindowAlertPositionParentWindowScreen) }
  439. flags: OptionBits; { Options for the behavior of the alert or sheet }
  440. end;
  441. type
  442. AlertStdCFStringAlertParamPtr = ^AlertStdCFStringAlertParamRec;
  443. { ÑÑÑ end Appearance 1.0 or later stuff}
  444. {
  445. NOTE: Code running under MultiFinder or System 7.0 or newer
  446. should always pass NULL to InitDialogs.
  447. }
  448. {
  449. * InitDialogs()
  450. *
  451. * Availability:
  452. * Mac OS X: not available
  453. * CarbonLib: not available
  454. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  455. }
  456. {
  457. * ErrorSound()
  458. *
  459. * Availability:
  460. * Mac OS X: not available
  461. * CarbonLib: not available
  462. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  463. }
  464. {
  465. * NewDialog()
  466. *
  467. * Mac OS X threading:
  468. * Not thread safe
  469. *
  470. * Availability:
  471. * Mac OS X: in version 10.0 and later in Carbon.framework
  472. * CarbonLib: in CarbonLib 1.0 and later
  473. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  474. }
  475. function NewDialog( dStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; procID: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SInt32; items: Handle ): DialogRef; external name '_NewDialog';
  476. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  477. {
  478. * GetNewDialog()
  479. *
  480. * Mac OS X threading:
  481. * Not thread safe
  482. *
  483. * Availability:
  484. * Mac OS X: in version 10.0 and later in Carbon.framework
  485. * CarbonLib: in CarbonLib 1.0 and later
  486. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  487. }
  488. function GetNewDialog( dialogID: SInt16; dStorage: UnivPtr; behind: WindowRef ): DialogRef; external name '_GetNewDialog';
  489. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  490. {
  491. * NewColorDialog()
  492. *
  493. * Mac OS X threading:
  494. * Not thread safe
  495. *
  496. * Availability:
  497. * Mac OS X: in version 10.0 and later in Carbon.framework
  498. * CarbonLib: in CarbonLib 1.0 and later
  499. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  500. }
  501. function NewColorDialog( dStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; procID: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SInt32; items: Handle ): DialogRef; external name '_NewColorDialog';
  502. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  503. {
  504. * CloseDialog()
  505. *
  506. * Availability:
  507. * Mac OS X: not available
  508. * CarbonLib: not available
  509. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  510. }
  511. {
  512. * DisposeDialog()
  513. *
  514. * Mac OS X threading:
  515. * Not thread safe
  516. *
  517. * Availability:
  518. * Mac OS X: in version 10.0 and later in Carbon.framework
  519. * CarbonLib: in CarbonLib 1.0 and later
  520. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  521. }
  522. procedure DisposeDialog( theDialog: DialogRef ); external name '_DisposeDialog';
  523. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  524. {
  525. * ModalDialog()
  526. *
  527. * Mac OS X threading:
  528. * Not thread safe
  529. *
  530. * Availability:
  531. * Mac OS X: in version 10.0 and later in Carbon.framework
  532. * CarbonLib: in CarbonLib 1.0 and later
  533. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  534. }
  535. procedure ModalDialog( modalFilter: ModalFilterUPP; var itemHit: DialogItemIndex ); external name '_ModalDialog';
  536. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  537. {
  538. * IsDialogEvent()
  539. *
  540. * Mac OS X threading:
  541. * Not thread safe
  542. *
  543. * Availability:
  544. * Mac OS X: in version 10.0 and later in Carbon.framework
  545. * CarbonLib: in CarbonLib 1.0 and later
  546. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  547. }
  548. function IsDialogEvent( const (*var*) theEvent: EventRecord ): Boolean; external name '_IsDialogEvent';
  549. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  550. {
  551. * DialogSelect()
  552. *
  553. * Mac OS X threading:
  554. * Not thread safe
  555. *
  556. * Availability:
  557. * Mac OS X: in version 10.0 and later in Carbon.framework
  558. * CarbonLib: in CarbonLib 1.0 and later
  559. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  560. }
  561. function DialogSelect( const (*var*) theEvent: EventRecord; var theDialog: DialogRef; var itemHit: DialogItemIndex ): Boolean; external name '_DialogSelect';
  562. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  563. {
  564. * DrawDialog()
  565. *
  566. * Mac OS X threading:
  567. * Not thread safe
  568. *
  569. * Availability:
  570. * Mac OS X: in version 10.0 and later in Carbon.framework
  571. * CarbonLib: in CarbonLib 1.0 and later
  572. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  573. }
  574. procedure DrawDialog( theDialog: DialogRef ); external name '_DrawDialog';
  575. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  576. {
  577. * UpdateDialog()
  578. *
  579. * Mac OS X threading:
  580. * Not thread safe
  581. *
  582. * Availability:
  583. * Mac OS X: in version 10.0 and later in Carbon.framework
  584. * CarbonLib: in CarbonLib 1.0 and later
  585. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  586. }
  587. procedure UpdateDialog( theDialog: DialogRef; updateRgn: RgnHandle ); external name '_UpdateDialog';
  588. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  589. {
  590. * HideDialogItem()
  591. *
  592. * Mac OS X threading:
  593. * Not thread safe
  594. *
  595. * Availability:
  596. * Mac OS X: in version 10.0 and later in Carbon.framework
  597. * CarbonLib: in CarbonLib 1.0 and later
  598. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  599. }
  600. procedure HideDialogItem( theDialog: DialogRef; itemNo: DialogItemIndex ); external name '_HideDialogItem';
  601. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  602. {
  603. * ShowDialogItem()
  604. *
  605. * Mac OS X threading:
  606. * Not thread safe
  607. *
  608. * Availability:
  609. * Mac OS X: in version 10.0 and later in Carbon.framework
  610. * CarbonLib: in CarbonLib 1.0 and later
  611. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  612. }
  613. procedure ShowDialogItem( theDialog: DialogRef; itemNo: DialogItemIndex ); external name '_ShowDialogItem';
  614. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  615. {
  616. * FindDialogItem()
  617. *
  618. * Mac OS X threading:
  619. * Not thread safe
  620. *
  621. * Availability:
  622. * Mac OS X: in version 10.0 and later in Carbon.framework
  623. * CarbonLib: in CarbonLib 1.0 and later
  624. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  625. }
  626. function FindDialogItem( theDialog: DialogRef; thePt: Point ): DialogItemIndexZeroBased; external name '_FindDialogItem';
  627. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  628. {
  629. * DialogCut()
  630. *
  631. * Mac OS X threading:
  632. * Not thread safe
  633. *
  634. * Availability:
  635. * Mac OS X: in version 10.0 and later in Carbon.framework
  636. * CarbonLib: in CarbonLib 1.0 and later
  637. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  638. }
  639. procedure DialogCut( theDialog: DialogRef ); external name '_DialogCut';
  640. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  641. {
  642. * DialogPaste()
  643. *
  644. * Mac OS X threading:
  645. * Not thread safe
  646. *
  647. * Availability:
  648. * Mac OS X: in version 10.0 and later in Carbon.framework
  649. * CarbonLib: in CarbonLib 1.0 and later
  650. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  651. }
  652. procedure DialogPaste( theDialog: DialogRef ); external name '_DialogPaste';
  653. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  654. {
  655. * DialogCopy()
  656. *
  657. * Mac OS X threading:
  658. * Not thread safe
  659. *
  660. * Availability:
  661. * Mac OS X: in version 10.0 and later in Carbon.framework
  662. * CarbonLib: in CarbonLib 1.0 and later
  663. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  664. }
  665. procedure DialogCopy( theDialog: DialogRef ); external name '_DialogCopy';
  666. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  667. {
  668. * DialogDelete()
  669. *
  670. * Mac OS X threading:
  671. * Not thread safe
  672. *
  673. * Availability:
  674. * Mac OS X: in version 10.0 and later in Carbon.framework
  675. * CarbonLib: in CarbonLib 1.0 and later
  676. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  677. }
  678. procedure DialogDelete( theDialog: DialogRef ); external name '_DialogDelete';
  679. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  680. {
  681. * Alert()
  682. *
  683. * Mac OS X threading:
  684. * Not thread safe
  685. *
  686. * Availability:
  687. * Mac OS X: in version 10.0 and later in Carbon.framework
  688. * CarbonLib: in CarbonLib 1.0 and later
  689. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  690. }
  691. function Alert( alertID: SInt16; modalFilter: ModalFilterUPP ): DialogItemIndex; external name '_Alert';
  692. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  693. {
  694. * StopAlert()
  695. *
  696. * Mac OS X threading:
  697. * Not thread safe
  698. *
  699. * Availability:
  700. * Mac OS X: in version 10.0 and later in Carbon.framework
  701. * CarbonLib: in CarbonLib 1.0 and later
  702. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  703. }
  704. function StopAlert( alertID: SInt16; modalFilter: ModalFilterUPP ): DialogItemIndex; external name '_StopAlert';
  705. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  706. {
  707. * NoteAlert()
  708. *
  709. * Mac OS X threading:
  710. * Not thread safe
  711. *
  712. * Availability:
  713. * Mac OS X: in version 10.0 and later in Carbon.framework
  714. * CarbonLib: in CarbonLib 1.0 and later
  715. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  716. }
  717. function NoteAlert( alertID: SInt16; modalFilter: ModalFilterUPP ): DialogItemIndex; external name '_NoteAlert';
  718. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  719. {
  720. * CautionAlert()
  721. *
  722. * Mac OS X threading:
  723. * Not thread safe
  724. *
  725. * Availability:
  726. * Mac OS X: in version 10.0 and later in Carbon.framework
  727. * CarbonLib: in CarbonLib 1.0 and later
  728. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  729. }
  730. function CautionAlert( alertID: SInt16; modalFilter: ModalFilterUPP ): DialogItemIndex; external name '_CautionAlert';
  731. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  732. {
  733. * GetDialogItem()
  734. *
  735. * Mac OS X threading:
  736. * Not thread safe
  737. *
  738. * Availability:
  739. * Mac OS X: in version 10.0 and later in Carbon.framework
  740. * CarbonLib: in CarbonLib 1.0 and later
  741. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  742. }
  743. procedure GetDialogItem( theDialog: DialogRef; itemNo: DialogItemIndex; var itemType: DialogItemType; var item: Handle; var box: Rect ); external name '_GetDialogItem';
  744. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  745. {
  746. * SetDialogItem()
  747. *
  748. * Mac OS X threading:
  749. * Not thread safe
  750. *
  751. * Availability:
  752. * Mac OS X: in version 10.0 and later in Carbon.framework
  753. * CarbonLib: in CarbonLib 1.0 and later
  754. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  755. }
  756. procedure SetDialogItem( theDialog: DialogRef; itemNo: DialogItemIndex; itemType: DialogItemType; item: Handle; const (*var*) box: Rect ); external name '_SetDialogItem';
  757. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  758. {
  759. * ParamText()
  760. *
  761. * Mac OS X threading:
  762. * Not thread safe
  763. *
  764. * Availability:
  765. * Mac OS X: in version 10.0 and later in Carbon.framework
  766. * CarbonLib: in CarbonLib 1.0 and later
  767. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  768. }
  769. procedure ParamText( const (*var*) param0: Str255; const (*var*) param1: Str255; const (*var*) param2: Str255; const (*var*) param3: Str255 ); external name '_ParamText';
  770. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  771. {
  772. * SelectDialogItemText()
  773. *
  774. * Mac OS X threading:
  775. * Not thread safe
  776. *
  777. * Availability:
  778. * Mac OS X: in version 10.0 and later in Carbon.framework
  779. * CarbonLib: in CarbonLib 1.0 and later
  780. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  781. }
  782. procedure SelectDialogItemText( theDialog: DialogRef; itemNo: DialogItemIndex; strtSel: SInt16; endSel: SInt16 ); external name '_SelectDialogItemText';
  783. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  784. {
  785. * GetDialogItemText()
  786. *
  787. * Mac OS X threading:
  788. * Not thread safe
  789. *
  790. * Availability:
  791. * Mac OS X: in version 10.0 and later in Carbon.framework
  792. * CarbonLib: in CarbonLib 1.0 and later
  793. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  794. }
  795. procedure GetDialogItemText( item: Handle; var text: Str255 ); external name '_GetDialogItemText';
  796. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  797. {
  798. * SetDialogItemText()
  799. *
  800. * Mac OS X threading:
  801. * Not thread safe
  802. *
  803. * Availability:
  804. * Mac OS X: in version 10.0 and later in Carbon.framework
  805. * CarbonLib: in CarbonLib 1.0 and later
  806. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  807. }
  808. procedure SetDialogItemText( item: Handle; const (*var*) text: Str255 ); external name '_SetDialogItemText';
  809. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  810. {
  811. * GetAlertStage()
  812. *
  813. * Mac OS X threading:
  814. * Not thread safe
  815. *
  816. * Availability:
  817. * Mac OS X: in version 10.0 and later in Carbon.framework
  818. * CarbonLib: in CarbonLib 1.0 and later
  819. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  820. }
  821. function GetAlertStage: SInt16; external name '_GetAlertStage';
  822. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  823. {
  824. * SetDialogFont()
  825. *
  826. * Mac OS X threading:
  827. * Not thread safe
  828. *
  829. * Availability:
  830. * Mac OS X: in version 10.0 and later in Carbon.framework
  831. * CarbonLib: in CarbonLib 1.0 and later
  832. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  833. }
  834. procedure SetDialogFont( fontNum: SInt16 ); external name '_SetDialogFont';
  835. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  836. {
  837. * ResetAlertStage()
  838. *
  839. * Mac OS X threading:
  840. * Not thread safe
  841. *
  842. * Availability:
  843. * Mac OS X: in version 10.0 and later in Carbon.framework
  844. * CarbonLib: in CarbonLib 1.0 and later
  845. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  846. }
  847. procedure ResetAlertStage; external name '_ResetAlertStage';
  848. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  849. { APIs in Carbon}
  850. {
  851. * GetParamText()
  852. *
  853. * Mac OS X threading:
  854. * Not thread safe
  855. *
  856. * Availability:
  857. * Mac OS X: in version 10.0 and later in Carbon.framework
  858. * CarbonLib: in CarbonLib 1.0 and later
  859. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
  860. }
  861. procedure GetParamText( param0: StringPtr; param1: StringPtr; param2: StringPtr; param3: StringPtr ); external name '_GetParamText';
  862. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  863. {
  864. * newdialog()
  865. *
  866. * Availability:
  867. * Mac OS X: not available
  868. * CarbonLib: not available
  869. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  870. }
  871. {
  872. * newcolordialog()
  873. *
  874. * Availability:
  875. * Mac OS X: not available
  876. * CarbonLib: not available
  877. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  878. }
  879. {
  880. * paramtext()
  881. *
  882. * Availability:
  883. * Mac OS X: not available
  884. * CarbonLib: not available
  885. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  886. }
  887. {
  888. * getdialogitemtext()
  889. *
  890. * Availability:
  891. * Mac OS X: not available
  892. * CarbonLib: not available
  893. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  894. }
  895. {
  896. * setdialogitemtext()
  897. *
  898. * Availability:
  899. * Mac OS X: not available
  900. * CarbonLib: not available
  901. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  902. }
  903. {
  904. * finddialogitem()
  905. *
  906. * Availability:
  907. * Mac OS X: not available
  908. * CarbonLib: not available
  909. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  910. }
  911. {
  912. * AppendDITL()
  913. *
  914. * Mac OS X threading:
  915. * Not thread safe
  916. *
  917. * Availability:
  918. * Mac OS X: in version 10.0 and later in Carbon.framework
  919. * CarbonLib: in CarbonLib 1.0 and later
  920. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  921. }
  922. procedure AppendDITL( theDialog: DialogRef; theHandle: Handle; method: DITLMethod ); external name '_AppendDITL';
  923. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  924. {
  925. * CountDITL()
  926. *
  927. * Mac OS X threading:
  928. * Not thread safe
  929. *
  930. * Availability:
  931. * Mac OS X: in version 10.0 and later in Carbon.framework
  932. * CarbonLib: in CarbonLib 1.0 and later
  933. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  934. }
  935. function CountDITL( theDialog: DialogRef ): DialogItemIndex; external name '_CountDITL';
  936. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  937. {
  938. * ShortenDITL()
  939. *
  940. * Mac OS X threading:
  941. * Not thread safe
  942. *
  943. * Availability:
  944. * Mac OS X: in version 10.0 and later in Carbon.framework
  945. * CarbonLib: in CarbonLib 1.0 and later
  946. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  947. }
  948. procedure ShortenDITL( theDialog: DialogRef; numberItems: DialogItemIndex ); external name '_ShortenDITL';
  949. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  950. {
  951. * InsertDialogItem()
  952. *
  953. * Mac OS X threading:
  954. * Not thread safe
  955. *
  956. * Availability:
  957. * Mac OS X: in version 10.0 and later in Carbon.framework
  958. * CarbonLib: in CarbonLib 1.0 and later
  959. * Non-Carbon CFM: not available
  960. }
  961. function InsertDialogItem( theDialog: DialogRef; afterItem: DialogItemIndex; itemType: DialogItemType; itemHandle: Handle; const (*var*) box: Rect ): OSStatus; external name '_InsertDialogItem';
  962. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  963. {
  964. * RemoveDialogItems()
  965. *
  966. * Mac OS X threading:
  967. * Not thread safe
  968. *
  969. * Availability:
  970. * Mac OS X: in version 10.0 and later in Carbon.framework
  971. * CarbonLib: in CarbonLib 1.0 and later
  972. * Non-Carbon CFM: not available
  973. }
  974. function RemoveDialogItems( theDialog: DialogRef; itemNo: DialogItemIndex; amountToRemove: DialogItemIndex; disposeItemData: Boolean ): OSStatus; external name '_RemoveDialogItems';
  975. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  976. {
  977. * StdFilterProc()
  978. *
  979. * Mac OS X threading:
  980. * Not thread safe
  981. *
  982. * Availability:
  983. * Mac OS X: in version 10.0 and later in Carbon.framework
  984. * CarbonLib: in CarbonLib 1.0 and later
  985. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  986. }
  987. function StdFilterProc( theDialog: DialogRef; var event: EventRecord; var itemHit: DialogItemIndex ): Boolean; external name '_StdFilterProc';
  988. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  989. {
  990. * GetStdFilterProc()
  991. *
  992. * Mac OS X threading:
  993. * Not thread safe
  994. *
  995. * Availability:
  996. * Mac OS X: in version 10.0 and later in Carbon.framework
  997. * CarbonLib: in CarbonLib 1.0 and later
  998. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  999. }
  1000. function GetStdFilterProc( var theProc: ModalFilterUPP ): OSErr; external name '_GetStdFilterProc';
  1001. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1002. {
  1003. * SetDialogDefaultItem()
  1004. *
  1005. * Mac OS X threading:
  1006. * Not thread safe
  1007. *
  1008. * Availability:
  1009. * Mac OS X: in version 10.0 and later in Carbon.framework
  1010. * CarbonLib: in CarbonLib 1.0 and later
  1011. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1012. }
  1013. function SetDialogDefaultItem( theDialog: DialogRef; newItem: DialogItemIndex ): OSErr; external name '_SetDialogDefaultItem';
  1014. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1015. {
  1016. * SetDialogCancelItem()
  1017. *
  1018. * Mac OS X threading:
  1019. * Not thread safe
  1020. *
  1021. * Availability:
  1022. * Mac OS X: in version 10.0 and later in Carbon.framework
  1023. * CarbonLib: in CarbonLib 1.0 and later
  1024. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1025. }
  1026. function SetDialogCancelItem( theDialog: DialogRef; newItem: DialogItemIndex ): OSErr; external name '_SetDialogCancelItem';
  1027. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1028. {
  1029. * SetDialogTracksCursor()
  1030. *
  1031. * Mac OS X threading:
  1032. * Not thread safe
  1033. *
  1034. * Availability:
  1035. * Mac OS X: in version 10.0 and later in Carbon.framework
  1036. * CarbonLib: in CarbonLib 1.0 and later
  1037. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1038. }
  1039. function SetDialogTracksCursor( theDialog: DialogRef; tracks: Boolean ): OSErr; external name '_SetDialogTracksCursor';
  1040. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1041. {
  1042. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  1043. ¥ Appearance Dialog Routines (available only with Appearance 1.0 and later)
  1044. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  1045. }
  1046. {
  1047. * NewFeaturesDialog()
  1048. *
  1049. * Mac OS X threading:
  1050. * Not thread safe
  1051. *
  1052. * Availability:
  1053. * Mac OS X: in version 10.0 and later in Carbon.framework
  1054. * CarbonLib: in CarbonLib 1.0 and later
  1055. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1056. }
  1057. function NewFeaturesDialog( inStorage: UnivPtr; const (*var*) inBoundsRect: Rect; const (*var*) inTitle: Str255; inIsVisible: Boolean; inProcID: SInt16; inBehind: WindowRef; inGoAwayFlag: Boolean; inRefCon: SInt32; inItemListHandle: Handle; inFlags: UInt32 ): DialogRef; external name '_NewFeaturesDialog';
  1058. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1059. {
  1060. * AutoSizeDialog()
  1061. *
  1062. * Mac OS X threading:
  1063. * Not thread safe
  1064. *
  1065. * Availability:
  1066. * Mac OS X: in version 10.0 and later in Carbon.framework
  1067. * CarbonLib: in CarbonLib 1.0 and later
  1068. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1069. }
  1070. function AutoSizeDialog( inDialog: DialogRef ): OSErr; external name '_AutoSizeDialog';
  1071. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1072. {
  1073. Regarding StandardAlert and constness:
  1074. Even though the inAlertParam parameter is marked const here, there was
  1075. a chance Dialog Manager would modify it on versions of Mac OS prior to 9.
  1076. }
  1077. {
  1078. * StandardAlert()
  1079. *
  1080. * Mac OS X threading:
  1081. * Not thread safe
  1082. *
  1083. * Availability:
  1084. * Mac OS X: in version 10.0 and later in Carbon.framework
  1085. * CarbonLib: in CarbonLib 1.0 and later
  1086. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1087. }
  1088. function StandardAlert( inAlertType: AlertType; const (*var*) inError: Str255; const (*var*) inExplanation: Str255; {const} inAlertParam: AlertStdAlertParamRecPtr { can be NULL }; var outItemHit: SInt16 ): OSErr; external name '_StandardAlert';
  1089. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1090. { CFString-based StandardAlert and StandardSheet APIs are only available on Mac OS X and later}
  1091. {
  1092. * GetStandardAlertDefaultParams()
  1093. *
  1094. * Summary:
  1095. * Fills out an AlertStdCFStringAlertParamRec with default values: -
  1096. * not movable - no help button - default button with title
  1097. * kAlertDefaultOKText, meaning "OK" - no cancel or other buttons
  1098. *
  1099. * Mac OS X threading:
  1100. * Not thread safe
  1101. *
  1102. * Parameters:
  1103. *
  1104. * param:
  1105. * The parameter block to initialize.
  1106. *
  1107. * version:
  1108. * The parameter block version; pass kStdCFStringAlertVersionOne.
  1109. *
  1110. * Availability:
  1111. * Mac OS X: in version 10.0 and later in Carbon.framework
  1112. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  1113. * Non-Carbon CFM: not available
  1114. }
  1115. function GetStandardAlertDefaultParams( param: AlertStdCFStringAlertParamPtr; version: UInt32 ): OSStatus; external name '_GetStandardAlertDefaultParams';
  1116. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1117. {
  1118. * CreateStandardAlert()
  1119. *
  1120. * Summary:
  1121. * Creates an alert containing standard elements and using standard
  1122. * formatting rules.
  1123. *
  1124. * Discussion:
  1125. * CreateStandardAlert should be used in conjunction with
  1126. * RunStandardAlert. After CreateStandardAlert returns, the alert is
  1127. * still invisible. RunStandardAlert will show the alert and run a
  1128. * modal dialog loop to process events in the alert.
  1129. *
  1130. * The strings passed to this API in the error, explanation, and
  1131. * AlertStdCFStringAlertParamRec button title parameters will all be
  1132. * retained during the creation of the alert, and released when the
  1133. * alert is disposed by RunStandardAlert. There is no net change to
  1134. * the refcount of these strings across CreateStandardAlert and
  1135. * RunStandardAlert.
  1136. *
  1137. * Mac OS X threading:
  1138. * Not thread safe
  1139. *
  1140. * Parameters:
  1141. *
  1142. * alertType:
  1143. * The type of alert to create.
  1144. *
  1145. * error:
  1146. * The error string to display. CreateStandardAlert increments the
  1147. * refcount on this string, so you may release it after
  1148. * CreateStandardAlert returns if you don't need it later.
  1149. *
  1150. * explanation:
  1151. * The explanation string to display. May be NULL or empty to
  1152. * display no explanation. CreateStandardAlert increments the
  1153. * refcount on this string, so you may release it after
  1154. * CreateStandardAlert returns if you don't need it later.
  1155. *
  1156. * param:
  1157. * The parameter block describing how to create the alert. May be
  1158. * NULL. CreateStandardAlert increments the refcount on the button
  1159. * title strings in the parameter block, so you may release them
  1160. * after CreateStandardAlert returns if you don't need them later.
  1161. *
  1162. * outAlert:
  1163. * On exit, contains the new alert.
  1164. *
  1165. * Availability:
  1166. * Mac OS X: in version 10.0 and later in Carbon.framework
  1167. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  1168. * Non-Carbon CFM: not available
  1169. }
  1170. function CreateStandardAlert( alertType_: AlertType; error: CFStringRef; explanation: CFStringRef { can be NULL }; {const} param: AlertStdCFStringAlertParamPtr { can be NULL }; var outAlert: DialogRef ): OSStatus; external name '_CreateStandardAlert';
  1171. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1172. {
  1173. * RunStandardAlert()
  1174. *
  1175. * Summary:
  1176. * Shows, runs, and destroys a standard alert using a modal dialog
  1177. * loop.
  1178. *
  1179. * Discussion:
  1180. * RunStandardAlert displays and runs an alert created by
  1181. * CreateStandardAlert. It handles all user interaction with the
  1182. * alert. After the user has dismissed the alert, RunStandardAlert
  1183. * destroys the alert dialog; the DialogRef will be invalid after
  1184. * RunStandardAlert returns. DO NOT call DisposeDialog.
  1185. *
  1186. * NOTE: DO NOT call this function for a dialog that was not created
  1187. * with CreateStandardAlert! You will sorely regret it, I promise
  1188. * you.
  1189. *
  1190. * Mac OS X threading:
  1191. * Not thread safe
  1192. *
  1193. * Parameters:
  1194. *
  1195. * inAlert:
  1196. * The alert to display.
  1197. *
  1198. * filterProc:
  1199. * An event filter function for handling events that do not apply
  1200. * to the alert. May be NULL.
  1201. *
  1202. * outItemHit:
  1203. * On exit, contains the item index of the button that was pressed
  1204. * to close the alert.
  1205. *
  1206. * Availability:
  1207. * Mac OS X: in version 10.0 and later in Carbon.framework
  1208. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  1209. * Non-Carbon CFM: not available
  1210. }
  1211. function RunStandardAlert( inAlert: DialogRef; filterProc: ModalFilterUPP { can be NULL }; var outItemHit: DialogItemIndex ): OSStatus; external name '_RunStandardAlert';
  1212. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1213. {
  1214. * CreateStandardSheet()
  1215. *
  1216. * Summary:
  1217. * Creates an alert containing standard elements and using standard
  1218. * formatting rules, and prepares it to be displayed as a sheet.
  1219. *
  1220. * Discussion:
  1221. * CreateStandardSheet should be used in conjunction with
  1222. * ShowSheetWindow. After CreateStandardSheet returns, the alert is
  1223. * still invisible. ShowSheetWindow will show the alert and then
  1224. * return. Events in the sheet are handled asynchronously; the
  1225. * application should be prepared for the sheet window to be part of
  1226. * its windowlist while running its own event loop. When a button in
  1227. * the sheet is pressed, the EventTargetRef passed to
  1228. * CreateStandardSheet will receive a command event with one of the
  1229. * command IDs kHICommandOK, kHICommandCancel, or kHICommandOther.
  1230. * The sheet is hidden and the sheet dialog destroyed before the
  1231. * command is sent; the caller does not have to call HideSheetWindow
  1232. * or DisposeDialog.
  1233. *
  1234. * If the caller needs to destroy the sheet before showing it, then
  1235. * it is sufficient to call DisposeDialog on the sheet. This is the
  1236. * only case in which the caller would need to destroy the sheet
  1237. * explicitly.
  1238. *
  1239. * The strings passed to this API in the error, explanation, and
  1240. * AlertStdCFStringAlertParamRec button title parameters will all be
  1241. * retained during the creation of the sheet, and released when the
  1242. * sheet is disposed. There is no net change to the refcount of
  1243. * these strings across CreateStandardSheet and sheet destruction.
  1244. *
  1245. * Mac OS X threading:
  1246. * Not thread safe
  1247. *
  1248. * Parameters:
  1249. *
  1250. * alertType:
  1251. * The type of alert to create.
  1252. *
  1253. * error:
  1254. * The error string to display. CreateStandardSheet increments the
  1255. * refcount on this string, so you may release it after
  1256. * CreateStandardSheet returns if you don't need it later.
  1257. *
  1258. * explanation:
  1259. * The explanation string to display. May be NULL or empty to
  1260. * display no explanation. CreateStandardSheet increments the
  1261. * refcount on this string, so you may release it after
  1262. * CreateStandardSheet returns if you don't need it later.
  1263. *
  1264. * param:
  1265. * The parameter block describing how to create the alert. May be
  1266. * NULL. CreateStandardSheet increments the refcount on the button
  1267. * title strings in the parameter block, so you may release them
  1268. * after CreateStandardSheet returns if you don't need them later.
  1269. *
  1270. * notifyTarget:
  1271. * The event target to be notified when the sheet is closed. The
  1272. * caller should install an event handler on this target for the
  1273. * [kEventClassCommand, kEventProcessCommand] event. May be NULL
  1274. * if the caller does not need the command event to be sent to any
  1275. * target.
  1276. *
  1277. * Typically, this will be the event target for the parent window
  1278. * of the sheet; a standard practice is to install a handler on
  1279. * the parent window just before showing the sheet window, and to
  1280. * remove the handler from the parent window after the sheet has
  1281. * been closed. It is also possible to install a handler on the
  1282. * sheet window itself, in which case you would pass NULL for this
  1283. * parameter, since the command event is automatically sent to the
  1284. * sheet window already. If you install a handler on the sheet
  1285. * itself, make sure to return eventNotHandledErr from your
  1286. * handler, because CreateStandardSheet installs its own handler
  1287. * on the sheet and that handler must be allowed to run to close
  1288. * the sheet window and release the DialogRef.
  1289. *
  1290. * outSheet:
  1291. * On exit, contains the new alert.
  1292. *
  1293. * Availability:
  1294. * Mac OS X: in version 10.0 and later in Carbon.framework
  1295. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  1296. * Non-Carbon CFM: not available
  1297. }
  1298. function CreateStandardSheet( alertType_: AlertType; error: CFStringRef; explanation: CFStringRef { can be NULL }; {const} param: AlertStdCFStringAlertParamPtr { can be NULL }; notifyTarget: EventTargetRef { can be NULL }; var outSheet: DialogRef ): OSStatus; external name '_CreateStandardSheet';
  1299. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1300. {
  1301. * CloseStandardSheet()
  1302. *
  1303. * Summary:
  1304. * Closes a standard sheet dialog and releases the dialog data
  1305. * structures.
  1306. *
  1307. * Discussion:
  1308. * CloseStandardSheet is meant to be used when you need to remove a
  1309. * sheet because of a higher-priority request to close the sheet's
  1310. * document window. For example, you might have a Save Changes sheet
  1311. * open on a document window. Meanwhile, the user drags the document
  1312. * into the trash. When your application sees that the document has
  1313. * been moved to the trash, it knows that it should close the
  1314. * document window, but first it needs to close the sheet.
  1315. *
  1316. * CloseStandardSheet should not be used by your Carbon event
  1317. * handler in response to a click in one of the sheet buttons; the
  1318. * Dialog Manager will close the sheet automatically in that case.
  1319. *
  1320. *
  1321. * If kStdAlertDoNotDisposeSheet was specified when the sheet was
  1322. * created, the sheet dialog will be hidden but not released, and
  1323. * you can reuse the sheet later.
  1324. *
  1325. * Mac OS X threading:
  1326. * Not thread safe
  1327. *
  1328. * Parameters:
  1329. *
  1330. * inSheet:
  1331. * The sheet to close.
  1332. *
  1333. * inResultCommand:
  1334. * This command, if not zero, will be sent to the EventTarget
  1335. * specified when the sheet was created.
  1336. *
  1337. * Availability:
  1338. * Mac OS X: in version 10.0 and later in Carbon.framework
  1339. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  1340. * Non-Carbon CFM: not available
  1341. }
  1342. function CloseStandardSheet( inSheet: DialogRef; inResultCommand: UInt32 ): OSStatus; external name '_CloseStandardSheet';
  1343. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1344. {
  1345. * GetDialogItemAsControl()
  1346. *
  1347. * Mac OS X threading:
  1348. * Not thread safe
  1349. *
  1350. * Availability:
  1351. * Mac OS X: in version 10.0 and later in Carbon.framework
  1352. * CarbonLib: in CarbonLib 1.0 and later
  1353. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1354. }
  1355. function GetDialogItemAsControl( inDialog: DialogRef; inItemNo: SInt16; var outControl: ControlRef ): OSErr; external name '_GetDialogItemAsControl';
  1356. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1357. {
  1358. * MoveDialogItem()
  1359. *
  1360. * Mac OS X threading:
  1361. * Not thread safe
  1362. *
  1363. * Availability:
  1364. * Mac OS X: in version 10.0 and later in Carbon.framework
  1365. * CarbonLib: in CarbonLib 1.0 and later
  1366. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1367. }
  1368. function MoveDialogItem( inDialog: DialogRef; inItemNo: SInt16; inHoriz: SInt16; inVert: SInt16 ): OSErr; external name '_MoveDialogItem';
  1369. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1370. {
  1371. * SizeDialogItem()
  1372. *
  1373. * Mac OS X threading:
  1374. * Not thread safe
  1375. *
  1376. * Availability:
  1377. * Mac OS X: in version 10.0 and later in Carbon.framework
  1378. * CarbonLib: in CarbonLib 1.0 and later
  1379. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1380. }
  1381. function SizeDialogItem( inDialog: DialogRef; inItemNo: SInt16; inWidth: SInt16; inHeight: SInt16 ): OSErr; external name '_SizeDialogItem';
  1382. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1383. {
  1384. * AppendDialogItemList()
  1385. *
  1386. * Mac OS X threading:
  1387. * Not thread safe
  1388. *
  1389. * Availability:
  1390. * Mac OS X: in version 10.0 and later in Carbon.framework
  1391. * CarbonLib: in CarbonLib 1.0 and later
  1392. * Non-Carbon CFM: in DialogsLib 8.5 and later
  1393. }
  1394. function AppendDialogItemList( dialog: DialogRef; ditlID: SInt16; method: DITLMethod ): OSErr; external name '_AppendDialogItemList';
  1395. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1396. {
  1397. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  1398. ¥ Dialog Routines available only with Appearance 1.1 (Mac OS 8.5) and later
  1399. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  1400. }
  1401. {
  1402. * SetDialogTimeout()
  1403. *
  1404. * Summary:
  1405. * Sets the timeout for a modal dialog.
  1406. *
  1407. * Discussion:
  1408. * SetDialogTimeout sets the delay after which a dialog will be
  1409. * automatically dismissed. When SetDialogTimeout is called, the
  1410. * Dialog Manager takes the current time, adds the timeout to it,
  1411. * and stores the result as the time to dismiss the dialog. If the
  1412. * dismissal time is reached, the dialog is automatically closed and
  1413. * the specified dialog item index is returned from ModalDialog in
  1414. * the itemHit parameter. If the user moves the mouse or presses a
  1415. * key, the dismissal time is reset by adding the original timeout
  1416. * to the time of the event. Only the ModalDialog API observes the
  1417. * timeout value; if you are handling events in a modeless dialog or
  1418. * sheet using IsDialogEvent and DialogSelect, the timeout will be
  1419. * ignored.
  1420. *
  1421. * Mac OS X threading:
  1422. * Not thread safe
  1423. *
  1424. * Parameters:
  1425. *
  1426. * inDialog:
  1427. * The dialog on which to set a timeout.
  1428. *
  1429. * inButtonToPress:
  1430. * The dialog item index that should be returned from ModalDialog
  1431. * when the timeout expires.
  1432. *
  1433. * inSecondsToWait:
  1434. * The time to wait before dismissing the dialog, in seconds.
  1435. *
  1436. * Result:
  1437. * An operating system result code.
  1438. *
  1439. * Availability:
  1440. * Mac OS X: in version 10.0 and later in Carbon.framework
  1441. * CarbonLib: in CarbonLib 1.0 and later
  1442. * Non-Carbon CFM: in DialogsLib 8.5 and later
  1443. }
  1444. function SetDialogTimeout( inDialog: DialogRef; inButtonToPress: SInt16; inSecondsToWait: UInt32 ): OSStatus; external name '_SetDialogTimeout';
  1445. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1446. {
  1447. * GetDialogTimeout()
  1448. *
  1449. * Summary:
  1450. * Retrieves the timeout for a modal dialog.
  1451. *
  1452. * Mac OS X threading:
  1453. * Not thread safe
  1454. *
  1455. * Parameters:
  1456. *
  1457. * inDialog:
  1458. * The dialog from which to retrieve the timeout.
  1459. *
  1460. * outButtonToPress:
  1461. * On exit, contains the dialog item index that should be returned
  1462. * from ModalDialog when the dialog is dismissed. May be NULL if
  1463. * you do not need this information.
  1464. *
  1465. * outSecondsToWait:
  1466. * On exit, contains the time to wait before dismissing the
  1467. * dialog, in seconds. May be NULL if you do not need this
  1468. * information.
  1469. *
  1470. * outSecondsRemaining:
  1471. * On exit, contains the time until the dialog is dismissed, in
  1472. * seconds. May be NULL if you do not need this information.
  1473. *
  1474. * Result:
  1475. * An operating system result code. Returns dialogNoTimeoutErr if no
  1476. * timeout has been set for this dialog.
  1477. *
  1478. * Availability:
  1479. * Mac OS X: in version 10.0 and later in Carbon.framework
  1480. * CarbonLib: in CarbonLib 1.0 and later
  1481. * Non-Carbon CFM: in DialogsLib 8.5 and later
  1482. }
  1483. function GetDialogTimeout( inDialog: DialogRef; outButtonToPress: SInt16Ptr { can be NULL }; outSecondsToWait: UInt32Ptr { can be NULL }; outSecondsRemaining: UInt32Ptr { can be NULL } ): OSStatus; external name '_GetDialogTimeout';
  1484. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1485. {
  1486. * SetModalDialogEventMask()
  1487. *
  1488. * Mac OS X threading:
  1489. * Not thread safe
  1490. *
  1491. * Availability:
  1492. * Mac OS X: in version 10.0 and later in Carbon.framework
  1493. * CarbonLib: in CarbonLib 1.0 and later
  1494. * Non-Carbon CFM: in DialogsLib 8.5 and later
  1495. }
  1496. function SetModalDialogEventMask( inDialog: DialogRef; inMask: EventMask ): OSStatus; external name '_SetModalDialogEventMask';
  1497. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1498. {
  1499. * GetModalDialogEventMask()
  1500. *
  1501. * Mac OS X threading:
  1502. * Not thread safe
  1503. *
  1504. * Availability:
  1505. * Mac OS X: in version 10.0 and later in Carbon.framework
  1506. * CarbonLib: in CarbonLib 1.0 and later
  1507. * Non-Carbon CFM: in DialogsLib 8.5 and later
  1508. }
  1509. function GetModalDialogEventMask( inDialog: DialogRef; var outMask: EventMask ): OSStatus; external name '_GetModalDialogEventMask';
  1510. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1511. {
  1512. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  1513. ¥ Accessor functions
  1514. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  1515. }
  1516. {
  1517. * GetDialogWindow()
  1518. *
  1519. * Mac OS X threading:
  1520. * Not thread safe
  1521. *
  1522. * Availability:
  1523. * Mac OS X: in version 10.0 and later in Carbon.framework
  1524. * CarbonLib: in CarbonLib 1.0 and later
  1525. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  1526. }
  1527. function GetDialogWindow( dialog: DialogRef ): WindowRef; external name '_GetDialogWindow';
  1528. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1529. {
  1530. * GetDialogTextEditHandle()
  1531. *
  1532. * Mac OS X threading:
  1533. * Not thread safe
  1534. *
  1535. * Availability:
  1536. * Mac OS X: in version 10.0 and later in Carbon.framework
  1537. * CarbonLib: in CarbonLib 1.0 and later
  1538. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  1539. }
  1540. function GetDialogTextEditHandle( dialog: DialogRef ): TEHandle; external name '_GetDialogTextEditHandle';
  1541. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1542. {
  1543. * GetDialogDefaultItem()
  1544. *
  1545. * Mac OS X threading:
  1546. * Not thread safe
  1547. *
  1548. * Availability:
  1549. * Mac OS X: in version 10.0 and later in Carbon.framework
  1550. * CarbonLib: in CarbonLib 1.0 and later
  1551. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  1552. }
  1553. function GetDialogDefaultItem( dialog: DialogRef ): SInt16; external name '_GetDialogDefaultItem';
  1554. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1555. {
  1556. * GetDialogCancelItem()
  1557. *
  1558. * Mac OS X threading:
  1559. * Not thread safe
  1560. *
  1561. * Availability:
  1562. * Mac OS X: in version 10.0 and later in Carbon.framework
  1563. * CarbonLib: in CarbonLib 1.0 and later
  1564. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  1565. }
  1566. function GetDialogCancelItem( dialog: DialogRef ): SInt16; external name '_GetDialogCancelItem';
  1567. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1568. {
  1569. * GetDialogKeyboardFocusItem()
  1570. *
  1571. * Mac OS X threading:
  1572. * Not thread safe
  1573. *
  1574. * Availability:
  1575. * Mac OS X: in version 10.0 and later in Carbon.framework
  1576. * CarbonLib: in CarbonLib 1.0 and later
  1577. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  1578. }
  1579. function GetDialogKeyboardFocusItem( dialog: DialogRef ): SInt16; external name '_GetDialogKeyboardFocusItem';
  1580. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1581. {
  1582. * SetPortDialogPort()
  1583. *
  1584. * Mac OS X threading:
  1585. * Not thread safe
  1586. *
  1587. * Availability:
  1588. * Mac OS X: in version 10.0 and later in Carbon.framework
  1589. * CarbonLib: in CarbonLib 1.0 and later
  1590. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  1591. }
  1592. procedure SetPortDialogPort( dialog: DialogRef ); external name '_SetPortDialogPort';
  1593. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1594. {
  1595. * GetDialogPort()
  1596. *
  1597. * Mac OS X threading:
  1598. * Not thread safe
  1599. *
  1600. * Availability:
  1601. * Mac OS X: in version 10.0 and later in Carbon.framework
  1602. * CarbonLib: in CarbonLib 1.0 and later
  1603. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  1604. }
  1605. function GetDialogPort( dialog: DialogRef ): CGrafPtr; external name '_GetDialogPort';
  1606. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1607. {
  1608. * GetDialogFromWindow()
  1609. *
  1610. * Mac OS X threading:
  1611. * Not thread safe
  1612. *
  1613. * Availability:
  1614. * Mac OS X: in version 10.0 and later in Carbon.framework
  1615. * CarbonLib: in CarbonLib 1.0 and later
  1616. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  1617. }
  1618. function GetDialogFromWindow( window: WindowRef ): DialogRef; external name '_GetDialogFromWindow';
  1619. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1620. {
  1621. * CouldDialog()
  1622. *
  1623. * Availability:
  1624. * Mac OS X: not available
  1625. * CarbonLib: not available
  1626. * Non-Carbon CFM: not available
  1627. }
  1628. {
  1629. * FreeDialog()
  1630. *
  1631. * Availability:
  1632. * Mac OS X: not available
  1633. * CarbonLib: not available
  1634. * Non-Carbon CFM: not available
  1635. }
  1636. {
  1637. * CouldAlert()
  1638. *
  1639. * Availability:
  1640. * Mac OS X: not available
  1641. * CarbonLib: not available
  1642. * Non-Carbon CFM: not available
  1643. }
  1644. {
  1645. * FreeAlert()
  1646. *
  1647. * Availability:
  1648. * Mac OS X: not available
  1649. * CarbonLib: not available
  1650. * Non-Carbon CFM: not available
  1651. }
  1652. (*
  1653. #if OLDROUTINENAMES
  1654. #define DisposDialog(theDialog) DisposeDialog(theDialog)
  1655. #define UpdtDialog(theDialog, updateRgn) UpdateDialog(theDialog, updateRgn)
  1656. #define GetDItem(theDialog, itemNo, itemType, item, box) GetDialogItem(theDialog, itemNo, itemType, item, box)
  1657. #define SetDItem(theDialog, itemNo, itemType, item, box) SetDialogItem(theDialog, itemNo, itemType, item, box)
  1658. #define HideDItem(theDialog, itemNo) HideDialogItem(theDialog, itemNo)
  1659. #define ShowDItem(theDialog, itemNo) ShowDialogItem(theDialog, itemNo)
  1660. #define SelIText(theDialog, itemNo, strtSel, endSel) SelectDialogItemText(theDialog, itemNo, strtSel, endSel)
  1661. #define GetIText(item, text) GetDialogItemText(item, text)
  1662. #define SetIText(item, text) SetDialogItemText(item, text)
  1663. #define FindDItem(theDialog, thePt) FindDialogItem(theDialog, thePt)
  1664. #define NewCDialog(dStorage, boundsRect, title, visible, procID, behind, goAwayFlag, refCon, items) \
  1665. NewColorDialog(dStorage, boundsRect, title, visible, procID, behind, goAwayFlag, refCon, items)
  1666. #define GetAlrtStage() GetAlertStage()
  1667. #define ResetAlrtStage() ResetAlertStage()
  1668. #define DlgCut(theDialog) DialogCut(theDialog)
  1669. #define DlgPaste(theDialog) DialogPaste(theDialog)
  1670. #define DlgCopy(theDialog) DialogCopy(theDialog)
  1671. #define DlgDelete(theDialog) DialogDelete(theDialog)
  1672. #define SetDAFont(fontNum) SetDialogFont(fontNum)
  1673. #define SetGrafPortOfDialog(dialog) SetPortDialogPort(dialog)
  1674. #endif { OLDROUTINENAMES }
  1675. *)
  1676. end.