QuickdrawText.pas 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. {
  2. File: QuickdrawText.p
  3. Contains: Quickdraw Text Interfaces.
  4. Version: Technology: Mac OS 8.5
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1983-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 QuickdrawText;
  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,MixedMode,IntlResources;
  92. {$ALIGN MAC68K}
  93. { new CGrafPort bottleneck ("newProc2") function, used in Unicode Text drawing }
  94. {
  95. * StandardGlyphs()
  96. *
  97. * Availability:
  98. * Non-Carbon CFM: in QuickDrawText 8.5 and later
  99. * CarbonLib: in CarbonLib 1.0 and later
  100. * Mac OS X: in version 10.0 and later
  101. }
  102. function StandardGlyphs(dataStream: UnivPtr; size: ByteCount): OSStatus; external name '_StandardGlyphs';
  103. const
  104. { CharToPixel directions }
  105. leftCaret = 0; { Place caret for left block }
  106. rightCaret = -1; { Place caret for right block }
  107. kHilite = 1; { Direction is SysDirection }
  108. smLeftCaret = 0; { Place caret for left block - obsolete }
  109. smRightCaret = -1; { Place caret for right block - obsolete }
  110. smHilite = 1; { Direction is TESysJust - obsolete }
  111. { Constants for styleRunPosition argument in PortionLine, DrawJustified, MeasureJustified, CharToPixel, and PixelToChar. }
  112. onlyStyleRun = 0; { This is the only style run on the line }
  113. leftStyleRun = 1; { This is leftmost of multiple style runs on the line }
  114. rightStyleRun = 2; { This is rightmost of multiple style runs on the line }
  115. middleStyleRun = 3; { There are multiple style runs on the line and this is neither the leftmost nor the rightmost. }
  116. smOnlyStyleRun = 0; { obsolete }
  117. smLeftStyleRun = 1; { obsolete }
  118. smRightStyleRun = 2; { obsolete }
  119. smMiddleStyleRun = 3; { obsolete }
  120. { type for styleRunPosition parameter in PixelToChar etc. }
  121. type
  122. JustStyleCode = SInt16;
  123. { Type for truncWhere parameter in TruncString, TruncText }
  124. TruncCode = SInt16;
  125. const
  126. { Constants for truncWhere argument in TruncString and TruncText }
  127. truncEnd = 0; { Truncate at end }
  128. truncMiddle = $4000; { Truncate in middle }
  129. smTruncEnd = 0; { Truncate at end - obsolete }
  130. smTruncMiddle = $4000; { Truncate in middle - obsolete }
  131. { Constants for TruncString and TruncText results }
  132. notTruncated = 0; { No truncation was necessary }
  133. truncated = 1; { Truncation performed }
  134. truncErr = -1; { General error }
  135. smNotTruncated = 0; { No truncation was necessary - obsolete }
  136. smTruncated = 1; { Truncation performed - obsolete }
  137. smTruncErr = -1; { General error - obsolete }
  138. type
  139. StyledLineBreakCode = SInt8;
  140. const
  141. smBreakWord = 0;
  142. smBreakChar = 1;
  143. smBreakOverflow = 2;
  144. { QuickTime3.0 }
  145. { Constants for txFlags (which used to be the pad field after txFace) }
  146. tfAntiAlias = $01;
  147. tfUnicode = $02;
  148. type
  149. FontInfoPtr = ^FontInfo;
  150. FontInfo = record
  151. ascent: SInt16;
  152. descent: SInt16;
  153. widMax: SInt16;
  154. leading: SInt16;
  155. end;
  156. FormatOrder = array [0..0] of SInt16;
  157. FormatOrderPtr = ^FormatOrder;
  158. { FormatStatus was moved to TextUtils.i }
  159. { OffsetTable moved to IntlResources.i }
  160. {$ifc TYPED_FUNCTION_POINTERS}
  161. StyleRunDirectionProcPtr = function(styleRunIndex: SInt16; dirParam: UnivPtr): boolean;
  162. {$elsec}
  163. StyleRunDirectionProcPtr = ProcPtr;
  164. {$endc}
  165. {$ifc OPAQUE_UPP_TYPES}
  166. StyleRunDirectionUPP = ^SInt32; { an opaque UPP }
  167. {$elsec}
  168. StyleRunDirectionUPP = UniversalProcPtr;
  169. {$endc}
  170. const
  171. uppStyleRunDirectionProcInfo = $00000390;
  172. {
  173. * NewStyleRunDirectionUPP()
  174. *
  175. * Availability:
  176. * Non-Carbon CFM: available as macro/inline
  177. * CarbonLib: in CarbonLib 1.0 and later
  178. * Mac OS X: in version 10.0 and later
  179. }
  180. function NewStyleRunDirectionUPP(userRoutine: StyleRunDirectionProcPtr): StyleRunDirectionUPP; external name '_NewStyleRunDirectionUPP'; { old name was NewStyleRunDirectionProc }
  181. {
  182. * DisposeStyleRunDirectionUPP()
  183. *
  184. * Availability:
  185. * Non-Carbon CFM: available as macro/inline
  186. * CarbonLib: in CarbonLib 1.0 and later
  187. * Mac OS X: in version 10.0 and later
  188. }
  189. procedure DisposeStyleRunDirectionUPP(userUPP: StyleRunDirectionUPP); external name '_DisposeStyleRunDirectionUPP';
  190. {
  191. * InvokeStyleRunDirectionUPP()
  192. *
  193. * Availability:
  194. * Non-Carbon CFM: available as macro/inline
  195. * CarbonLib: in CarbonLib 1.0 and later
  196. * Mac OS X: in version 10.0 and later
  197. }
  198. function InvokeStyleRunDirectionUPP(styleRunIndex: SInt16; dirParam: UnivPtr; userRoutine: StyleRunDirectionUPP): boolean; external name '_InvokeStyleRunDirectionUPP'; { old name was CallStyleRunDirectionProc }
  199. {$ifc CALL_NOT_IN_CARBON}
  200. {
  201. * Pixel2Char()
  202. *
  203. * Availability:
  204. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  205. * CarbonLib: not available
  206. * Mac OS X: not available
  207. }
  208. function Pixel2Char(textBuf: Ptr; textLen: SInt16; slop: SInt16; pixelWidth: SInt16; var leadingEdge: boolean): SInt16; external name '_Pixel2Char';
  209. {
  210. * Char2Pixel()
  211. *
  212. * Availability:
  213. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  214. * CarbonLib: not available
  215. * Mac OS X: not available
  216. }
  217. function Char2Pixel(textBuf: Ptr; textLen: SInt16; slop: SInt16; offset: SInt16; direction: SInt16): SInt16; external name '_Char2Pixel';
  218. {$endc} {CALL_NOT_IN_CARBON}
  219. {
  220. * PixelToChar()
  221. *
  222. * Availability:
  223. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  224. * CarbonLib: in CarbonLib 1.0 and later
  225. * Mac OS X: in version 10.0 and later
  226. }
  227. function PixelToChar(textBuf: Ptr; textLength: SInt32; slop: Fixed; pixelWidth: Fixed; var leadingEdge: boolean; var widthRemaining: Fixed; styleRunPosition: JustStyleCode; numer: Point; denom: Point): SInt16; external name '_PixelToChar';
  228. {
  229. * CharToPixel()
  230. *
  231. * Availability:
  232. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  233. * CarbonLib: in CarbonLib 1.0 and later
  234. * Mac OS X: in version 10.0 and later
  235. }
  236. function CharToPixel(textBuf: Ptr; textLength: SInt32; slop: Fixed; offset: SInt32; direction: SInt16; styleRunPosition: JustStyleCode; numer: Point; denom: Point): SInt16; external name '_CharToPixel';
  237. {
  238. * DrawJustified()
  239. *
  240. * Availability:
  241. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  242. * CarbonLib: in CarbonLib 1.0 and later
  243. * Mac OS X: in version 10.0 and later
  244. }
  245. procedure DrawJustified(textPtr: Ptr; textLength: SInt32; slop: Fixed; styleRunPosition: JustStyleCode; numer: Point; denom: Point); external name '_DrawJustified';
  246. {
  247. * MeasureJustified()
  248. *
  249. * Availability:
  250. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  251. * CarbonLib: in CarbonLib 1.0 and later
  252. * Mac OS X: in version 10.0 and later
  253. }
  254. procedure MeasureJustified(textPtr: Ptr; textLength: SInt32; slop: Fixed; charLocs: Ptr; styleRunPosition: JustStyleCode; numer: Point; denom: Point); external name '_MeasureJustified';
  255. {
  256. * PortionLine()
  257. *
  258. * Availability:
  259. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  260. * CarbonLib: in CarbonLib 1.0 and later
  261. * Mac OS X: in version 10.0 and later
  262. }
  263. function PortionLine(textPtr: Ptr; textLen: SInt32; styleRunPosition: JustStyleCode; numer: Point; denom: Point): Fixed; external name '_PortionLine';
  264. {
  265. * HiliteText()
  266. *
  267. * Availability:
  268. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  269. * CarbonLib: in CarbonLib 1.0 and later
  270. * Mac OS X: in version 10.0 and later
  271. }
  272. procedure HiliteText(textPtr: Ptr; textLength: SInt16; firstOffset: SInt16; secondOffset: SInt16; var offsets: OffsetTable); external name '_HiliteText';
  273. {$ifc CALL_NOT_IN_CARBON}
  274. {
  275. * DrawJust()
  276. *
  277. * Availability:
  278. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  279. * CarbonLib: not available
  280. * Mac OS X: not available
  281. }
  282. procedure DrawJust(textPtr: Ptr; textLength: SInt16; slop: SInt16); external name '_DrawJust';
  283. {
  284. * MeasureJust()
  285. *
  286. * Availability:
  287. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  288. * CarbonLib: not available
  289. * Mac OS X: not available
  290. }
  291. procedure MeasureJust(textPtr: Ptr; textLength: SInt16; slop: SInt16; charLocs: Ptr); external name '_MeasureJust';
  292. {
  293. * PortionText()
  294. *
  295. * Availability:
  296. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  297. * CarbonLib: not available
  298. * Mac OS X: not available
  299. }
  300. function PortionText(textPtr: Ptr; textLength: SInt32): Fixed; external name '_PortionText';
  301. {$endc} {CALL_NOT_IN_CARBON}
  302. {
  303. * VisibleLength()
  304. *
  305. * Availability:
  306. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  307. * CarbonLib: in CarbonLib 1.0 and later
  308. * Mac OS X: in version 10.0 and later
  309. }
  310. function VisibleLength(textPtr: Ptr; textLength: SInt32): SInt32; external name '_VisibleLength';
  311. {
  312. * GetFormatOrder()
  313. *
  314. * Availability:
  315. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  316. * CarbonLib: in CarbonLib 1.0 and later
  317. * Mac OS X: in version 10.0 and later
  318. }
  319. procedure GetFormatOrder(ordering: FormatOrderPtr; firstFormat: SInt16; lastFormat: SInt16; lineRight: boolean; rlDirProc: StyleRunDirectionUPP; dirParam: Ptr); external name '_GetFormatOrder';
  320. {
  321. * TextFont()
  322. *
  323. * Availability:
  324. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  325. * CarbonLib: in CarbonLib 1.0 and later
  326. * Mac OS X: in version 10.0 and later
  327. }
  328. procedure TextFont(font: SInt16); external name '_TextFont';
  329. {
  330. * TextFace()
  331. *
  332. * Availability:
  333. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  334. * CarbonLib: in CarbonLib 1.0 and later
  335. * Mac OS X: in version 10.0 and later
  336. }
  337. procedure TextFace(face: StyleParameter); external name '_TextFace';
  338. {
  339. * TextMode()
  340. *
  341. * Availability:
  342. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  343. * CarbonLib: in CarbonLib 1.0 and later
  344. * Mac OS X: in version 10.0 and later
  345. }
  346. procedure TextMode(mode: SInt16); external name '_TextMode';
  347. {
  348. * TextSize()
  349. *
  350. * Availability:
  351. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  352. * CarbonLib: in CarbonLib 1.0 and later
  353. * Mac OS X: in version 10.0 and later
  354. }
  355. procedure TextSize(size: SInt16); external name '_TextSize';
  356. {
  357. * SpaceExtra()
  358. *
  359. * Availability:
  360. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  361. * CarbonLib: in CarbonLib 1.0 and later
  362. * Mac OS X: in version 10.0 and later
  363. }
  364. procedure SpaceExtra(extra: Fixed); external name '_SpaceExtra';
  365. {
  366. * DrawChar()
  367. *
  368. * Availability:
  369. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  370. * CarbonLib: in CarbonLib 1.0 and later
  371. * Mac OS X: in version 10.0 and later
  372. }
  373. procedure DrawChar(ch: CharParameter); external name '_DrawChar';
  374. {
  375. * DrawString()
  376. *
  377. * Availability:
  378. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  379. * CarbonLib: in CarbonLib 1.0 and later
  380. * Mac OS X: in version 10.0 and later
  381. }
  382. procedure DrawString(const (*var*) s: Str255); external name '_DrawString';
  383. {
  384. * [Mac]DrawText()
  385. *
  386. * Availability:
  387. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  388. * CarbonLib: in CarbonLib 1.0 and later
  389. * Mac OS X: in version 10.0 and later
  390. }
  391. procedure DrawText(textBuf: UnivPtr; firstByte: SInt16; byteCount: SInt16); external name '_DrawText';
  392. {
  393. * CharWidth()
  394. *
  395. * Availability:
  396. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  397. * CarbonLib: in CarbonLib 1.0 and later
  398. * Mac OS X: in version 10.0 and later
  399. }
  400. function CharWidth(ch: CharParameter): SInt16; external name '_CharWidth';
  401. {
  402. * StringWidth()
  403. *
  404. * Availability:
  405. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  406. * CarbonLib: in CarbonLib 1.0 and later
  407. * Mac OS X: in version 10.0 and later
  408. }
  409. function StringWidth(const (*var*) s: Str255): SInt16; external name '_StringWidth';
  410. {
  411. * TextWidth()
  412. *
  413. * Availability:
  414. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  415. * CarbonLib: in CarbonLib 1.0 and later
  416. * Mac OS X: in version 10.0 and later
  417. }
  418. function TextWidth(textBuf: UnivPtr; firstByte: SInt16; byteCount: SInt16): SInt16; external name '_TextWidth';
  419. {
  420. * MeasureText()
  421. *
  422. * Availability:
  423. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  424. * CarbonLib: in CarbonLib 1.0 and later
  425. * Mac OS X: in version 10.0 and later
  426. }
  427. procedure MeasureText(count: SInt16; textAddr: UnivPtr; charLocs: UnivPtr); external name '_MeasureText';
  428. {
  429. * GetFontInfo()
  430. *
  431. * Availability:
  432. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  433. * CarbonLib: in CarbonLib 1.0 and later
  434. * Mac OS X: in version 10.0 and later
  435. }
  436. procedure GetFontInfo(var info: FontInfo); external name '_GetFontInfo';
  437. {
  438. * CharExtra()
  439. *
  440. * Availability:
  441. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  442. * CarbonLib: in CarbonLib 1.0 and later
  443. * Mac OS X: in version 10.0 and later
  444. }
  445. procedure CharExtra(extra: Fixed); external name '_CharExtra';
  446. {
  447. * StdText()
  448. *
  449. * Availability:
  450. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  451. * CarbonLib: in CarbonLib 1.0 and later
  452. * Mac OS X: in version 10.0 and later
  453. }
  454. procedure StdText(count: SInt16; textAddr: UnivPtr; numer: Point; denom: Point); external name '_StdText';
  455. {
  456. * StdTxMeas()
  457. *
  458. * Availability:
  459. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  460. * CarbonLib: in CarbonLib 1.0 and later
  461. * Mac OS X: in version 10.0 and later
  462. }
  463. function StdTxMeas(byteCount: SInt16; textAddr: UnivPtr; var numer: Point; var denom: Point; var info: FontInfo): SInt16; external name '_StdTxMeas';
  464. {
  465. * StyledLineBreak()
  466. *
  467. * Availability:
  468. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  469. * CarbonLib: in CarbonLib 1.0 and later
  470. * Mac OS X: in version 10.0 and later
  471. }
  472. function StyledLineBreak(textPtr: Ptr; textLen: SInt32; textStart: SInt32; textEnd: SInt32; flags: SInt32; var textWidth: Fixed; var textOffset: SInt32): StyledLineBreakCode; external name '_StyledLineBreak';
  473. {
  474. * TruncString()
  475. *
  476. * Availability:
  477. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  478. * CarbonLib: in CarbonLib 1.0 and later
  479. * Mac OS X: in version 10.0 and later
  480. }
  481. function TruncString(width: SInt16; var theString: Str255; truncWhere: TruncCode): SInt16; external name '_TruncString';
  482. {
  483. * TruncText()
  484. *
  485. * Availability:
  486. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  487. * CarbonLib: in CarbonLib 1.0 and later
  488. * Mac OS X: in version 10.0 and later
  489. }
  490. function TruncText(width: SInt16; textPtr: Ptr; var length: SInt16; truncWhere: TruncCode): SInt16; external name '_TruncText';
  491. {$ifc OLDROUTINENAMES}
  492. {$ifc CALL_NOT_IN_CARBON}
  493. {
  494. * NPixel2Char()
  495. *
  496. * Availability:
  497. * Non-Carbon CFM: not available
  498. * CarbonLib: not available
  499. * Mac OS X: not available
  500. }
  501. function NPixel2Char(textBuf: Ptr; textLength: SInt32; slop: Fixed; pixelWidth: Fixed; var leadingEdge: boolean; var widthRemaining: Fixed; styleRunPosition: JustStyleCode; numer: Point; denom: Point): SInt16; external name '_NPixel2Char';
  502. {
  503. * NChar2Pixel()
  504. *
  505. * Availability:
  506. * Non-Carbon CFM: not available
  507. * CarbonLib: not available
  508. * Mac OS X: not available
  509. }
  510. function NChar2Pixel(textBuf: Ptr; textLength: SInt32; slop: Fixed; offset: SInt32; direction: SInt16; styleRunPosition: JustStyleCode; numer: Point; denom: Point): SInt16; external name '_NChar2Pixel';
  511. {
  512. * NDrawJust()
  513. *
  514. * Availability:
  515. * Non-Carbon CFM: not available
  516. * CarbonLib: not available
  517. * Mac OS X: not available
  518. }
  519. procedure NDrawJust(textPtr: Ptr; textLength: SInt32; slop: Fixed; styleRunPosition: JustStyleCode; numer: Point; denom: Point); external name '_NDrawJust';
  520. {
  521. * NMeasureJust()
  522. *
  523. * Availability:
  524. * Non-Carbon CFM: not available
  525. * CarbonLib: not available
  526. * Mac OS X: not available
  527. }
  528. procedure NMeasureJust(textPtr: Ptr; textLength: SInt32; slop: Fixed; charLocs: Ptr; styleRunPosition: JustStyleCode; numer: Point; denom: Point); external name '_NMeasureJust';
  529. {
  530. * NPortionText()
  531. *
  532. * Availability:
  533. * Non-Carbon CFM: not available
  534. * CarbonLib: not available
  535. * Mac OS X: not available
  536. }
  537. function NPortionText(textPtr: Ptr; textLen: SInt32; styleRunPosition: JustStyleCode; numer: Point; denom: Point): Fixed; external name '_NPortionText';
  538. {$endc} {CALL_NOT_IN_CARBON}
  539. {$endc} {OLDROUTINENAMES}
  540. {$ALIGN MAC68K}
  541. end.