HTMLRendering.pas 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354
  1. {
  2. File: HTMLRendering.p
  3. Contains: HTML Rendering Library Interfaces.
  4. Version: Technology: 1.0
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1999-2002 by Apple Computer, Inc., all rights reserved
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit HTMLRendering;
  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,Events,Files,CodeFragments,Controls,CFData,CFString,CFURL;
  92. {$ALIGN MAC68K}
  93. type
  94. HRReference = ^SInt32; { an opaque 32-bit type }
  95. HRReferencePtr = ^HRReference; { when a var xx:HRReference parameter can be nil, it is changed to xx: HRReferencePtr }
  96. {
  97. * HRGetHTMLRenderingLibVersion()
  98. *
  99. * Availability:
  100. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  101. * CarbonLib: in CarbonLib 1.1 and later
  102. * Mac OS X: in version 10.0 and later
  103. }
  104. function HRGetHTMLRenderingLibVersion(var returnVers: NumVersion): OSStatus; external name '_HRGetHTMLRenderingLibVersion';
  105. {$ifc TARGET_RT_MAC_CFM}
  106. {$elsec}
  107. {$ifc TARGET_RT_MAC_MACHO}
  108. {$endc}
  109. {$endc}
  110. const
  111. kHRRendererHTML32Type = $68743332 (* 'ht32' *); { HTML 3.2 }
  112. {
  113. * HRNewReference()
  114. *
  115. * Availability:
  116. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  117. * CarbonLib: in CarbonLib 1.1 and later
  118. * Mac OS X: in version 10.0 and later
  119. }
  120. function HRNewReference(var hrRef: HRReference; rendererType: OSType; grafPtr_: GrafPtr): OSStatus; external name '_HRNewReference';
  121. {
  122. * HRNewReferenceInWindow()
  123. *
  124. * Discussion:
  125. * Use this API from a Carbon App. All the contrrols created by the
  126. * HTML renderer will be embedded in the root control of the window
  127. * specified by the window ref.
  128. *
  129. * Parameters:
  130. *
  131. * hrRef:
  132. * Pointer to the new reference created and returned by the
  133. * renderer.
  134. *
  135. * rendererType:
  136. * Type of the renderer e.g. kHRRendererHTML32Type. Only this type
  137. * is supported for now.
  138. *
  139. * inWindowRef:
  140. * Reference to the window for which rendering area will be
  141. * specified.
  142. *
  143. * Availability:
  144. * Non-Carbon CFM: not available
  145. * CarbonLib: in CarbonLib 1.3 and later
  146. * Mac OS X: in version 10.0 and later
  147. }
  148. function HRNewReferenceInWindow(var hrRef: HRReference; rendererType: OSType; inWindowRef: WindowRef): OSStatus; external name '_HRNewReferenceInWindow';
  149. {
  150. * HRDisposeReference()
  151. *
  152. * Availability:
  153. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  154. * CarbonLib: in CarbonLib 1.1 and later
  155. * Mac OS X: in version 10.0 and later
  156. }
  157. function HRDisposeReference(hrRef: HRReference): OSStatus; external name '_HRDisposeReference';
  158. {
  159. * HRFreeMemory()
  160. *
  161. * Availability:
  162. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  163. * CarbonLib: in CarbonLib 1.1 and later
  164. * Mac OS X: in version 10.0 and later
  165. }
  166. function HRFreeMemory(inBytesNeeded: Size): SInt32; external name '_HRFreeMemory';
  167. { System level notifications }
  168. {
  169. * HRScreenConfigurationChanged()
  170. *
  171. * Availability:
  172. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  173. * CarbonLib: in CarbonLib 1.1 and later
  174. * Mac OS X: in version 10.0 and later
  175. }
  176. procedure HRScreenConfigurationChanged; external name '_HRScreenConfigurationChanged';
  177. {
  178. * HRIsHREvent()
  179. *
  180. * Availability:
  181. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  182. * CarbonLib: in CarbonLib 1.1 and later
  183. * Mac OS X: in version 10.0 and later
  184. }
  185. function HRIsHREvent(const (*var*) eventRecord_: EventRecord): boolean; external name '_HRIsHREvent';
  186. { Drawing }
  187. {
  188. * HRSetGrafPtr()
  189. *
  190. * Availability:
  191. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  192. * CarbonLib: in CarbonLib 1.1 and later
  193. * Mac OS X: in version 10.0 and later
  194. }
  195. function HRSetGrafPtr(hrRef: HRReference; grafPtr_: GrafPtr): OSStatus; external name '_HRSetGrafPtr';
  196. {
  197. * HRSetWindowRef()
  198. *
  199. * Discussion:
  200. * Use this API from a Carbon App. All the contrrols created by the
  201. * HTML renderer will be moved in the root control of the window
  202. * specified by the window ref. All the drawing will now happen in
  203. * the specified window.
  204. *
  205. * Parameters:
  206. *
  207. * hrRef:
  208. * Reference to the renderer object.
  209. *
  210. * windowRef:
  211. * new Reference to the window to be attached to the above hrRef.
  212. *
  213. * Availability:
  214. * Non-Carbon CFM: not available
  215. * CarbonLib: in CarbonLib 1.3 and later
  216. * Mac OS X: in version 10.0 and later
  217. }
  218. function HRSetWindowRef(hrRef: HRReference; windowRef_: WindowRef): OSStatus; external name '_HRSetWindowRef';
  219. {
  220. * HRSetEmbeddingControl()
  221. *
  222. * Discussion:
  223. * Use this API to tell the HTML Renderer to embed all the controls
  224. * it has created so far and the new controls it creates after this
  225. * call to be embedded in the given control. Useful if you wish to
  226. * have an HTML displayed with in your dialog. e.g. Software Update
  227. * needs this.
  228. *
  229. * Parameters:
  230. *
  231. * hrRef:
  232. * Reference to the renderer object.
  233. *
  234. * controlRef:
  235. * all the future controls created by renderer are embeded in this
  236. * controlRef.
  237. *
  238. * Availability:
  239. * Non-Carbon CFM: not available
  240. * CarbonLib: in CarbonLib 1.3 and later
  241. * Mac OS X: in version 10.0 and later
  242. }
  243. function HRSetEmbeddingControl(hrRef: HRReference; controlRef_: ControlRef): OSStatus; external name '_HRSetEmbeddingControl';
  244. {
  245. * HRActivate()
  246. *
  247. * Availability:
  248. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  249. * CarbonLib: in CarbonLib 1.1 and later
  250. * Mac OS X: in version 10.0 and later
  251. }
  252. function HRActivate(hrRef: HRReference): OSStatus; external name '_HRActivate';
  253. {
  254. * HRDeactivate()
  255. *
  256. * Availability:
  257. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  258. * CarbonLib: in CarbonLib 1.1 and later
  259. * Mac OS X: in version 10.0 and later
  260. }
  261. function HRDeactivate(hrRef: HRReference): OSStatus; external name '_HRDeactivate';
  262. {
  263. * HRDraw()
  264. *
  265. * Availability:
  266. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  267. * CarbonLib: in CarbonLib 1.1 and later
  268. * Mac OS X: in version 10.0 and later
  269. }
  270. function HRDraw(hrRef: HRReference; updateRgnH: RgnHandle): OSStatus; external name '_HRDraw';
  271. {
  272. * HRDrawInPort()
  273. *
  274. * Discussion:
  275. * Use this API from a Carbon App. All the drawing will now happen
  276. * in the specified port. This is the API you want to use to draw in
  277. * an offscreen port, for example when printing. You could also use
  278. * this API to draw in an on screen port.
  279. *
  280. * Parameters:
  281. *
  282. * hrRef:
  283. * Reference to the renderer object.
  284. *
  285. * updateRgnH:
  286. * Region to be updated.
  287. *
  288. * grafPtr:
  289. * A graf pointer to render HTML into.
  290. *
  291. * Availability:
  292. * Non-Carbon CFM: not available
  293. * CarbonLib: in CarbonLib 1.3 and later
  294. * Mac OS X: in version 10.0 and later
  295. }
  296. function HRDrawInPort(hrRef: HRReference; updateRgnH: RgnHandle; grafPtr: CGrafPtr): OSStatus; external name '_HRDrawInPort';
  297. {
  298. * HRSetRenderingRect()
  299. *
  300. * Availability:
  301. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  302. * CarbonLib: in CarbonLib 1.1 and later
  303. * Mac OS X: in version 10.0 and later
  304. }
  305. function HRSetRenderingRect(hrRef: HRReference; const (*var*) renderingRect: Rect): OSStatus; external name '_HRSetRenderingRect';
  306. {
  307. * HRGetRenderedImageSize()
  308. *
  309. * Availability:
  310. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  311. * CarbonLib: in CarbonLib 1.1 and later
  312. * Mac OS X: in version 10.0 and later
  313. }
  314. function HRGetRenderedImageSize(hrRef: HRReference; var renderingSize: Point): OSStatus; external name '_HRGetRenderedImageSize';
  315. {
  316. * HRGetRenderedImageSize32()
  317. *
  318. * Discussion:
  319. * Use this API when the rendered image could have coordinates
  320. * larger than what SInt16 can hold.
  321. *
  322. * Parameters:
  323. *
  324. * hrRef:
  325. * Reference to the renderer object.
  326. *
  327. * height:
  328. * Height of the image is returned in this parameter.
  329. *
  330. * width:
  331. * Width of the image is returned in this parameter.
  332. *
  333. * Availability:
  334. * Non-Carbon CFM: not available
  335. * CarbonLib: in CarbonLib 1.3 and later
  336. * Mac OS X: in version 10.0 and later
  337. }
  338. function HRGetRenderedImageSize32(hrRef: HRReference; var height: UInt32; var width: UInt32): OSStatus; external name '_HRGetRenderedImageSize32';
  339. {
  340. * HRScrollToLocation()
  341. *
  342. * Availability:
  343. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  344. * CarbonLib: in CarbonLib 1.1 and later
  345. * Mac OS X: in version 10.0 and later
  346. }
  347. function HRScrollToLocation(hrRef: HRReference; var location: Point): OSStatus; external name '_HRScrollToLocation';
  348. {
  349. * HRScrollToImageLocation32()
  350. *
  351. * Discussion:
  352. * Use this API when specifying location to scroll to. Location is
  353. * specified in image space.
  354. *
  355. * Parameters:
  356. *
  357. * hrRef:
  358. * Reference to the renderer object.
  359. *
  360. * h:
  361. * Horizontal location.
  362. *
  363. * v:
  364. * Vertical location.
  365. *
  366. * Availability:
  367. * Non-Carbon CFM: not available
  368. * CarbonLib: in CarbonLib 1.3 and later
  369. * Mac OS X: in version 10.0 and later
  370. }
  371. function HRScrollToImageLocation32(hrRef: HRReference; h: SInt32; v: SInt32): OSStatus; external name '_HRScrollToImageLocation32';
  372. {
  373. * HRForceQuickdraw()
  374. *
  375. * Availability:
  376. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  377. * CarbonLib: in CarbonLib 1.1 and later
  378. * Mac OS X: in version 10.0 and later
  379. }
  380. function HRForceQuickdraw(hrRef: HRReference; forceQuickdraw: boolean): OSStatus; external name '_HRForceQuickdraw';
  381. type
  382. HRScrollbarState = SInt16;
  383. const
  384. eHRScrollbarOn = 0;
  385. eHRScrollbarOff = 1;
  386. eHRScrollbarAuto = 2;
  387. {
  388. * HRSetScrollbarState()
  389. *
  390. * Availability:
  391. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  392. * CarbonLib: in CarbonLib 1.1 and later
  393. * Mac OS X: in version 10.0 and later
  394. }
  395. function HRSetScrollbarState(hrRef: HRReference; hScrollbarState: HRScrollbarState; vScrollbarState: HRScrollbarState): OSStatus; external name '_HRSetScrollbarState';
  396. {
  397. * HRSetDrawBorder()
  398. *
  399. * Availability:
  400. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  401. * CarbonLib: in CarbonLib 1.1 and later
  402. * Mac OS X: in version 10.0 and later
  403. }
  404. function HRSetDrawBorder(hrRef: HRReference; drawBorder: boolean): OSStatus; external name '_HRSetDrawBorder';
  405. {
  406. * HRSetGrowboxCutout()
  407. *
  408. * Availability:
  409. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  410. * CarbonLib: in CarbonLib 1.1 and later
  411. * Mac OS X: in version 10.0 and later
  412. }
  413. function HRSetGrowboxCutout(hrRef: HRReference; allowCutout: boolean): OSStatus; external name '_HRSetGrowboxCutout';
  414. { Navigation }
  415. {
  416. * HRGoToFile()
  417. *
  418. * Availability:
  419. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  420. * CarbonLib: in CarbonLib 1.1 and later
  421. * Mac OS X: in version 10.0 and later
  422. }
  423. function HRGoToFile(hrRef: HRReference; const (*var*) fsspec_: FSSpec; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToFile';
  424. {
  425. * HRGoToURL()
  426. *
  427. * Availability:
  428. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  429. * CarbonLib: in CarbonLib 1.1 and later
  430. * Mac OS X: in version 10.0 and later
  431. }
  432. function HRGoToURL(hrRef: HRReference; url: ConstCStringPtr; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToURL';
  433. {
  434. * HRGoToAnchor()
  435. *
  436. * Availability:
  437. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  438. * CarbonLib: in CarbonLib 1.1 and later
  439. * Mac OS X: in version 10.0 and later
  440. }
  441. function HRGoToAnchor(hrRef: HRReference; anchorName: ConstCStringPtr): OSStatus; external name '_HRGoToAnchor';
  442. {
  443. * HRGoToPtr()
  444. *
  445. * Availability:
  446. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  447. * CarbonLib: in CarbonLib 1.1 and later
  448. * Mac OS X: in version 10.0 and later
  449. }
  450. function HRGoToPtr(hrRef: HRReference; buffer: CStringPtr; bufferSize: UInt32; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToPtr';
  451. {
  452. * HRGoToFSRef()
  453. *
  454. * Discussion:
  455. * Use these API from a Carbon App instead of using HRGoToFile,
  456. * HRGoToURL, HRGoToAnchor and HRGoToPtr. These APIs are same in
  457. * behavior with their old counter parts. The only difference is
  458. * that they take FSRef, CFURLRef, CFString, and CFData as
  459. * parameters.
  460. *
  461. * Parameters:
  462. *
  463. * hrRef:
  464. * Reference to the renderer object.
  465. *
  466. * fref:
  467. * Reference to HTML file that is be opened and rendered.
  468. *
  469. * addToHistory:
  470. * true if this file URL should be added to history.
  471. *
  472. * forceRefresh:
  473. * true if the rendering area should be refreshed.
  474. *
  475. * Availability:
  476. * Non-Carbon CFM: not available
  477. * CarbonLib: in CarbonLib 1.3 and later
  478. * Mac OS X: in version 10.0 and later
  479. }
  480. function HRGoToFSRef(hrRef: HRReference; const (*var*) fref: FSRef; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToFSRef';
  481. {
  482. * HRGoToCFURL()
  483. *
  484. * Discussion:
  485. * Use these API from a Carbon App instead of using HRGoToFile,
  486. * HRGoToURL, HRGoToAnchor and HRGoToPtr. These APIs are same in
  487. * behavior with their old counter parts. The only difference is
  488. * that they take FSRef, CFURLRef, CFString, and CFData as
  489. * parameters.
  490. *
  491. * Parameters:
  492. *
  493. * hrRef:
  494. * Reference to the renderer object.
  495. *
  496. * url:
  497. * Reference to url that is be rendered.
  498. *
  499. * addToHistory:
  500. * true if this URL should be added to history.
  501. *
  502. * forceRefresh:
  503. * true if the rendering area should be refreshed.
  504. *
  505. * Availability:
  506. * Non-Carbon CFM: not available
  507. * CarbonLib: in CarbonLib 1.3 and later
  508. * Mac OS X: in version 10.0 and later
  509. }
  510. function HRGoToCFURL(hrRef: HRReference; url: CFURLRef; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToCFURL';
  511. {
  512. * HRGoToAnchorCFString()
  513. *
  514. * Discussion:
  515. * Use these API from a Carbon App instead of using HRGoToFile,
  516. * HRGoToURL, HRGoToAnchor and HRGoToPtr. These APIs are same in
  517. * behavior with their old counter parts. The only difference is
  518. * that they take FSRef, CFURLRef, CFString, and CFData as
  519. * parameters.
  520. *
  521. * Parameters:
  522. *
  523. * hrRef:
  524. * Reference to the renderer object.
  525. *
  526. * anchorName:
  527. * Name of the anchor to be displayed.
  528. *
  529. * Availability:
  530. * Non-Carbon CFM: not available
  531. * CarbonLib: in CarbonLib 1.3 and later
  532. * Mac OS X: in version 10.0 and later
  533. }
  534. function HRGoToAnchorCFString(hrRef: HRReference; anchorName: CFStringRef): OSStatus; external name '_HRGoToAnchorCFString';
  535. {
  536. * HRGoToData()
  537. *
  538. * Discussion:
  539. * Use these API from a Carbon App instead of using HRGoToFile,
  540. * HRGoToURL, HRGoToAnchor and HRGoToPtr. These APIs are same in
  541. * behavior with their old counter parts. The only difference is
  542. * that they take FSRef, CFURLRef, CFString, and CFData as
  543. * parameters.
  544. *
  545. * Parameters:
  546. *
  547. * hrRef:
  548. * Reference to the renderer object.
  549. *
  550. * data:
  551. * Reference to data in the memory that is be rendered.
  552. *
  553. * addToHistory:
  554. * true if this file URL should be added to history.
  555. *
  556. * forceRefresh:
  557. * true if the rendering area should be refreshed.
  558. *
  559. * Availability:
  560. * Non-Carbon CFM: not available
  561. * CarbonLib: in CarbonLib 1.3 and later
  562. * Mac OS X: in version 10.0 and later
  563. }
  564. function HRGoToData(hrRef: HRReference; data: CFDataRef; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToData';
  565. { Accessors }
  566. { either file url or url of <base> tag }
  567. {
  568. * HRGetRootURL()
  569. *
  570. * Availability:
  571. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  572. * CarbonLib: in CarbonLib 1.1 and later
  573. * Mac OS X: in version 10.0 and later
  574. }
  575. function HRGetRootURL(hrRef: HRReference; rootURLH: Handle): OSStatus; external name '_HRGetRootURL';
  576. { url of <base> tag }
  577. {
  578. * HRGetBaseURL()
  579. *
  580. * Availability:
  581. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  582. * CarbonLib: in CarbonLib 1.1 and later
  583. * Mac OS X: in version 10.0 and later
  584. }
  585. function HRGetBaseURL(hrRef: HRReference; baseURLH: Handle): OSStatus; external name '_HRGetBaseURL';
  586. { file url }
  587. {
  588. * HRGetHTMLURL()
  589. *
  590. * Availability:
  591. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  592. * CarbonLib: in CarbonLib 1.1 and later
  593. * Mac OS X: in version 10.0 and later
  594. }
  595. function HRGetHTMLURL(hrRef: HRReference; HTMLURLH: Handle): OSStatus; external name '_HRGetHTMLURL';
  596. {
  597. * HRGetTitle()
  598. *
  599. * Availability:
  600. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  601. * CarbonLib: in CarbonLib 1.1 and later
  602. * Mac OS X: in version 10.0 and later
  603. }
  604. function HRGetTitle(hrRef: HRReference; title: StringPtr): OSStatus; external name '_HRGetTitle';
  605. {
  606. * HRGetHTMLFile()
  607. *
  608. * Availability:
  609. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  610. * CarbonLib: in CarbonLib 1.1 and later
  611. * Mac OS X: in version 10.0 and later
  612. }
  613. function HRGetHTMLFile(hrRef: HRReference; var fsspec_: FSSpec): OSStatus; external name '_HRGetHTMLFile';
  614. {
  615. * HRGetRootURLAsCFString()
  616. *
  617. * Discussion:
  618. * Use these API from a Carbon App instead of using HRGetRootURL,
  619. * HRGetBaseURL, HRGetHTMLURL, HRGetTitle and HRGetHTMLFile. These
  620. * APIs are same in behavior with their old counter parts. The only
  621. * difference is that they take CFString, CFURLRef, and FSRef as
  622. * parameters.
  623. *
  624. * Parameters:
  625. *
  626. * hrRef:
  627. * Reference to the renderer object.
  628. *
  629. * rootString:
  630. * Get CFString equivalent for the root url.
  631. *
  632. * Availability:
  633. * Non-Carbon CFM: not available
  634. * CarbonLib: in CarbonLib 1.3 and later
  635. * Mac OS X: in version 10.0 and later
  636. }
  637. function HRGetRootURLAsCFString(hrRef: HRReference; var rootString: CFStringRef): OSStatus; external name '_HRGetRootURLAsCFString';
  638. {
  639. * HRGetBaseURLAsCFString()
  640. *
  641. * Discussion:
  642. * Use these API from a Carbon App instead of using HRGetRootURL,
  643. * HRGetBaseURL, HRGetHTMLURL, HRGetTitle and HRGetHTMLFile. These
  644. * APIs are same in behavior with their old counter parts. The only
  645. * difference is that they take CFString, CFURLRef, and FSRef as
  646. * parameters.
  647. *
  648. * Parameters:
  649. *
  650. * hrRef:
  651. * Reference to the renderer object.
  652. *
  653. * baseString:
  654. * Get CFString equivalent for the base url.
  655. *
  656. * Availability:
  657. * Non-Carbon CFM: not available
  658. * CarbonLib: in CarbonLib 1.3 and later
  659. * Mac OS X: in version 10.0 and later
  660. }
  661. function HRGetBaseURLAsCFString(hrRef: HRReference; var baseString: CFStringRef): OSStatus; external name '_HRGetBaseURLAsCFString';
  662. {
  663. * HRGetHTMLURLAsCFURL()
  664. *
  665. * Discussion:
  666. * Use these API from a Carbon App instead of using HRGetRootURL,
  667. * HRGetBaseURL, HRGetHTMLURL, HRGetTitle and HRGetHTMLFile. These
  668. * APIs are same in behavior with their old counter parts. The only
  669. * difference is that they take CFString, CFURLRef, and FSRef as
  670. * parameters.
  671. *
  672. * Parameters:
  673. *
  674. * hrRef:
  675. * Reference to the renderer object.
  676. *
  677. * theURL:
  678. * Get currently displayed HTML as a CFURL.
  679. *
  680. * Availability:
  681. * Non-Carbon CFM: not available
  682. * CarbonLib: in CarbonLib 1.3 and later
  683. * Mac OS X: in version 10.0 and later
  684. }
  685. function HRGetHTMLURLAsCFURL(hrRef: HRReference; var theURL: CFURLRef): OSStatus; external name '_HRGetHTMLURLAsCFURL';
  686. {
  687. * HRGetTitleAsCFString()
  688. *
  689. * Discussion:
  690. * Use these API from a Carbon App instead of using HRGetRootURL,
  691. * HRGetBaseURL, HRGetHTMLURL, HRGetTitle and HRGetHTMLFile. These
  692. * APIs are same in behavior with their old counter parts. The only
  693. * difference is that they take CFString, CFURLRef, and FSRef as
  694. * parameters.
  695. *
  696. * Parameters:
  697. *
  698. * hrRef:
  699. * Reference to the renderer object.
  700. *
  701. * title:
  702. * Get title of the currently displayed HTML as a CFString.
  703. *
  704. * Availability:
  705. * Non-Carbon CFM: not available
  706. * CarbonLib: in CarbonLib 1.3 and later
  707. * Mac OS X: in version 10.0 and later
  708. }
  709. function HRGetTitleAsCFString(hrRef: HRReference; var title: CFStringRef): OSStatus; external name '_HRGetTitleAsCFString';
  710. {
  711. * HRGetHTMLFileAsFSRef()
  712. *
  713. * Discussion:
  714. * Use these API from a Carbon App instead of using HRGetRootURL,
  715. * HRGetBaseURL, HRGetHTMLURL, HRGetTitle and HRGetHTMLFile. These
  716. * APIs are same in behavior with their old counter parts. The only
  717. * difference is that they take CFString, CFURLRef, and FSRef as
  718. * parameters.
  719. *
  720. * Parameters:
  721. *
  722. * hrRef:
  723. * Reference to the renderer object.
  724. *
  725. * fref:
  726. * Get currently displayed HTML as a FSRef.
  727. *
  728. * Availability:
  729. * Non-Carbon CFM: not available
  730. * CarbonLib: in CarbonLib 1.3 and later
  731. * Mac OS X: in version 10.0 and later
  732. }
  733. function HRGetHTMLFileAsFSRef(hrRef: HRReference; var fref: FSRef): OSStatus; external name '_HRGetHTMLFileAsFSRef';
  734. { Utilities }
  735. {
  736. * HRUtilCreateFullURL()
  737. *
  738. * Availability:
  739. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  740. * CarbonLib: in CarbonLib 1.1 and later
  741. * Mac OS X: in version 10.0 and later
  742. }
  743. function HRUtilCreateFullURL(rootURL: ConstCStringPtr; linkURL: ConstCStringPtr; fullURLH: Handle): OSStatus; external name '_HRUtilCreateFullURL';
  744. {
  745. * HRUtilGetFSSpecFromURL()
  746. *
  747. * Availability:
  748. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  749. * CarbonLib: in CarbonLib 1.1 and later
  750. * Mac OS X: in version 10.0 and later
  751. }
  752. function HRUtilGetFSSpecFromURL(rootURL: ConstCStringPtr; linkURL: ConstCStringPtr; var destSpec: FSSpec): OSStatus; external name '_HRUtilGetFSSpecFromURL';
  753. { urlHandle should be valid on input }
  754. {
  755. * HRUtilGetURLFromFSSpec()
  756. *
  757. * Availability:
  758. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  759. * CarbonLib: in CarbonLib 1.1 and later
  760. * Mac OS X: in version 10.0 and later
  761. }
  762. function HRUtilGetURLFromFSSpec(const (*var*) fsspec_: FSSpec; urlHandle: Handle): OSStatus; external name '_HRUtilGetURLFromFSSpec';
  763. {
  764. * HRUtilCreateFullCFURL()
  765. *
  766. * Discussion:
  767. * Use these API from a Carbon App instead of using
  768. * HRUtilCreateFullURL, HRUtilGetFSSpecFromURL,
  769. * HRUtilGetURLFromFSSpec. These APIs are same in behavior with
  770. * their old counter parts. The only difference is that they take
  771. * CFURLRef, and FSRef as parameters.
  772. *
  773. * Parameters:
  774. *
  775. * rootString:
  776. * a CFString for the root.
  777. *
  778. * linkString:
  779. * a CFString for a partial link.
  780. *
  781. * url:
  782. * Fully qualified URL is returned after attaching a link string
  783. * to the root.
  784. *
  785. * Availability:
  786. * Non-Carbon CFM: not available
  787. * CarbonLib: in CarbonLib 1.3 and later
  788. * Mac OS X: in version 10.0 and later
  789. }
  790. function HRUtilCreateFullCFURL(rootString: CFStringRef; linkString: CFStringRef; var url: CFURLRef): OSStatus; external name '_HRUtilCreateFullCFURL';
  791. {
  792. * HRUtilGetFSRefFromURL()
  793. *
  794. * Discussion:
  795. * Use these API from a Carbon App instead of using
  796. * HRUtilCreateFullURL, HRUtilGetFSSpecFromURL,
  797. * HRUtilGetURLFromFSSpec. These APIs are same in behavior with
  798. * their old counter parts. The only difference is that they take
  799. * CFURLRef, and FSRef as parameters.
  800. *
  801. * Parameters:
  802. *
  803. * rootString:
  804. * a CFString for the root.
  805. *
  806. * linkString:
  807. * a CFString for a partial link.
  808. *
  809. * destRef:
  810. * File reference is returned for the complete path created after
  811. * attaching link string to the root. If File does not exist,
  812. * fnfErr is returned as a function result.
  813. *
  814. * Availability:
  815. * Non-Carbon CFM: not available
  816. * CarbonLib: in CarbonLib 1.3 and later
  817. * Mac OS X: in version 10.0 and later
  818. }
  819. function HRUtilGetFSRefFromURL(rootString: CFStringRef; linkString: CFStringRef; var destRef: FSRef): OSStatus; external name '_HRUtilGetFSRefFromURL';
  820. {
  821. * HRUtilGetURLFromFSRef()
  822. *
  823. * Discussion:
  824. * Use these API from a Carbon App instead of using
  825. * HRUtilCreateFullURL, HRUtilGetFSSpecFromURL,
  826. * HRUtilGetURLFromFSSpec. These APIs are same in behavior with
  827. * their old counter parts. The only difference is that they take
  828. * CFURLRef, and FSRef as parameters.
  829. *
  830. * Parameters:
  831. *
  832. * fileRef:
  833. * Refernce to a file whose URL is desired.
  834. *
  835. * url:
  836. * a fully qualified URL is returned in this parameter. The
  837. * returned URL gives the path of the file specified in the above
  838. * parameter.
  839. *
  840. * Availability:
  841. * Non-Carbon CFM: not available
  842. * CarbonLib: in CarbonLib 1.3 and later
  843. * Mac OS X: in version 10.0 and later
  844. }
  845. function HRUtilGetURLFromFSRef(const (*var*) fileRef: FSRef; var url: CFURLRef): OSStatus; external name '_HRUtilGetURLFromFSRef';
  846. {
  847. Visited links
  848. If you register a function here, it will be called to determine
  849. whether or not the given URL has been visited. It should return
  850. true if the URL has been visited.
  851. In addition to the URLs that the application may add to the list
  852. of visited links, it should also add URLs that the user clicks
  853. on. These URLs can be caught by the "add URL to history" callback
  854. below.
  855. }
  856. type
  857. {$ifc TYPED_FUNCTION_POINTERS}
  858. HRWasURLVisitedProcPtr = function(url: ConstCStringPtr; refCon: UnivPtr): boolean;
  859. {$elsec}
  860. HRWasURLVisitedProcPtr = ProcPtr;
  861. {$endc}
  862. {$ifc OPAQUE_UPP_TYPES}
  863. HRWasURLVisitedUPP = ^SInt32; { an opaque UPP }
  864. {$elsec}
  865. HRWasURLVisitedUPP = UniversalProcPtr;
  866. {$endc}
  867. {
  868. * HRRegisterWasURLVisitedUPP()
  869. *
  870. * Availability:
  871. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  872. * CarbonLib: in CarbonLib 1.1 and later
  873. * Mac OS X: in version 10.0 and later
  874. }
  875. procedure HRRegisterWasURLVisitedUPP(inWasURLVisitedUPP: HRWasURLVisitedUPP; hrRef: HRReference; inRefCon: UnivPtr); external name '_HRRegisterWasURLVisitedUPP';
  876. {
  877. * HRUnregisterWasURLVisitedUPP()
  878. *
  879. * Availability:
  880. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  881. * CarbonLib: in CarbonLib 1.1 and later
  882. * Mac OS X: in version 10.0 and later
  883. }
  884. procedure HRUnregisterWasURLVisitedUPP(hrRef: HRReference); external name '_HRUnregisterWasURLVisitedUPP';
  885. {
  886. Use these API from a Carbon App instead of using HRRegisterWasURLVisitedUPP, HRUnregisterWasURLVisitedUPP.
  887. These APIs are same in behavior with their old counter parts. The only difference is that they take
  888. CFURLRef as parameters.
  889. }
  890. type
  891. {$ifc TYPED_FUNCTION_POINTERS}
  892. HRWasCFURLVisitedProcPtr = function(url: CFURLRef; refCon: UnivPtr): boolean;
  893. {$elsec}
  894. HRWasCFURLVisitedProcPtr = ProcPtr;
  895. {$endc}
  896. {$ifc OPAQUE_UPP_TYPES}
  897. HRWasCFURLVisitedUPP = ^SInt32; { an opaque UPP }
  898. {$elsec}
  899. HRWasCFURLVisitedUPP = HRWasCFURLVisitedProcPtr;
  900. {$endc}
  901. {
  902. * HRRegisterWasCFURLVisitedUPP()
  903. *
  904. * Availability:
  905. * Non-Carbon CFM: not available
  906. * CarbonLib: in CarbonLib 1.3 and later
  907. * Mac OS X: in version 10.0 and later
  908. }
  909. procedure HRRegisterWasCFURLVisitedUPP(inWasCFURLVisitedUPP: HRWasCFURLVisitedUPP; hrRef: HRReference; inRefCon: UnivPtr); external name '_HRRegisterWasCFURLVisitedUPP';
  910. {
  911. * HRUnregisterWasCFURLVisitedUPP()
  912. *
  913. * Availability:
  914. * Non-Carbon CFM: not available
  915. * CarbonLib: in CarbonLib 1.3 and later
  916. * Mac OS X: in version 10.0 and later
  917. }
  918. procedure HRUnregisterWasCFURLVisitedUPP(hrRef: HRReference); external name '_HRUnregisterWasCFURLVisitedUPP';
  919. {
  920. New URL
  921. If you register a function here, it will be called every time
  922. the renderer is going to display a new URL. A few examples of how
  923. you might use this include...
  924. (a) maintaining a history of URLs
  925. (b) maintainging a list of visited links
  926. (c) setting a window title based on the new URL
  927. }
  928. type
  929. {$ifc TYPED_FUNCTION_POINTERS}
  930. HRNewURLProcPtr = function(url: ConstCStringPtr; targetFrame: ConstCStringPtr; addToHistory: boolean; refCon: UnivPtr): OSStatus;
  931. {$elsec}
  932. HRNewURLProcPtr = ProcPtr;
  933. {$endc}
  934. {$ifc OPAQUE_UPP_TYPES}
  935. HRNewURLUPP = ^SInt32; { an opaque UPP }
  936. {$elsec}
  937. HRNewURLUPP = UniversalProcPtr;
  938. {$endc}
  939. {
  940. * HRRegisterNewURLUPP()
  941. *
  942. * Availability:
  943. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  944. * CarbonLib: in CarbonLib 1.1 and later
  945. * Mac OS X: in version 10.0 and later
  946. }
  947. procedure HRRegisterNewURLUPP(inNewURLUPP: HRNewURLUPP; hrRef: HRReference; inRefCon: UnivPtr); external name '_HRRegisterNewURLUPP';
  948. {
  949. * HRUnregisterNewURLUPP()
  950. *
  951. * Availability:
  952. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  953. * CarbonLib: in CarbonLib 1.1 and later
  954. * Mac OS X: in version 10.0 and later
  955. }
  956. procedure HRUnregisterNewURLUPP(hrRef: HRReference); external name '_HRUnregisterNewURLUPP';
  957. {
  958. Use these API from a Carbon App instead of using HRRegisterNewURLUPP, HRUnregisterNewURLUPP.
  959. These APIs are same in behavior with their old counter parts. The only difference is that they take
  960. CFURLRef as parameters.
  961. }
  962. type
  963. {$ifc TYPED_FUNCTION_POINTERS}
  964. HRNewCFURLProcPtr = function(url: CFURLRef; targetString: CFStringRef; addToHistory: boolean; refCon: UnivPtr): OSStatus;
  965. {$elsec}
  966. HRNewCFURLProcPtr = ProcPtr;
  967. {$endc}
  968. {$ifc OPAQUE_UPP_TYPES}
  969. HRNewCFURLUPP = ^SInt32; { an opaque UPP }
  970. {$elsec}
  971. HRNewCFURLUPP = HRNewCFURLProcPtr;
  972. {$endc}
  973. {
  974. * HRRegisterNewCFURLUPP()
  975. *
  976. * Availability:
  977. * Non-Carbon CFM: not available
  978. * CarbonLib: in CarbonLib 1.3 and later
  979. * Mac OS X: in version 10.0 and later
  980. }
  981. procedure HRRegisterNewCFURLUPP(inURLUPP: HRNewCFURLUPP; hrRef: HRReference; inRefCon: UnivPtr); external name '_HRRegisterNewCFURLUPP';
  982. {
  983. * HRUnregisterNewCFURLUPP()
  984. *
  985. * Availability:
  986. * Non-Carbon CFM: not available
  987. * CarbonLib: in CarbonLib 1.3 and later
  988. * Mac OS X: in version 10.0 and later
  989. }
  990. procedure HRUnregisterNewCFURLUPP(hrRef: HRReference); external name '_HRUnregisterNewCFURLUPP';
  991. {
  992. URL to FSSpec function
  993. If you register a function here, it will be called every time
  994. the renderer is going to locate a file. The function will be
  995. passed an enum indicating the type of file being asked for.
  996. }
  997. type
  998. URLSourceType = UInt16;
  999. const
  1000. kHRLookingForHTMLSource = 1;
  1001. kHRLookingForImage = 2;
  1002. kHRLookingForEmbedded = 3;
  1003. kHRLookingForImageMap = 4;
  1004. kHRLookingForFrame = 5;
  1005. type
  1006. {$ifc TYPED_FUNCTION_POINTERS}
  1007. HRURLToFSSpecProcPtr = function(rootURL: ConstCStringPtr; linkURL: ConstCStringPtr; var fsspec_: FSSpec; urlSourceType_: URLSourceType; refCon: UnivPtr): OSStatus;
  1008. {$elsec}
  1009. HRURLToFSSpecProcPtr = ProcPtr;
  1010. {$endc}
  1011. {$ifc OPAQUE_UPP_TYPES}
  1012. HRURLToFSSpecUPP = ^SInt32; { an opaque UPP }
  1013. {$elsec}
  1014. HRURLToFSSpecUPP = UniversalProcPtr;
  1015. {$endc}
  1016. {
  1017. * HRRegisterURLToFSSpecUPP()
  1018. *
  1019. * Availability:
  1020. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  1021. * CarbonLib: in CarbonLib 1.1 and later
  1022. * Mac OS X: in version 10.0 and later
  1023. }
  1024. procedure HRRegisterURLToFSSpecUPP(inURLToFSSpecUPP: HRURLToFSSpecUPP; hrRef: HRReference; inRefCon: UnivPtr); external name '_HRRegisterURLToFSSpecUPP';
  1025. {
  1026. * HRUnregisterURLToFSSpecUPP()
  1027. *
  1028. * Availability:
  1029. * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
  1030. * CarbonLib: in CarbonLib 1.1 and later
  1031. * Mac OS X: in version 10.0 and later
  1032. }
  1033. procedure HRUnregisterURLToFSSpecUPP(hrRef: HRReference); external name '_HRUnregisterURLToFSSpecUPP';
  1034. {
  1035. Use these API from a Carbon App instead of using HRRegisterURLToFSSpecUPP, HRUnregisterURLToFSSpecUPP.
  1036. These APIs are same in behavior with their old counter parts. The only difference is that they take
  1037. FSRef as parameters.
  1038. }
  1039. type
  1040. {$ifc TYPED_FUNCTION_POINTERS}
  1041. HRURLToFSRefProcPtr = function(rootString: CFStringRef; linkString: CFStringRef; var fref: FSRef; urlSourceType_: URLSourceType; refCon: UnivPtr): OSStatus;
  1042. {$elsec}
  1043. HRURLToFSRefProcPtr = ProcPtr;
  1044. {$endc}
  1045. {$ifc OPAQUE_UPP_TYPES}
  1046. HRURLToFSRefUPP = ^SInt32; { an opaque UPP }
  1047. {$elsec}
  1048. HRURLToFSRefUPP = HRURLToFSRefProcPtr;
  1049. {$endc}
  1050. {
  1051. * HRRegisterURLToFSRefUPP()
  1052. *
  1053. * Availability:
  1054. * Non-Carbon CFM: not available
  1055. * CarbonLib: in CarbonLib 1.3 and later
  1056. * Mac OS X: in version 10.0 and later
  1057. }
  1058. procedure HRRegisterURLToFSRefUPP(inURLToFSRefUPP: HRURLToFSRefUPP; hrRef: HRReference; inRefCon: UnivPtr); external name '_HRRegisterURLToFSRefUPP';
  1059. {
  1060. * HRUnregisterURLToFSRefUPP()
  1061. *
  1062. * Availability:
  1063. * Non-Carbon CFM: not available
  1064. * CarbonLib: in CarbonLib 1.3 and later
  1065. * Mac OS X: in version 10.0 and later
  1066. }
  1067. procedure HRUnregisterURLToFSRefUPP(hrRef: HRReference); external name '_HRUnregisterURLToFSRefUPP';
  1068. const
  1069. uppHRWasURLVisitedProcInfo = $000003D0;
  1070. uppHRWasCFURLVisitedProcInfo = $000003D0;
  1071. uppHRNewURLProcInfo = $000037F0;
  1072. uppHRNewCFURLProcInfo = $000037F0;
  1073. uppHRURLToFSSpecProcInfo = $0000EFF0;
  1074. uppHRURLToFSRefProcInfo = $0000EFF0;
  1075. {
  1076. * NewHRWasURLVisitedUPP()
  1077. *
  1078. * Availability:
  1079. * Non-Carbon CFM: available as macro/inline
  1080. * CarbonLib: in CarbonLib 1.1 and later
  1081. * Mac OS X: in version 10.0 and later
  1082. }
  1083. function NewHRWasURLVisitedUPP(userRoutine: HRWasURLVisitedProcPtr): HRWasURLVisitedUPP; external name '_NewHRWasURLVisitedUPP'; { old name was NewHRWasURLVisitedProc }
  1084. {
  1085. * NewHRWasCFURLVisitedUPP()
  1086. *
  1087. * Availability:
  1088. * Non-Carbon CFM: not available
  1089. * CarbonLib: in CarbonLib 1.3 and later
  1090. * Mac OS X: in version 10.0 and later
  1091. }
  1092. function NewHRWasCFURLVisitedUPP(userRoutine: HRWasCFURLVisitedProcPtr): HRWasCFURLVisitedUPP; external name '_NewHRWasCFURLVisitedUPP';
  1093. {
  1094. * NewHRNewURLUPP()
  1095. *
  1096. * Availability:
  1097. * Non-Carbon CFM: available as macro/inline
  1098. * CarbonLib: in CarbonLib 1.1 and later
  1099. * Mac OS X: in version 10.0 and later
  1100. }
  1101. function NewHRNewURLUPP(userRoutine: HRNewURLProcPtr): HRNewURLUPP; external name '_NewHRNewURLUPP'; { old name was NewHRNewURLProc }
  1102. {
  1103. * NewHRNewCFURLUPP()
  1104. *
  1105. * Availability:
  1106. * Non-Carbon CFM: not available
  1107. * CarbonLib: in CarbonLib 1.3 and later
  1108. * Mac OS X: in version 10.0 and later
  1109. }
  1110. function NewHRNewCFURLUPP(userRoutine: HRNewCFURLProcPtr): HRNewCFURLUPP; external name '_NewHRNewCFURLUPP';
  1111. {
  1112. * NewHRURLToFSSpecUPP()
  1113. *
  1114. * Availability:
  1115. * Non-Carbon CFM: available as macro/inline
  1116. * CarbonLib: in CarbonLib 1.1 and later
  1117. * Mac OS X: in version 10.0 and later
  1118. }
  1119. function NewHRURLToFSSpecUPP(userRoutine: HRURLToFSSpecProcPtr): HRURLToFSSpecUPP; external name '_NewHRURLToFSSpecUPP'; { old name was NewHRURLToFSSpecProc }
  1120. {
  1121. * NewHRURLToFSRefUPP()
  1122. *
  1123. * Availability:
  1124. * Non-Carbon CFM: not available
  1125. * CarbonLib: in CarbonLib 1.3 and later
  1126. * Mac OS X: in version 10.0 and later
  1127. }
  1128. function NewHRURLToFSRefUPP(userRoutine: HRURLToFSRefProcPtr): HRURLToFSRefUPP; external name '_NewHRURLToFSRefUPP';
  1129. {
  1130. * DisposeHRWasURLVisitedUPP()
  1131. *
  1132. * Availability:
  1133. * Non-Carbon CFM: available as macro/inline
  1134. * CarbonLib: in CarbonLib 1.1 and later
  1135. * Mac OS X: in version 10.0 and later
  1136. }
  1137. procedure DisposeHRWasURLVisitedUPP(userUPP: HRWasURLVisitedUPP); external name '_DisposeHRWasURLVisitedUPP';
  1138. {
  1139. * DisposeHRWasCFURLVisitedUPP()
  1140. *
  1141. * Availability:
  1142. * Non-Carbon CFM: not available
  1143. * CarbonLib: in CarbonLib 1.3 and later
  1144. * Mac OS X: in version 10.0 and later
  1145. }
  1146. procedure DisposeHRWasCFURLVisitedUPP(userUPP: HRWasCFURLVisitedUPP); external name '_DisposeHRWasCFURLVisitedUPP';
  1147. {
  1148. * DisposeHRNewURLUPP()
  1149. *
  1150. * Availability:
  1151. * Non-Carbon CFM: available as macro/inline
  1152. * CarbonLib: in CarbonLib 1.1 and later
  1153. * Mac OS X: in version 10.0 and later
  1154. }
  1155. procedure DisposeHRNewURLUPP(userUPP: HRNewURLUPP); external name '_DisposeHRNewURLUPP';
  1156. {
  1157. * DisposeHRNewCFURLUPP()
  1158. *
  1159. * Availability:
  1160. * Non-Carbon CFM: not available
  1161. * CarbonLib: in CarbonLib 1.3 and later
  1162. * Mac OS X: in version 10.0 and later
  1163. }
  1164. procedure DisposeHRNewCFURLUPP(userUPP: HRNewCFURLUPP); external name '_DisposeHRNewCFURLUPP';
  1165. {
  1166. * DisposeHRURLToFSSpecUPP()
  1167. *
  1168. * Availability:
  1169. * Non-Carbon CFM: available as macro/inline
  1170. * CarbonLib: in CarbonLib 1.1 and later
  1171. * Mac OS X: in version 10.0 and later
  1172. }
  1173. procedure DisposeHRURLToFSSpecUPP(userUPP: HRURLToFSSpecUPP); external name '_DisposeHRURLToFSSpecUPP';
  1174. {
  1175. * DisposeHRURLToFSRefUPP()
  1176. *
  1177. * Availability:
  1178. * Non-Carbon CFM: not available
  1179. * CarbonLib: in CarbonLib 1.3 and later
  1180. * Mac OS X: in version 10.0 and later
  1181. }
  1182. procedure DisposeHRURLToFSRefUPP(userUPP: HRURLToFSRefUPP); external name '_DisposeHRURLToFSRefUPP';
  1183. {
  1184. * InvokeHRWasURLVisitedUPP()
  1185. *
  1186. * Availability:
  1187. * Non-Carbon CFM: available as macro/inline
  1188. * CarbonLib: in CarbonLib 1.1 and later
  1189. * Mac OS X: in version 10.0 and later
  1190. }
  1191. function InvokeHRWasURLVisitedUPP(url: ConstCStringPtr; refCon: UnivPtr; userRoutine: HRWasURLVisitedUPP): boolean; external name '_InvokeHRWasURLVisitedUPP'; { old name was CallHRWasURLVisitedProc }
  1192. {
  1193. * InvokeHRWasCFURLVisitedUPP()
  1194. *
  1195. * Availability:
  1196. * Non-Carbon CFM: not available
  1197. * CarbonLib: in CarbonLib 1.3 and later
  1198. * Mac OS X: in version 10.0 and later
  1199. }
  1200. function InvokeHRWasCFURLVisitedUPP(url: CFURLRef; refCon: UnivPtr; userRoutine: HRWasCFURLVisitedUPP): boolean; external name '_InvokeHRWasCFURLVisitedUPP';
  1201. {
  1202. * InvokeHRNewURLUPP()
  1203. *
  1204. * Availability:
  1205. * Non-Carbon CFM: available as macro/inline
  1206. * CarbonLib: in CarbonLib 1.1 and later
  1207. * Mac OS X: in version 10.0 and later
  1208. }
  1209. function InvokeHRNewURLUPP(url: ConstCStringPtr; targetFrame: ConstCStringPtr; addToHistory: boolean; refCon: UnivPtr; userRoutine: HRNewURLUPP): OSStatus; external name '_InvokeHRNewURLUPP'; { old name was CallHRNewURLProc }
  1210. {
  1211. * InvokeHRNewCFURLUPP()
  1212. *
  1213. * Availability:
  1214. * Non-Carbon CFM: not available
  1215. * CarbonLib: in CarbonLib 1.3 and later
  1216. * Mac OS X: in version 10.0 and later
  1217. }
  1218. function InvokeHRNewCFURLUPP(url: CFURLRef; targetString: CFStringRef; addToHistory: boolean; refCon: UnivPtr; userRoutine: HRNewCFURLUPP): OSStatus; external name '_InvokeHRNewCFURLUPP';
  1219. {
  1220. * InvokeHRURLToFSSpecUPP()
  1221. *
  1222. * Availability:
  1223. * Non-Carbon CFM: available as macro/inline
  1224. * CarbonLib: in CarbonLib 1.1 and later
  1225. * Mac OS X: in version 10.0 and later
  1226. }
  1227. function InvokeHRURLToFSSpecUPP(rootURL: ConstCStringPtr; linkURL: ConstCStringPtr; var fsspec_: FSSpec; urlSourceType_: URLSourceType; refCon: UnivPtr; userRoutine: HRURLToFSSpecUPP): OSStatus; external name '_InvokeHRURLToFSSpecUPP'; { old name was CallHRURLToFSSpecProc }
  1228. {
  1229. * InvokeHRURLToFSRefUPP()
  1230. *
  1231. * Availability:
  1232. * Non-Carbon CFM: not available
  1233. * CarbonLib: in CarbonLib 1.3 and later
  1234. * Mac OS X: in version 10.0 and later
  1235. }
  1236. function InvokeHRURLToFSRefUPP(rootString: CFStringRef; linkString: CFStringRef; var fref: FSRef; urlSourceType_: URLSourceType; refCon: UnivPtr; userRoutine: HRURLToFSRefUPP): OSStatus; external name '_InvokeHRURLToFSRefUPP';
  1237. {$ALIGN MAC68K}
  1238. end.