Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3059 lines
98 KiB

  1. /*
  2. File: ATSUnicode.h
  3. Contains: Public interfaces for Apple Type Services for Unicode Imaging
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1997-2001 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __MACTYPES__
  11. #include <MacTypes.h>
  12. #endif
  13. #ifndef __MACERRORS__
  14. #include <MacErrors.h>
  15. #endif
  16. #ifndef __MACMEMORY__
  17. #include <MacMemory.h>
  18. #endif
  19. #ifndef __TEXTCOMMON__
  20. #include <TextCommon.h>
  21. #endif
  22. #ifndef __ATSLAYOUTTYPES__
  23. #include <ATSLayoutTypes.h>
  24. #endif
  25. #ifndef __FONTS__
  26. #include <Fonts.h>
  27. #endif
  28. #ifndef __QUICKDRAW__
  29. #include <Quickdraw.h>
  30. #endif
  31. #ifndef __SFNTTYPES__
  32. #include <SFNTTypes.h>
  33. #endif
  34. #ifndef __SFNTLAYOUTTYPES__
  35. #include <SFNTLayoutTypes.h>
  36. #endif
  37. #ifndef __ATSTYPES__
  38. #include <ATSTypes.h>
  39. #endif
  40. #if PRAGMA_ONCE
  41. #pragma once
  42. #endif
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46. #if PRAGMA_IMPORT
  47. #pragma import on
  48. #endif
  49. #if PRAGMA_STRUCT_ALIGN
  50. #pragma options align=mac68k
  51. #elif PRAGMA_STRUCT_PACKPUSH
  52. #pragma pack(push, 2)
  53. #elif PRAGMA_STRUCT_PACK
  54. #pragma pack(2)
  55. #endif
  56. /********************************/
  57. /* Types and related constants */
  58. /********************************/
  59. /*
  60. UniCharArrayHandle and UniCharArrayOffset are defined in the
  61. TextCommon interface file.
  62. */
  63. /*
  64. ATSUTextMeasurement is specific to ATSUI in that measurement
  65. quantities are in fractional Fixed format instead of shorts
  66. used in QuickDraw Text. This provides exact outline metrics and
  67. line specifications such as line width, ascent, descent, and so on.
  68. */
  69. typedef Fixed ATSUTextMeasurement;
  70. /*
  71. ATSUFontID indicates a particular font family and face.
  72. ATSUFontID's are not guaranteed to remain constant across
  73. reboots. Clients should use the font's unique name to
  74. get a font token to store in documents which is
  75. guaranteed to remain constant across reboots.
  76. */
  77. typedef FMFont ATSUFontID;
  78. /*
  79. ATSUFontFeatureType and ATSUFontFeatureSelector are used
  80. to identify font features.
  81. */
  82. typedef UInt16 ATSUFontFeatureType;
  83. typedef UInt16 ATSUFontFeatureSelector;
  84. /*
  85. ATSUFontVariationAxis and ATSUFontVariationValue are used
  86. in connection with font variations.
  87. */
  88. typedef FourCharCode ATSUFontVariationAxis;
  89. typedef Fixed ATSUFontVariationValue;
  90. /*
  91. ATSUTextLayout is used to store the attribute information
  92. associated with a contiguous block of UniChar's (UInt16's)
  93. in memory. It's typed to be an opaque structure.
  94. */
  95. typedef struct OpaqueATSUTextLayout* ATSUTextLayout;
  96. /*
  97. ATSUStyle is used to store a set of individual attributes,
  98. font features, and font variations. It's typed to be
  99. an opaque structure.
  100. */
  101. typedef struct OpaqueATSUStyle* ATSUStyle;
  102. /*
  103. ATSUFontFallbacks is used to store the desired font fallback
  104. list and associated fallback cache information. It's typed
  105. to be an opaque structure.
  106. */
  107. typedef struct OpaqueATSUFontFallbacks* ATSUFontFallbacks;
  108. /*
  109. ATSUAttributeTag is used to indicate the particular type
  110. of attribute under consideration: font, size, color,
  111. and so on.
  112. Each style run may have at most one attribute with a
  113. given ATSUAttributeTag (i.e., a style run can't have
  114. more than one font or size) but may have none.
  115. Note: Apple reserves values 0 to 65,535 (0 to 0x0000FFFF).
  116. ATSUI clients may create their own tags with any other value.
  117. */
  118. typedef UInt32 ATSUAttributeTag;
  119. enum {
  120. /* Layout and Line Control Attribute Tags*/
  121. kATSULineWidthTag = 1L, /* Type: ATSUTextMeasurement >= 0*/
  122. /* Default value: 0*/
  123. kATSULineRotationTag = 2L, /* Type: Fixed (fixed value in degrees in right-handed coordinate system)*/
  124. /* Default value: 0*/
  125. kATSULineDirectionTag = 3L, /* Type: Boolean; values 0 or 1 (see below for value identities)*/
  126. /* Default value: GetSysDirection() ? kATSURightToLeftBaseDirection : kATSULeftToRightBaseDirection*/
  127. kATSULineJustificationFactorTag = 4L, /* Type: Fract between 0 and 1*/
  128. /* Default value: kATSUNoJustification*/
  129. kATSULineFlushFactorTag = 5L, /* Type: Fract between 0 and 1 */
  130. /* Default value: kATSUStartAlignment*/
  131. kATSULineBaselineValuesTag = 6L, /* Type: BslnBaselineRecord*/
  132. /* Default value: All zeros. Calculated from other style attributes (e.g., font and point size)*/
  133. kATSULineLayoutOptionsTag = 7L, /* Type: ATSLineLayoutOptions (see ATSLayoutTypes.h)*/
  134. /* Default value: kATSLineNoLayoutOptions - other options listed in ATSLayoutTypes.h*/
  135. kATSULineAscentTag = 8L, /* Type: ATSUTextMeasurement >= 0*/
  136. /* Default value: Maximum typographical ascent of all fonts used on line or textLayout*/
  137. kATSULineDescentTag = 9L, /* Type: ATSUTextMeasurement >= 0*/
  138. /* Default value: Maximum typographical descent+leading of all fonts used on line or textLayout*/
  139. kATSULineLangRegionTag = 10L, /* Type: RegionCode - region values listed in script.h interface file*/
  140. /* Default value: kTextRegionDontCare*/
  141. kATSULineTextLocatorTag = 11L, /* Type: TextBreakLocatorRef*/
  142. /* Default value: NULL - set Region derived locator or the default Text Utilities locator*/
  143. kATSULineTruncationTag = 12L, /* Type: ATSULineTruncation*/
  144. /* Default value: kATSUTruncateNone */
  145. kATSULineFontFallbacksTag = 13L, /* Type: ATSUFontFallbacks*/
  146. /* Default value: globally set font fallbacks using the ATSUSetFontFallbacks */
  147. kATSULayoutOperationOverrideTag = 15L, /* Type: ATSULayoutOperationOverrideSpecifier (MacOS 10.2 or later) */
  148. /* Default value: NULL*/
  149. kATSUMaxLineTag = 16L, /* This is just for convenience - the upper limit of the ATSUTextLayout attribute tags*/
  150. /* Obsolete layout tags */
  151. kATSULineLanguageTag = 10L, /* Use kATSULineLangRegionTag */
  152. /* Special layout tags */
  153. kATSUCGContextTag = 32767L, /* Type: CGContextRef (MacOS X systems only)*/
  154. /* Default value: NULL*/
  155. /* Run Style Attribute Tags*/
  156. /* QuickDraw compatibility tags */
  157. kATSUQDBoldfaceTag = 256L, /* Type: Boolean */
  158. /* Default value: false*/
  159. kATSUQDItalicTag = 257L, /* Type: Boolean */
  160. /* Default value: false*/
  161. kATSUQDUnderlineTag = 258L, /* Type: Boolean */
  162. /* Default value: false*/
  163. kATSUQDCondensedTag = 259L, /* Type: Boolean */
  164. /* Default value: false*/
  165. kATSUQDExtendedTag = 260L, /* Type: Boolean */
  166. /* Default value: false*/
  167. /* Common run tags */
  168. kATSUFontTag = 261L, /* Type: ATSUFontID */
  169. /* Default value: GetScriptVariable( smSystemScript, smScriptAppFond )*/
  170. kATSUSizeTag = 262L, /* Type: Fixed */
  171. /* Default value: GetScriptVariable( smSystemScript, smScriptAppFondSize ) */
  172. kATSUColorTag = 263L, /* Type: RGBColor*/
  173. /* Default value: (0, 0, 0)*/
  174. /* Less common run tags */
  175. kATSULangRegionTag = 264L, /* Type: RegionCode - region values listed in script.h interface file*/
  176. /* Default value: GetScriptManagerVariable( smRegionCode )*/
  177. kATSUVerticalCharacterTag = 265L, /* Type: ATSUVerticalCharacterType */
  178. /* Default value: kATSUStronglyHorizontal*/
  179. kATSUImposeWidthTag = 266L, /* Type: ATSUTextMeasurement >= 0*/
  180. /* Default value: kATSUseGlyphAdvance - all glyphs use their own font defined advance widths*/
  181. kATSUBeforeWithStreamShiftTag = 267L, /* Type: Fixed*/
  182. /* Default value: 0*/
  183. kATSUAfterWithStreamShiftTag = 268L, /* Type: Fixed*/
  184. /* Default value: 0*/
  185. kATSUCrossStreamShiftTag = 269L, /* Type: Fixed*/
  186. /* Default value: 0*/
  187. kATSUTrackingTag = 270L, /* Type: Fixed*/
  188. /* Default value: kATSNoTracking*/
  189. kATSUHangingInhibitFactorTag = 271L, /* Type: Fract between 0 and 1*/
  190. /* Default value: 0*/
  191. kATSUKerningInhibitFactorTag = 272L, /* Type: Fract between 0 and 1*/
  192. /* Default value: 0*/
  193. kATSUDecompositionFactorTag = 273L, /* Type: Fixed (-1.0 -> 1.0)*/
  194. /* Default value: 0*/
  195. kATSUBaselineClassTag = 274L, /* Type: BslnBaselineClass (see SFNTLayoutTypes.h)*/
  196. /* Default value: kBSLNRomanBaseline - set to kBSLNNoBaselineOverride to use intrinsic baselines*/
  197. kATSUPriorityJustOverrideTag = 275L, /* Type: ATSJustPriorityWidthDeltaOverrides (see ATSLayoutTypes.h)*/
  198. /* Default value: all zeros*/
  199. kATSUNoLigatureSplitTag = 276L, /* Type: Boolean*/
  200. /* Default value: false - ligatures and compound characters have divisable components.*/
  201. kATSUNoCaretAngleTag = 277L, /* Type: Boolean*/
  202. /* Default value: false - use the character's angularity to determine its boundaries*/
  203. kATSUSuppressCrossKerningTag = 278L, /* Type: Boolean*/
  204. /* Default value: false - do not suppress automatic cross kerning (defined by font)*/
  205. kATSUNoOpticalAlignmentTag = 279L, /* Type: Boolean*/
  206. /* Default value: false - do not suppress character's automatic optical positional alignment*/
  207. kATSUForceHangingTag = 280L, /* Type: Boolean*/
  208. /* Default value: false - do not force the character's to hang beyond the line boundaries*/
  209. kATSUNoSpecialJustificationTag = 281L, /* Type: Boolean*/
  210. /* Default value: false - perform post-compensation justification if needed*/
  211. kATSUStyleTextLocatorTag = 282L, /* Type: TextBreakLocatorRef*/
  212. /* Default value: NULL - region derived locator or the default Text Utilities locator*/
  213. kATSUStyleRenderingOptionsTag = 283L, /* Type: ATSStyleRenderingOptions (see ATSLayoutTypes.h)*/
  214. /* Default value: kATSStyleNoOptions - other options listed in ATSLayoutTypes.h*/
  215. kATSUAscentTag = 284L, /* Type: ATSUTextMeasurement >= 0 (MacOS 10.2 or later)*/
  216. /* Default value: Ascent value of style's font with current pointSize*/
  217. kATSUDescentTag = 285L, /* Type: ATSUTextMeasurement >= 0 (MacOS 10.2 or later)*/
  218. /* Default value: Descent value of style's font with current pointSize*/
  219. kATSULeadingTag = 286L, /* Type: ATSUTextMeasurement >= 0 (MacOS 10.2 or later)*/
  220. /* Default value: Leading value of style's font with current pointSize (usually value 0)*/
  221. kATSUGlyphSelectorTag = 287L, /* Type: ATSUGlyphSelector (MacOS 10.2 or later)*/
  222. /* Default value: 0 - use the glyphs derived by ATSUI layout*/
  223. kATSURGBAlphaColorTag = 288L, /* Type: ATSURGBAlphaColor (MacOS 10.2 or later)*/
  224. /* Default value: (0, 0, 0, 1)*/
  225. kATSUFontMatrixTag = 289L, /* Type: CGAffineTransform (MacOS 10.2 or later)*/
  226. /* Default value: [1, 0, 0, 1, 0, 0] ==> CGAffineTransformIdentity*/
  227. kATSUMaxStyleTag = 290L, /* This is just for convenience - the upper limit of the ATSUStyle attribute tags */
  228. /* obsolete style tags */
  229. kATSULanguageTag = 264L, /* use kATSULangRegionTag */
  230. /* max */
  231. kATSUMaxATSUITagValue = 65535L /* This is the maximum Apple ATSUI reserved tag value. Client defined tags must be larger.*/
  232. };
  233. /*
  234. ATSUAttributeValuePtr is used to provide generic access to
  235. storage of attribute values, which vary in size.
  236. ConstATSUAttributeValuePtr is a pointer to a const attribute value.
  237. */
  238. typedef void * ATSUAttributeValuePtr;
  239. typedef const void * ConstATSUAttributeValuePtr;
  240. /*
  241. ATSUAttributeInfo is used to provide a tag/size pairing.
  242. This makes it possible to provide the client information
  243. about all the attributes for a given range of text. This
  244. structure is only used to return to the client information
  245. about a complete set of attributes. An array of
  246. ATSUAttributeInfos is passed as a parameter so that the
  247. client can find out what attributes are set and what their
  248. individual sizes are; with that information, they can then
  249. query about the values of the attributes they're interested
  250. in. Because arrays of ATSUAttributeInfos are used as parameters
  251. to functions, they have to be of a fixed size, hence the
  252. value is not included in the structure.
  253. */
  254. struct ATSUAttributeInfo {
  255. ATSUAttributeTag fTag;
  256. ByteCount fValueSize;
  257. };
  258. typedef struct ATSUAttributeInfo ATSUAttributeInfo;
  259. /*
  260. ATSUCaret contains the complete information needed to render a
  261. caret. fX and fY is the position of one of the caret's ends
  262. relative to the origin position of the line the caret belongs.
  263. fDeltaX and fDeltaY is the position of the caret's other end.
  264. Hence, to draw a caret, simply call MoveTo(fX, fY) followed by
  265. LineTo(fDeltaX, fDeltaY) or equivalent. The ATSUCaret will
  266. contain the positions needed to draw carets on angled lines
  267. and reflect angled carets and leading/trailing split caret
  268. appearances.
  269. */
  270. struct ATSUCaret {
  271. Fixed fX;
  272. Fixed fY;
  273. Fixed fDeltaX;
  274. Fixed fDeltaY;
  275. };
  276. typedef struct ATSUCaret ATSUCaret;
  277. /*
  278. ATSUCursorMovementType is used to indicate how much to move
  279. the cursor when using the ATSUI cusor movement routines.
  280. Note that kATSUByCharacterCluster is only available in Mac OS X
  281. and in CarbonLib versions 1.3 and later.
  282. */
  283. typedef UInt16 ATSUCursorMovementType;
  284. enum {
  285. kATSUByCharacter = 0,
  286. kATSUByTypographicCluster = 1, /* clusters based on characters or ligatures*/
  287. kATSUByWord = 2,
  288. kATSUByCharacterCluster = 3, /* clusters based on characters only*/
  289. kATSUByCluster = 1 /* obsolete name for kATSUByTypographicCluster*/
  290. };
  291. /*
  292. ATSULineTruncation is for identifying where truncation will occur when
  293. using a ATSUTextLayout with the ATSULineTruncation layout attribute.
  294. */
  295. typedef UInt32 ATSULineTruncation;
  296. enum {
  297. kATSUTruncateNone = 0, /* truncation specification - add to any desired truncFeat bit options listed below*/
  298. kATSUTruncateStart = 1, /* for instance, kATSUTruncateEnd with kATSUTruncFeatNoSquishing is value 0x0000000A*/
  299. kATSUTruncateEnd = 2,
  300. kATSUTruncateMiddle = 3,
  301. kATSUTruncateSpecificationMask = 0x00000007, /* these bits are reserved for the truncation specification (0 - 7)*/
  302. /* the following bit-field options can be added to the chosen truncation specification*/
  303. kATSUTruncFeatNoSquishing = 0x00000008 /* if specified, do not perform any negative justification in lieu of truncation*/
  304. };
  305. /*
  306. ATSUVerticalCharacterType currently can take two values
  307. and is used to indicate whether text is to be laid out
  308. as vertical glyphs or horizontal glyphs.
  309. */
  310. typedef UInt16 ATSUVerticalCharacterType;
  311. enum {
  312. kATSUStronglyHorizontal = 0,
  313. kATSUStronglyVertical = 1
  314. };
  315. /*
  316. ATSUStyleComparison is an enumeration with four values,
  317. and is used by ATSUCompareStyles() to indicate if the
  318. first style parameter contains as a proper subset, is
  319. equal to, or is contained by the second style parameter.
  320. */
  321. typedef UInt16 ATSUStyleComparison;
  322. enum {
  323. kATSUStyleUnequal = 0,
  324. kATSUStyleContains = 1,
  325. kATSUStyleEquals = 2,
  326. kATSUStyleContainedBy = 3
  327. };
  328. /*
  329. ATSUFontFallbackMethod type defines the method by which ATSUI will try to
  330. find an appropriate font for a character if the assigned font does not
  331. contain the needed glyph(s) to represent it. This affects ATSUMatchFontsToText
  332. and font selection during layout and drawing when ATSUSetTransientFontMatching
  333. is set ON.
  334. */
  335. typedef UInt16 ATSUFontFallbackMethod;
  336. enum {
  337. kATSUDefaultFontFallbacks = 0,
  338. kATSULastResortOnlyFallback = 1,
  339. kATSUSequentialFallbacksPreferred = 2,
  340. kATSUSequentialFallbacksExclusive = 3
  341. };
  342. /*
  343. ATSUTabType type defines the characteristic of ATSUI tabs.
  344. A Left tab type specifies that the left side of affected text is to be
  345. maintained flush against the tab stop. A Right tab type specifies that
  346. the right side of affected text is to be maintained flush against the
  347. tab stop. A Center tab type specifies that the affected text centered
  348. about the tab stop.
  349. */
  350. typedef UInt16 ATSUTabType;
  351. enum {
  352. kATSULeftTab = 0,
  353. kATSUCenterTab = 1,
  354. kATSURightTab = 2,
  355. kATSUNumberTabTypes = 3
  356. };
  357. /*
  358. ATSUTab specifies the position and type of tab stop
  359. to be applied to a ATSUTextLayout set through the ATSUI routine
  360. ATSUSetTabArray and returned through ATSUGetTabArray.
  361. */
  362. struct ATSUTab {
  363. ATSUTextMeasurement tabPosition;
  364. ATSUTabType tabType;
  365. };
  366. typedef struct ATSUTab ATSUTab;
  367. /*
  368. GlyphCollection types represent the specific character collection. If
  369. the value is zero, kGlyphCollectionGID, then this indicates that the
  370. glyph value represents the actual glyphID of a specific font.
  371. */
  372. typedef UInt16 GlyphCollection;
  373. enum {
  374. kGlyphCollectionGID = 0,
  375. kGlyphCollectionAdobeCNS1 = 1,
  376. kGlyphCollectionAdobeGB1 = 2,
  377. kGlyphCollectionAdobeJapan1 = 3,
  378. kGlyphCollectionAdobeJapan2 = 4,
  379. kGlyphCollectionAdobeKorea1 = 5,
  380. kGlyphCollectionUnspecified = 0xFF
  381. };
  382. /*
  383. ATSUGlyphSelector can direct ATSUI to use a specific glyph instead of the one that
  384. ATSUI normally derives. The glyph can be specified either as a glyphID (specific
  385. to the font used) or CID from a specfic collection defined by the collection entry.
  386. */
  387. struct ATSUGlyphSelector {
  388. GlyphCollection collection; /* kGlyphCollectionXXX enum*/
  389. GlyphID glyphID; /* GID (when collection==0) or CID*/
  390. };
  391. typedef struct ATSUGlyphSelector ATSUGlyphSelector;
  392. #if CALL_NOT_IN_CARBON
  393. /*
  394. ATSUMemoryCallbacks is a union struct that allows the ATSUI
  395. client to specify a specific heap for ATSUI use or allocation
  396. callbacks of which ATSUI is to use each time ATSUI performs a
  397. memory operation (alloc, grow, free).
  398. */
  399. typedef CALLBACK_API_C( void *, ATSUCustomAllocFunc )(void *refCon, ByteCount howMuch);
  400. typedef CALLBACK_API_C( void , ATSUCustomFreeFunc )(void *refCon, void *doomedBlock);
  401. typedef CALLBACK_API_C( void *, ATSUCustomGrowFunc )(void *refCon, void *oldBlock, ByteCount oldSize, ByteCount newSize);
  402. union ATSUMemoryCallbacks {
  403. struct {
  404. ATSUCustomAllocFunc Alloc;
  405. ATSUCustomFreeFunc Free;
  406. ATSUCustomGrowFunc Grow;
  407. void * memoryRefCon;
  408. } callbacks;
  409. THz heapToUse;
  410. };
  411. typedef union ATSUMemoryCallbacks ATSUMemoryCallbacks;
  412. /*
  413. ATSUHeapSpec provides the ATSUI client a means of specifying the heap
  414. from which ATSUI should allocate its dynamic memory or specifying
  415. that ATSUI should use the memory callback provided by the client.
  416. */
  417. typedef UInt16 ATSUHeapSpec;
  418. enum {
  419. kATSUUseCurrentHeap = 0,
  420. kATSUUseAppHeap = 1,
  421. kATSUUseSpecificHeap = 2,
  422. kATSUUseCallbacks = 3
  423. };
  424. /*
  425. ATSUMemorySetting is used to store the results from a ATSUSetMemoryAlloc
  426. or a ATSUGetCurrentMemorySetting call. It can also be used to change the
  427. current ATSUMemorySetting by passing it into the ATSUSetCurrentMemorySetting
  428. call.
  429. */
  430. typedef struct OpaqueATSUMemorySetting* ATSUMemorySetting;
  431. #endif /* CALL_NOT_IN_CARBON */
  432. /* Types for ATSUI Low Level API */
  433. struct ATSUGlyphInfo {
  434. GlyphID glyphID;
  435. UInt16 reserved;
  436. UInt32 layoutFlags;
  437. UniCharArrayOffset charIndex;
  438. ATSUStyle style;
  439. Float32 deltaY;
  440. Float32 idealX;
  441. SInt16 screenX;
  442. SInt16 caretX;
  443. };
  444. typedef struct ATSUGlyphInfo ATSUGlyphInfo;
  445. struct ATSUGlyphInfoArray {
  446. ATSUTextLayout layout;
  447. ItemCount numGlyphs;
  448. ATSUGlyphInfo glyphs[1];
  449. };
  450. typedef struct ATSUGlyphInfoArray ATSUGlyphInfoArray;
  451. /********************/
  452. /* Other constants */
  453. /********************/
  454. /* Line direction types (used for kATSULineDirectionTag values) */
  455. enum {
  456. kATSULeftToRightBaseDirection = 0, /* Impose left-to-right or top-to-bottom dominant direction */
  457. kATSURightToLeftBaseDirection = 1 /* Impose right-to-left or bottom-to-top dominant direction */
  458. };
  459. /* LineFlushFactor convenience defined values */
  460. #define kATSUStartAlignment ((Fract) 0x00000000L)
  461. #define kATSUEndAlignment ((Fract) 0x40000000L)
  462. #define kATSUCenterAlignment ((Fract) 0x20000000L)
  463. /* LineJustificationFactor convenience defined values */
  464. #define kATSUNoJustification ((Fract) 0x00000000L)
  465. #define kATSUFullJustification ((Fract) 0x40000000L)
  466. /* Other constants */
  467. enum {
  468. kATSUInvalidFontID = 0
  469. };
  470. enum {
  471. kATSUUseLineControlWidth = 0x7FFFFFFF
  472. };
  473. enum {
  474. kATSUNoSelector = 0x0000FFFF
  475. };
  476. enum {
  477. kATSUUseGrafPortPenLoc = (unsigned long)0xFFFFFFFF,
  478. kATSUClearAll = (unsigned long)0xFFFFFFFF
  479. };
  480. enum {
  481. kATSUFromTextBeginning = (unsigned long)0xFFFFFFFF,
  482. kATSUToTextEnd = (unsigned long)0xFFFFFFFF
  483. };
  484. /****************/
  485. /* Functions */
  486. /****************/
  487. /* ---------------------------------------------------------------------------- */
  488. /* Clipboard support, flattened style version 0 */
  489. /* ---------------------------------------------------------------------------- */
  490. /*
  491. Warning: ATSUCopyToHandle & ATSUPasteFromHandle have been deprecated
  492. Use their replacements, ATSUFlattenStyleRunsToStream and , instead if available or
  493. perform your own flattening
  494. */
  495. /*
  496. * ATSUCopyToHandle()
  497. *
  498. * Availability:
  499. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  500. * CarbonLib: in CarbonLib 1.0 and later
  501. * Mac OS X: in version 10.0 and later
  502. */
  503. EXTERN_API_C( OSStatus )
  504. ATSUCopyToHandle(
  505. ATSUStyle iStyle,
  506. Handle oStyleHandle);
  507. /*
  508. * ATSUPasteFromHandle()
  509. *
  510. * Availability:
  511. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  512. * CarbonLib: in CarbonLib 1.0 and later
  513. * Mac OS X: in version 10.0 and later
  514. */
  515. EXTERN_API_C( OSStatus )
  516. ATSUPasteFromHandle(
  517. ATSUStyle iStyle,
  518. Handle iStyleHandle);
  519. /* ---------------------------------------------------------------------------- */
  520. /* Memory allocation specification functions (not in Carbon) */
  521. /* ---------------------------------------------------------------------------- */
  522. #if CALL_NOT_IN_CARBON
  523. /*
  524. * ATSUCreateMemorySetting()
  525. *
  526. * Availability:
  527. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  528. * CarbonLib: not available
  529. * Mac OS X: not available
  530. */
  531. EXTERN_API_C( OSStatus )
  532. ATSUCreateMemorySetting(
  533. ATSUHeapSpec iHeapSpec,
  534. ATSUMemoryCallbacks * iMemoryCallbacks,
  535. ATSUMemorySetting * oMemorySetting);
  536. /*
  537. * ATSUSetCurrentMemorySetting()
  538. *
  539. * Availability:
  540. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  541. * CarbonLib: not available
  542. * Mac OS X: not available
  543. */
  544. EXTERN_API_C( OSStatus )
  545. ATSUSetCurrentMemorySetting(ATSUMemorySetting iMemorySetting);
  546. /*
  547. * ATSUGetCurrentMemorySetting()
  548. *
  549. * Availability:
  550. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  551. * CarbonLib: not available
  552. * Mac OS X: not available
  553. */
  554. EXTERN_API_C( ATSUMemorySetting )
  555. ATSUGetCurrentMemorySetting(void);
  556. /*
  557. * ATSUDisposeMemorySetting()
  558. *
  559. * Availability:
  560. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  561. * CarbonLib: not available
  562. * Mac OS X: not available
  563. */
  564. EXTERN_API_C( OSStatus )
  565. ATSUDisposeMemorySetting(ATSUMemorySetting iMemorySetting);
  566. /* ---------------------------------------------------------------------------- */
  567. /* Font fallback object functions */
  568. /* ---------------------------------------------------------------------------- */
  569. #endif /* CALL_NOT_IN_CARBON */
  570. /*
  571. * ATSUCreateFontFallbacks()
  572. *
  573. * Availability:
  574. * Non-Carbon CFM: not available
  575. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  576. * Mac OS X: in version 10.1 and later
  577. */
  578. EXTERN_API_C( OSStatus )
  579. ATSUCreateFontFallbacks(ATSUFontFallbacks * oFontFallback);
  580. /*
  581. * ATSUDisposeFontFallbacks()
  582. *
  583. * Availability:
  584. * Non-Carbon CFM: not available
  585. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  586. * Mac OS X: in version 10.1 and later
  587. */
  588. EXTERN_API_C( OSStatus )
  589. ATSUDisposeFontFallbacks(ATSUFontFallbacks iFontFallbacks);
  590. /*
  591. * ATSUSetObjFontFallbacks()
  592. *
  593. * Availability:
  594. * Non-Carbon CFM: not available
  595. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  596. * Mac OS X: in version 10.1 and later
  597. */
  598. EXTERN_API_C( OSStatus )
  599. ATSUSetObjFontFallbacks(
  600. ATSUFontFallbacks iFontFallbacks,
  601. ItemCount iFontFallbacksCount,
  602. const ATSUFontID iFonts[],
  603. ATSUFontFallbackMethod iFontFallbackMethod);
  604. /*
  605. * ATSUGetObjFontFallbacks()
  606. *
  607. * Availability:
  608. * Non-Carbon CFM: not available
  609. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  610. * Mac OS X: in version 10.1 and later
  611. */
  612. EXTERN_API_C( OSStatus )
  613. ATSUGetObjFontFallbacks(
  614. ATSUFontFallbacks iFontFallbacks,
  615. ItemCount iMaxFontFallbacksCount,
  616. ATSUFontID oFonts[],
  617. ATSUFontFallbackMethod * oFontFallbackMethod,
  618. ItemCount * oActualFallbacksCount);
  619. /* ---------------------------------------------------------------------------- */
  620. /* Basic style functions */
  621. /* ---------------------------------------------------------------------------- */
  622. /*
  623. * ATSUCreateStyle()
  624. *
  625. * Availability:
  626. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  627. * CarbonLib: in CarbonLib 1.0 and later
  628. * Mac OS X: in version 10.0 and later
  629. */
  630. EXTERN_API_C( OSStatus )
  631. ATSUCreateStyle(ATSUStyle * oStyle);
  632. /*
  633. * ATSUCreateAndCopyStyle()
  634. *
  635. * Availability:
  636. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  637. * CarbonLib: in CarbonLib 1.0 and later
  638. * Mac OS X: in version 10.0 and later
  639. */
  640. EXTERN_API_C( OSStatus )
  641. ATSUCreateAndCopyStyle(
  642. ATSUStyle iStyle,
  643. ATSUStyle * oStyle);
  644. /*
  645. * ATSUDisposeStyle()
  646. *
  647. * Availability:
  648. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  649. * CarbonLib: in CarbonLib 1.0 and later
  650. * Mac OS X: in version 10.0 and later
  651. */
  652. EXTERN_API_C( OSStatus )
  653. ATSUDisposeStyle(ATSUStyle iStyle);
  654. /*
  655. * ATSUSetStyleRefCon()
  656. *
  657. * Availability:
  658. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  659. * CarbonLib: in CarbonLib 1.0 and later
  660. * Mac OS X: in version 10.0 and later
  661. */
  662. EXTERN_API_C( OSStatus )
  663. ATSUSetStyleRefCon(
  664. ATSUStyle iStyle,
  665. UInt32 iRefCon);
  666. /*
  667. * ATSUGetStyleRefCon()
  668. *
  669. * Availability:
  670. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  671. * CarbonLib: in CarbonLib 1.0 and later
  672. * Mac OS X: in version 10.0 and later
  673. */
  674. EXTERN_API_C( OSStatus )
  675. ATSUGetStyleRefCon(
  676. ATSUStyle iStyle,
  677. UInt32 * oRefCon);
  678. /* ---------------------------------------------------------------------------- */
  679. /* Style comparison */
  680. /* ---------------------------------------------------------------------------- */
  681. /*
  682. * ATSUCompareStyles()
  683. *
  684. * Availability:
  685. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  686. * CarbonLib: in CarbonLib 1.0 and later
  687. * Mac OS X: in version 10.0 and later
  688. */
  689. EXTERN_API_C( OSStatus )
  690. ATSUCompareStyles(
  691. ATSUStyle iFirstStyle,
  692. ATSUStyle iSecondStyle,
  693. ATSUStyleComparison * oComparison);
  694. /* ---------------------------------------------------------------------------- */
  695. /* Attribute manipulations */
  696. /* ---------------------------------------------------------------------------- */
  697. /*
  698. * ATSUCopyAttributes()
  699. *
  700. * Availability:
  701. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  702. * CarbonLib: in CarbonLib 1.0 and later
  703. * Mac OS X: in version 10.0 and later
  704. */
  705. EXTERN_API_C( OSStatus )
  706. ATSUCopyAttributes(
  707. ATSUStyle iSourceStyle,
  708. ATSUStyle iDestinationStyle);
  709. /*
  710. * ATSUOverwriteAttributes()
  711. *
  712. * Availability:
  713. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  714. * CarbonLib: in CarbonLib 1.0 and later
  715. * Mac OS X: in version 10.0 and later
  716. */
  717. EXTERN_API_C( OSStatus )
  718. ATSUOverwriteAttributes(
  719. ATSUStyle iSourceStyle,
  720. ATSUStyle iDestinationStyle);
  721. /*
  722. * ATSUUnderwriteAttributes()
  723. *
  724. * Availability:
  725. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  726. * CarbonLib: in CarbonLib 1.0 and later
  727. * Mac OS X: in version 10.0 and later
  728. */
  729. EXTERN_API_C( OSStatus )
  730. ATSUUnderwriteAttributes(
  731. ATSUStyle iSourceStyle,
  732. ATSUStyle iDestinationStyle);
  733. /* ---------------------------------------------------------------------------- */
  734. /* Empty styles */
  735. /* ---------------------------------------------------------------------------- */
  736. /*
  737. * ATSUClearStyle()
  738. *
  739. * Availability:
  740. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  741. * CarbonLib: in CarbonLib 1.0 and later
  742. * Mac OS X: in version 10.0 and later
  743. */
  744. EXTERN_API_C( OSStatus )
  745. ATSUClearStyle(ATSUStyle iStyle);
  746. /*
  747. * ATSUStyleIsEmpty()
  748. *
  749. * Availability:
  750. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  751. * CarbonLib: in CarbonLib 1.0 and later
  752. * Mac OS X: in version 10.0 and later
  753. */
  754. EXTERN_API_C( OSStatus )
  755. ATSUStyleIsEmpty(
  756. ATSUStyle iStyle,
  757. Boolean * oIsClear);
  758. /* ---------------------------------------------------------------------------- */
  759. /* Get and set attributes */
  760. /* ---------------------------------------------------------------------------- */
  761. /*
  762. * ATSUCalculateBaselineDeltas()
  763. *
  764. * Availability:
  765. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  766. * CarbonLib: in CarbonLib 1.0 and later
  767. * Mac OS X: in version 10.0 and later
  768. */
  769. EXTERN_API_C( OSStatus )
  770. ATSUCalculateBaselineDeltas(
  771. ATSUStyle iStyle,
  772. BslnBaselineClass iBaselineClass,
  773. BslnBaselineRecord oBaselineDeltas);
  774. /*
  775. * ATSUSetAttributes()
  776. *
  777. * Availability:
  778. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  779. * CarbonLib: in CarbonLib 1.0 and later
  780. * Mac OS X: in version 10.0 and later
  781. */
  782. EXTERN_API_C( OSStatus )
  783. ATSUSetAttributes(
  784. ATSUStyle iStyle,
  785. ItemCount iAttributeCount,
  786. const ATSUAttributeTag iTag[],
  787. const ByteCount iValueSize[],
  788. const ATSUAttributeValuePtr iValue[]);
  789. /*
  790. * ATSUGetAttribute()
  791. *
  792. * Availability:
  793. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  794. * CarbonLib: in CarbonLib 1.0 and later
  795. * Mac OS X: in version 10.0 and later
  796. */
  797. EXTERN_API_C( OSStatus )
  798. ATSUGetAttribute(
  799. ATSUStyle iStyle,
  800. ATSUAttributeTag iTag,
  801. ByteCount iExpectedValueSize,
  802. ATSUAttributeValuePtr oValue,
  803. ByteCount * oActualValueSize);
  804. /*
  805. * ATSUGetAllAttributes()
  806. *
  807. * Availability:
  808. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  809. * CarbonLib: in CarbonLib 1.0 and later
  810. * Mac OS X: in version 10.0 and later
  811. */
  812. EXTERN_API_C( OSStatus )
  813. ATSUGetAllAttributes(
  814. ATSUStyle iStyle,
  815. ATSUAttributeInfo oAttributeInfoArray[],
  816. ItemCount iTagValuePairArraySize,
  817. ItemCount * oTagValuePairCount);
  818. /*
  819. * ATSUClearAttributes()
  820. *
  821. * Availability:
  822. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  823. * CarbonLib: in CarbonLib 1.0 and later
  824. * Mac OS X: in version 10.0 and later
  825. */
  826. EXTERN_API_C( OSStatus )
  827. ATSUClearAttributes(
  828. ATSUStyle iStyle,
  829. ItemCount iTagCount,
  830. const ATSUAttributeTag iTag[]);
  831. /* ---------------------------------------------------------------------------- */
  832. /* Font features */
  833. /* ---------------------------------------------------------------------------- */
  834. /*
  835. * ATSUSetFontFeatures()
  836. *
  837. * Availability:
  838. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  839. * CarbonLib: in CarbonLib 1.0 and later
  840. * Mac OS X: in version 10.0 and later
  841. */
  842. EXTERN_API_C( OSStatus )
  843. ATSUSetFontFeatures(
  844. ATSUStyle iStyle,
  845. ItemCount iFeatureCount,
  846. const ATSUFontFeatureType iType[],
  847. const ATSUFontFeatureSelector iSelector[]);
  848. /*
  849. * ATSUGetFontFeature()
  850. *
  851. * Availability:
  852. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  853. * CarbonLib: in CarbonLib 1.0 and later
  854. * Mac OS X: in version 10.0 and later
  855. */
  856. EXTERN_API_C( OSStatus )
  857. ATSUGetFontFeature(
  858. ATSUStyle iStyle,
  859. ItemCount iFeatureIndex,
  860. ATSUFontFeatureType * oFeatureType,
  861. ATSUFontFeatureSelector * oFeatureSelector);
  862. /*
  863. * ATSUGetAllFontFeatures()
  864. *
  865. * Availability:
  866. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  867. * CarbonLib: in CarbonLib 1.0 and later
  868. * Mac OS X: in version 10.0 and later
  869. */
  870. EXTERN_API_C( OSStatus )
  871. ATSUGetAllFontFeatures(
  872. ATSUStyle iStyle,
  873. ItemCount iMaximumFeatureCount,
  874. ATSUFontFeatureType oFeatureType[],
  875. ATSUFontFeatureSelector oFeatureSelector[],
  876. ItemCount * oActualFeatureCount);
  877. /*
  878. * ATSUClearFontFeatures()
  879. *
  880. * Availability:
  881. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  882. * CarbonLib: in CarbonLib 1.0 and later
  883. * Mac OS X: in version 10.0 and later
  884. */
  885. EXTERN_API_C( OSStatus )
  886. ATSUClearFontFeatures(
  887. ATSUStyle iStyle,
  888. ItemCount iFeatureCount,
  889. const ATSUFontFeatureType iType[],
  890. const ATSUFontFeatureSelector iSelector[]);
  891. /* ---------------------------------------------------------------------------- */
  892. /* Font variations */
  893. /* ---------------------------------------------------------------------------- */
  894. /*
  895. * ATSUSetVariations()
  896. *
  897. * Availability:
  898. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  899. * CarbonLib: in CarbonLib 1.0 and later
  900. * Mac OS X: in version 10.0 and later
  901. */
  902. EXTERN_API_C( OSStatus )
  903. ATSUSetVariations(
  904. ATSUStyle iStyle,
  905. ItemCount iVariationCount,
  906. const ATSUFontVariationAxis iAxes[],
  907. const ATSUFontVariationValue iValue[]);
  908. /*
  909. * ATSUGetFontVariationValue()
  910. *
  911. * Availability:
  912. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  913. * CarbonLib: in CarbonLib 1.0 and later
  914. * Mac OS X: in version 10.0 and later
  915. */
  916. EXTERN_API_C( OSStatus )
  917. ATSUGetFontVariationValue(
  918. ATSUStyle iStyle,
  919. ATSUFontVariationAxis iFontVariationAxis,
  920. ATSUFontVariationValue * oFontVariationValue);
  921. /*
  922. * ATSUGetAllFontVariations()
  923. *
  924. * Availability:
  925. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  926. * CarbonLib: in CarbonLib 1.0 and later
  927. * Mac OS X: in version 10.0 and later
  928. */
  929. EXTERN_API_C( OSStatus )
  930. ATSUGetAllFontVariations(
  931. ATSUStyle iStyle,
  932. ItemCount iVariationCount,
  933. ATSUFontVariationAxis oVariationAxes[],
  934. ATSUFontVariationValue oFontVariationValues[],
  935. ItemCount * oActualVariationCount);
  936. /*
  937. * ATSUClearFontVariations()
  938. *
  939. * Availability:
  940. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  941. * CarbonLib: in CarbonLib 1.0 and later
  942. * Mac OS X: in version 10.0 and later
  943. */
  944. EXTERN_API_C( OSStatus )
  945. ATSUClearFontVariations(
  946. ATSUStyle iStyle,
  947. ItemCount iAxisCount,
  948. const ATSUFontVariationAxis iAxis[]);
  949. /* ---------------------------------------------------------------------------- */
  950. /* Basic text-layout functions */
  951. /* ---------------------------------------------------------------------------- */
  952. /*
  953. * ATSUCreateTextLayout()
  954. *
  955. * Availability:
  956. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  957. * CarbonLib: in CarbonLib 1.0 and later
  958. * Mac OS X: in version 10.0 and later
  959. */
  960. EXTERN_API_C( OSStatus )
  961. ATSUCreateTextLayout(ATSUTextLayout * oTextLayout);
  962. /*
  963. * ATSUCreateAndCopyTextLayout()
  964. *
  965. * Availability:
  966. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  967. * CarbonLib: in CarbonLib 1.0 and later
  968. * Mac OS X: in version 10.0 and later
  969. */
  970. EXTERN_API_C( OSStatus )
  971. ATSUCreateAndCopyTextLayout(
  972. ATSUTextLayout iTextLayout,
  973. ATSUTextLayout * oTextLayout);
  974. /*
  975. * ATSUCreateTextLayoutWithTextPtr()
  976. *
  977. * Availability:
  978. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  979. * CarbonLib: in CarbonLib 1.0 and later
  980. * Mac OS X: in version 10.0 and later
  981. */
  982. EXTERN_API_C( OSStatus )
  983. ATSUCreateTextLayoutWithTextPtr(
  984. ConstUniCharArrayPtr iText,
  985. UniCharArrayOffset iTextOffset,
  986. UniCharCount iTextLength,
  987. UniCharCount iTextTotalLength,
  988. ItemCount iNumberOfRuns,
  989. const UniCharCount iRunLengths[],
  990. ATSUStyle iStyles[],
  991. ATSUTextLayout * oTextLayout);
  992. /*
  993. * ATSUCreateTextLayoutWithTextHandle()
  994. *
  995. * Availability:
  996. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  997. * CarbonLib: in CarbonLib 1.0 and later
  998. * Mac OS X: in version 10.0 and later
  999. */
  1000. EXTERN_API_C( OSStatus )
  1001. ATSUCreateTextLayoutWithTextHandle(
  1002. UniCharArrayHandle iText,
  1003. UniCharArrayOffset iTextOffset,
  1004. UniCharCount iTextLength,
  1005. UniCharCount iTextTotalLength,
  1006. ItemCount iNumberOfRuns,
  1007. const UniCharCount iRunLengths[],
  1008. ATSUStyle iStyles[],
  1009. ATSUTextLayout * oTextLayout);
  1010. /*
  1011. * ATSUClearLayoutCache()
  1012. *
  1013. * Availability:
  1014. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  1015. * CarbonLib: in CarbonLib 1.0 and later
  1016. * Mac OS X: in version 10.0 and later
  1017. */
  1018. EXTERN_API_C( OSStatus )
  1019. ATSUClearLayoutCache(
  1020. ATSUTextLayout iTextLayout,
  1021. UniCharArrayOffset iLineStart);
  1022. /*
  1023. * ATSUDisposeTextLayout()
  1024. *
  1025. * Availability:
  1026. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1027. * CarbonLib: in CarbonLib 1.0 and later
  1028. * Mac OS X: in version 10.0 and later
  1029. */
  1030. EXTERN_API_C( OSStatus )
  1031. ATSUDisposeTextLayout(ATSUTextLayout iTextLayout);
  1032. /*
  1033. * ATSUSetTextLayoutRefCon()
  1034. *
  1035. * Availability:
  1036. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1037. * CarbonLib: in CarbonLib 1.0 and later
  1038. * Mac OS X: in version 10.0 and later
  1039. */
  1040. EXTERN_API_C( OSStatus )
  1041. ATSUSetTextLayoutRefCon(
  1042. ATSUTextLayout iTextLayout,
  1043. UInt32 iRefCon);
  1044. /*
  1045. * ATSUGetTextLayoutRefCon()
  1046. *
  1047. * Availability:
  1048. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1049. * CarbonLib: in CarbonLib 1.0 and later
  1050. * Mac OS X: in version 10.0 and later
  1051. */
  1052. EXTERN_API_C( OSStatus )
  1053. ATSUGetTextLayoutRefCon(
  1054. ATSUTextLayout iTextLayout,
  1055. UInt32 * oRefCon);
  1056. /* ---------------------------------------------------------------------------- */
  1057. /* Glyph bounds retrieval */
  1058. /* ---------------------------------------------------------------------------- */
  1059. /*
  1060. * ATSUGetGlyphBounds()
  1061. *
  1062. * Availability:
  1063. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  1064. * CarbonLib: in CarbonLib 1.0 and later
  1065. * Mac OS X: in version 10.0 and later
  1066. */
  1067. EXTERN_API_C( OSStatus )
  1068. ATSUGetGlyphBounds(
  1069. ATSUTextLayout iTextLayout,
  1070. ATSUTextMeasurement iTextBasePointX,
  1071. ATSUTextMeasurement iTextBasePointY,
  1072. UniCharArrayOffset iBoundsCharStart,
  1073. UniCharCount iBoundsCharLength,
  1074. UInt16 iTypeOfBounds,
  1075. ItemCount iMaxNumberOfBounds,
  1076. ATSTrapezoid oGlyphBounds[],
  1077. ItemCount * oActualNumberOfBounds);
  1078. /* ---------------------------------------------------------------------------- */
  1079. /* Idle processing */
  1080. /* ---------------------------------------------------------------------------- */
  1081. /*
  1082. * ATSUIdle()
  1083. *
  1084. * Availability:
  1085. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1086. * CarbonLib: in CarbonLib 1.0 and later
  1087. * Mac OS X: in version 10.0 and later
  1088. */
  1089. EXTERN_API_C( OSStatus )
  1090. ATSUIdle(ATSUTextLayout iTextLayout);
  1091. /* ---------------------------------------------------------------------------- */
  1092. /* Text location */
  1093. /* ---------------------------------------------------------------------------- */
  1094. /*
  1095. * ATSUSetTextPointerLocation()
  1096. *
  1097. * Availability:
  1098. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1099. * CarbonLib: in CarbonLib 1.0 and later
  1100. * Mac OS X: in version 10.0 and later
  1101. */
  1102. EXTERN_API_C( OSStatus )
  1103. ATSUSetTextPointerLocation(
  1104. ATSUTextLayout iTextLayout,
  1105. ConstUniCharArrayPtr iText,
  1106. UniCharArrayOffset iTextOffset,
  1107. UniCharCount iTextLength,
  1108. UniCharCount iTextTotalLength);
  1109. /*
  1110. * ATSUSetTextHandleLocation()
  1111. *
  1112. * Availability:
  1113. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1114. * CarbonLib: in CarbonLib 1.0 and later
  1115. * Mac OS X: in version 10.0 and later
  1116. */
  1117. EXTERN_API_C( OSStatus )
  1118. ATSUSetTextHandleLocation(
  1119. ATSUTextLayout iTextLayout,
  1120. UniCharArrayHandle iText,
  1121. UniCharArrayOffset iTextOffset,
  1122. UniCharCount iTextLength,
  1123. UniCharCount iTextTotalLength);
  1124. /*
  1125. * ATSUGetTextLocation()
  1126. *
  1127. * Availability:
  1128. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1129. * CarbonLib: in CarbonLib 1.0 and later
  1130. * Mac OS X: in version 10.0 and later
  1131. */
  1132. EXTERN_API_C( OSStatus )
  1133. ATSUGetTextLocation(
  1134. ATSUTextLayout iTextLayout,
  1135. void ** oText,
  1136. Boolean * oTextIsStoredInHandle,
  1137. UniCharArrayOffset * oOffset,
  1138. UniCharCount * oTextLength,
  1139. UniCharCount * oTextTotalLength);
  1140. /* ---------------------------------------------------------------------------- */
  1141. /* Text manipulation */
  1142. /* ---------------------------------------------------------------------------- */
  1143. /*
  1144. * ATSUTextDeleted()
  1145. *
  1146. * Availability:
  1147. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1148. * CarbonLib: in CarbonLib 1.0 and later
  1149. * Mac OS X: in version 10.0 and later
  1150. */
  1151. EXTERN_API_C( OSStatus )
  1152. ATSUTextDeleted(
  1153. ATSUTextLayout iTextLayout,
  1154. UniCharArrayOffset iDeletedRangeStart,
  1155. UniCharCount iDeletedRangeLength);
  1156. /*
  1157. * ATSUTextInserted()
  1158. *
  1159. * Availability:
  1160. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1161. * CarbonLib: in CarbonLib 1.0 and later
  1162. * Mac OS X: in version 10.0 and later
  1163. */
  1164. EXTERN_API_C( OSStatus )
  1165. ATSUTextInserted(
  1166. ATSUTextLayout iTextLayout,
  1167. UniCharArrayOffset iInsertionLocation,
  1168. UniCharCount iInsertionLength);
  1169. /*
  1170. * ATSUTextMoved()
  1171. *
  1172. * Availability:
  1173. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1174. * CarbonLib: in CarbonLib 1.0 and later
  1175. * Mac OS X: in version 10.0 and later
  1176. */
  1177. EXTERN_API_C( OSStatus )
  1178. ATSUTextMoved(
  1179. ATSUTextLayout iTextLayout,
  1180. ConstUniCharArrayPtr iNewLocation);
  1181. /* ---------------------------------------------------------------------------- */
  1182. /* Layout controls */
  1183. /* ---------------------------------------------------------------------------- */
  1184. /*
  1185. * ATSUCopyLayoutControls()
  1186. *
  1187. * Availability:
  1188. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1189. * CarbonLib: in CarbonLib 1.0 and later
  1190. * Mac OS X: in version 10.0 and later
  1191. */
  1192. EXTERN_API_C( OSStatus )
  1193. ATSUCopyLayoutControls(
  1194. ATSUTextLayout iSourceTextLayout,
  1195. ATSUTextLayout iDestTextLayout);
  1196. /*
  1197. * ATSUSetLayoutControls()
  1198. *
  1199. * Availability:
  1200. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1201. * CarbonLib: in CarbonLib 1.0 and later
  1202. * Mac OS X: in version 10.0 and later
  1203. */
  1204. EXTERN_API_C( OSStatus )
  1205. ATSUSetLayoutControls(
  1206. ATSUTextLayout iTextLayout,
  1207. ItemCount iAttributeCount,
  1208. const ATSUAttributeTag iTag[],
  1209. const ByteCount iValueSize[],
  1210. const ATSUAttributeValuePtr iValue[]);
  1211. /*
  1212. * ATSUGetLayoutControl()
  1213. *
  1214. * Availability:
  1215. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1216. * CarbonLib: in CarbonLib 1.0 and later
  1217. * Mac OS X: in version 10.0 and later
  1218. */
  1219. EXTERN_API_C( OSStatus )
  1220. ATSUGetLayoutControl(
  1221. ATSUTextLayout iTextLayout,
  1222. ATSUAttributeTag iTag,
  1223. ByteCount iExpectedValueSize,
  1224. ATSUAttributeValuePtr oValue,
  1225. ByteCount * oActualValueSize);
  1226. /*
  1227. * ATSUGetAllLayoutControls()
  1228. *
  1229. * Availability:
  1230. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1231. * CarbonLib: in CarbonLib 1.0 and later
  1232. * Mac OS X: in version 10.0 and later
  1233. */
  1234. EXTERN_API_C( OSStatus )
  1235. ATSUGetAllLayoutControls(
  1236. ATSUTextLayout iTextLayout,
  1237. ATSUAttributeInfo oAttributeInfoArray[],
  1238. ItemCount iTagValuePairArraySize,
  1239. ItemCount * oTagValuePairCount);
  1240. /*
  1241. * ATSUClearLayoutControls()
  1242. *
  1243. * Availability:
  1244. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1245. * CarbonLib: in CarbonLib 1.0 and later
  1246. * Mac OS X: in version 10.0 and later
  1247. */
  1248. EXTERN_API_C( OSStatus )
  1249. ATSUClearLayoutControls(
  1250. ATSUTextLayout iTextLayout,
  1251. ItemCount iTagCount,
  1252. const ATSUAttributeTag iTag[]);
  1253. /* ---------------------------------------------------------------------------- */
  1254. /* Single line layout controls */
  1255. /* ---------------------------------------------------------------------------- */
  1256. /*
  1257. * ATSUCopyLineControls()
  1258. *
  1259. * Availability:
  1260. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  1261. * CarbonLib: in CarbonLib 1.0 and later
  1262. * Mac OS X: in version 10.0 and later
  1263. */
  1264. EXTERN_API_C( OSStatus )
  1265. ATSUCopyLineControls(
  1266. ATSUTextLayout iSourceTextLayout,
  1267. UniCharArrayOffset iSourceLineStart,
  1268. ATSUTextLayout iDestTextLayout,
  1269. UniCharArrayOffset iDestLineStart);
  1270. /*
  1271. * ATSUSetLineControls()
  1272. *
  1273. * Availability:
  1274. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  1275. * CarbonLib: in CarbonLib 1.0 and later
  1276. * Mac OS X: in version 10.0 and later
  1277. */
  1278. EXTERN_API_C( OSStatus )
  1279. ATSUSetLineControls(
  1280. ATSUTextLayout iTextLayout,
  1281. UniCharArrayOffset iLineStart,
  1282. ItemCount iAttributeCount,
  1283. const ATSUAttributeTag iTag[],
  1284. const ByteCount iValueSize[],
  1285. const ATSUAttributeValuePtr iValue[]);
  1286. /*
  1287. * ATSUGetLineControl()
  1288. *
  1289. * Availability:
  1290. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  1291. * CarbonLib: in CarbonLib 1.0 and later
  1292. * Mac OS X: in version 10.0 and later
  1293. */
  1294. EXTERN_API_C( OSStatus )
  1295. ATSUGetLineControl(
  1296. ATSUTextLayout iTextLayout,
  1297. UniCharArrayOffset iLineStart,
  1298. ATSUAttributeTag iTag,
  1299. ByteCount iExpectedValueSize,
  1300. ATSUAttributeValuePtr oValue,
  1301. ByteCount * oActualValueSize);
  1302. /*
  1303. * ATSUGetAllLineControls()
  1304. *
  1305. * Availability:
  1306. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  1307. * CarbonLib: in CarbonLib 1.0 and later
  1308. * Mac OS X: in version 10.0 and later
  1309. */
  1310. EXTERN_API_C( OSStatus )
  1311. ATSUGetAllLineControls(
  1312. ATSUTextLayout iTextLayout,
  1313. UniCharArrayOffset iLineStart,
  1314. ATSUAttributeInfo oAttributeInfoArray[],
  1315. ItemCount iTagValuePairArraySize,
  1316. ItemCount * oTagValuePairCount);
  1317. /*
  1318. * ATSUClearLineControls()
  1319. *
  1320. * Availability:
  1321. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  1322. * CarbonLib: in CarbonLib 1.0 and later
  1323. * Mac OS X: in version 10.0 and later
  1324. */
  1325. EXTERN_API_C( OSStatus )
  1326. ATSUClearLineControls(
  1327. ATSUTextLayout iTextLayout,
  1328. UniCharArrayOffset iLineStart,
  1329. ItemCount iTagCount,
  1330. const ATSUAttributeTag iTag[]);
  1331. /* ---------------------------------------------------------------------------- */
  1332. /* Style run processing */
  1333. /* ---------------------------------------------------------------------------- */
  1334. /*
  1335. * ATSUSetRunStyle()
  1336. *
  1337. * Availability:
  1338. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1339. * CarbonLib: in CarbonLib 1.0 and later
  1340. * Mac OS X: in version 10.0 and later
  1341. */
  1342. EXTERN_API_C( OSStatus )
  1343. ATSUSetRunStyle(
  1344. ATSUTextLayout iTextLayout,
  1345. ATSUStyle iStyle,
  1346. UniCharArrayOffset iRunStart,
  1347. UniCharCount iRunLength);
  1348. /*
  1349. * ATSUGetRunStyle()
  1350. *
  1351. * Availability:
  1352. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1353. * CarbonLib: in CarbonLib 1.0 and later
  1354. * Mac OS X: in version 10.0 and later
  1355. */
  1356. EXTERN_API_C( OSStatus )
  1357. ATSUGetRunStyle(
  1358. ATSUTextLayout iTextLayout,
  1359. UniCharArrayOffset iOffset,
  1360. ATSUStyle * oStyle,
  1361. UniCharArrayOffset * oRunStart,
  1362. UniCharCount * oRunLength);
  1363. /*
  1364. * ATSUGetContinuousAttributes()
  1365. *
  1366. * Availability:
  1367. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1368. * CarbonLib: in CarbonLib 1.0 and later
  1369. * Mac OS X: in version 10.0 and later
  1370. */
  1371. EXTERN_API_C( OSStatus )
  1372. ATSUGetContinuousAttributes(
  1373. ATSUTextLayout iTextLayout,
  1374. UniCharArrayOffset iOffset,
  1375. UniCharCount iLength,
  1376. ATSUStyle oStyle);
  1377. /* ---------------------------------------------------------------------------- */
  1378. /* Drawing and measuring */
  1379. /* ---------------------------------------------------------------------------- */
  1380. /*
  1381. * ATSUDrawText()
  1382. *
  1383. * Availability:
  1384. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1385. * CarbonLib: in CarbonLib 1.0 and later
  1386. * Mac OS X: in version 10.0 and later
  1387. */
  1388. EXTERN_API_C( OSStatus )
  1389. ATSUDrawText(
  1390. ATSUTextLayout iTextLayout,
  1391. UniCharArrayOffset iLineOffset,
  1392. UniCharCount iLineLength,
  1393. ATSUTextMeasurement iLocationX,
  1394. ATSUTextMeasurement iLocationY);
  1395. /*
  1396. Warning: ATSUMeasureText has been deprecated
  1397. Use its replacement, ATSUGetUnjustifiedBounds, instead if available
  1398. */
  1399. /*
  1400. * ATSUMeasureText()
  1401. *
  1402. * Availability:
  1403. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1404. * CarbonLib: in CarbonLib 1.0 and later
  1405. * Mac OS X: in version 10.0 and later
  1406. */
  1407. EXTERN_API_C( OSStatus )
  1408. ATSUMeasureText(
  1409. ATSUTextLayout iTextLayout,
  1410. UniCharArrayOffset iLineStart,
  1411. UniCharCount iLineLength,
  1412. ATSUTextMeasurement * oTextBefore,
  1413. ATSUTextMeasurement * oTextAfter,
  1414. ATSUTextMeasurement * oAscent,
  1415. ATSUTextMeasurement * oDescent);
  1416. /*
  1417. * ATSUGetUnjustifiedBounds()
  1418. *
  1419. * Availability:
  1420. * Non-Carbon CFM: not available
  1421. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1422. * Mac OS X: in version 10.2 and later
  1423. */
  1424. EXTERN_API_C( OSStatus )
  1425. ATSUGetUnjustifiedBounds(
  1426. ATSUTextLayout iTextLayout,
  1427. UniCharArrayOffset iLineStart,
  1428. UniCharCount iLineLength,
  1429. ATSUTextMeasurement * oTextBefore,
  1430. ATSUTextMeasurement * oTextAfter,
  1431. ATSUTextMeasurement * oAscent,
  1432. ATSUTextMeasurement * oDescent);
  1433. /*
  1434. * ATSUMeasureTextImage()
  1435. *
  1436. * Availability:
  1437. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1438. * CarbonLib: in CarbonLib 1.0 and later
  1439. * Mac OS X: in version 10.0 and later
  1440. */
  1441. EXTERN_API_C( OSStatus )
  1442. ATSUMeasureTextImage(
  1443. ATSUTextLayout iTextLayout,
  1444. UniCharArrayOffset iLineOffset,
  1445. UniCharCount iLineLength,
  1446. ATSUTextMeasurement iLocationX,
  1447. ATSUTextMeasurement iLocationY,
  1448. Rect * oTextImageRect);
  1449. /* ---------------------------------------------------------------------------- */
  1450. /* Highlighting */
  1451. /* ---------------------------------------------------------------------------- */
  1452. /*
  1453. * ATSUHighlightText()
  1454. *
  1455. * Availability:
  1456. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1457. * CarbonLib: in CarbonLib 1.0 and later
  1458. * Mac OS X: in version 10.0 and later
  1459. */
  1460. EXTERN_API_C( OSStatus )
  1461. ATSUHighlightText(
  1462. ATSUTextLayout iTextLayout,
  1463. ATSUTextMeasurement iTextBasePointX,
  1464. ATSUTextMeasurement iTextBasePointY,
  1465. UniCharArrayOffset iHighlightStart,
  1466. UniCharCount iHighlightLength);
  1467. /*
  1468. * ATSUUnhighlightText()
  1469. *
  1470. * Availability:
  1471. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1472. * CarbonLib: in CarbonLib 1.0 and later
  1473. * Mac OS X: in version 10.0 and later
  1474. */
  1475. EXTERN_API_C( OSStatus )
  1476. ATSUUnhighlightText(
  1477. ATSUTextLayout iTextLayout,
  1478. ATSUTextMeasurement iTextBasePointX,
  1479. ATSUTextMeasurement iTextBasePointY,
  1480. UniCharArrayOffset iHighlightStart,
  1481. UniCharCount iHighlightLength);
  1482. /*
  1483. * ATSUGetTextHighlight()
  1484. *
  1485. * Availability:
  1486. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1487. * CarbonLib: in CarbonLib 1.0 and later
  1488. * Mac OS X: in version 10.0 and later
  1489. */
  1490. EXTERN_API_C( OSStatus )
  1491. ATSUGetTextHighlight(
  1492. ATSUTextLayout iTextLayout,
  1493. ATSUTextMeasurement iTextBasePointX,
  1494. ATSUTextMeasurement iTextBasePointY,
  1495. UniCharArrayOffset iHighlightStart,
  1496. UniCharCount iHighlightLength,
  1497. RgnHandle oHighlightRegion);
  1498. /*
  1499. * ATSUHighlightInactiveText()
  1500. *
  1501. * Availability:
  1502. * Non-Carbon CFM: not available
  1503. * CarbonLib: not available
  1504. * Mac OS X: in version 10.0 and later
  1505. */
  1506. EXTERN_API_C( OSStatus )
  1507. ATSUHighlightInactiveText(
  1508. ATSUTextLayout iTextLayout,
  1509. ATSUTextMeasurement iTextBasePointX,
  1510. ATSUTextMeasurement iTextBasePointY,
  1511. UniCharArrayOffset iHighlightStart,
  1512. UniCharCount iHighlightLength);
  1513. /* ---------------------------------------------------------------------------- */
  1514. /* Hit-testing */
  1515. /* ---------------------------------------------------------------------------- */
  1516. /*
  1517. * ATSUPositionToOffset()
  1518. *
  1519. * Availability:
  1520. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1521. * CarbonLib: in CarbonLib 1.0 and later
  1522. * Mac OS X: in version 10.0 and later
  1523. */
  1524. EXTERN_API_C( OSStatus )
  1525. ATSUPositionToOffset(
  1526. ATSUTextLayout iTextLayout,
  1527. ATSUTextMeasurement iLocationX,
  1528. ATSUTextMeasurement iLocationY,
  1529. UniCharArrayOffset * ioPrimaryOffset,
  1530. Boolean * oIsLeading,
  1531. UniCharArrayOffset * oSecondaryOffset);
  1532. /*
  1533. * ATSUOffsetToPosition()
  1534. *
  1535. * Availability:
  1536. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1537. * CarbonLib: in CarbonLib 1.0 and later
  1538. * Mac OS X: in version 10.0 and later
  1539. */
  1540. EXTERN_API_C( OSStatus )
  1541. ATSUOffsetToPosition(
  1542. ATSUTextLayout iTextLayout,
  1543. UniCharArrayOffset iOffset,
  1544. Boolean iIsLeading,
  1545. ATSUCaret * oMainCaret,
  1546. ATSUCaret * oSecondCaret,
  1547. Boolean * oCaretIsSplit);
  1548. /*
  1549. * ATSUPositionToCursorOffset()
  1550. *
  1551. * Availability:
  1552. * Non-Carbon CFM: in ATSUnicodeLib 9.2.2 and later
  1553. * CarbonLib: in CarbonLib 1.5 and later
  1554. * Mac OS X: in version 10.0 and later
  1555. */
  1556. EXTERN_API_C( OSStatus )
  1557. ATSUPositionToCursorOffset(
  1558. ATSUTextLayout iTextLayout,
  1559. ATSUTextMeasurement iLocationX,
  1560. ATSUTextMeasurement iLocationY,
  1561. ATSUCursorMovementType iMovementType,
  1562. UniCharArrayOffset * ioPrimaryOffset,
  1563. Boolean * oIsLeading,
  1564. UniCharArrayOffset * oSecondaryOffset);
  1565. /*
  1566. * ATSUOffsetToCursorPosition()
  1567. *
  1568. * Availability:
  1569. * Non-Carbon CFM: in ATSUnicodeLib 9.2.2 and later
  1570. * CarbonLib: in CarbonLib 1.5 and later
  1571. * Mac OS X: in version 10.0 and later
  1572. */
  1573. EXTERN_API_C( OSStatus )
  1574. ATSUOffsetToCursorPosition(
  1575. ATSUTextLayout iTextLayout,
  1576. UniCharArrayOffset iOffset,
  1577. Boolean iIsLeading,
  1578. ATSUCursorMovementType iMovementType,
  1579. ATSUCaret * oMainCaret,
  1580. ATSUCaret * oSecondCaret,
  1581. Boolean * oCaretIsSplit);
  1582. /* ---------------------------------------------------------------------------- */
  1583. /* Cursor movement */
  1584. /* ---------------------------------------------------------------------------- */
  1585. /*
  1586. * ATSUNextCursorPosition()
  1587. *
  1588. * Availability:
  1589. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1590. * CarbonLib: in CarbonLib 1.0 and later
  1591. * Mac OS X: in version 10.0 and later
  1592. */
  1593. EXTERN_API_C( OSStatus )
  1594. ATSUNextCursorPosition(
  1595. ATSUTextLayout iTextLayout,
  1596. UniCharArrayOffset iOldOffset,
  1597. ATSUCursorMovementType iMovementType,
  1598. UniCharArrayOffset * oNewOffset);
  1599. /*
  1600. * ATSUPreviousCursorPosition()
  1601. *
  1602. * Availability:
  1603. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1604. * CarbonLib: in CarbonLib 1.0 and later
  1605. * Mac OS X: in version 10.0 and later
  1606. */
  1607. EXTERN_API_C( OSStatus )
  1608. ATSUPreviousCursorPosition(
  1609. ATSUTextLayout iTextLayout,
  1610. UniCharArrayOffset iOldOffset,
  1611. ATSUCursorMovementType iMovementType,
  1612. UniCharArrayOffset * oNewOffset);
  1613. /*
  1614. * ATSURightwardCursorPosition()
  1615. *
  1616. * Availability:
  1617. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1618. * CarbonLib: in CarbonLib 1.0 and later
  1619. * Mac OS X: in version 10.0 and later
  1620. */
  1621. EXTERN_API_C( OSStatus )
  1622. ATSURightwardCursorPosition(
  1623. ATSUTextLayout iTextLayout,
  1624. UniCharArrayOffset iOldOffset,
  1625. ATSUCursorMovementType iMovementType,
  1626. UniCharArrayOffset * oNewOffset);
  1627. /*
  1628. * ATSULeftwardCursorPosition()
  1629. *
  1630. * Availability:
  1631. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1632. * CarbonLib: in CarbonLib 1.0 and later
  1633. * Mac OS X: in version 10.0 and later
  1634. */
  1635. EXTERN_API_C( OSStatus )
  1636. ATSULeftwardCursorPosition(
  1637. ATSUTextLayout iTextLayout,
  1638. UniCharArrayOffset iOldOffset,
  1639. ATSUCursorMovementType iMovementType,
  1640. UniCharArrayOffset * oNewOffset);
  1641. /* ---------------------------------------------------------------------------- */
  1642. /* Line breaking */
  1643. /* ---------------------------------------------------------------------------- */
  1644. /*
  1645. * ATSUBatchBreakLines()
  1646. *
  1647. * Availability:
  1648. * Non-Carbon CFM: not available
  1649. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1650. * Mac OS X: in version 10.2 and later
  1651. */
  1652. EXTERN_API_C( OSStatus )
  1653. ATSUBatchBreakLines(
  1654. ATSUTextLayout iTextLayout,
  1655. UniCharArrayOffset iRangeStart,
  1656. UniCharCount iRangeLength,
  1657. ATSUTextMeasurement iLineWidth,
  1658. ItemCount * oBreakCount);
  1659. /*
  1660. * ATSUBreakLine()
  1661. *
  1662. * Availability:
  1663. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1664. * CarbonLib: in CarbonLib 1.0 and later
  1665. * Mac OS X: in version 10.0 and later
  1666. */
  1667. EXTERN_API_C( OSStatus )
  1668. ATSUBreakLine(
  1669. ATSUTextLayout iTextLayout,
  1670. UniCharArrayOffset iLineStart,
  1671. ATSUTextMeasurement iLineWidth,
  1672. Boolean iUseAsSoftLineBreak,
  1673. UniCharArrayOffset * oLineBreak);
  1674. /*
  1675. * ATSUSetSoftLineBreak()
  1676. *
  1677. * Availability:
  1678. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1679. * CarbonLib: in CarbonLib 1.0 and later
  1680. * Mac OS X: in version 10.0 and later
  1681. */
  1682. EXTERN_API_C( OSStatus )
  1683. ATSUSetSoftLineBreak(
  1684. ATSUTextLayout iTextLayout,
  1685. UniCharArrayOffset iLineBreak);
  1686. /*
  1687. * ATSUGetSoftLineBreaks()
  1688. *
  1689. * Availability:
  1690. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1691. * CarbonLib: in CarbonLib 1.0 and later
  1692. * Mac OS X: in version 10.0 and later
  1693. */
  1694. EXTERN_API_C( OSStatus )
  1695. ATSUGetSoftLineBreaks(
  1696. ATSUTextLayout iTextLayout,
  1697. UniCharArrayOffset iRangeStart,
  1698. UniCharCount iRangeLength,
  1699. ItemCount iMaximumBreaks,
  1700. UniCharArrayOffset oBreaks[],
  1701. ItemCount * oBreakCount);
  1702. /*
  1703. * ATSUClearSoftLineBreaks()
  1704. *
  1705. * Availability:
  1706. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1707. * CarbonLib: in CarbonLib 1.0 and later
  1708. * Mac OS X: in version 10.0 and later
  1709. */
  1710. EXTERN_API_C( OSStatus )
  1711. ATSUClearSoftLineBreaks(
  1712. ATSUTextLayout iTextLayout,
  1713. UniCharArrayOffset iRangeStart,
  1714. UniCharCount iRangeLength);
  1715. /* ---------------------------------------------------------------------------- */
  1716. /* Tab support */
  1717. /* ---------------------------------------------------------------------------- */
  1718. /*
  1719. * ATSUSetTabArray()
  1720. *
  1721. * Availability:
  1722. * Non-Carbon CFM: not available
  1723. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1724. * Mac OS X: in version 10.2 and later
  1725. */
  1726. EXTERN_API_C( OSStatus )
  1727. ATSUSetTabArray(
  1728. ATSUTextLayout iTextLayout,
  1729. const ATSUTab iTabs[],
  1730. ItemCount iTabCount);
  1731. /*
  1732. * ATSUGetTabArray()
  1733. *
  1734. * Availability:
  1735. * Non-Carbon CFM: not available
  1736. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1737. * Mac OS X: in version 10.2 and later
  1738. */
  1739. EXTERN_API_C( OSStatus )
  1740. ATSUGetTabArray(
  1741. ATSUTextLayout iTextLayout,
  1742. ItemCount iMaxTabCount,
  1743. ATSUTab oTabs[],
  1744. ItemCount * oTabCount);
  1745. /* ---------------------------------------------------------------------------- */
  1746. /* Font matching */
  1747. /* ---------------------------------------------------------------------------- */
  1748. /*
  1749. * ATSUSetFontFallbacks()
  1750. *
  1751. * Availability:
  1752. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  1753. * CarbonLib: in CarbonLib 1.0 and later
  1754. * Mac OS X: in version 10.0 and later
  1755. */
  1756. EXTERN_API_C( OSStatus )
  1757. ATSUSetFontFallbacks(
  1758. ItemCount iFontFallbacksCount,
  1759. const ATSUFontID iFontIDs[],
  1760. ATSUFontFallbackMethod iFontFallbackMethod);
  1761. /*
  1762. * ATSUGetFontFallbacks()
  1763. *
  1764. * Availability:
  1765. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  1766. * CarbonLib: in CarbonLib 1.0 and later
  1767. * Mac OS X: in version 10.0 and later
  1768. */
  1769. EXTERN_API_C( OSStatus )
  1770. ATSUGetFontFallbacks(
  1771. ItemCount iMaxFontFallbacksCount,
  1772. ATSUFontID oFontIDs[],
  1773. ATSUFontFallbackMethod * oFontFallbackMethod,
  1774. ItemCount * oActualFallbacksCount);
  1775. /*
  1776. * ATSUMatchFontsToText()
  1777. *
  1778. * Availability:
  1779. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1780. * CarbonLib: in CarbonLib 1.0 and later
  1781. * Mac OS X: in version 10.0 and later
  1782. */
  1783. EXTERN_API_C( OSStatus )
  1784. ATSUMatchFontsToText(
  1785. ATSUTextLayout iTextLayout,
  1786. UniCharArrayOffset iTextStart,
  1787. UniCharCount iTextLength,
  1788. ATSUFontID * oFontID,
  1789. UniCharArrayOffset * oChangedOffset,
  1790. UniCharCount * oChangedLength);
  1791. /*
  1792. * ATSUSetTransientFontMatching()
  1793. *
  1794. * Availability:
  1795. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1796. * CarbonLib: in CarbonLib 1.0 and later
  1797. * Mac OS X: in version 10.0 and later
  1798. */
  1799. EXTERN_API_C( OSStatus )
  1800. ATSUSetTransientFontMatching(
  1801. ATSUTextLayout iTextLayout,
  1802. Boolean iTransientFontMatching);
  1803. /*
  1804. * ATSUGetTransientFontMatching()
  1805. *
  1806. * Availability:
  1807. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1808. * CarbonLib: in CarbonLib 1.0 and later
  1809. * Mac OS X: in version 10.0 and later
  1810. */
  1811. EXTERN_API_C( OSStatus )
  1812. ATSUGetTransientFontMatching(
  1813. ATSUTextLayout iTextLayout,
  1814. Boolean * oTransientFontMatching);
  1815. /* ---------------------------------------------------------------------------- */
  1816. /* Font ID's */
  1817. /* ---------------------------------------------------------------------------- */
  1818. /*
  1819. * ATSUFontCount()
  1820. *
  1821. * Availability:
  1822. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1823. * CarbonLib: in CarbonLib 1.0 and later
  1824. * Mac OS X: in version 10.0 and later
  1825. */
  1826. EXTERN_API_C( OSStatus )
  1827. ATSUFontCount(ItemCount * oFontCount);
  1828. /*
  1829. * ATSUGetFontIDs()
  1830. *
  1831. * Availability:
  1832. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1833. * CarbonLib: in CarbonLib 1.0 and later
  1834. * Mac OS X: in version 10.0 and later
  1835. */
  1836. EXTERN_API_C( OSStatus )
  1837. ATSUGetFontIDs(
  1838. ATSUFontID oFontIDs[],
  1839. ItemCount iArraySize,
  1840. ItemCount * oFontCount);
  1841. /*
  1842. * ATSUFONDtoFontID()
  1843. *
  1844. * Availability:
  1845. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1846. * CarbonLib: in CarbonLib 1.0 and later
  1847. * Mac OS X: in version 10.0 and later
  1848. */
  1849. EXTERN_API_C( OSStatus )
  1850. ATSUFONDtoFontID(
  1851. short iFONDNumber,
  1852. Style iFONDStyle,
  1853. ATSUFontID * oFontID);
  1854. /*
  1855. * ATSUFontIDtoFOND()
  1856. *
  1857. * Availability:
  1858. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1859. * CarbonLib: in CarbonLib 1.0 and later
  1860. * Mac OS X: in version 10.0 and later
  1861. */
  1862. EXTERN_API_C( OSStatus )
  1863. ATSUFontIDtoFOND(
  1864. ATSUFontID iFontID,
  1865. short * oFONDNumber,
  1866. Style * oFONDStyle);
  1867. /* ---------------------------------------------------------------------------- */
  1868. /* Font names */
  1869. /* ---------------------------------------------------------------------------- */
  1870. /*
  1871. * ATSUCountFontNames()
  1872. *
  1873. * Availability:
  1874. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1875. * CarbonLib: in CarbonLib 1.0 and later
  1876. * Mac OS X: in version 10.0 and later
  1877. */
  1878. EXTERN_API_C( OSStatus )
  1879. ATSUCountFontNames(
  1880. ATSUFontID iFontID,
  1881. ItemCount * oFontNameCount);
  1882. /*
  1883. * ATSUGetIndFontName()
  1884. *
  1885. * Availability:
  1886. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1887. * CarbonLib: in CarbonLib 1.0 and later
  1888. * Mac OS X: in version 10.0 and later
  1889. */
  1890. EXTERN_API_C( OSStatus )
  1891. ATSUGetIndFontName(
  1892. ATSUFontID iFontID,
  1893. ItemCount iFontNameIndex,
  1894. ByteCount iMaximumNameLength,
  1895. Ptr oName,
  1896. ByteCount * oActualNameLength,
  1897. FontNameCode * oFontNameCode,
  1898. FontPlatformCode * oFontNamePlatform,
  1899. FontScriptCode * oFontNameScript,
  1900. FontLanguageCode * oFontNameLanguage);
  1901. /*
  1902. * ATSUFindFontName()
  1903. *
  1904. * Availability:
  1905. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1906. * CarbonLib: in CarbonLib 1.0 and later
  1907. * Mac OS X: in version 10.0 and later
  1908. */
  1909. EXTERN_API_C( OSStatus )
  1910. ATSUFindFontName(
  1911. ATSUFontID iFontID,
  1912. FontNameCode iFontNameCode,
  1913. FontPlatformCode iFontNamePlatform,
  1914. FontScriptCode iFontNameScript,
  1915. FontLanguageCode iFontNameLanguage,
  1916. ByteCount iMaximumNameLength,
  1917. Ptr oName,
  1918. ByteCount * oActualNameLength,
  1919. ItemCount * oFontNameIndex);
  1920. /*
  1921. * ATSUFindFontFromName()
  1922. *
  1923. * Availability:
  1924. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1925. * CarbonLib: in CarbonLib 1.0 and later
  1926. * Mac OS X: in version 10.0 and later
  1927. */
  1928. EXTERN_API_C( OSStatus )
  1929. ATSUFindFontFromName(
  1930. Ptr iName,
  1931. ByteCount iNameLength,
  1932. FontNameCode iFontNameCode,
  1933. FontPlatformCode iFontNamePlatform,
  1934. FontScriptCode iFontNameScript,
  1935. FontLanguageCode iFontNameLanguage,
  1936. ATSUFontID * oFontID);
  1937. /* ---------------------------------------------------------------------------- */
  1938. /* Font features */
  1939. /* ---------------------------------------------------------------------------- */
  1940. /*
  1941. * ATSUCountFontFeatureTypes()
  1942. *
  1943. * Availability:
  1944. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1945. * CarbonLib: in CarbonLib 1.0 and later
  1946. * Mac OS X: in version 10.0 and later
  1947. */
  1948. EXTERN_API_C( OSStatus )
  1949. ATSUCountFontFeatureTypes(
  1950. ATSUFontID iFontID,
  1951. ItemCount * oTypeCount);
  1952. /*
  1953. * ATSUCountFontFeatureSelectors()
  1954. *
  1955. * Availability:
  1956. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1957. * CarbonLib: in CarbonLib 1.0 and later
  1958. * Mac OS X: in version 10.0 and later
  1959. */
  1960. EXTERN_API_C( OSStatus )
  1961. ATSUCountFontFeatureSelectors(
  1962. ATSUFontID iFontID,
  1963. ATSUFontFeatureType iType,
  1964. ItemCount * oSelectorCount);
  1965. /*
  1966. * ATSUGetFontFeatureTypes()
  1967. *
  1968. * Availability:
  1969. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1970. * CarbonLib: in CarbonLib 1.0 and later
  1971. * Mac OS X: in version 10.0 and later
  1972. */
  1973. EXTERN_API_C( OSStatus )
  1974. ATSUGetFontFeatureTypes(
  1975. ATSUFontID iFontID,
  1976. ItemCount iMaximumTypes,
  1977. ATSUFontFeatureType oTypes[],
  1978. ItemCount * oActualTypeCount);
  1979. /*
  1980. * ATSUGetFontFeatureSelectors()
  1981. *
  1982. * Availability:
  1983. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  1984. * CarbonLib: in CarbonLib 1.0 and later
  1985. * Mac OS X: in version 10.0 and later
  1986. */
  1987. EXTERN_API_C( OSStatus )
  1988. ATSUGetFontFeatureSelectors(
  1989. ATSUFontID iFontID,
  1990. ATSUFontFeatureType iType,
  1991. ItemCount iMaximumSelectors,
  1992. ATSUFontFeatureSelector oSelectors[],
  1993. Boolean oSelectorIsOnByDefault[],
  1994. ItemCount * oActualSelectorCount,
  1995. Boolean * oIsMutuallyExclusive);
  1996. /*
  1997. * ATSUGetFontFeatureNameCode()
  1998. *
  1999. * Availability:
  2000. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  2001. * CarbonLib: in CarbonLib 1.0 and later
  2002. * Mac OS X: in version 10.0 and later
  2003. */
  2004. EXTERN_API_C( OSStatus )
  2005. ATSUGetFontFeatureNameCode(
  2006. ATSUFontID iFontID,
  2007. ATSUFontFeatureType iType,
  2008. ATSUFontFeatureSelector iSelector,
  2009. FontNameCode * oNameCode);
  2010. /* ---------------------------------------------------------------------------- */
  2011. /* Font tracking value & names */
  2012. /* ---------------------------------------------------------------------------- */
  2013. /*
  2014. * ATSUCountFontTracking()
  2015. *
  2016. * Availability:
  2017. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  2018. * CarbonLib: in CarbonLib 1.0 and later
  2019. * Mac OS X: in version 10.0 and later
  2020. */
  2021. EXTERN_API_C( OSStatus )
  2022. ATSUCountFontTracking(
  2023. ATSUFontID iFontID,
  2024. ATSUVerticalCharacterType iCharacterOrientation,
  2025. ItemCount * oTrackingCount);
  2026. /*
  2027. * ATSUGetIndFontTracking()
  2028. *
  2029. * Availability:
  2030. * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
  2031. * CarbonLib: in CarbonLib 1.0 and later
  2032. * Mac OS X: in version 10.0 and later
  2033. */
  2034. EXTERN_API_C( OSStatus )
  2035. ATSUGetIndFontTracking(
  2036. ATSUFontID iFontID,
  2037. ATSUVerticalCharacterType iCharacterOrientation,
  2038. ItemCount iTrackIndex,
  2039. Fixed * oFontTrackingValue,
  2040. FontNameCode * oNameCode);
  2041. /* ---------------------------------------------------------------------------- */
  2042. /* Font variations */
  2043. /* ---------------------------------------------------------------------------- */
  2044. /*
  2045. * ATSUCountFontVariations()
  2046. *
  2047. * Availability:
  2048. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  2049. * CarbonLib: in CarbonLib 1.0 and later
  2050. * Mac OS X: in version 10.0 and later
  2051. */
  2052. EXTERN_API_C( OSStatus )
  2053. ATSUCountFontVariations(
  2054. ATSUFontID iFontID,
  2055. ItemCount * oVariationCount);
  2056. /*
  2057. * ATSUGetIndFontVariation()
  2058. *
  2059. * Availability:
  2060. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  2061. * CarbonLib: in CarbonLib 1.0 and later
  2062. * Mac OS X: in version 10.0 and later
  2063. */
  2064. EXTERN_API_C( OSStatus )
  2065. ATSUGetIndFontVariation(
  2066. ATSUFontID iFontID,
  2067. ItemCount iVariationIndex,
  2068. ATSUFontVariationAxis * oATSUFontVariationAxis,
  2069. ATSUFontVariationValue * oMinimumValue,
  2070. ATSUFontVariationValue * oMaximumValue,
  2071. ATSUFontVariationValue * oDefaultValue);
  2072. /*
  2073. * ATSUGetFontVariationNameCode()
  2074. *
  2075. * Availability:
  2076. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  2077. * CarbonLib: in CarbonLib 1.0 and later
  2078. * Mac OS X: in version 10.0 and later
  2079. */
  2080. EXTERN_API_C( OSStatus )
  2081. ATSUGetFontVariationNameCode(
  2082. ATSUFontID iFontID,
  2083. ATSUFontVariationAxis iAxis,
  2084. FontNameCode * oNameCode);
  2085. /* ---------------------------------------------------------------------------- */
  2086. /* Font Instances */
  2087. /* ---------------------------------------------------------------------------- */
  2088. /*
  2089. * ATSUCountFontInstances()
  2090. *
  2091. * Availability:
  2092. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  2093. * CarbonLib: in CarbonLib 1.0 and later
  2094. * Mac OS X: in version 10.0 and later
  2095. */
  2096. EXTERN_API_C( OSStatus )
  2097. ATSUCountFontInstances(
  2098. ATSUFontID iFontID,
  2099. ItemCount * oInstances);
  2100. /*
  2101. * ATSUGetFontInstance()
  2102. *
  2103. * Availability:
  2104. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  2105. * CarbonLib: in CarbonLib 1.0 and later
  2106. * Mac OS X: in version 10.0 and later
  2107. */
  2108. EXTERN_API_C( OSStatus )
  2109. ATSUGetFontInstance(
  2110. ATSUFontID iFontID,
  2111. ItemCount iFontInstanceIndex,
  2112. ItemCount iMaximumVariations,
  2113. ATSUFontVariationAxis oAxes[],
  2114. ATSUFontVariationValue oValues[],
  2115. ItemCount * oActualVariationCount);
  2116. /*
  2117. * ATSUGetFontInstanceNameCode()
  2118. *
  2119. * Availability:
  2120. * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
  2121. * CarbonLib: in CarbonLib 1.0 and later
  2122. * Mac OS X: in version 10.0 and later
  2123. */
  2124. EXTERN_API_C( OSStatus )
  2125. ATSUGetFontInstanceNameCode(
  2126. ATSUFontID iFontID,
  2127. ItemCount iInstanceIndex,
  2128. FontNameCode * oNameCode);
  2129. /********************************************************************************/
  2130. /* ATSUI Low-Level API. For more low-level calls, see ATSUnicodeDirectAccess.h */
  2131. /********************************************************************************/
  2132. /* ---------------------------------------------------------------------------- */
  2133. /* GlyphInfo access */
  2134. /* ---------------------------------------------------------------------------- */
  2135. /*
  2136. * ATSUGetGlyphInfo()
  2137. *
  2138. * Availability:
  2139. * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
  2140. * CarbonLib: in CarbonLib 1.1 and later
  2141. * Mac OS X: in version 10.0 and later
  2142. */
  2143. EXTERN_API_C( OSStatus )
  2144. ATSUGetGlyphInfo(
  2145. ATSUTextLayout iTextLayout,
  2146. UniCharArrayOffset iLineStart,
  2147. UniCharCount iLineLength,
  2148. ByteCount * ioBufferSize,
  2149. ATSUGlyphInfoArray * oGlyphInfoPtr);
  2150. /*
  2151. * ATSUDrawGlyphInfo()
  2152. *
  2153. * Availability:
  2154. * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
  2155. * CarbonLib: in CarbonLib 1.1 and later
  2156. * Mac OS X: in version 10.0 and later
  2157. */
  2158. EXTERN_API_C( OSStatus )
  2159. ATSUDrawGlyphInfo(
  2160. ATSUGlyphInfoArray * iGlyphInfoArray,
  2161. Float32Point iLocation);
  2162. /* ---------------------------------------------------------------------------- */
  2163. /* Font Data Access */
  2164. /* ---------------------------------------------------------------------------- */
  2165. /*
  2166. * ATSUGlyphGetIdealMetrics()
  2167. *
  2168. * Availability:
  2169. * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
  2170. * CarbonLib: in CarbonLib 1.1 and later
  2171. * Mac OS X: in version 10.0 and later
  2172. */
  2173. EXTERN_API_C( OSStatus )
  2174. ATSUGlyphGetIdealMetrics(
  2175. ATSUStyle iATSUStyle,
  2176. ItemCount iNumOfGlyphs,
  2177. GlyphID iGlyphIDs[],
  2178. ByteOffset iInputOffset,
  2179. ATSGlyphIdealMetrics oIdealMetrics[]);
  2180. /*
  2181. * ATSUGetNativeCurveType()
  2182. *
  2183. * Availability:
  2184. * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
  2185. * CarbonLib: in CarbonLib 1.1 and later
  2186. * Mac OS X: in version 10.0 and later
  2187. */
  2188. EXTERN_API_C( OSStatus )
  2189. ATSUGetNativeCurveType(
  2190. ATSUStyle iATSUStyle,
  2191. ATSCurveType * oCurveType);
  2192. /* ---------------------------------------------------------------------------- */
  2193. /* Device specific routines */
  2194. /* ---------------------------------------------------------------------------- */
  2195. /*
  2196. * ATSUGlyphGetScreenMetrics()
  2197. *
  2198. * Availability:
  2199. * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
  2200. * CarbonLib: in CarbonLib 1.1 and later
  2201. * Mac OS X: in version 10.0 and later
  2202. */
  2203. EXTERN_API_C( OSStatus )
  2204. ATSUGlyphGetScreenMetrics(
  2205. ATSUStyle iATSUStyle,
  2206. ItemCount iNumOfGlyphs,
  2207. GlyphID iGlyphIDs[],
  2208. ByteOffset iInputOffset,
  2209. Boolean iForcingAntiAlias,
  2210. Boolean iAntiAliasSwitch,
  2211. ATSGlyphScreenMetrics oScreenMetrics[]);
  2212. /* ---------------------------------------------------------------------------- */
  2213. /* ATSUGlyphGetQuadraticPaths callbacks */
  2214. /* ---------------------------------------------------------------------------- */
  2215. typedef CALLBACK_API( OSStatus , ATSQuadraticLineProcPtr )(const Float32Point *pt1, const Float32Point *pt2, void *callBackDataPtr);
  2216. typedef CALLBACK_API( OSStatus , ATSQuadraticCurveProcPtr )(const Float32Point *pt1, const Float32Point *controlPt, const Float32Point *pt2, void *callBackDataPtr);
  2217. typedef CALLBACK_API( OSStatus , ATSQuadraticNewPathProcPtr )(void * callBackDataPtr);
  2218. typedef CALLBACK_API( OSStatus , ATSQuadraticClosePathProcPtr )(void * callBackDataPtr);
  2219. typedef TVECTOR_UPP_TYPE(ATSQuadraticLineProcPtr) ATSQuadraticLineUPP;
  2220. typedef TVECTOR_UPP_TYPE(ATSQuadraticCurveProcPtr) ATSQuadraticCurveUPP;
  2221. typedef TVECTOR_UPP_TYPE(ATSQuadraticNewPathProcPtr) ATSQuadraticNewPathUPP;
  2222. typedef TVECTOR_UPP_TYPE(ATSQuadraticClosePathProcPtr) ATSQuadraticClosePathUPP;
  2223. /*
  2224. * NewATSQuadraticLineUPP()
  2225. *
  2226. * Availability:
  2227. * Non-Carbon CFM: available as macro/inline
  2228. * CarbonLib: in CarbonLib 1.1 and later
  2229. * Mac OS X: in version 10.0 and later
  2230. */
  2231. EXTERN_API_C( ATSQuadraticLineUPP )
  2232. NewATSQuadraticLineUPP(ATSQuadraticLineProcPtr userRoutine);
  2233. #if !OPAQUE_UPP_TYPES
  2234. enum { uppATSQuadraticLineProcInfo = 0x00000FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2235. #ifdef __cplusplus
  2236. inline DEFINE_API_C(ATSQuadraticLineUPP) NewATSQuadraticLineUPP(ATSQuadraticLineProcPtr userRoutine) { return userRoutine; }
  2237. #else
  2238. #define NewATSQuadraticLineUPP(userRoutine) (userRoutine)
  2239. #endif
  2240. #endif
  2241. /*
  2242. * NewATSQuadraticCurveUPP()
  2243. *
  2244. * Availability:
  2245. * Non-Carbon CFM: available as macro/inline
  2246. * CarbonLib: in CarbonLib 1.1 and later
  2247. * Mac OS X: in version 10.0 and later
  2248. */
  2249. EXTERN_API_C( ATSQuadraticCurveUPP )
  2250. NewATSQuadraticCurveUPP(ATSQuadraticCurveProcPtr userRoutine);
  2251. #if !OPAQUE_UPP_TYPES
  2252. enum { uppATSQuadraticCurveProcInfo = 0x00003FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2253. #ifdef __cplusplus
  2254. inline DEFINE_API_C(ATSQuadraticCurveUPP) NewATSQuadraticCurveUPP(ATSQuadraticCurveProcPtr userRoutine) { return userRoutine; }
  2255. #else
  2256. #define NewATSQuadraticCurveUPP(userRoutine) (userRoutine)
  2257. #endif
  2258. #endif
  2259. /*
  2260. * NewATSQuadraticNewPathUPP()
  2261. *
  2262. * Availability:
  2263. * Non-Carbon CFM: available as macro/inline
  2264. * CarbonLib: in CarbonLib 1.1 and later
  2265. * Mac OS X: in version 10.0 and later
  2266. */
  2267. EXTERN_API_C( ATSQuadraticNewPathUPP )
  2268. NewATSQuadraticNewPathUPP(ATSQuadraticNewPathProcPtr userRoutine);
  2269. #if !OPAQUE_UPP_TYPES
  2270. enum { uppATSQuadraticNewPathProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
  2271. #ifdef __cplusplus
  2272. inline DEFINE_API_C(ATSQuadraticNewPathUPP) NewATSQuadraticNewPathUPP(ATSQuadraticNewPathProcPtr userRoutine) { return userRoutine; }
  2273. #else
  2274. #define NewATSQuadraticNewPathUPP(userRoutine) (userRoutine)
  2275. #endif
  2276. #endif
  2277. /*
  2278. * NewATSQuadraticClosePathUPP()
  2279. *
  2280. * Availability:
  2281. * Non-Carbon CFM: available as macro/inline
  2282. * CarbonLib: in CarbonLib 1.1 and later
  2283. * Mac OS X: in version 10.0 and later
  2284. */
  2285. EXTERN_API_C( ATSQuadraticClosePathUPP )
  2286. NewATSQuadraticClosePathUPP(ATSQuadraticClosePathProcPtr userRoutine);
  2287. #if !OPAQUE_UPP_TYPES
  2288. enum { uppATSQuadraticClosePathProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
  2289. #ifdef __cplusplus
  2290. inline DEFINE_API_C(ATSQuadraticClosePathUPP) NewATSQuadraticClosePathUPP(ATSQuadraticClosePathProcPtr userRoutine) { return userRoutine; }
  2291. #else
  2292. #define NewATSQuadraticClosePathUPP(userRoutine) (userRoutine)
  2293. #endif
  2294. #endif
  2295. /*
  2296. * DisposeATSQuadraticLineUPP()
  2297. *
  2298. * Availability:
  2299. * Non-Carbon CFM: available as macro/inline
  2300. * CarbonLib: in CarbonLib 1.1 and later
  2301. * Mac OS X: in version 10.0 and later
  2302. */
  2303. EXTERN_API_C( void )
  2304. DisposeATSQuadraticLineUPP(ATSQuadraticLineUPP userUPP);
  2305. #if !OPAQUE_UPP_TYPES
  2306. #ifdef __cplusplus
  2307. inline DEFINE_API_C(void) DisposeATSQuadraticLineUPP(ATSQuadraticLineUPP) {}
  2308. #else
  2309. #define DisposeATSQuadraticLineUPP(userUPP)
  2310. #endif
  2311. #endif
  2312. /*
  2313. * DisposeATSQuadraticCurveUPP()
  2314. *
  2315. * Availability:
  2316. * Non-Carbon CFM: available as macro/inline
  2317. * CarbonLib: in CarbonLib 1.1 and later
  2318. * Mac OS X: in version 10.0 and later
  2319. */
  2320. EXTERN_API_C( void )
  2321. DisposeATSQuadraticCurveUPP(ATSQuadraticCurveUPP userUPP);
  2322. #if !OPAQUE_UPP_TYPES
  2323. #ifdef __cplusplus
  2324. inline DEFINE_API_C(void) DisposeATSQuadraticCurveUPP(ATSQuadraticCurveUPP) {}
  2325. #else
  2326. #define DisposeATSQuadraticCurveUPP(userUPP)
  2327. #endif
  2328. #endif
  2329. /*
  2330. * DisposeATSQuadraticNewPathUPP()
  2331. *
  2332. * Availability:
  2333. * Non-Carbon CFM: available as macro/inline
  2334. * CarbonLib: in CarbonLib 1.1 and later
  2335. * Mac OS X: in version 10.0 and later
  2336. */
  2337. EXTERN_API_C( void )
  2338. DisposeATSQuadraticNewPathUPP(ATSQuadraticNewPathUPP userUPP);
  2339. #if !OPAQUE_UPP_TYPES
  2340. #ifdef __cplusplus
  2341. inline DEFINE_API_C(void) DisposeATSQuadraticNewPathUPP(ATSQuadraticNewPathUPP) {}
  2342. #else
  2343. #define DisposeATSQuadraticNewPathUPP(userUPP)
  2344. #endif
  2345. #endif
  2346. /*
  2347. * DisposeATSQuadraticClosePathUPP()
  2348. *
  2349. * Availability:
  2350. * Non-Carbon CFM: available as macro/inline
  2351. * CarbonLib: in CarbonLib 1.1 and later
  2352. * Mac OS X: in version 10.0 and later
  2353. */
  2354. EXTERN_API_C( void )
  2355. DisposeATSQuadraticClosePathUPP(ATSQuadraticClosePathUPP userUPP);
  2356. #if !OPAQUE_UPP_TYPES
  2357. #ifdef __cplusplus
  2358. inline DEFINE_API_C(void) DisposeATSQuadraticClosePathUPP(ATSQuadraticClosePathUPP) {}
  2359. #else
  2360. #define DisposeATSQuadraticClosePathUPP(userUPP)
  2361. #endif
  2362. #endif
  2363. /*
  2364. * InvokeATSQuadraticLineUPP()
  2365. *
  2366. * Availability:
  2367. * Non-Carbon CFM: available as macro/inline
  2368. * CarbonLib: in CarbonLib 1.1 and later
  2369. * Mac OS X: in version 10.0 and later
  2370. */
  2371. EXTERN_API_C( OSStatus )
  2372. InvokeATSQuadraticLineUPP(
  2373. const Float32Point * pt1,
  2374. const Float32Point * pt2,
  2375. void * callBackDataPtr,
  2376. ATSQuadraticLineUPP userUPP);
  2377. #if !OPAQUE_UPP_TYPES
  2378. #ifdef __cplusplus
  2379. inline DEFINE_API_C(OSStatus) InvokeATSQuadraticLineUPP(const Float32Point * pt1, const Float32Point * pt2, void * callBackDataPtr, ATSQuadraticLineUPP userUPP) { return (*userUPP)(pt1, pt2, callBackDataPtr); }
  2380. #else
  2381. #define InvokeATSQuadraticLineUPP(pt1, pt2, callBackDataPtr, userUPP) (*userUPP)(pt1, pt2, callBackDataPtr)
  2382. #endif
  2383. #endif
  2384. /*
  2385. * InvokeATSQuadraticCurveUPP()
  2386. *
  2387. * Availability:
  2388. * Non-Carbon CFM: available as macro/inline
  2389. * CarbonLib: in CarbonLib 1.1 and later
  2390. * Mac OS X: in version 10.0 and later
  2391. */
  2392. EXTERN_API_C( OSStatus )
  2393. InvokeATSQuadraticCurveUPP(
  2394. const Float32Point * pt1,
  2395. const Float32Point * controlPt,
  2396. const Float32Point * pt2,
  2397. void * callBackDataPtr,
  2398. ATSQuadraticCurveUPP userUPP);
  2399. #if !OPAQUE_UPP_TYPES
  2400. #ifdef __cplusplus
  2401. inline DEFINE_API_C(OSStatus) InvokeATSQuadraticCurveUPP(const Float32Point * pt1, const Float32Point * controlPt, const Float32Point * pt2, void * callBackDataPtr, ATSQuadraticCurveUPP userUPP) { return (*userUPP)(pt1, controlPt, pt2, callBackDataPtr); }
  2402. #else
  2403. #define InvokeATSQuadraticCurveUPP(pt1, controlPt, pt2, callBackDataPtr, userUPP) (*userUPP)(pt1, controlPt, pt2, callBackDataPtr)
  2404. #endif
  2405. #endif
  2406. /*
  2407. * InvokeATSQuadraticNewPathUPP()
  2408. *
  2409. * Availability:
  2410. * Non-Carbon CFM: available as macro/inline
  2411. * CarbonLib: in CarbonLib 1.1 and later
  2412. * Mac OS X: in version 10.0 and later
  2413. */
  2414. EXTERN_API_C( OSStatus )
  2415. InvokeATSQuadraticNewPathUPP(
  2416. void * callBackDataPtr,
  2417. ATSQuadraticNewPathUPP userUPP);
  2418. #if !OPAQUE_UPP_TYPES
  2419. #ifdef __cplusplus
  2420. inline DEFINE_API_C(OSStatus) InvokeATSQuadraticNewPathUPP(void * callBackDataPtr, ATSQuadraticNewPathUPP userUPP) { return (*userUPP)(callBackDataPtr); }
  2421. #else
  2422. #define InvokeATSQuadraticNewPathUPP(callBackDataPtr, userUPP) (*userUPP)(callBackDataPtr)
  2423. #endif
  2424. #endif
  2425. /*
  2426. * InvokeATSQuadraticClosePathUPP()
  2427. *
  2428. * Availability:
  2429. * Non-Carbon CFM: available as macro/inline
  2430. * CarbonLib: in CarbonLib 1.1 and later
  2431. * Mac OS X: in version 10.0 and later
  2432. */
  2433. EXTERN_API_C( OSStatus )
  2434. InvokeATSQuadraticClosePathUPP(
  2435. void * callBackDataPtr,
  2436. ATSQuadraticClosePathUPP userUPP);
  2437. #if !OPAQUE_UPP_TYPES
  2438. #ifdef __cplusplus
  2439. inline DEFINE_API_C(OSStatus) InvokeATSQuadraticClosePathUPP(void * callBackDataPtr, ATSQuadraticClosePathUPP userUPP) { return (*userUPP)(callBackDataPtr); }
  2440. #else
  2441. #define InvokeATSQuadraticClosePathUPP(callBackDataPtr, userUPP) (*userUPP)(callBackDataPtr)
  2442. #endif
  2443. #endif
  2444. /*
  2445. * ATSUGlyphGetQuadraticPaths()
  2446. *
  2447. * Availability:
  2448. * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
  2449. * CarbonLib: in CarbonLib 1.1 and later
  2450. * Mac OS X: in version 10.0 and later
  2451. */
  2452. EXTERN_API_C( OSStatus )
  2453. ATSUGlyphGetQuadraticPaths(
  2454. ATSUStyle iATSUStyle,
  2455. GlyphID iGlyphID,
  2456. ATSQuadraticNewPathUPP iNewPathProc,
  2457. ATSQuadraticLineUPP iLineProc,
  2458. ATSQuadraticCurveUPP iCurveProc,
  2459. ATSQuadraticClosePathUPP iClosePathProc,
  2460. void * iCallbackDataPtr,
  2461. OSStatus * oCallbackResult);
  2462. /* ATSUGlyphGetCubicPaths callbacks */
  2463. typedef CALLBACK_API( OSStatus , ATSCubicMoveToProcPtr )(const Float32Point *pt, void *callBackDataPtr);
  2464. typedef CALLBACK_API( OSStatus , ATSCubicLineToProcPtr )(const Float32Point *pt, void *callBackDataPtr);
  2465. typedef CALLBACK_API( OSStatus , ATSCubicCurveToProcPtr )(const Float32Point *pt1, const Float32Point *pt2, const Float32Point *pt3, void *callBackDataPtr);
  2466. typedef CALLBACK_API( OSStatus , ATSCubicClosePathProcPtr )(void * callBackDataPtr);
  2467. typedef TVECTOR_UPP_TYPE(ATSCubicMoveToProcPtr) ATSCubicMoveToUPP;
  2468. typedef TVECTOR_UPP_TYPE(ATSCubicLineToProcPtr) ATSCubicLineToUPP;
  2469. typedef TVECTOR_UPP_TYPE(ATSCubicCurveToProcPtr) ATSCubicCurveToUPP;
  2470. typedef TVECTOR_UPP_TYPE(ATSCubicClosePathProcPtr) ATSCubicClosePathUPP;
  2471. /*
  2472. * NewATSCubicMoveToUPP()
  2473. *
  2474. * Availability:
  2475. * Non-Carbon CFM: available as macro/inline
  2476. * CarbonLib: in CarbonLib 1.1 and later
  2477. * Mac OS X: in version 10.0 and later
  2478. */
  2479. EXTERN_API_C( ATSCubicMoveToUPP )
  2480. NewATSCubicMoveToUPP(ATSCubicMoveToProcPtr userRoutine);
  2481. #if !OPAQUE_UPP_TYPES
  2482. enum { uppATSCubicMoveToProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
  2483. #ifdef __cplusplus
  2484. inline DEFINE_API_C(ATSCubicMoveToUPP) NewATSCubicMoveToUPP(ATSCubicMoveToProcPtr userRoutine) { return userRoutine; }
  2485. #else
  2486. #define NewATSCubicMoveToUPP(userRoutine) (userRoutine)
  2487. #endif
  2488. #endif
  2489. /*
  2490. * NewATSCubicLineToUPP()
  2491. *
  2492. * Availability:
  2493. * Non-Carbon CFM: available as macro/inline
  2494. * CarbonLib: in CarbonLib 1.1 and later
  2495. * Mac OS X: in version 10.0 and later
  2496. */
  2497. EXTERN_API_C( ATSCubicLineToUPP )
  2498. NewATSCubicLineToUPP(ATSCubicLineToProcPtr userRoutine);
  2499. #if !OPAQUE_UPP_TYPES
  2500. enum { uppATSCubicLineToProcInfo = 0x000003F0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes) */
  2501. #ifdef __cplusplus
  2502. inline DEFINE_API_C(ATSCubicLineToUPP) NewATSCubicLineToUPP(ATSCubicLineToProcPtr userRoutine) { return userRoutine; }
  2503. #else
  2504. #define NewATSCubicLineToUPP(userRoutine) (userRoutine)
  2505. #endif
  2506. #endif
  2507. /*
  2508. * NewATSCubicCurveToUPP()
  2509. *
  2510. * Availability:
  2511. * Non-Carbon CFM: available as macro/inline
  2512. * CarbonLib: in CarbonLib 1.1 and later
  2513. * Mac OS X: in version 10.0 and later
  2514. */
  2515. EXTERN_API_C( ATSCubicCurveToUPP )
  2516. NewATSCubicCurveToUPP(ATSCubicCurveToProcPtr userRoutine);
  2517. #if !OPAQUE_UPP_TYPES
  2518. enum { uppATSCubicCurveToProcInfo = 0x00003FF0 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2519. #ifdef __cplusplus
  2520. inline DEFINE_API_C(ATSCubicCurveToUPP) NewATSCubicCurveToUPP(ATSCubicCurveToProcPtr userRoutine) { return userRoutine; }
  2521. #else
  2522. #define NewATSCubicCurveToUPP(userRoutine) (userRoutine)
  2523. #endif
  2524. #endif
  2525. /*
  2526. * NewATSCubicClosePathUPP()
  2527. *
  2528. * Availability:
  2529. * Non-Carbon CFM: available as macro/inline
  2530. * CarbonLib: in CarbonLib 1.1 and later
  2531. * Mac OS X: in version 10.0 and later
  2532. */
  2533. EXTERN_API_C( ATSCubicClosePathUPP )
  2534. NewATSCubicClosePathUPP(ATSCubicClosePathProcPtr userRoutine);
  2535. #if !OPAQUE_UPP_TYPES
  2536. enum { uppATSCubicClosePathProcInfo = 0x000000F0 }; /* pascal 4_bytes Func(4_bytes) */
  2537. #ifdef __cplusplus
  2538. inline DEFINE_API_C(ATSCubicClosePathUPP) NewATSCubicClosePathUPP(ATSCubicClosePathProcPtr userRoutine) { return userRoutine; }
  2539. #else
  2540. #define NewATSCubicClosePathUPP(userRoutine) (userRoutine)
  2541. #endif
  2542. #endif
  2543. /*
  2544. * DisposeATSCubicMoveToUPP()
  2545. *
  2546. * Availability:
  2547. * Non-Carbon CFM: available as macro/inline
  2548. * CarbonLib: in CarbonLib 1.1 and later
  2549. * Mac OS X: in version 10.0 and later
  2550. */
  2551. EXTERN_API_C( void )
  2552. DisposeATSCubicMoveToUPP(ATSCubicMoveToUPP userUPP);
  2553. #if !OPAQUE_UPP_TYPES
  2554. #ifdef __cplusplus
  2555. inline DEFINE_API_C(void) DisposeATSCubicMoveToUPP(ATSCubicMoveToUPP) {}
  2556. #else
  2557. #define DisposeATSCubicMoveToUPP(userUPP)
  2558. #endif
  2559. #endif
  2560. /*
  2561. * DisposeATSCubicLineToUPP()
  2562. *
  2563. * Availability:
  2564. * Non-Carbon CFM: available as macro/inline
  2565. * CarbonLib: in CarbonLib 1.1 and later
  2566. * Mac OS X: in version 10.0 and later
  2567. */
  2568. EXTERN_API_C( void )
  2569. DisposeATSCubicLineToUPP(ATSCubicLineToUPP userUPP);
  2570. #if !OPAQUE_UPP_TYPES
  2571. #ifdef __cplusplus
  2572. inline DEFINE_API_C(void) DisposeATSCubicLineToUPP(ATSCubicLineToUPP) {}
  2573. #else
  2574. #define DisposeATSCubicLineToUPP(userUPP)
  2575. #endif
  2576. #endif
  2577. /*
  2578. * DisposeATSCubicCurveToUPP()
  2579. *
  2580. * Availability:
  2581. * Non-Carbon CFM: available as macro/inline
  2582. * CarbonLib: in CarbonLib 1.1 and later
  2583. * Mac OS X: in version 10.0 and later
  2584. */
  2585. EXTERN_API_C( void )
  2586. DisposeATSCubicCurveToUPP(ATSCubicCurveToUPP userUPP);
  2587. #if !OPAQUE_UPP_TYPES
  2588. #ifdef __cplusplus
  2589. inline DEFINE_API_C(void) DisposeATSCubicCurveToUPP(ATSCubicCurveToUPP) {}
  2590. #else
  2591. #define DisposeATSCubicCurveToUPP(userUPP)
  2592. #endif
  2593. #endif
  2594. /*
  2595. * DisposeATSCubicClosePathUPP()
  2596. *
  2597. * Availability:
  2598. * Non-Carbon CFM: available as macro/inline
  2599. * CarbonLib: in CarbonLib 1.1 and later
  2600. * Mac OS X: in version 10.0 and later
  2601. */
  2602. EXTERN_API_C( void )
  2603. DisposeATSCubicClosePathUPP(ATSCubicClosePathUPP userUPP);
  2604. #if !OPAQUE_UPP_TYPES
  2605. #ifdef __cplusplus
  2606. inline DEFINE_API_C(void) DisposeATSCubicClosePathUPP(ATSCubicClosePathUPP) {}
  2607. #else
  2608. #define DisposeATSCubicClosePathUPP(userUPP)
  2609. #endif
  2610. #endif
  2611. /*
  2612. * InvokeATSCubicMoveToUPP()
  2613. *
  2614. * Availability:
  2615. * Non-Carbon CFM: available as macro/inline
  2616. * CarbonLib: in CarbonLib 1.1 and later
  2617. * Mac OS X: in version 10.0 and later
  2618. */
  2619. EXTERN_API_C( OSStatus )
  2620. InvokeATSCubicMoveToUPP(
  2621. const Float32Point * pt,
  2622. void * callBackDataPtr,
  2623. ATSCubicMoveToUPP userUPP);
  2624. #if !OPAQUE_UPP_TYPES
  2625. #ifdef __cplusplus
  2626. inline DEFINE_API_C(OSStatus) InvokeATSCubicMoveToUPP(const Float32Point * pt, void * callBackDataPtr, ATSCubicMoveToUPP userUPP) { return (*userUPP)(pt, callBackDataPtr); }
  2627. #else
  2628. #define InvokeATSCubicMoveToUPP(pt, callBackDataPtr, userUPP) (*userUPP)(pt, callBackDataPtr)
  2629. #endif
  2630. #endif
  2631. /*
  2632. * InvokeATSCubicLineToUPP()
  2633. *
  2634. * Availability:
  2635. * Non-Carbon CFM: available as macro/inline
  2636. * CarbonLib: in CarbonLib 1.1 and later
  2637. * Mac OS X: in version 10.0 and later
  2638. */
  2639. EXTERN_API_C( OSStatus )
  2640. InvokeATSCubicLineToUPP(
  2641. const Float32Point * pt,
  2642. void * callBackDataPtr,
  2643. ATSCubicLineToUPP userUPP);
  2644. #if !OPAQUE_UPP_TYPES
  2645. #ifdef __cplusplus
  2646. inline DEFINE_API_C(OSStatus) InvokeATSCubicLineToUPP(const Float32Point * pt, void * callBackDataPtr, ATSCubicLineToUPP userUPP) { return (*userUPP)(pt, callBackDataPtr); }
  2647. #else
  2648. #define InvokeATSCubicLineToUPP(pt, callBackDataPtr, userUPP) (*userUPP)(pt, callBackDataPtr)
  2649. #endif
  2650. #endif
  2651. /*
  2652. * InvokeATSCubicCurveToUPP()
  2653. *
  2654. * Availability:
  2655. * Non-Carbon CFM: available as macro/inline
  2656. * CarbonLib: in CarbonLib 1.1 and later
  2657. * Mac OS X: in version 10.0 and later
  2658. */
  2659. EXTERN_API_C( OSStatus )
  2660. InvokeATSCubicCurveToUPP(
  2661. const Float32Point * pt1,
  2662. const Float32Point * pt2,
  2663. const Float32Point * pt3,
  2664. void * callBackDataPtr,
  2665. ATSCubicCurveToUPP userUPP);
  2666. #if !OPAQUE_UPP_TYPES
  2667. #ifdef __cplusplus
  2668. inline DEFINE_API_C(OSStatus) InvokeATSCubicCurveToUPP(const Float32Point * pt1, const Float32Point * pt2, const Float32Point * pt3, void * callBackDataPtr, ATSCubicCurveToUPP userUPP) { return (*userUPP)(pt1, pt2, pt3, callBackDataPtr); }
  2669. #else
  2670. #define InvokeATSCubicCurveToUPP(pt1, pt2, pt3, callBackDataPtr, userUPP) (*userUPP)(pt1, pt2, pt3, callBackDataPtr)
  2671. #endif
  2672. #endif
  2673. /*
  2674. * InvokeATSCubicClosePathUPP()
  2675. *
  2676. * Availability:
  2677. * Non-Carbon CFM: available as macro/inline
  2678. * CarbonLib: in CarbonLib 1.1 and later
  2679. * Mac OS X: in version 10.0 and later
  2680. */
  2681. EXTERN_API_C( OSStatus )
  2682. InvokeATSCubicClosePathUPP(
  2683. void * callBackDataPtr,
  2684. ATSCubicClosePathUPP userUPP);
  2685. #if !OPAQUE_UPP_TYPES
  2686. #ifdef __cplusplus
  2687. inline DEFINE_API_C(OSStatus) InvokeATSCubicClosePathUPP(void * callBackDataPtr, ATSCubicClosePathUPP userUPP) { return (*userUPP)(callBackDataPtr); }
  2688. #else
  2689. #define InvokeATSCubicClosePathUPP(callBackDataPtr, userUPP) (*userUPP)(callBackDataPtr)
  2690. #endif
  2691. #endif
  2692. /*
  2693. * ATSUGlyphGetCubicPaths()
  2694. *
  2695. * Availability:
  2696. * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
  2697. * CarbonLib: in CarbonLib 1.1 and later
  2698. * Mac OS X: in version 10.0 and later
  2699. */
  2700. EXTERN_API_C( OSStatus )
  2701. ATSUGlyphGetCubicPaths(
  2702. ATSUStyle iATSUStyle,
  2703. GlyphID iGlyphID,
  2704. ATSCubicMoveToUPP iMoveToProc,
  2705. ATSCubicLineToUPP iLineToProc,
  2706. ATSCubicCurveToUPP iCurveToProc,
  2707. ATSCubicClosePathUPP iClosePathProc,
  2708. void * iCallbackDataPtr,
  2709. OSStatus * oCallbackResult);
  2710. /*
  2711. * ATSUGlyphGetCurvePaths()
  2712. *
  2713. * Availability:
  2714. * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
  2715. * CarbonLib: in CarbonLib 1.1 and later
  2716. * Mac OS X: in version 10.0 and later
  2717. */
  2718. EXTERN_API_C( OSStatus )
  2719. ATSUGlyphGetCurvePaths(
  2720. ATSUStyle iATSUStyle,
  2721. GlyphID iGlyphID,
  2722. ByteCount * ioBufferSize,
  2723. ATSUCurvePaths * oPaths);
  2724. #if PRAGMA_STRUCT_ALIGN
  2725. #pragma options align=reset
  2726. #elif PRAGMA_STRUCT_PACKPUSH
  2727. #pragma pack(pop)
  2728. #elif PRAGMA_STRUCT_PACK
  2729. #pragma pack()
  2730. #endif
  2731. #ifdef PRAGMA_IMPORT_OFF
  2732. #pragma import off
  2733. #elif PRAGMA_IMPORT
  2734. #pragma import reset
  2735. #endif
  2736. #ifdef __cplusplus
  2737. }
  2738. #endif