ATSUnicode.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:50k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       ATSUnicode.h
  3.  
  4.      Contains:   Public interfaces for Apple Type Services for Unicode Imaging
  5.  
  6.      Version:    Technology: Mac OS 9
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1997-2001 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __ATSUNICODE__
  18. #define __ATSUNICODE__
  19. #ifndef __ATSLAYOUTTYPES__
  20. #include "ATSLayoutTypes.h"
  21. #endif
  22. #ifndef __SFNTLAYOUTTYPES__
  23. #include "SFNTLayoutTypes.h"
  24. #endif
  25. #ifndef __MACTYPES__
  26. #include "MacTypes.h"
  27. #endif
  28. #ifndef __MACMEMORY__
  29. #include "MacMemory.h"
  30. #endif
  31. #ifndef __FONTS__
  32. #include "Fonts.h"
  33. #endif
  34. #ifndef __QUICKDRAW__
  35. #include "Quickdraw.h"
  36. #endif
  37. #ifndef __TEXTCOMMON__
  38. #include "TextCommon.h"
  39. #endif
  40. #ifndef __MACERRORS__
  41. #include "MacErrors.h"
  42. #endif
  43. #if PRAGMA_ONCE
  44. #pragma once
  45. #endif
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49. #if PRAGMA_IMPORT
  50. #pragma import on
  51. #endif
  52. #if PRAGMA_STRUCT_ALIGN
  53.     #pragma options align=mac68k
  54. #elif PRAGMA_STRUCT_PACKPUSH
  55.     #pragma pack(push, 2)
  56. #elif PRAGMA_STRUCT_PACK
  57.     #pragma pack(2)
  58. #endif
  59. /************/
  60. /*  Types   */
  61. /************/
  62. /*
  63.    UniCharArrayHandle and UniCharArrayOffset are defined in the
  64.    TextCommon interface file.
  65. */
  66. /*
  67.     ATSUTextMeasurement is specific to ATSUI in that measurement
  68.     quantities are in fractional Fixed format instead of shorts
  69.     used in QuickDraw Text.  This provides exact outline metrics and
  70.     line specifications such as line width, ascent, descent, and so on.  
  71. */
  72. typedef Fixed                           ATSUTextMeasurement;
  73. /*
  74.     ATSUFontID indicates a particular font family and face.  
  75.     ATSUFontID's are not guaranteed to remain constant across 
  76.     reboots.  Clients should use the font's unique name to 
  77.     get a font token to store in documents which is 
  78.     guaranteed to remain constant across reboots. 
  79. */
  80. typedef FMFont                          ATSUFontID;
  81. /*
  82.     ATSUFontFeatureType and ATSUFontFeatureSelector are used 
  83.     to identify font features.  
  84. */
  85. typedef UInt16                          ATSUFontFeatureType;
  86. typedef UInt16                          ATSUFontFeatureSelector;
  87. /*
  88.     ATSUFontVariationAxis and ATSUFontVariationValue are used 
  89.     in connection with font variations.  
  90. */
  91. typedef FourCharCode                    ATSUFontVariationAxis;
  92. typedef Fixed                           ATSUFontVariationValue;
  93. /*
  94.     ATSUTextLayout is used to store the attribute information 
  95.     associated with a contiguous block of UniChar's (UInt16's) 
  96.     in memory.  It's typed to be an opaque structure.  
  97. */
  98. typedef struct OpaqueATSUTextLayout*    ATSUTextLayout;
  99. /*
  100.     ATSUStyle is used to store a set of individual attributes, 
  101.     font features, and font variations.  It's typed to be 
  102.     an opaque structure.  
  103. */
  104. typedef struct OpaqueATSUStyle*         ATSUStyle;
  105. /*
  106.     ATSUAttributeTag is used to indicate the particular type 
  107.     of attribute under consideration:  font, size, color, 
  108.     and so on.  
  109.     Each style run may have at most one attribute with a 
  110.     given ATSUAttributeTag (i.e., a style run can't have 
  111.     more than one font or size) but may have none.  
  112. */
  113. typedef UInt32                          ATSUAttributeTag;
  114. /*
  115.     ATSUAttributeValuePtr is used to provide generic access 
  116.     to storage of attribute values, which vary in size.
  117. */
  118. typedef void *                          ATSUAttributeValuePtr;
  119. /*
  120.     ATSUAttributeInfo is used to provide a tag/size pairing.  
  121.     This makes it possible to provide the client information   
  122.     about all the attributes for a given range of text.  This   
  123.     structure is only used to return to the client information   
  124.     about a complete set of attributes.  An array of   
  125.     ATSUAttributeInfos is passed as a parameter so that the   
  126.     client can find out what attributes are set and what their   
  127.     individual sizes are; with that information, they can then   
  128.     query about the values of the attributes they're interested   
  129.     in.  Because arrays of ATSUAttributeInfos are used as parameters   
  130.     to functions, they have to be of a fixed size, hence the   
  131.     value is not included in the structure.  
  132. */
  133. struct ATSUAttributeInfo {
  134.     ATSUAttributeTag                fTag;
  135.     ByteCount                       fValueSize;
  136. };
  137. typedef struct ATSUAttributeInfo        ATSUAttributeInfo;
  138. /*
  139.     ATSUCaret contains the complete information needed to render a
  140.     caret.  fX and fY is the position of one of the caret's ends
  141.     relative to the origin position of the line the caret belongs.
  142.     fDeltaX and fDeltaY is the position of the caret's other end.
  143.     Hence, to draw a caret, simply call MoveTo(fX, fY) followed by
  144.     LineTo(fDeltaX, fDeltaY) or equivalent.  The ATSUCaret will
  145.     contain the positions needed to draw carets on angled lines
  146.     and reflect angled carets and leading/trailing split caret
  147.     appearances.
  148. */
  149. struct ATSUCaret {
  150.     Fixed                           fX;
  151.     Fixed                           fY;
  152.     Fixed                           fDeltaX;
  153.     Fixed                           fDeltaY;
  154. };
  155. typedef struct ATSUCaret                ATSUCaret;
  156. /*
  157.     ATSUCursorMovementType currently can take three values 
  158.     (kATSUByCharacter, kATSUByCluster, and kATSUByWord) 
  159.     and is used to indicate how much to move the cursor.  
  160. */
  161. typedef UInt16                          ATSUCursorMovementType;
  162. /*
  163.     ATSUVerticalCharacterType currently can take two values 
  164.     (kATSUStronglyVertical, and kATSUStronglyHorizontal) and 
  165.     is used to indicate whether text is to be laid out as 
  166.     vertical glyphs or horizontal glyphs.  
  167. */
  168. typedef UInt16                          ATSUVerticalCharacterType;
  169. /*
  170.     ATSUStyleComparison is an enumeration with four values 
  171.     (kATUStyleUnequal, ATSUStyleContains, kATSUStyleEquals, 
  172.     and kATSUStyleContainedBy), and is used by ATSUCompareStyles() 
  173.     to indicate if the first style parameter contains as a 
  174.     proper subset, is equal to, or is contained by the second 
  175.     style parameter.
  176. */
  177. typedef UInt16                          ATSUStyleComparison;
  178. /*
  179.     ATSUFontFallbackMethod type defines the type of heap or memory callback
  180.     method ATSUI is to follow iin all its permanent memory allocations for
  181.     it clients.
  182. */
  183. typedef UInt16                          ATSUFontFallbackMethod;
  184. /*
  185.     ATSUMemoryCallbacks is a union struct that allows the ATSUI 
  186.     client to specify a specific heap for ATSUI use or allocation
  187.     callbacks of which ATSUI is to use each time ATSUI performs a
  188.     memory operation (alloc, grow, free).
  189. */
  190. typedef CALLBACK_API_C( void *, ATSUCustomAllocFunc )(void *refCon, ByteCount howMuch);
  191. typedef CALLBACK_API_C( void , ATSUCustomFreeFunc )(void *refCon, void *doomedBlock);
  192. typedef CALLBACK_API_C( void *, ATSUCustomGrowFunc )(void *refCon, void *oldBlock, ByteCount oldSize, ByteCount newSize);
  193. union ATSUMemoryCallbacks {
  194.     struct {
  195.         ATSUCustomAllocFunc             Alloc;
  196.         ATSUCustomFreeFunc              Free;
  197.         ATSUCustomGrowFunc              Grow;
  198.         void *                          memoryRefCon;
  199.     }                                 callbacks;
  200.     THz                             heapToUse;
  201. };
  202. typedef union ATSUMemoryCallbacks       ATSUMemoryCallbacks;
  203. /*
  204.     ATSUHeapSpec provides allows the ATSUI client a means of
  205.     specifying the heap ATSUI should allocate it's dynamic memory
  206.     from or that ATSUI should use the memory callback provided by
  207.     the client.
  208. */
  209. typedef UInt16                          ATSUHeapSpec;
  210. /*
  211.     ATSUMemorySetting is used to store the results from a ATSUSetMemoryAlloc
  212.     or a ATSUGetCurrentMemorySetting call.  It can also be used to change the
  213.     current ATSUMemorySetting by passing it into the ATSUSetCurrentMemorySetting
  214.     call.
  215. */
  216. typedef struct OpaqueATSUMemorySetting*  ATSUMemorySetting;
  217. /*******************************************************************************/
  218. /*  ATSUI Attribute tags:  Apple reserves values 0 to 65,535 (0 to 0x0000FFFF) */
  219. /*  ATSUI clients may create their own tags with any other value               */
  220. /*******************************************************************************/
  221. /*  Line Control Attribute Tags */
  222. enum {
  223.     kATSULineWidthTag           = 1L,                           /*    Type:       ATSUTextMeasurement*/
  224.                                                                 /*    Default value: 0*/
  225.     kATSULineRotationTag        = 2L,                           /*    Type:       Fixed (fixed value in degrees in right-handed coordinate system)*/
  226.                                                                 /*    Default value: 0*/
  227.     kATSULineDirectionTag       = 3L,                           /*    Type:       Boolean; values 0 or 1 (see below for value identities)*/
  228.                                                                 /*    Default value: GetSysDirection() ? kATSURightToLeftBaseDirection : kATSULeftToRightBaseDirection*/
  229.     kATSULineJustificationFactorTag = 4L,                       /*    Type:       Fract between 0 and 1*/
  230.                                                                 /*    Default value: kATSUNoJustification*/
  231.     kATSULineFlushFactorTag     = 5L,                           /*    Type:       Fract between 0 and 1 */
  232.                                                                 /*    Default value: kATSUStartAlignment*/
  233.     kATSULineBaselineValuesTag  = 6L,                           /*    Type:       BslnBaselineRecord*/
  234.                                                                 /*    Default value: All zeros.  Calculated from other style attributes (e.g., font and point size)*/
  235.     kATSULineLayoutOptionsTag   = 7L,                           /*    Type:       UInt32*/
  236.                                                                 /*    Default value: kATSLineNoLayoutOptions - other options listed in ATSLayoutTypes.h*/
  237.     kATSULineAscentTag          = 8L,                           /*    Type:       ATSUTextMeasurement*/
  238.                                                                 /*    Default value: kATSUseLineHeight*/
  239.     kATSULineDescentTag         = 9L,                           /*    Type:       ATSUTextMeasurement*/
  240.                                                                 /*    Default value: kATSUseLineHeight*/
  241.     kATSULineLanguageTag        = 10L,                          /*    Type:       RegionCode - region values listed in script.h interface file*/
  242.                                                                 /*    Default value: kTextRegionDontCare*/
  243.     kATSULineTextLocatorTag     = 11L,                          /*    Type:       TextBreakLocatorRef*/
  244.                                                                 /*    Default value: NULL - set Region derived locator or the default Text Utilities locator*/
  245.     kATSUMaxLineTag             = 12L                           /*    This is just for convenience - the upper limit of the ATSUTextLayout attribute tags */
  246. };
  247. /*  Run Style Attribute Tags */
  248. enum {
  249.                                                                 /* QuickDraw compatibility tags */
  250.     kATSUQDBoldfaceTag          = 256L,                         /*    Type:       Boolean    */
  251.                                                                 /*    Default value: false*/
  252.     kATSUQDItalicTag            = 257L,                         /*    Type:       Boolean       */
  253.                                                                 /*    Default value: false*/
  254.     kATSUQDUnderlineTag         = 258L,                         /*    Type:       Boolean    */
  255.                                                                 /*    Default value: false*/
  256.     kATSUQDCondensedTag         = 259L,                         /*    Type:       Boolean    */
  257.                                                                 /*    Default value: false*/
  258.     kATSUQDExtendedTag          = 260L,                         /*    Type:       Boolean    */
  259.                                                                 /*    Default value: false*/
  260.                                                                 /* Common run tags */
  261.     kATSUFontTag                = 261L,                         /*    Type:       ATSUFontID */
  262.                                                                 /*    Default value: GetScriptVariable( smSystemScript, smScriptAppFond )*/
  263.     kATSUSizeTag                = 262L,                         /*    Type:       Fixed  */
  264.                                                                 /*    Default value: GetScriptVariable( smSystemScript, smScriptAppFondSize )    */
  265.     kATSUColorTag               = 263L,                         /*    Type:       RGBColor   */
  266.                                                                 /*    Default value: (0, 0, 0)*/
  267.                                                                 /*    Less common run tags */
  268.     kATSULanguageTag            = 264L,                         /*    Type:       RegionCode - region values listed in script.h interface file*/
  269.                                                                 /*    Default value: GetScriptManagerVariable( smRegionCode )*/
  270.     kATSUVerticalCharacterTag   = 265L,                         /*    Type:       ATSUVerticalCharacterType  */
  271.                                                                 /*    Default value: kATSUStronglyHorizontal*/
  272.     kATSUImposeWidthTag         = 266L,                         /*    Type:       ATSUTextMeasurement*/
  273.                                                                 /*    Default value: all glyphs use their own font defined advance widths*/
  274.     kATSUBeforeWithStreamShiftTag = 267L,                       /*    Type:       Fixed*/
  275.                                                                 /*    Default value: 0*/
  276.     kATSUAfterWithStreamShiftTag = 268L,                        /*    Type:       Fixed*/
  277.                                                                 /*    Default value: 0*/
  278.     kATSUCrossStreamShiftTag    = 269L,                         /*    Type:       Fixed*/
  279.                                                                 /*    Default value: 0*/
  280.     kATSUTrackingTag            = 270L,                         /*    Type:       Fixed*/
  281.                                                                 /*    Default value: kATSNoTracking*/
  282.     kATSUHangingInhibitFactorTag = 271L,                        /*    Type:       Fract between 0 and 1*/
  283.                                                                 /*    Default value: 0*/
  284.     kATSUKerningInhibitFactorTag = 272L,                        /*    Type:       Fract between 0 and 1*/
  285.                                                                 /*    Default value: 0*/
  286.     kATSUDecompositionFactorTag = 273L,                         /*    Type:       Fixed (-1.0 -> 1.0)*/
  287.                                                                 /*    Default value: 0*/
  288.     kATSUBaselineClassTag       = 274L,                         /*    Type:       BslnBaselineClass  (see SFNTLayoutTypes.h)*/
  289.                                                                 /*    Default value: kBSLNRomanBaseline - set to kBSLNNoBaselineOverride to use intrinsic baselines*/
  290.     kATSUPriorityJustOverrideTag = 275L,                        /*    Type:       ATSJustPriorityWidthDeltaOverrides (see ATSLayoutTypes.h)*/
  291.                                                                 /*    Default value: all zeros*/
  292.     kATSUNoLigatureSplitTag     = 276L,                         /*    Type:       Boolean*/
  293.                                                                 /*    Default value: false - ligatures and compound characters have divisable components.*/
  294.     kATSUNoCaretAngleTag        = 277L,                         /*    Type:       Boolean*/
  295.                                                                 /*    Default value: false - use the character's angularity to determine its boundaries*/
  296.     kATSUSuppressCrossKerningTag = 278L,                        /*    Type:       Boolean*/
  297.                                                                 /*    Default value: false - do not suppress automatic cross kerning (defined by font)*/
  298.     kATSUNoOpticalAlignmentTag  = 279L,                         /*    Type:       Boolean*/
  299.                                                                 /*    Default value: false - do not suppress character's automatic optical positional alignment*/
  300.     kATSUForceHangingTag        = 280L,                         /*    Type:       Boolean*/
  301.                                                                 /*    Default value: false - do not force the character's to hang beyond the line boundaries*/
  302.     kATSUNoSpecialJustificationTag = 281L,                      /*    Type:       Boolean*/
  303.                                                                 /*    Default value: false - perform post-compensation justification if needed*/
  304.     kATSUStyleTextLocatorTag    = 282L,                         /*    Type:       TextBreakLocatorRef*/
  305.                                                                 /*    Default value: NULL - region derived locator or the default Text Utilities locator*/
  306.     kATSUMaxStyleTag            = 283L,                         /*    This is just for convenience - the upper limit of the ATSUStyle attribute tags */
  307.     kATSUMaxATSUITagValue       = 65535L                        /*    This is the maximum Apple ATSUI reserved tag value.  Client defined tags must be larger.*/
  308. };
  309. /********************************/
  310. /*  Enumerations and constants  */
  311. /********************************/
  312. /* Cursor movement */
  313. enum {
  314.     kATSUByCharacter            = 0,
  315.     kATSUByCluster              = 1,
  316.     kATSUByWord                 = 2
  317. };
  318. /* Vertical text types */
  319. enum {
  320.     kATSUStronglyHorizontal     = 0,
  321.     kATSUStronglyVertical       = 1
  322. };
  323. /* Line direction types (used for kATSULineDirectionTag values) */
  324. enum {
  325.     kATSULeftToRightBaseDirection = 0,                          /*    Impose left-to-right or top-to-bottom dominant direction */
  326.     kATSURightToLeftBaseDirection = 1                           /*    Impose right-to-left or bottom-to-top dominant direction */
  327. };
  328. /* Style comparison types */
  329. enum {
  330.     kATSUStyleUnequal           = 0,
  331.     kATSUStyleContains          = 1,
  332.     kATSUStyleEquals            = 2,
  333.     kATSUStyleContainedBy       = 3
  334. };
  335. /* Font Fallback methods */
  336. enum {
  337.     kATSUDefaultFontFallbacks   = 0,
  338.     kATSULastResortOnlyFallback = 1,
  339.     kATSUSequentialFallbacksPreferred = 2,
  340.     kATSUSequentialFallbacksExclusive = 3
  341. };
  342. /* ATSUI heap or memory allocation specifiers (of type ATSUHeapSpec) */
  343. enum {
  344.     kATSUUseCurrentHeap         = 0,
  345.     kATSUUseAppHeap             = 1,
  346.     kATSUUseSpecificHeap        = 2,
  347.     kATSUUseCallbacks           = 3
  348. };
  349. /* LineFlushFactor convenience defined values */
  350. #define kATSUStartAlignment         ((Fract) 0x00000000L)
  351. #define kATSUEndAlignment           ((Fract) 0x40000000L)
  352. #define kATSUCenterAlignment        ((Fract) 0x20000000L)
  353. /* LineJustificationFactor convenience defined values */
  354. #define kATSUNoJustification        ((Fract) 0x00000000L)
  355. #define kATSUFullJustification      ((Fract) 0x40000000L)
  356. /* Other constants  */
  357. enum {
  358.     kATSUInvalidFontID          = 0
  359. };
  360. enum {
  361.     kATSUUseLineControlWidth    = 0x7FFFFFFF
  362. };
  363. enum {
  364.     kATSUNoSelector             = 0x0000FFFF
  365. };
  366. enum {
  367.     kATSUUseGrafPortPenLoc      = (long)0xFFFFFFFF,
  368.     kATSUClearAll               = (long)0xFFFFFFFF
  369. };
  370. enum {
  371.     kATSUFromTextBeginning      = (long)0xFFFFFFFF,
  372.     kATSUToTextEnd              = (long)0xFFFFFFFF
  373. };
  374. /****************/
  375. /*  Functions   */
  376. /****************/
  377. /*  Clipboard support, flattened style version 0 (is is advised to not use these routines and perform your own flattening)  */
  378. EXTERN_API_C( OSStatus )
  379. ATSUCopyToHandle                (ATSUStyle              iStyle,
  380.                                  Handle                 oStyleHandle);
  381. EXTERN_API_C( OSStatus )
  382. ATSUPasteFromHandle             (ATSUStyle              iStyle,
  383.                                  Handle                 iStyleHandle);
  384. /*  Memory allocation specification functions   */
  385. EXTERN_API_C( OSStatus )
  386. ATSUCreateMemorySetting         (ATSUHeapSpec           iHeapSpec,
  387.                                  ATSUMemoryCallbacks *  iMemoryCallbacks,
  388.                                  ATSUMemorySetting *    oMemorySetting);
  389. EXTERN_API_C( OSStatus )
  390. ATSUSetCurrentMemorySetting     (ATSUMemorySetting      iMemorySetting);
  391. EXTERN_API_C( ATSUMemorySetting )
  392. ATSUGetCurrentMemorySetting     (void);
  393. EXTERN_API_C( OSStatus )
  394. ATSUDisposeMemorySetting        (ATSUMemorySetting      iMemorySetting);
  395. /*  Basic style functions   */
  396. EXTERN_API_C( OSStatus )
  397. ATSUCreateStyle                 (ATSUStyle *            oStyle);
  398. EXTERN_API_C( OSStatus )
  399. ATSUCreateAndCopyStyle          (ATSUStyle              iStyle,
  400.                                  ATSUStyle *            oStyle);
  401. EXTERN_API_C( OSStatus )
  402. ATSUDisposeStyle                (ATSUStyle              iStyle);
  403. EXTERN_API_C( OSStatus )
  404. ATSUSetStyleRefCon              (ATSUStyle              iStyle,
  405.                                  UInt32                 iRefCon);
  406. EXTERN_API_C( OSStatus )
  407. ATSUGetStyleRefCon              (ATSUStyle              iStyle,
  408.                                  UInt32 *               oRefCon);
  409. /*  Style comparison        */
  410. EXTERN_API_C( OSStatus )
  411. ATSUCompareStyles               (ATSUStyle              iFirstStyle,
  412.                                  ATSUStyle              iSecondStyle,
  413.                                  ATSUStyleComparison *  oComparison);
  414. /*  Attribute manipulations */
  415. EXTERN_API_C( OSStatus )
  416. ATSUCopyAttributes              (ATSUStyle              iSourceStyle,
  417.                                  ATSUStyle              iDestinationStyle);
  418. EXTERN_API_C( OSStatus )
  419. ATSUOverwriteAttributes         (ATSUStyle              iSourceStyle,
  420.                                  ATSUStyle              iDestinationStyle);
  421. EXTERN_API_C( OSStatus )
  422. ATSUUnderwriteAttributes        (ATSUStyle              iSourceStyle,
  423.                                  ATSUStyle              iDestinationStyle);
  424. /*  Empty styles    */
  425. EXTERN_API_C( OSStatus )
  426. ATSUClearStyle                  (ATSUStyle              iStyle);
  427. EXTERN_API_C( OSStatus )
  428. ATSUStyleIsEmpty                (ATSUStyle              iStyle,
  429.                                  Boolean *              oIsClear);
  430. /*  Get and set attributes */
  431. EXTERN_API_C( OSStatus )
  432. ATSUCalculateBaselineDeltas     (ATSUStyle              iStyle,
  433.                                  BslnBaselineClass      iBaselineClass,
  434.                                  BslnBaselineRecord     oBaselineDeltas);
  435. EXTERN_API_C( OSStatus )
  436. ATSUSetAttributes               (ATSUStyle              iStyle,
  437.                                  ItemCount              iAttributeCount,
  438.                                  ATSUAttributeTag       iTag[],
  439.                                  ByteCount              iValueSize[],
  440.                                  ATSUAttributeValuePtr  iValue[]);
  441. EXTERN_API_C( OSStatus )
  442. ATSUGetAttribute                (ATSUStyle              iStyle,
  443.                                  ATSUAttributeTag       iTag,
  444.                                  ByteCount              iExpectedValueSize,
  445.                                  ATSUAttributeValuePtr  oValue,
  446.                                  ByteCount *            oActualValueSize);
  447. EXTERN_API_C( OSStatus )
  448. ATSUGetAllAttributes            (ATSUStyle              iStyle,
  449.                                  ATSUAttributeInfo      oAttributeInfoArray[],
  450.                                  ItemCount              iTagValuePairArraySize,
  451.                                  ItemCount *            oTagValuePairCount);
  452. EXTERN_API_C( OSStatus )
  453. ATSUClearAttributes             (ATSUStyle              iStyle,
  454.                                  ItemCount              iTagCount,
  455.                                  ATSUAttributeTag       iTag[]);
  456. /*  Font features   */
  457. EXTERN_API_C( OSStatus )
  458. ATSUSetFontFeatures             (ATSUStyle              iStyle,
  459.                                  ItemCount              iFeatureCount,
  460.                                  ATSUFontFeatureType    iType[],
  461.                                  ATSUFontFeatureSelector  iSelector[]);
  462. EXTERN_API_C( OSStatus )
  463. ATSUGetFontFeature              (ATSUStyle              iStyle,
  464.                                  ItemCount              iFeatureIndex,
  465.                                  ATSUFontFeatureType *  oFeatureType,
  466.                                  ATSUFontFeatureSelector * oFeatureSelector);
  467. EXTERN_API_C( OSStatus )
  468. ATSUGetAllFontFeatures          (ATSUStyle              iStyle,
  469.                                  ItemCount              iMaximumFeatureCount,
  470.                                  ATSUFontFeatureType    oFeatureType[],
  471.                                  ATSUFontFeatureSelector  oFeatureSelector[],
  472.                                  ItemCount *            oActualFeatureCount);
  473. EXTERN_API_C( OSStatus )
  474. ATSUClearFontFeatures           (ATSUStyle              iStyle,
  475.                                  ItemCount              iFeatureCount,
  476.                                  ATSUFontFeatureType    iType[],
  477.                                  ATSUFontFeatureSelector  iSelector[]);
  478. /*  Font variations */
  479. EXTERN_API_C( OSStatus )
  480. ATSUSetVariations               (ATSUStyle              iStyle,
  481.                                  ItemCount              iVariationCount,
  482.                                  ATSUFontVariationAxis  iAxes[],
  483.                                  ATSUFontVariationValue  iValue[]);
  484. EXTERN_API_C( OSStatus )
  485. ATSUGetFontVariationValue       (ATSUStyle              iStyle,
  486.                                  ATSUFontVariationAxis  iFontVariationAxis,
  487.                                  ATSUFontVariationValue * oFontVariationValue);
  488. EXTERN_API_C( OSStatus )
  489. ATSUGetAllFontVariations        (ATSUStyle              iStyle,
  490.                                  ItemCount              iVariationCount,
  491.                                  ATSUFontVariationAxis  oVariationAxes[],
  492.                                  ATSUFontVariationValue  oFontVariationValues[],
  493.                                  ItemCount *            oActualVariationCount);
  494. EXTERN_API_C( OSStatus )
  495. ATSUClearFontVariations         (ATSUStyle              iStyle,
  496.                                  ItemCount              iAxisCount,
  497.                                  ATSUFontVariationAxis  iAxis[]);
  498. /*  Basic text-layout functions */
  499. EXTERN_API_C( OSStatus )
  500. ATSUCreateTextLayout            (ATSUTextLayout *       oTextLayout);
  501. EXTERN_API_C( OSStatus )
  502. ATSUCreateAndCopyTextLayout     (ATSUTextLayout         iTextLayout,
  503.                                  ATSUTextLayout *       oTextLayout);
  504. EXTERN_API_C( OSStatus )
  505. ATSUCreateTextLayoutWithTextPtr (ConstUniCharArrayPtr   iText,
  506.                                  UniCharArrayOffset     iTextOffset,
  507.                                  UniCharCount           iTextLength,
  508.                                  UniCharCount           iTextTotalLength,
  509.                                  ItemCount              iNumberOfRuns,
  510.                                  UniCharCount           iRunLengths[],
  511.                                  ATSUStyle              iStyles[],
  512.                                  ATSUTextLayout *       oTextLayout);
  513. EXTERN_API_C( OSStatus )
  514. ATSUCreateTextLayoutWithTextHandle (UniCharArrayHandle  iText,
  515.                                  UniCharArrayOffset     iTextOffset,
  516.                                  UniCharCount           iTextLength,
  517.                                  UniCharCount           iTextTotalLength,
  518.                                  ItemCount              iNumberOfRuns,
  519.                                  UniCharCount           iRunLengths[],
  520.                                  ATSUStyle              iStyles[],
  521.                                  ATSUTextLayout *       oTextLayout);
  522. EXTERN_API_C( OSStatus )
  523. ATSUClearLayoutCache            (ATSUTextLayout         iTextLayout,
  524.                                  UniCharArrayOffset     iLineStart);
  525. EXTERN_API_C( OSStatus )
  526. ATSUDisposeTextLayout           (ATSUTextLayout         iTextLayout);
  527. EXTERN_API_C( OSStatus )
  528. ATSUSetTextLayoutRefCon         (ATSUTextLayout         iTextLayout,
  529.                                  UInt32                 iRefCon);
  530. EXTERN_API_C( OSStatus )
  531. ATSUGetTextLayoutRefCon         (ATSUTextLayout         iTextLayout,
  532.                                  UInt32 *               oRefCon);
  533. /*  Glyph bounds retrieval  */
  534. EXTERN_API_C( OSStatus )
  535. ATSUGetGlyphBounds              (ATSUTextLayout         iTextLayout,
  536.                                  ATSUTextMeasurement    iTextBasePointX,
  537.                                  ATSUTextMeasurement    iTextBasePointY,
  538.                                  UniCharArrayOffset     iBoundsCharStart,
  539.                                  UniCharCount           iBoundsCharLength,
  540.                                  UInt16                 iTypeOfBounds,
  541.                                  ItemCount              iMaxNumberOfBounds,
  542.                                  ATSTrapezoid           oGlyphBounds[],
  543.                                  ItemCount *            oActualNumberOfBounds);
  544. /*  Idle processing */
  545. EXTERN_API_C( OSStatus )
  546. ATSUIdle                        (ATSUTextLayout         iTextLayout);
  547. /*  Text location   */
  548. EXTERN_API_C( OSStatus )
  549. ATSUSetTextPointerLocation      (ATSUTextLayout         iTextLayout,
  550.                                  ConstUniCharArrayPtr   iText,
  551.                                  UniCharArrayOffset     iTextOffset,
  552.                                  UniCharCount           iTextLength,
  553.                                  UniCharCount           iTextTotalLength);
  554. EXTERN_API_C( OSStatus )
  555. ATSUSetTextHandleLocation       (ATSUTextLayout         iTextLayout,
  556.                                  UniCharArrayHandle     iText,
  557.                                  UniCharArrayOffset     iTextOffset,
  558.                                  UniCharCount           iTextLength,
  559.                                  UniCharCount           iTextTotalLength);
  560. EXTERN_API_C( OSStatus )
  561. ATSUGetTextLocation             (ATSUTextLayout         iTextLayout,
  562.                                  void **                oText,
  563.                                  Boolean *              oTextIsStoredInHandle,
  564.                                  UniCharArrayOffset *   oOffset,
  565.                                  UniCharCount *         oTextLength,
  566.                                  UniCharCount *         oTextTotalLength);
  567. /*  Text manipulation   */
  568. EXTERN_API_C( OSStatus )
  569. ATSUTextDeleted                 (ATSUTextLayout         iTextLayout,
  570.                                  UniCharArrayOffset     iDeletedRangeStart,
  571.                                  UniCharCount           iDeletedRangeLength);
  572. EXTERN_API_C( OSStatus )
  573. ATSUTextInserted                (ATSUTextLayout         iTextLayout,
  574.                                  UniCharArrayOffset     iInsertionLocation,
  575.                                  UniCharCount           iInsertionLength);
  576. EXTERN_API_C( OSStatus )
  577. ATSUTextMoved                   (ATSUTextLayout         iTextLayout,
  578.                                  ConstUniCharArrayPtr   iNewLocation);
  579. /*  Layout controls */
  580. EXTERN_API_C( OSStatus )
  581. ATSUCopyLayoutControls          (ATSUTextLayout         iSourceTextLayout,
  582.                                  ATSUTextLayout         iDestTextLayout);
  583. EXTERN_API_C( OSStatus )
  584. ATSUSetLayoutControls           (ATSUTextLayout         iTextLayout,
  585.                                  ItemCount              iAttributeCount,
  586.                                  ATSUAttributeTag       iTag[],
  587.                                  ByteCount              iValueSize[],
  588.                                  ATSUAttributeValuePtr  iValue[]);
  589. EXTERN_API_C( OSStatus )
  590. ATSUGetLayoutControl            (ATSUTextLayout         iTextLayout,
  591.                                  ATSUAttributeTag       iTag,
  592.                                  ByteCount              iExpectedValueSize,
  593.                                  ATSUAttributeValuePtr  oValue,
  594.                                  ByteCount *            oActualValueSize);
  595. EXTERN_API_C( OSStatus )
  596. ATSUGetAllLayoutControls        (ATSUTextLayout         iTextLayout,
  597.                                  ATSUAttributeInfo      oAttributeInfoArray[],
  598.                                  ItemCount              iTagValuePairArraySize,
  599.                                  ItemCount *            oTagValuePairCount);
  600. EXTERN_API_C( OSStatus )
  601. ATSUClearLayoutControls         (ATSUTextLayout         iTextLayout,
  602.                                  ItemCount              iTagCount,
  603.                                  ATSUAttributeTag       iTag[]);
  604. /*  Single line layout controls */
  605. EXTERN_API_C( OSStatus )
  606. ATSUCopyLineControls            (ATSUTextLayout         iSourceTextLayout,
  607.                                  UniCharArrayOffset     iSourceLineStart,
  608.                                  ATSUTextLayout         iDestTextLayout,
  609.                                  UniCharArrayOffset     iDestLineStart);
  610. EXTERN_API_C( OSStatus )
  611. ATSUSetLineControls             (ATSUTextLayout         iTextLayout,
  612.                                  UniCharArrayOffset     iLineStart,
  613.                                  ItemCount              iAttributeCount,
  614.                                  ATSUAttributeTag       iTag[],
  615.                                  ByteCount              iValueSize[],
  616.                                  ATSUAttributeValuePtr  iValue[]);
  617. EXTERN_API_C( OSStatus )
  618. ATSUGetLineControl              (ATSUTextLayout         iTextLayout,
  619.                                  UniCharArrayOffset     iLineStart,
  620.                                  ATSUAttributeTag       iTag,
  621.                                  ByteCount              iExpectedValueSize,
  622.                                  ATSUAttributeValuePtr  oValue,
  623.                                  ByteCount *            oActualValueSize);
  624. EXTERN_API_C( OSStatus )
  625. ATSUGetAllLineControls          (ATSUTextLayout         iTextLayout,
  626.                                  UniCharArrayOffset     iLineStart,
  627.                                  ATSUAttributeInfo      oAttributeInfoArray[],
  628.                                  ItemCount              iTagValuePairArraySize,
  629.                                  ItemCount *            oTagValuePairCount);
  630. EXTERN_API_C( OSStatus )
  631. ATSUClearLineControls           (ATSUTextLayout         iTextLayout,
  632.                                  UniCharArrayOffset     iLineStart,
  633.                                  ItemCount              iTagCount,
  634.                                  ATSUAttributeTag       iTag[]);
  635. /*  Style run processing    */
  636. EXTERN_API_C( OSStatus )
  637. ATSUSetRunStyle                 (ATSUTextLayout         iTextLayout,
  638.                                  ATSUStyle              iStyle,
  639.                                  UniCharArrayOffset     iRunStart,
  640.                                  UniCharCount           iRunLength);
  641. EXTERN_API_C( OSStatus )
  642. ATSUGetRunStyle                 (ATSUTextLayout         iTextLayout,
  643.                                  UniCharArrayOffset     iOffset,
  644.                                  ATSUStyle *            oStyle,
  645.                                  UniCharArrayOffset *   oRunStart,
  646.                                  UniCharCount *         oRunLength);
  647. EXTERN_API_C( OSStatus )
  648. ATSUGetContinuousAttributes     (ATSUTextLayout         iTextLayout,
  649.                                  UniCharArrayOffset     iOffset,
  650.                                  UniCharCount           iLength,
  651.                                  ATSUStyle              oStyle);
  652. /*  Drawing and measuring   */
  653. EXTERN_API_C( OSStatus )
  654. ATSUDrawText                    (ATSUTextLayout         iTextLayout,
  655.                                  UniCharArrayOffset     iLineOffset,
  656.                                  UniCharCount           iLineLength,
  657.                                  ATSUTextMeasurement    iLocationX,
  658.                                  ATSUTextMeasurement    iLocationY);
  659. EXTERN_API_C( OSStatus )
  660. ATSUMeasureText                 (ATSUTextLayout         iTextLayout,
  661.                                  UniCharArrayOffset     iLineStart,
  662.                                  UniCharCount           iLineLength,
  663.                                  ATSUTextMeasurement *  oTextBefore,
  664.                                  ATSUTextMeasurement *  oTextAfter,
  665.                                  ATSUTextMeasurement *  oAscent,
  666.                                  ATSUTextMeasurement *  oDescent);
  667. EXTERN_API_C( OSStatus )
  668. ATSUMeasureTextImage            (ATSUTextLayout         iTextLayout,
  669.                                  UniCharArrayOffset     iLineOffset,
  670.                                  UniCharCount           iLineLength,
  671.                                  ATSUTextMeasurement    iLocationX,
  672.                                  ATSUTextMeasurement    iLocationY,
  673.                                  Rect *                 oTextImageRect);
  674. /*  Highlighting    */
  675. EXTERN_API_C( OSStatus )
  676. ATSUHighlightText               (ATSUTextLayout         iTextLayout,
  677.                                  ATSUTextMeasurement    iTextBasePointX,
  678.                                  ATSUTextMeasurement    iTextBasePointY,
  679.                                  UniCharArrayOffset     iHighlightStart,
  680.                                  UniCharCount           iHighlightLength);
  681. EXTERN_API_C( OSStatus )
  682. ATSUUnhighlightText             (ATSUTextLayout         iTextLayout,
  683.                                  ATSUTextMeasurement    iTextBasePointX,
  684.                                  ATSUTextMeasurement    iTextBasePointY,
  685.                                  UniCharArrayOffset     iHighlightStart,
  686.                                  UniCharCount           iHighlightLength);
  687. EXTERN_API_C( OSStatus )
  688. ATSUGetTextHighlight            (ATSUTextLayout         iTextLayout,
  689.                                  ATSUTextMeasurement    iTextBasePointX,
  690.                                  ATSUTextMeasurement    iTextBasePointY,
  691.                                  UniCharArrayOffset     iHighlightStart,
  692.                                  UniCharCount           iHighlightLength,
  693.                                  RgnHandle              oHighlightRegion);
  694. /*  Hit-testing */
  695. EXTERN_API_C( OSStatus )
  696. ATSUPositionToOffset            (ATSUTextLayout         iTextLayout,
  697.                                  ATSUTextMeasurement    iLocationX,
  698.                                  ATSUTextMeasurement    iLocationY,
  699.                                  UniCharArrayOffset *   ioPrimaryOffset,
  700.                                  Boolean *              oIsLeading,
  701.                                  UniCharArrayOffset *   oSecondaryOffset);
  702. EXTERN_API_C( OSStatus )
  703. ATSUOffsetToPosition            (ATSUTextLayout         iTextLayout,
  704.                                  UniCharArrayOffset     iOffset,
  705.                                  Boolean                iIsLeading,
  706.                                  ATSUCaret *            oMainCaret,
  707.                                  ATSUCaret *            oSecondCaret,
  708.                                  Boolean *              oCaretIsSplit);
  709. /*  Cursor movement */
  710. EXTERN_API_C( OSStatus )
  711. ATSUNextCursorPosition          (ATSUTextLayout         iTextLayout,
  712.                                  UniCharArrayOffset     iOldOffset,
  713.                                  ATSUCursorMovementType  iMovementType,
  714.                                  UniCharArrayOffset *   oNewOffset);
  715. EXTERN_API_C( OSStatus )
  716. ATSUPreviousCursorPosition      (ATSUTextLayout         iTextLayout,
  717.                                  UniCharArrayOffset     iOldOffset,
  718.                                  ATSUCursorMovementType  iMovementType,
  719.                                  UniCharArrayOffset *   oNewOffset);
  720. EXTERN_API_C( OSStatus )
  721. ATSURightwardCursorPosition     (ATSUTextLayout         iTextLayout,
  722.                                  UniCharArrayOffset     iOldOffset,
  723.                                  ATSUCursorMovementType  iMovementType,
  724.                                  UniCharArrayOffset *   oNewOffset);
  725. EXTERN_API_C( OSStatus )
  726. ATSULeftwardCursorPosition      (ATSUTextLayout         iTextLayout,
  727.                                  UniCharArrayOffset     iOldOffset,
  728.                                  ATSUCursorMovementType  iMovementType,
  729.                                  UniCharArrayOffset *   oNewOffset);
  730. /*  Line breaking   */
  731. EXTERN_API_C( OSStatus )
  732. ATSUBreakLine                   (ATSUTextLayout         iTextLayout,
  733.                                  UniCharArrayOffset     iLineStart,
  734.                                  ATSUTextMeasurement    iLineWidth,
  735.                                  Boolean                iUseAsSoftLineBreak,
  736.                                  UniCharArrayOffset *   oLineBreak);
  737. EXTERN_API_C( OSStatus )
  738. ATSUSetSoftLineBreak            (ATSUTextLayout         iTextLayout,
  739.                                  UniCharArrayOffset     iLineBreak);
  740. EXTERN_API_C( OSStatus )
  741. ATSUGetSoftLineBreaks           (ATSUTextLayout         iTextLayout,
  742.                                  UniCharArrayOffset     iRangeStart,
  743.                                  UniCharCount           iRangeLength,
  744.                                  ItemCount              iMaximumBreaks,
  745.                                  UniCharArrayOffset     oBreaks[],
  746.                                  ItemCount *            oBreakCount);
  747. EXTERN_API_C( OSStatus )
  748. ATSUClearSoftLineBreaks         (ATSUTextLayout         iTextLayout,
  749.                                  UniCharArrayOffset     iRangeStart,
  750.                                  UniCharCount           iRangeLength);
  751. /*  Font matching   */
  752. EXTERN_API_C( OSStatus )
  753. ATSUSetFontFallbacks            (ItemCount              iFontFallbacksCount,
  754.                                  ATSUFontID             iFontIDs[],
  755.                                  ATSUFontFallbackMethod  iFontFallbackMethod);
  756. EXTERN_API_C( OSStatus )
  757. ATSUGetFontFallbacks            (ItemCount              iMaxFontFallbacksCount,
  758.                                  ATSUFontID             oFontIDs[],
  759.                                  ATSUFontFallbackMethod * oFontFallbackMethod,
  760.                                  ItemCount *            oActualFallbacksCount);
  761. EXTERN_API_C( OSStatus )
  762. ATSUMatchFontsToText            (ATSUTextLayout         iTextLayout,
  763.                                  UniCharArrayOffset     iTextStart,
  764.                                  UniCharCount           iTextLength,
  765.                                  ATSUFontID *           oFontID,
  766.                                  UniCharArrayOffset *   oChangedOffset,
  767.                                  UniCharCount *         oChangedLength);
  768. EXTERN_API_C( OSStatus )
  769. ATSUSetTransientFontMatching    (ATSUTextLayout         iTextLayout,
  770.                                  Boolean                iTransientFontMatching);
  771. EXTERN_API_C( OSStatus )
  772. ATSUGetTransientFontMatching    (ATSUTextLayout         iTextLayout,
  773.                                  Boolean *              oTransientFontMatching);
  774. /*  Font ID's   */
  775. EXTERN_API_C( OSStatus )
  776. ATSUFontCount                   (ItemCount *            oFontCount);
  777. EXTERN_API_C( OSStatus )
  778. ATSUGetFontIDs                  (ATSUFontID             oFontIDs[],
  779.                                  ItemCount              iArraySize,
  780.                                  ItemCount *            oFontCount);
  781. EXTERN_API_C( OSStatus )
  782. ATSUFONDtoFontID                (short                  iFONDNumber,
  783.                                  Style                  iFONDStyle,
  784.                                  ATSUFontID *           oFontID);
  785. EXTERN_API_C( OSStatus )
  786. ATSUFontIDtoFOND                (ATSUFontID             iFontID,
  787.                                  short *                oFONDNumber,
  788.                                  Style *                oFONDStyle);
  789. /*  Font names  */
  790. EXTERN_API_C( OSStatus )
  791. ATSUCountFontNames              (ATSUFontID             iFontID,
  792.                                  ItemCount *            oFontNameCount);
  793. EXTERN_API_C( OSStatus )
  794. ATSUGetIndFontName              (ATSUFontID             iFontID,
  795.                                  ItemCount              iFontNameIndex,
  796.                                  ByteCount              iMaximumNameLength,
  797.                                  Ptr                    oName,
  798.                                  ByteCount *            oActualNameLength,
  799.                                  FontNameCode *         oFontNameCode,
  800.                                  FontPlatformCode *     oFontNamePlatform,
  801.                                  FontScriptCode *       oFontNameScript,
  802.                                  FontLanguageCode *     oFontNameLanguage);
  803. EXTERN_API_C( OSStatus )
  804. ATSUFindFontName                (ATSUFontID             iFontID,
  805.                                  FontNameCode           iFontNameCode,
  806.                                  FontPlatformCode       iFontNamePlatform,
  807.                                  FontScriptCode         iFontNameScript,
  808.                                  FontLanguageCode       iFontNameLanguage,
  809.                                  ByteCount              iMaximumNameLength,
  810.                                  Ptr                    oName,
  811.                                  ByteCount *            oActualNameLength,
  812.                                  ItemCount *            oFontNameIndex);
  813. EXTERN_API_C( OSStatus )
  814. ATSUFindFontFromName            (Ptr                    iName,
  815.                                  ByteCount              iNameLength,
  816.                                  FontNameCode           iFontNameCode,
  817.                                  FontPlatformCode       iFontNamePlatform,
  818.                                  FontScriptCode         iFontNameScript,
  819.                                  FontLanguageCode       iFontNameLanguage,
  820.                                  ATSUFontID *           oFontID);
  821. /*  Font features   */
  822. EXTERN_API_C( OSStatus )
  823. ATSUCountFontFeatureTypes       (ATSUFontID             iFontID,
  824.                                  ItemCount *            oTypeCount);
  825. EXTERN_API_C( OSStatus )
  826. ATSUCountFontFeatureSelectors   (ATSUFontID             iFontID,
  827.                                  ATSUFontFeatureType    iType,
  828.                                  ItemCount *            oSelectorCount);
  829. EXTERN_API_C( OSStatus )
  830. ATSUGetFontFeatureTypes         (ATSUFontID             iFontID,
  831.                                  ItemCount              iMaximumTypes,
  832.                                  ATSUFontFeatureType    oTypes[],
  833.                                  ItemCount *            oActualTypeCount);
  834. EXTERN_API_C( OSStatus )
  835. ATSUGetFontFeatureSelectors     (ATSUFontID             iFontID,
  836.                                  ATSUFontFeatureType    iType,
  837.                                  ItemCount              iMaximumSelectors,
  838.                                  ATSUFontFeatureSelector  oSelectors[],
  839.                                  Boolean                oSelectorIsOnByDefault[],
  840.                                  ItemCount *            oActualSelectorCount,
  841.                                  Boolean *              oIsMutuallyExclusive);
  842. EXTERN_API_C( OSStatus )
  843. ATSUGetFontFeatureNameCode      (ATSUFontID             iFontID,
  844.                                  ATSUFontFeatureType    iType,
  845.                                  ATSUFontFeatureSelector  iSelector,
  846.                                  FontNameCode *         oNameCode);
  847. /*  Font tracking value & names */
  848. EXTERN_API_C( OSStatus )
  849. ATSUCountFontTracking           (ATSUFontID             iFontID,
  850.                                  ATSUVerticalCharacterType  iCharacterOrientation,
  851.                                  ItemCount *            oTrackingCount);
  852. EXTERN_API_C( OSStatus )
  853. ATSUGetIndFontTracking          (ATSUFontID             iFontID,
  854.                                  ATSUVerticalCharacterType  iCharacterOrientation,
  855.                                  ItemCount              iTrackIndex,
  856.                                  Fixed *                oFontTrackingValue,
  857.                                  FontNameCode *         oNameCode);
  858. /*  Font variations */
  859. EXTERN_API_C( OSStatus )
  860. ATSUCountFontVariations         (ATSUFontID             iFontID,
  861.                                  ItemCount *            oVariationCount);
  862. EXTERN_API_C( OSStatus )
  863. ATSUGetIndFontVariation         (ATSUFontID             iFontID,
  864.                                  ItemCount              iVariationIndex,
  865.                                  ATSUFontVariationAxis * oATSUFontVariationAxis,
  866.                                  ATSUFontVariationValue * oMinimumValue,
  867.                                  ATSUFontVariationValue * oMaximumValue,
  868.                                  ATSUFontVariationValue * oDefaultValue);
  869. EXTERN_API_C( OSStatus )
  870. ATSUGetFontVariationNameCode    (ATSUFontID             iFontID,
  871.                                  ATSUFontVariationAxis  iAxis,
  872.                                  FontNameCode *         oNameCode);
  873. /*  Font Instances  */
  874. EXTERN_API_C( OSStatus )
  875. ATSUCountFontInstances          (ATSUFontID             iFontID,
  876.                                  ItemCount *            oInstances);
  877. EXTERN_API_C( OSStatus )
  878. ATSUGetFontInstance             (ATSUFontID             iFontID,
  879.                                  ItemCount              iFontInstanceIndex,
  880.                                  ItemCount              iMaximumVariations,
  881.                                  ATSUFontVariationAxis  oAxes[],
  882.                                  ATSUFontVariationValue  oValues[],
  883.                                  ItemCount *            oActualVariationCount);
  884. EXTERN_API_C( OSStatus )
  885. ATSUGetFontInstanceNameCode     (ATSUFontID             iFontID,
  886.                                  ItemCount              iInstanceIndex,
  887.                                  FontNameCode *         oNameCode);
  888. #if PRAGMA_STRUCT_ALIGN
  889.     #pragma options align=reset
  890. #elif PRAGMA_STRUCT_PACKPUSH
  891.     #pragma pack(pop)
  892. #elif PRAGMA_STRUCT_PACK
  893.     #pragma pack()
  894. #endif
  895. #ifdef PRAGMA_IMPORT_OFF
  896. #pragma import off
  897. #elif PRAGMA_IMPORT
  898. #pragma import reset
  899. #endif
  900. #ifdef __cplusplus
  901. }
  902. #endif
  903. #endif /* __ATSUNICODE__ */