MacHelp.pas 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938
  1. {
  2. File: HIToolbox/MacHelp.h
  3. Contains: Macintosh Help Package Interfaces.
  4. Version: HIToolbox-219.4.81~2
  5. Copyright: © 1998-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 MacHelp;
  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,Quickdraw,TextEdit,Controls,Dialogs,Events,MacWindows,Menus;
  92. {$ALIGN MAC68K}
  93. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  94. { Help Manager constants, etc. }
  95. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  96. const
  97. kMacHelpVersion = $0003;
  98. const
  99. kHMHelpMenuID = -16490; { Resource ID and menu ID of help menu }
  100. type
  101. HMContentRequest = SInt16;
  102. const
  103. kHMSupplyContent = 0;
  104. kHMDisposeContent = 1;
  105. type
  106. HMContentType = UInt32;
  107. const
  108. kHMNoContent = $6E6F6E65 (* 'none' *);
  109. kHMCFStringContent = $63667374 (* 'cfst' *); { CFStringRef}
  110. kHMCFStringLocalizedContent = $6366736C (* 'cfsl' *); { CFStringRef; name of a localized string. Supported by Jaguar and later.}
  111. kHMPascalStrContent = $70737472 (* 'pstr' *);
  112. kHMStringResContent = $73747223 (* 'str#' *);
  113. kHMTEHandleContent = $74787468 (* 'txth' *); { Supported by CarbonLib and Jaguar and later}
  114. kHMTextResContent = $74657874 (* 'text' *); { Supported by CarbonLib and Jaguar and later}
  115. kHMStrResContent = $73747220 (* 'str ' *);
  116. {
  117. * HMTagDisplaySide
  118. *
  119. * Discussion:
  120. * Help tag display locations relative to absolute hot rect
  121. }
  122. type
  123. HMTagDisplaySide = SInt16;
  124. const
  125. {
  126. * System default location
  127. }
  128. kHMDefaultSide = 0;
  129. {
  130. * Above, aligned with left or right depending on system script
  131. }
  132. kHMOutsideTopScriptAligned = 1;
  133. {
  134. * To the left, centered vertically
  135. }
  136. kHMOutsideLeftCenterAligned = 2;
  137. kHMOutsideBottomScriptAligned = 3;
  138. {
  139. * To the right, centered vertically
  140. }
  141. kHMOutsideRightCenterAligned = 4;
  142. {
  143. * Above, aligned with left
  144. }
  145. kHMOutsideTopLeftAligned = 5;
  146. {
  147. * Above, aligned with right
  148. }
  149. kHMOutsideTopRightAligned = 6;
  150. {
  151. * To the left, aligned with top
  152. }
  153. kHMOutsideLeftTopAligned = 7;
  154. {
  155. * To the left, aligned with bottom
  156. }
  157. kHMOutsideLeftBottomAligned = 8;
  158. {
  159. * To the right, aligned with top
  160. }
  161. kHMOutsideBottomLeftAligned = 9;
  162. {
  163. * To the right, aligned with bottom
  164. }
  165. kHMOutsideBottomRightAligned = 10;
  166. kHMOutsideRightTopAligned = 11;
  167. kHMOutsideRightBottomAligned = 12;
  168. {
  169. * Above, centered horizontally
  170. }
  171. kHMOutsideTopCenterAligned = 13;
  172. {
  173. * Below, centered horizontally
  174. }
  175. kHMOutsideBottomCenterAligned = 14;
  176. {
  177. * Inside, aligned with right, centered vertically
  178. }
  179. kHMInsideRightCenterAligned = 15;
  180. {
  181. * Inside, aligned with left, centered vertically
  182. }
  183. kHMInsideLeftCenterAligned = 16;
  184. {
  185. * Inside, aligned with bottom, centered horizontally
  186. }
  187. kHMInsideBottomCenterAligned = 17;
  188. {
  189. * Inside, aligned with top, centered horizontally
  190. }
  191. kHMInsideTopCenterAligned = 18;
  192. {
  193. * Inside, aligned with top and left
  194. }
  195. kHMInsideTopLeftCorner = 19;
  196. {
  197. * Inside, aligned with top and right
  198. }
  199. kHMInsideTopRightCorner = 20;
  200. {
  201. * Inside, aligned with bottom and left
  202. }
  203. kHMInsideBottomLeftCorner = 21;
  204. {
  205. * Inside, aligned with bottom and right
  206. }
  207. kHMInsideBottomRightCorner = 22;
  208. {
  209. * Centered vertically and horizontally
  210. }
  211. kHMAbsoluteCenterAligned = 23;
  212. { Obsoleted constants HMTagDisplaySides, use the new ones, please }
  213. const
  214. kHMTopSide = kHMOutsideTopScriptAligned;
  215. kHMLeftSide = kHMOutsideLeftCenterAligned;
  216. kHMBottomSide = kHMOutsideBottomScriptAligned;
  217. kHMRightSide = kHMOutsideRightCenterAligned;
  218. kHMTopLeftCorner = kHMOutsideTopLeftAligned;
  219. kHMTopRightCorner = kHMOutsideTopRightAligned;
  220. kHMLeftTopCorner = kHMOutsideLeftTopAligned;
  221. kHMLeftBottomCorner = kHMOutsideLeftBottomAligned;
  222. kHMBottomLeftCorner = kHMOutsideBottomLeftAligned;
  223. kHMBottomRightCorner = kHMOutsideBottomRightAligned;
  224. kHMRightTopCorner = kHMOutsideRightTopAligned;
  225. kHMRightBottomCorner = kHMOutsideRightBottomAligned;
  226. type
  227. HMContentProvidedType = SInt16;
  228. const
  229. kHMContentProvided = 0;
  230. kHMContentNotProvided = 1;
  231. kHMContentNotProvidedDontPropagate = 2;
  232. const
  233. kHMMinimumContentIndex = 0; { first entry in HMHelpContentRec.content is the minimum content }
  234. kHMMaximumContentIndex = 1; { second entry in HMHelpContentRec.content is the maximum content }
  235. const
  236. errHMIllegalContentForMinimumState = -10980; { unrecognized content type for minimum content }
  237. errHMIllegalContentForMaximumState = -10981; { unrecognized content type for maximum content }
  238. { obsolete names; will be removed}
  239. const
  240. kHMIllegalContentForMinimumState = errHMIllegalContentForMinimumState;
  241. const
  242. kHelpTagEventHandlerTag = $68657674 (* 'hevt' *);
  243. type
  244. HMStringResType = record
  245. hmmResID: SInt16;
  246. hmmIndex: SInt16;
  247. end;
  248. type
  249. HMHelpContent = record
  250. contentType: HMContentType;
  251. case SInt16 of
  252. 0: (
  253. tagCFString: CFStringRef; { CFStringRef }
  254. );
  255. 1: (
  256. tagString: Str255; { Pascal String }
  257. );
  258. 2: (
  259. tagStringRes: HMStringResType; { STR# resource ID and index }
  260. );
  261. 3: (
  262. tagTEHandle: TEHandle; { TextEdit handle (NOT SUPPORTED ON MAC OS X) }
  263. );
  264. 4: (
  265. tagTextRes: SInt16; { TEXT/styl resource ID (NOT SUPPORTED ON MAC OS X) }
  266. );
  267. 5: (
  268. tagStrRes: SInt16; { STR resource ID }
  269. );
  270. end;
  271. type
  272. HMHelpContentRec = record
  273. version: SInt32;
  274. absHotRect: Rect;
  275. tagSide: HMTagDisplaySide;
  276. content: array [0..1] of HMHelpContent;
  277. end;
  278. HMHelpContentPtr = ^HMHelpContentRec;
  279. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  280. { Callback procs }
  281. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
  282. type
  283. HMControlContentProcPtr = function( inControl: ControlRef; inGlobalMouse: Point; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr ): OSStatus;
  284. type
  285. HMWindowContentProcPtr = function( inWindow: WindowRef; inGlobalMouse: Point; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr ): OSStatus;
  286. type
  287. HMMenuTitleContentProcPtr = function( inMenu: MenuRef; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr ): OSStatus;
  288. type
  289. HMMenuItemContentProcPtr = function( const (*var*) inTrackingData: MenuTrackingData; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr ): OSStatus;
  290. type
  291. HMControlContentUPP = HMControlContentProcPtr;
  292. type
  293. HMWindowContentUPP = HMWindowContentProcPtr;
  294. type
  295. HMMenuTitleContentUPP = HMMenuTitleContentProcPtr;
  296. type
  297. HMMenuItemContentUPP = HMMenuItemContentProcPtr;
  298. {
  299. * NewHMControlContentUPP()
  300. *
  301. * Availability:
  302. * Mac OS X: in version 10.0 and later in Carbon.framework
  303. * CarbonLib: in CarbonLib 1.0 and later
  304. * Non-Carbon CFM: available as macro/inline
  305. }
  306. function NewHMControlContentUPP( userRoutine: HMControlContentProcPtr ): HMControlContentUPP; external name '_NewHMControlContentUPP';
  307. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  308. {
  309. * NewHMWindowContentUPP()
  310. *
  311. * Availability:
  312. * Mac OS X: in version 10.0 and later in Carbon.framework
  313. * CarbonLib: in CarbonLib 1.0 and later
  314. * Non-Carbon CFM: available as macro/inline
  315. }
  316. function NewHMWindowContentUPP( userRoutine: HMWindowContentProcPtr ): HMWindowContentUPP; external name '_NewHMWindowContentUPP';
  317. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  318. {
  319. * NewHMMenuTitleContentUPP()
  320. *
  321. * Availability:
  322. * Mac OS X: in version 10.0 and later in Carbon.framework
  323. * CarbonLib: in CarbonLib 1.0 and later
  324. * Non-Carbon CFM: available as macro/inline
  325. }
  326. function NewHMMenuTitleContentUPP( userRoutine: HMMenuTitleContentProcPtr ): HMMenuTitleContentUPP; external name '_NewHMMenuTitleContentUPP';
  327. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  328. {
  329. * NewHMMenuItemContentUPP()
  330. *
  331. * Availability:
  332. * Mac OS X: in version 10.0 and later in Carbon.framework
  333. * CarbonLib: in CarbonLib 1.0 and later
  334. * Non-Carbon CFM: available as macro/inline
  335. }
  336. function NewHMMenuItemContentUPP( userRoutine: HMMenuItemContentProcPtr ): HMMenuItemContentUPP; external name '_NewHMMenuItemContentUPP';
  337. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  338. {
  339. * DisposeHMControlContentUPP()
  340. *
  341. * Availability:
  342. * Mac OS X: in version 10.0 and later in Carbon.framework
  343. * CarbonLib: in CarbonLib 1.0 and later
  344. * Non-Carbon CFM: available as macro/inline
  345. }
  346. procedure DisposeHMControlContentUPP( userUPP: HMControlContentUPP ); external name '_DisposeHMControlContentUPP';
  347. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  348. {
  349. * DisposeHMWindowContentUPP()
  350. *
  351. * Availability:
  352. * Mac OS X: in version 10.0 and later in Carbon.framework
  353. * CarbonLib: in CarbonLib 1.0 and later
  354. * Non-Carbon CFM: available as macro/inline
  355. }
  356. procedure DisposeHMWindowContentUPP( userUPP: HMWindowContentUPP ); external name '_DisposeHMWindowContentUPP';
  357. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  358. {
  359. * DisposeHMMenuTitleContentUPP()
  360. *
  361. * Availability:
  362. * Mac OS X: in version 10.0 and later in Carbon.framework
  363. * CarbonLib: in CarbonLib 1.0 and later
  364. * Non-Carbon CFM: available as macro/inline
  365. }
  366. procedure DisposeHMMenuTitleContentUPP( userUPP: HMMenuTitleContentUPP ); external name '_DisposeHMMenuTitleContentUPP';
  367. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  368. {
  369. * DisposeHMMenuItemContentUPP()
  370. *
  371. * Availability:
  372. * Mac OS X: in version 10.0 and later in Carbon.framework
  373. * CarbonLib: in CarbonLib 1.0 and later
  374. * Non-Carbon CFM: available as macro/inline
  375. }
  376. procedure DisposeHMMenuItemContentUPP( userUPP: HMMenuItemContentUPP ); external name '_DisposeHMMenuItemContentUPP';
  377. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  378. {
  379. * InvokeHMControlContentUPP()
  380. *
  381. * Availability:
  382. * Mac OS X: in version 10.0 and later in Carbon.framework
  383. * CarbonLib: in CarbonLib 1.0 and later
  384. * Non-Carbon CFM: available as macro/inline
  385. }
  386. function InvokeHMControlContentUPP( inControl: ControlRef; inGlobalMouse: Point; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr; userUPP: HMControlContentUPP ): OSStatus; external name '_InvokeHMControlContentUPP';
  387. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  388. {
  389. * InvokeHMWindowContentUPP()
  390. *
  391. * Availability:
  392. * Mac OS X: in version 10.0 and later in Carbon.framework
  393. * CarbonLib: in CarbonLib 1.0 and later
  394. * Non-Carbon CFM: available as macro/inline
  395. }
  396. function InvokeHMWindowContentUPP( inWindow: WindowRef; inGlobalMouse: Point; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr; userUPP: HMWindowContentUPP ): OSStatus; external name '_InvokeHMWindowContentUPP';
  397. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  398. {
  399. * InvokeHMMenuTitleContentUPP()
  400. *
  401. * Availability:
  402. * Mac OS X: in version 10.0 and later in Carbon.framework
  403. * CarbonLib: in CarbonLib 1.0 and later
  404. * Non-Carbon CFM: available as macro/inline
  405. }
  406. function InvokeHMMenuTitleContentUPP( inMenu: MenuRef; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr; userUPP: HMMenuTitleContentUPP ): OSStatus; external name '_InvokeHMMenuTitleContentUPP';
  407. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  408. {
  409. * InvokeHMMenuItemContentUPP()
  410. *
  411. * Availability:
  412. * Mac OS X: in version 10.0 and later in Carbon.framework
  413. * CarbonLib: in CarbonLib 1.0 and later
  414. * Non-Carbon CFM: available as macro/inline
  415. }
  416. function InvokeHMMenuItemContentUPP( const (*var*) inTrackingData: MenuTrackingData; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr; userUPP: HMMenuItemContentUPP ): OSStatus; external name '_InvokeHMMenuItemContentUPP';
  417. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  418. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  419. { API }
  420. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  421. { Help Menu }
  422. {
  423. * HMGetHelpMenu()
  424. *
  425. * Summary:
  426. * Returns a menu to which applications may add their own help items.
  427. *
  428. * Mac OS X threading:
  429. * Not thread safe
  430. *
  431. * Parameters:
  432. *
  433. * outHelpMenu:
  434. * On exit, contains the help menu.
  435. *
  436. * outFirstCustomItemIndex:
  437. * On exit, contains the menu item index that will be used by the
  438. * first item added by the application. This parameter may be NULL.
  439. *
  440. * Availability:
  441. * Mac OS X: in version 10.0 and later in Carbon.framework
  442. * CarbonLib: in CarbonLib 1.1 and later
  443. * Non-Carbon CFM: not available
  444. }
  445. function HMGetHelpMenu( var outHelpMenu: MenuRef; outFirstCustomItemIndex: MenuItemIndexPtr { can be NULL } ): OSStatus; external name '_HMGetHelpMenu';
  446. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  447. { Installing/Retrieving Content }
  448. { Menu title and item help tags are not supported by CarbonLib. They are fully supported on Mac OS X. }
  449. { Pass NULL for the inContent parameter of HMSetControl/Window/MenuItemHelpContent to remove help content
  450. from a control, window, or menu. }
  451. {
  452. * HMSetControlHelpContent()
  453. *
  454. * Mac OS X threading:
  455. * Not thread safe
  456. *
  457. * Availability:
  458. * Mac OS X: in version 10.0 and later in Carbon.framework
  459. * CarbonLib: in CarbonLib 1.0 and later
  460. * Non-Carbon CFM: not available
  461. }
  462. function HMSetControlHelpContent( inControl: ControlRef; {const} inContent: HMHelpContentPtr { can be NULL } ): OSStatus; external name '_HMSetControlHelpContent';
  463. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  464. {
  465. * HMGetControlHelpContent()
  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: not available
  474. }
  475. function HMGetControlHelpContent( inControl: ControlRef; var outContent: HMHelpContentRec ): OSStatus; external name '_HMGetControlHelpContent';
  476. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  477. {
  478. * HMSetWindowHelpContent()
  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: not available
  487. }
  488. function HMSetWindowHelpContent( inWindow: WindowRef; {const} inContent: HMHelpContentPtr { can be NULL } ): OSStatus; external name '_HMSetWindowHelpContent';
  489. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  490. {
  491. * HMGetWindowHelpContent()
  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: not available
  500. }
  501. function HMGetWindowHelpContent( inWindow: WindowRef; var outContent: HMHelpContentRec ): OSStatus; external name '_HMGetWindowHelpContent';
  502. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  503. {
  504. * HMSetMenuItemHelpContent()
  505. *
  506. * Mac OS X threading:
  507. * Not thread safe
  508. *
  509. * Availability:
  510. * Mac OS X: in version 10.0 and later in Carbon.framework
  511. * CarbonLib: in CarbonLib 1.0 and later
  512. * Non-Carbon CFM: not available
  513. }
  514. function HMSetMenuItemHelpContent( inMenu: MenuRef; inItem: MenuItemIndex; {const} inContent: HMHelpContentPtr { can be NULL } ): OSStatus; external name '_HMSetMenuItemHelpContent';
  515. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  516. {
  517. * HMGetMenuItemHelpContent()
  518. *
  519. * Mac OS X threading:
  520. * Not thread safe
  521. *
  522. * Availability:
  523. * Mac OS X: in version 10.0 and later in Carbon.framework
  524. * CarbonLib: in CarbonLib 1.0 and later
  525. * Non-Carbon CFM: not available
  526. }
  527. function HMGetMenuItemHelpContent( inMenu: MenuRef; inItem: MenuItemIndex; var outContent: HMHelpContentRec ): OSStatus; external name '_HMGetMenuItemHelpContent';
  528. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  529. { Installing/Retrieving Content Callbacks }
  530. {
  531. * HMInstallControlContentCallback()
  532. *
  533. * Mac OS X threading:
  534. * Not thread safe
  535. *
  536. * Availability:
  537. * Mac OS X: in version 10.0 and later in Carbon.framework
  538. * CarbonLib: in CarbonLib 1.0 and later
  539. * Non-Carbon CFM: not available
  540. }
  541. function HMInstallControlContentCallback( inControl: ControlRef; inContentUPP: HMControlContentUPP ): OSStatus; external name '_HMInstallControlContentCallback';
  542. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  543. {
  544. * HMInstallWindowContentCallback()
  545. *
  546. * Mac OS X threading:
  547. * Not thread safe
  548. *
  549. * Availability:
  550. * Mac OS X: in version 10.0 and later in Carbon.framework
  551. * CarbonLib: in CarbonLib 1.0 and later
  552. * Non-Carbon CFM: not available
  553. }
  554. function HMInstallWindowContentCallback( inWindow: WindowRef; inContentUPP: HMWindowContentUPP ): OSStatus; external name '_HMInstallWindowContentCallback';
  555. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  556. {
  557. * HMInstallMenuTitleContentCallback()
  558. *
  559. * Mac OS X threading:
  560. * Not thread safe
  561. *
  562. * Availability:
  563. * Mac OS X: in version 10.0 and later in Carbon.framework
  564. * CarbonLib: in CarbonLib 1.0 and later
  565. * Non-Carbon CFM: not available
  566. }
  567. function HMInstallMenuTitleContentCallback( inMenu: MenuRef; inContentUPP: HMMenuTitleContentUPP ): OSStatus; external name '_HMInstallMenuTitleContentCallback';
  568. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  569. {
  570. * HMInstallMenuItemContentCallback()
  571. *
  572. * Mac OS X threading:
  573. * Not thread safe
  574. *
  575. * Availability:
  576. * Mac OS X: in version 10.0 and later in Carbon.framework
  577. * CarbonLib: in CarbonLib 1.0 and later
  578. * Non-Carbon CFM: not available
  579. }
  580. function HMInstallMenuItemContentCallback( inMenu: MenuRef; inContentUPP: HMMenuItemContentUPP ): OSStatus; external name '_HMInstallMenuItemContentCallback';
  581. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  582. {
  583. * HMGetControlContentCallback()
  584. *
  585. * Mac OS X threading:
  586. * Not thread safe
  587. *
  588. * Availability:
  589. * Mac OS X: in version 10.0 and later in Carbon.framework
  590. * CarbonLib: in CarbonLib 1.0 and later
  591. * Non-Carbon CFM: not available
  592. }
  593. function HMGetControlContentCallback( inControl: ControlRef; var outContentUPP: HMControlContentUPP ): OSStatus; external name '_HMGetControlContentCallback';
  594. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  595. {
  596. * HMGetWindowContentCallback()
  597. *
  598. * Mac OS X threading:
  599. * Not thread safe
  600. *
  601. * Availability:
  602. * Mac OS X: in version 10.0 and later in Carbon.framework
  603. * CarbonLib: in CarbonLib 1.0 and later
  604. * Non-Carbon CFM: not available
  605. }
  606. function HMGetWindowContentCallback( inWindow: WindowRef; var outContentUPP: HMWindowContentUPP ): OSStatus; external name '_HMGetWindowContentCallback';
  607. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  608. {
  609. * HMGetMenuTitleContentCallback()
  610. *
  611. * Mac OS X threading:
  612. * Not thread safe
  613. *
  614. * Availability:
  615. * Mac OS X: in version 10.0 and later in Carbon.framework
  616. * CarbonLib: in CarbonLib 1.0 and later
  617. * Non-Carbon CFM: not available
  618. }
  619. function HMGetMenuTitleContentCallback( inMenu: MenuRef; var outContentUPP: HMMenuTitleContentUPP ): OSStatus; external name '_HMGetMenuTitleContentCallback';
  620. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  621. {
  622. * HMGetMenuItemContentCallback()
  623. *
  624. * Mac OS X threading:
  625. * Not thread safe
  626. *
  627. * Availability:
  628. * Mac OS X: in version 10.0 and later in Carbon.framework
  629. * CarbonLib: in CarbonLib 1.0 and later
  630. * Non-Carbon CFM: not available
  631. }
  632. function HMGetMenuItemContentCallback( inMenu: MenuRef; var outContentUPP: HMMenuItemContentUPP ): OSStatus; external name '_HMGetMenuItemContentCallback';
  633. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  634. { Enabling and Disabling Help Tags }
  635. {
  636. * HMAreHelpTagsDisplayed()
  637. *
  638. * Mac OS X threading:
  639. * Not thread safe
  640. *
  641. * Availability:
  642. * Mac OS X: in version 10.0 and later in Carbon.framework
  643. * CarbonLib: in CarbonLib 1.0 and later
  644. * Non-Carbon CFM: not available
  645. }
  646. function HMAreHelpTagsDisplayed: Boolean; external name '_HMAreHelpTagsDisplayed';
  647. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  648. {
  649. * HMSetHelpTagsDisplayed()
  650. *
  651. * Mac OS X threading:
  652. * Not thread safe
  653. *
  654. * Availability:
  655. * Mac OS X: in version 10.0 and later in Carbon.framework
  656. * CarbonLib: in CarbonLib 1.0 and later
  657. * Non-Carbon CFM: not available
  658. }
  659. function HMSetHelpTagsDisplayed( inDisplayTags: Boolean ): OSStatus; external name '_HMSetHelpTagsDisplayed';
  660. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  661. {
  662. * HMSetTagDelay()
  663. *
  664. * Mac OS X threading:
  665. * Not thread safe
  666. *
  667. * Availability:
  668. * Mac OS X: in version 10.0 and later in Carbon.framework
  669. * CarbonLib: in CarbonLib 1.0 and later
  670. * Non-Carbon CFM: not available
  671. }
  672. function HMSetTagDelay( inDelay: Duration ): OSStatus; external name '_HMSetTagDelay';
  673. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  674. {
  675. * HMGetTagDelay()
  676. *
  677. * Mac OS X threading:
  678. * Not thread safe
  679. *
  680. * Availability:
  681. * Mac OS X: in version 10.0 and later in Carbon.framework
  682. * CarbonLib: in CarbonLib 1.0 and later
  683. * Non-Carbon CFM: not available
  684. }
  685. function HMGetTagDelay( var outDelay: Duration ): OSStatus; external name '_HMGetTagDelay';
  686. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  687. { Compatibility }
  688. {
  689. * HMSetMenuHelpFromBalloonRsrc()
  690. *
  691. * Summary:
  692. * Not really implemented.
  693. *
  694. * Discussion:
  695. * Though this API is exported from CarbonLib and Mac OS X, it is
  696. * completely non-functional. We have no plans to implement it.
  697. *
  698. * Mac OS X threading:
  699. * Not thread safe
  700. *
  701. * Availability:
  702. * Mac OS X: in version 10.0 and later in Carbon.framework
  703. * CarbonLib: in CarbonLib 1.0 and later
  704. * Non-Carbon CFM: not available
  705. }
  706. function HMSetMenuHelpFromBalloonRsrc( inMenu: MenuRef; inHmnuRsrcID: SInt16 ): OSStatus; external name '_HMSetMenuHelpFromBalloonRsrc';
  707. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  708. {
  709. * HMSetDialogHelpFromBalloonRsrc()
  710. *
  711. * Summary:
  712. * Not really implemented.
  713. *
  714. * Discussion:
  715. * Though this API is exported from CarbonLib and Mac OS X, it is
  716. * completely non-functional. We have no plans to implement it.
  717. *
  718. * Mac OS X threading:
  719. * Not thread safe
  720. *
  721. * Availability:
  722. * Mac OS X: in version 10.0 and later in Carbon.framework
  723. * CarbonLib: in CarbonLib 1.0 and later
  724. * Non-Carbon CFM: not available
  725. }
  726. function HMSetDialogHelpFromBalloonRsrc( inDialog: DialogRef; inHdlgRsrcID: SInt16; inItemStart: SInt16 ): OSStatus; external name '_HMSetDialogHelpFromBalloonRsrc';
  727. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  728. { Displaying tags }
  729. {
  730. * HMDisplayTag()
  731. *
  732. * Summary:
  733. * Displays a help tag at a user-defined location.
  734. *
  735. * Discussion:
  736. * Note that HMDisplayTag does not currently retain the help content
  737. * that is passed to it, nor release it when the tag is closed. Your
  738. * application must ensure that the help content remains valid as
  739. * long as the tag may be visible (which effectively means that your
  740. * application should never dispose of help content that is passed
  741. * to HMDisplayTag).
  742. *
  743. * Mac OS X threading:
  744. * Not thread safe
  745. *
  746. * Parameters:
  747. *
  748. * inContent:
  749. * HMHelpContentRec describing the help tag to be displayed.
  750. *
  751. * Result:
  752. * An OSStatus code indicating success or failure.
  753. *
  754. * Availability:
  755. * Mac OS X: in version 10.0 and later in Carbon.framework
  756. * CarbonLib: in CarbonLib 1.2 and later
  757. * Non-Carbon CFM: not available
  758. }
  759. function HMDisplayTag( const (*var*) inContent: HMHelpContentRec ): OSStatus; external name '_HMDisplayTag';
  760. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  761. {
  762. * HMHideTag()
  763. *
  764. * Summary:
  765. * HMHideTag hides the currently visible help tag. If there is no
  766. * current help tag, this call does nothing.
  767. *
  768. * Mac OS X threading:
  769. * Not thread safe
  770. *
  771. * Result:
  772. * An OSStatus code indicating success or failure.
  773. *
  774. * Availability:
  775. * Mac OS X: in version 10.1 and later in Carbon.framework
  776. * CarbonLib: in CarbonLib 1.2 and later
  777. * Non-Carbon CFM: not available
  778. }
  779. function HMHideTag: OSStatus; external name '_HMHideTag';
  780. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  781. {
  782. * Summary:
  783. * Values for the inOptions parameter to HMHideTagWithOptions.
  784. }
  785. const
  786. {
  787. * Causes the tag to fade out when hidden. If this flag is not
  788. * specified, the tag is hidden without fading.
  789. }
  790. kHMHideTagFade = 1 shl 0;
  791. {
  792. * Causes the tag to begin hiding immediately. If this flag is not
  793. * specified, the tag is hidden after a short delay (currently 0.75
  794. * second).
  795. }
  796. kHMHideTagImmediately = 1 shl 1;
  797. {
  798. * HMHideTagWithOptions()
  799. *
  800. * Summary:
  801. * Hides the current help tag, with various options to control how
  802. * the tag is hidden.
  803. *
  804. * Mac OS X threading:
  805. * Not thread safe
  806. *
  807. * Parameters:
  808. *
  809. * inOptions:
  810. * Options for how the tag should be hidden. kHMHideTagFade and
  811. * kHMHideTagImmediately are the only available options.
  812. *
  813. * Result:
  814. * An operating system result code. noErr is returned if there is no
  815. * tag currently visible.
  816. *
  817. * Availability:
  818. * Mac OS X: in version 10.4 and later in Carbon.framework
  819. * CarbonLib: not available in CarbonLib 1.x
  820. * Non-Carbon CFM: not available
  821. }
  822. function HMHideTagWithOptions( inOptions: OptionBits ): OSStatus; external name '_HMHideTagWithOptions';
  823. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  824. end.