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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       GXLayout.h
  3.  
  4.      Contains:   QuickDraw GX layout routine interfaces.
  5.  
  6.      Version:    Technology: Quickdraw GX 1.1
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1994-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 __GXLAYOUT__
  18. #define __GXLAYOUT__
  19. #ifndef __CONDITIONALMACROS__
  20. #include "ConditionalMacros.h"
  21. #endif
  22. #ifndef __GXTYPES__
  23. #include "GXTypes.h"
  24. #endif
  25. #if PRAGMA_ONCE
  26. #pragma once
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #if PRAGMA_IMPORT
  32. #pragma import on
  33. #endif
  34. #if PRAGMA_STRUCT_ALIGN
  35.     #pragma options align=mac68k
  36. #elif PRAGMA_STRUCT_PACKPUSH
  37.     #pragma pack(push, 2)
  38. #elif PRAGMA_STRUCT_PACK
  39.     #pragma pack(2)
  40. #endif
  41. #if defined(__MWERKS__) && TARGET_CPU_68K
  42.     #pragma push
  43.     #pragma pointers_in_D0
  44. #endif
  45.  
  46. #if CALL_NOT_IN_CARBON
  47. EXTERN_API_C( gxShape )
  48. GXNewLayout                     (long                   textRunCount,
  49.                                  const short            textRunLengths[],
  50.                                  const void *           text[],
  51.                                  long                   styleRunCount,
  52.                                  const short            styleRunLengths[],
  53.                                  const gxStyle          styles[],
  54.                                  long                   levelRunCount,
  55.                                  const short            levelRunLengths[],
  56.                                  const short            levels[],
  57.                                  const gxLayoutOptions * layoutOptions,
  58.                                  const gxPoint *        position)                           THREEWORDINLINE(0x303C, 0x0000, 0xA832);
  59. EXTERN_API_C( long )
  60. GXGetLayout                     (gxShape                layout,
  61.                                  void *                 text,
  62.                                  long *                 styleRunCount,
  63.                                  short                  styleRunLengths[],
  64.                                  gxStyle                styles[],
  65.                                  long *                 levelRunCount,
  66.                                  short                  levelRunLengths[],
  67.                                  short                  levels[],
  68.                                  gxLayoutOptions *      layoutOptions,
  69.                                  gxPoint *              position)                           THREEWORDINLINE(0x303C, 0x0001, 0xA832);
  70. EXTERN_API_C( void )
  71. GXSetLayout                     (gxShape                layout,
  72.                                  long                   textRunCount,
  73.                                  const short            textRunLengths[],
  74.                                  const void *           text[],
  75.                                  long                   styleRunCount,
  76.                                  const short            styleRunLengths[],
  77.                                  const gxStyle          styles[],
  78.                                  long                   levelRunCount,
  79.                                  const short            levelRunLengths[],
  80.                                  const short            levels[],
  81.                                  const gxLayoutOptions * layoutOptions,
  82.                                  const gxPoint *        position)                           THREEWORDINLINE(0x303C, 0x0002, 0xA832);
  83. EXTERN_API_C( void )
  84. GXDrawLayout                    (long                   textRunCount,
  85.                                  const short            textRunLengths[],
  86.                                  const void *           text[],
  87.                                  long                   styleRunCount,
  88.                                  const short            styleRunLengths[],
  89.                                  const gxStyle          styles[],
  90.                                  long                   levelRunCount,
  91.                                  const short            levelRunLengths[],
  92.                                  const short            levels[],
  93.                                  const gxLayoutOptions * layoutOptions,
  94.                                  const gxPoint *        position)                           THREEWORDINLINE(0x303C, 0x0003, 0xA832);
  95. EXTERN_API_C( void )
  96. GXSetLayoutParts                (gxShape                layout,
  97.                                  gxByteOffset           oldStartOffset,
  98.                                  gxByteOffset           oldEndOffset,
  99.                                  long                   newTextRunCount,
  100.                                  const short            newTextRunLengths[],
  101.                                  const void *           newText[],
  102.                                  long                   newStyleRunCount,
  103.                                  const short            newStyleRunLengths[],
  104.                                  const gxStyle          newStyles[],
  105.                                  long                   newLevelRunCount,
  106.                                  const short            newLevelRunLengths[],
  107.                                  const short            newLevels[])                          THREEWORDINLINE(0x303C, 0x0004, 0xA832);
  108. EXTERN_API_C( void )
  109. GXSetLayoutShapeParts           (gxShape                layout,
  110.                                  gxByteOffset           startOffset,
  111.                                  gxByteOffset           endOffset,
  112.                                  gxShape                insert)                             THREEWORDINLINE(0x303C, 0x0005, 0xA832);
  113. EXTERN_API_C( long )
  114. GXGetLayoutParts                (gxShape                layout,
  115.                                  gxByteOffset           startOffset,
  116.                                  gxByteOffset           endOffset,
  117.                                  void *                 text,
  118.                                  long *                 styleRunCount,
  119.                                  short                  styleRunLengths[],
  120.                                  gxStyle                styles[],
  121.                                  long *                 levelRunCount,
  122.                                  short                  levelRunLengths[],
  123.                                  short                  levels[])                             THREEWORDINLINE(0x303C, 0x0006, 0xA832);
  124. EXTERN_API_C( gxShape )
  125. GXGetLayoutShapeParts           (gxShape                layout,
  126.                                  gxByteOffset           startOffset,
  127.                                  gxByteOffset           endOffset,
  128.                                  gxShape                dest)                               THREEWORDINLINE(0x303C, 0x0007, 0xA832);
  129. EXTERN_API_C( long )
  130. GXGetLayoutGlyphs               (gxShape                layout,
  131.                                  gxGlyphcode *          glyphs,
  132.                                  gxPoint                positions[],
  133.                                  long                   advance[],
  134.                                  gxPoint                tangents[],
  135.                                  long *                 runCount,
  136.                                  short                  styleRuns[],
  137.                                  gxStyle                glyphStyles[])                        THREEWORDINLINE(0x303C, 0x0008, 0xA832);
  138. EXTERN_API_C( gxByteOffset )
  139. GXHitTestLayout                 (gxShape                layout,
  140.                                  const gxPoint *        hitDown,
  141.                                  gxHighlightType        highlightType,
  142.                                  gxLayoutHitInfo *      hitInfo,
  143.                                  gxShape                hitTrackingArea)                    THREEWORDINLINE(0x303C, 0x0009, 0xA832);
  144. EXTERN_API_C( gxShape )
  145. GXGetLayoutHighlight            (gxShape                layout,
  146.                                  gxByteOffset           startOffset,
  147.                                  gxByteOffset           endOffset,
  148.                                  gxHighlightType        highlightType,
  149.                                  gxShape                highlight)                          THREEWORDINLINE(0x303C, 0x000A, 0xA832);
  150. EXTERN_API_C( gxShape )
  151. GXGetLayoutVisualHighlight      (gxShape                layout,
  152.                                  gxByteOffset           startOffset,
  153.                                  long                   startLeadingEdge,
  154.                                  gxByteOffset           endOffset,
  155.                                  long                   endLeadingEdge,
  156.                                  gxHighlightType        highlightType,
  157.                                  gxShape                highlight)                          THREEWORDINLINE(0x303C, 0x000B, 0xA832);
  158. EXTERN_API_C( gxShape )
  159. GXGetLayoutCaret                (gxShape                layout,
  160.                                  gxByteOffset           offset,
  161.                                  gxHighlightType        highlightType,
  162.                                  gxCaretType            caretType,
  163.                                  gxShape                caret)                              THREEWORDINLINE(0x303C, 0x000C, 0xA832);
  164. EXTERN_API_C( gxByteOffset )
  165. GXGetLayoutBreakOffset          (gxShape                layout,
  166.                                  gxByteOffset           startOffset,
  167.                                  Fixed                  lineWidth,
  168.                                  long                   hyphenationCount,
  169.                                  const gxByteOffset     hyphenationPoints[],
  170.                                  Boolean *              startIsStaked,
  171.                                  gxByteOffset *         priorStake,
  172.                                  gxByteOffset *         nextStake)                          THREEWORDINLINE(0x303C, 0x000D, 0xA832);
  173. EXTERN_API_C( Fixed )
  174. GXGetLayoutRangeWidth           (gxShape                layout,
  175.                                  gxByteOffset           startOffset,
  176.                                  gxByteOffset           endOffset,
  177.                                  gxShape                supplementaryText)                  THREEWORDINLINE(0x303C, 0x000E, 0xA832);
  178. EXTERN_API_C( gxShape )
  179. GXNewLayoutFromRange            (gxShape                layout,
  180.                                  gxByteOffset           startOffset,
  181.                                  gxByteOffset           endOffset,
  182.                                  const gxLayoutOptions * layoutOptions,
  183.                                  gxShape                supplementaryText)                  THREEWORDINLINE(0x303C, 0x000F, 0xA832);
  184. EXTERN_API_C( gxShape )
  185. GXGetCaretAngleArea             (gxShape                layout,
  186.                                  const gxPoint *        hitPoint,
  187.                                  gxHighlightType        highlightType,
  188.                                  gxShape                caretArea,
  189.                                  short *                returnedRise,
  190.                                  short *                returnedRun)                        THREEWORDINLINE(0x303C, 0x0010, 0xA832);
  191. EXTERN_API_C( void )
  192. GXGetStyleBaselineDeltas        (gxStyle                baseStyle,
  193.                                  gxBaselineType         baseType,
  194.                                  gxBaselineDeltas       returnedDeltas)                     THREEWORDINLINE(0x303C, 0x0011, 0xA832);
  195. EXTERN_API_C( gxByteOffset )
  196. GXGetRightVisualOffset          (gxShape                layout,
  197.                                  gxByteOffset           currentOffset)                      THREEWORDINLINE(0x303C, 0x0012, 0xA832);
  198. EXTERN_API_C( gxByteOffset )
  199. GXGetLeftVisualOffset           (gxShape                layout,
  200.                                  gxByteOffset           currentOffset)                      THREEWORDINLINE(0x303C, 0x0013, 0xA832);
  201. EXTERN_API_C( void )
  202. GXGetCompoundCharacterLimits    (gxShape                layout,
  203.                                  gxByteOffset           trial,
  204.                                  gxByteOffset *         minOffset,
  205.                                  gxByteOffset *         maxOffset,
  206.                                  Boolean *              onBoundary)                         THREEWORDINLINE(0x303C, 0x0014, 0xA832);
  207. EXTERN_API_C( void )
  208. GXGetOffsetGlyphs               (gxShape                layout,
  209.                                  gxByteOffset           trial,
  210.                                  long                   leadingEdge,
  211.                                  gxLayoutOffsetState *  offsetState,
  212.                                  unsigned short *       firstGlyph,
  213.                                  unsigned short *       secondGlyph)                        THREEWORDINLINE(0x303C, 0x0015, 0xA832);
  214. EXTERN_API_C( void )
  215. GXGetGlyphOffset                (gxShape                layout,
  216.                                  long                   trial,
  217.                                  long                   onLeftTop,
  218.                                  gxByteOffset *         offset,
  219.                                  Boolean *              leadingEdge,
  220.                                  Boolean *              wasRealCharacter)                   THREEWORDINLINE(0x303C, 0x0016, 0xA832);
  221. EXTERN_API_C( void )
  222. GXGetLayoutSpan                 (gxShape                layout,
  223.                                  Fixed *                lineAscent,
  224.                                  Fixed *                lineDescent)                        THREEWORDINLINE(0x303C, 0x0017, 0xA832);
  225. EXTERN_API_C( void )
  226. GXSetLayoutSpan                 (gxShape                layout,
  227.                                  Fixed                  lineAscent,
  228.                                  Fixed                  lineDescent)                        THREEWORDINLINE(0x303C, 0x0018, 0xA832);
  229. EXTERN_API_C( Fixed )
  230. GXGetLayoutJustificationGap     (gxShape                layout)                             THREEWORDINLINE(0x303C, 0x0279, 0xA832);
  231. EXTERN_API_C( void )
  232. GXGetLayoutJustificationFactors (gxShape                layout,
  233.                                  Fixed                  constrainedFactors[],
  234.                                  Fixed                  unconstrainedFactors[])               THREEWORDINLINE(0x303C, 0x027A, 0xA832);
  235. EXTERN_API_C( void )
  236. GXSetStyleRunControls           (gxStyle                target,
  237.                                  const gxRunControls *  runControls)                        THREEWORDINLINE(0x303C, 0x0019, 0xA832);
  238. EXTERN_API_C( void )
  239. GXSetStyleRunPriorityJustOverride (gxStyle              target,
  240.                                  const gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x001A, 0xA832);
  241. EXTERN_API_C( void )
  242. GXSetStyleRunGlyphJustOverrides (gxStyle                target,
  243.                                  long                   count,
  244.                                  const gxGlyphJustificationOverride  glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x001B, 0xA832);
  245. EXTERN_API_C( void )
  246. GXSetStyleRunGlyphSubstitutions (gxStyle                target,
  247.                                  long                   count,
  248.                                  const gxGlyphSubstitution  glyphSubstitutions[])             THREEWORDINLINE(0x303C, 0x001C, 0xA832);
  249. EXTERN_API_C( void )
  250. GXSetStyleRunFeatures           (gxStyle                target,
  251.                                  long                   count,
  252.                                  const gxRunFeature     runFeatures[])                        THREEWORDINLINE(0x303C, 0x001D, 0xA832);
  253. EXTERN_API_C( void )
  254. GXSetStyleRunKerningAdjustments (gxStyle                target,
  255.                                  long                   count,
  256.                                  const gxKerningAdjustment  kerningAdjustments[])             THREEWORDINLINE(0x303C, 0x001E, 0xA832);
  257. EXTERN_API_C( void )
  258. GXSetShapeRunControls           (gxShape                target,
  259.                                  const gxRunControls *  runControls)                        THREEWORDINLINE(0x303C, 0x001F, 0xA832);
  260. EXTERN_API_C( void )
  261. GXSetShapeRunPriorityJustOverride (gxShape              target,
  262.                                  const gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x0020, 0xA832);
  263. EXTERN_API_C( void )
  264. GXSetShapeRunGlyphJustOverrides (gxShape                target,
  265.                                  long                   count,
  266.                                  const gxGlyphJustificationOverride  glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x0021, 0xA832);
  267. EXTERN_API_C( void )
  268. GXSetShapeRunGlyphSubstitutions (gxShape                target,
  269.                                  long                   count,
  270.                                  const gxGlyphSubstitution  glyphSubstitutions[])             THREEWORDINLINE(0x303C, 0x0022, 0xA832);
  271. EXTERN_API_C( void )
  272. GXSetShapeRunFeatures           (gxShape                target,
  273.                                  long                   count,
  274.                                  const gxRunFeature     runFeatures[])                        THREEWORDINLINE(0x303C, 0x0023, 0xA832);
  275. EXTERN_API_C( void )
  276. GXSetShapeRunKerningAdjustments (gxShape                target,
  277.                                  long                   count,
  278.                                  const gxKerningAdjustment  kerningAdjustments[])             THREEWORDINLINE(0x303C, 0x0024, 0xA832);
  279. EXTERN_API_C( long )
  280. GXGetStyleRunControls           (gxStyle                source,
  281.                                  gxRunControls *        runControls)                        THREEWORDINLINE(0x303C, 0x0025, 0xA832);
  282. EXTERN_API_C( long )
  283. GXGetStyleRunPriorityJustOverride (gxStyle              source,
  284.                                  gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x0026, 0xA832);
  285. EXTERN_API_C( long )
  286. GXGetStyleRunGlyphJustOverrides (gxStyle                source,
  287.                                  gxGlyphJustificationOverride  glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x0027, 0xA832);
  288. EXTERN_API_C( long )
  289. GXGetStyleRunGlyphSubstitutions (gxStyle                source,
  290.                                  gxGlyphSubstitution    glyphSubstitutions[])                 THREEWORDINLINE(0x303C, 0x0028, 0xA832);
  291. EXTERN_API_C( long )
  292. GXGetStyleRunFeatures           (gxStyle                source,
  293.                                  gxRunFeature           runFeatures[])                        THREEWORDINLINE(0x303C, 0x0029, 0xA832);
  294. EXTERN_API_C( long )
  295. GXGetStyleRunKerningAdjustments (gxStyle                source,
  296.                                  gxKerningAdjustment    kerningAdjustments[])                 THREEWORDINLINE(0x303C, 0x002A, 0xA832);
  297. EXTERN_API_C( long )
  298. GXGetShapeRunControls           (gxShape                source,
  299.                                  gxRunControls *        runControls)                        THREEWORDINLINE(0x303C, 0x002B, 0xA832);
  300. EXTERN_API_C( long )
  301. GXGetShapeRunPriorityJustOverride (gxShape              source,
  302.                                  gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x002C, 0xA832);
  303. EXTERN_API_C( long )
  304. GXGetShapeRunGlyphJustOverrides (gxShape                source,
  305.                                  gxGlyphJustificationOverride  glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x002D, 0xA832);
  306. EXTERN_API_C( long )
  307. GXGetShapeRunGlyphSubstitutions (gxShape                source,
  308.                                  gxGlyphSubstitution    glyphSubstitutions[])                 THREEWORDINLINE(0x303C, 0x002E, 0xA832);
  309. EXTERN_API_C( long )
  310. GXGetShapeRunFeatures           (gxShape                source,
  311.                                  gxRunFeature           runFeatures[])                        THREEWORDINLINE(0x303C, 0x002F, 0xA832);
  312. EXTERN_API_C( long )
  313. GXGetShapeRunKerningAdjustments (gxShape                source,
  314.                                  gxKerningAdjustment    kerningAdjustments[])                 THREEWORDINLINE(0x303C, 0x0030, 0xA832);
  315. #endif  /* CALL_NOT_IN_CARBON */
  316.  
  317. #if defined(__MWERKS__) && TARGET_CPU_68K
  318.     #pragma pop
  319. #endif
  320. #if PRAGMA_STRUCT_ALIGN
  321.     #pragma options align=reset
  322. #elif PRAGMA_STRUCT_PACKPUSH
  323.     #pragma pack(pop)
  324. #elif PRAGMA_STRUCT_PACK
  325.     #pragma pack()
  326. #endif
  327. #ifdef PRAGMA_IMPORT_OFF
  328. #pragma import off
  329. #elif PRAGMA_IMPORT
  330. #pragma import reset
  331. #endif
  332. #ifdef __cplusplus
  333. }
  334. #endif
  335. #endif /* __GXLAYOUT__ */