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

多媒体编程

开发平台:

Visual C++

  1. EXTERN_API( GrafPtr )
  2. GetHWNDPort                     (void *                 theHWND);
  3. #define GetPortHWND(port)  (HWND)GetPortNativeWindow(port)
  4. #define GetHWNDPort(theHWND) GetNativeWindowPort(theHWND)
  5. EXTERN_API( void *)
  6. GetPortHDC                      (GrafPtr                port);
  7. EXTERN_API( void *)
  8. GetPortHBITMAP                  (GrafPtr                port);
  9. EXTERN_API( void *)
  10. GetPortHPALETTE                 (GrafPtr                port);
  11. EXTERN_API( void *)
  12. GetPortHFONT                    (GrafPtr                port);
  13. EXTERN_API( void *)
  14. GetDIBFromPICT                  (PicHandle              hPict);
  15. EXTERN_API( PicHandle )
  16. GetPICTFromDIB                  (void *                 h);
  17. #endif  /* CALL_NOT_IN_CARBON */
  18. #endif  /* TARGET_OS_WIN32 */
  19. #if TARGET_OS_MAC
  20.     #define MacSetPort SetPort
  21. #endif
  22. EXTERN_API( void )
  23. MacSetPort                      (GrafPtr                port)                               ONEWORDINLINE(0xA873);
  24. EXTERN_API( void )
  25. GetPort                         (GrafPtr *              port)                               ONEWORDINLINE(0xA874);
  26. EXTERN_API( void )
  27. GrafDevice                      (short                  device)                             ONEWORDINLINE(0xA872);
  28. EXTERN_API( void )
  29. SetPortBits                     (const BitMap *         bm)                                 ONEWORDINLINE(0xA875);
  30. EXTERN_API( void )
  31. PortSize                        (short                  width,
  32.                                  short                  height)                             ONEWORDINLINE(0xA876);
  33. EXTERN_API( void )
  34. MovePortTo                      (short                  leftGlobal,
  35.                                  short                  topGlobal)                          ONEWORDINLINE(0xA877);
  36. EXTERN_API( void )
  37. SetOrigin                       (short                  h,
  38.                                  short                  v)                                  ONEWORDINLINE(0xA878);
  39. EXTERN_API( void )
  40. SetClip                         (RgnHandle              rgn)                                ONEWORDINLINE(0xA879);
  41. EXTERN_API( void )
  42. GetClip                         (RgnHandle              rgn)                                ONEWORDINLINE(0xA87A);
  43. EXTERN_API( void )
  44. ClipRect                        (const Rect *           r)                                  ONEWORDINLINE(0xA87B);
  45. EXTERN_API( void )
  46. BackPat                         (const Pattern *        pat)                                ONEWORDINLINE(0xA87C);
  47. EXTERN_API( void )
  48. InitCursor                      (void)                                                      ONEWORDINLINE(0xA850);
  49. #if TARGET_OS_MAC
  50.     #define MacSetCursor SetCursor
  51. #endif
  52. EXTERN_API( void )
  53. MacSetCursor                    (const Cursor *         crsr)                               ONEWORDINLINE(0xA851);
  54. EXTERN_API( void )
  55. HideCursor                      (void)                                                      ONEWORDINLINE(0xA852);
  56. #if TARGET_OS_MAC
  57.     #define MacShowCursor ShowCursor
  58. #endif
  59. EXTERN_API( void )
  60. MacShowCursor                   (void)                                                      ONEWORDINLINE(0xA853);
  61. EXTERN_API( void )
  62. ObscureCursor                   (void)                                                      ONEWORDINLINE(0xA856);
  63. EXTERN_API( void )
  64. HidePen                         (void)                                                      ONEWORDINLINE(0xA896);
  65. EXTERN_API( void )
  66. ShowPen                         (void)                                                      ONEWORDINLINE(0xA897);
  67. EXTERN_API( void )
  68. GetPen                          (Point *                pt)                                 ONEWORDINLINE(0xA89A);
  69. EXTERN_API( void )
  70. GetPenState                     (PenState *             pnState)                            ONEWORDINLINE(0xA898);
  71. EXTERN_API( void )
  72. SetPenState                     (const PenState *       pnState)                            ONEWORDINLINE(0xA899);
  73. EXTERN_API( void )
  74. PenSize                         (short                  width,
  75.                                  short                  height)                             ONEWORDINLINE(0xA89B);
  76. EXTERN_API( void )
  77. PenMode                         (short                  mode)                               ONEWORDINLINE(0xA89C);
  78. EXTERN_API( void )
  79. PenPat                          (const Pattern *        pat)                                ONEWORDINLINE(0xA89D);
  80. EXTERN_API( void )
  81. PenNormal                       (void)                                                      ONEWORDINLINE(0xA89E);
  82. EXTERN_API( void )
  83. MoveTo                          (short                  h,
  84.                                  short                  v)                                  ONEWORDINLINE(0xA893);
  85. EXTERN_API( void )
  86. Move                            (short                  dh,
  87.                                  short                  dv)                                 ONEWORDINLINE(0xA894);
  88. #if TARGET_OS_MAC
  89.     #define MacLineTo LineTo
  90. #endif
  91. EXTERN_API( void )
  92. MacLineTo                       (short                  h,
  93.                                  short                  v)                                  ONEWORDINLINE(0xA891);
  94. EXTERN_API( void )
  95. Line                            (short                  dh,
  96.                                  short                  dv)                                 ONEWORDINLINE(0xA892);
  97. EXTERN_API( void )
  98. ForeColor                       (long                   color)                              ONEWORDINLINE(0xA862);
  99. EXTERN_API( void )
  100. BackColor                       (long                   color)                              ONEWORDINLINE(0xA863);
  101. EXTERN_API( void )
  102. ColorBit                        (short                  whichBit)                           ONEWORDINLINE(0xA864);
  103. #if TARGET_OS_MAC
  104.     #define MacSetRect SetRect
  105. #endif
  106. EXTERN_API( void )
  107. MacSetRect                      (Rect *                 r,
  108.                                  short                  left,
  109.                                  short                  top,
  110.                                  short                  right,
  111.                                  short                  bottom)                             ONEWORDINLINE(0xA8A7);
  112. #if TARGET_OS_MAC
  113.     #define MacOffsetRect OffsetRect
  114. #endif
  115. EXTERN_API( void )
  116. MacOffsetRect                   (Rect *                 r,
  117.                                  short                  dh,
  118.                                  short                  dv)                                 ONEWORDINLINE(0xA8A8);
  119. #if TARGET_OS_MAC
  120.     #define MacInsetRect InsetRect
  121. #endif
  122. EXTERN_API( void )
  123. MacInsetRect                    (Rect *                 r,
  124.                                  short                  dh,
  125.                                  short                  dv)                                 ONEWORDINLINE(0xA8A9);
  126. EXTERN_API( Boolean )
  127. SectRect                        (const Rect *           src1,
  128.                                  const Rect *           src2,
  129.                                  Rect *                 dstRect)                            ONEWORDINLINE(0xA8AA);
  130. #if TARGET_OS_MAC
  131.     #define MacUnionRect UnionRect
  132. #endif
  133. EXTERN_API( void )
  134. MacUnionRect                    (const Rect *           src1,
  135.                                  const Rect *           src2,
  136.                                  Rect *                 dstRect)                            ONEWORDINLINE(0xA8AB);
  137. #if TARGET_OS_MAC
  138.     #define MacEqualRect EqualRect
  139. #endif
  140. EXTERN_API( Boolean )
  141. MacEqualRect                    (const Rect *           rect1,
  142.                                  const Rect *           rect2)                              ONEWORDINLINE(0xA8A6);
  143. EXTERN_API( Boolean )
  144. EmptyRect                       (const Rect *           r)                                  ONEWORDINLINE(0xA8AE);
  145. #if TARGET_OS_MAC
  146.     #define MacFrameRect FrameRect
  147. #endif
  148. EXTERN_API( void )
  149. MacFrameRect                    (const Rect *           r)                                  ONEWORDINLINE(0xA8A1);
  150. EXTERN_API( void )
  151. PaintRect                       (const Rect *           r)                                  ONEWORDINLINE(0xA8A2);
  152. EXTERN_API( void )
  153. EraseRect                       (const Rect *           r)                                  ONEWORDINLINE(0xA8A3);
  154. #if TARGET_OS_MAC
  155.     #define MacInvertRect InvertRect
  156. #endif
  157. EXTERN_API( void )
  158. MacInvertRect                   (const Rect *           r)                                  ONEWORDINLINE(0xA8A4);
  159. #if TARGET_OS_MAC
  160.     #define MacFillRect FillRect
  161. #endif
  162. EXTERN_API( void )
  163. MacFillRect                     (const Rect *           r,
  164.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8A5);
  165. EXTERN_API( void )
  166. FrameOval                       (const Rect *           r)                                  ONEWORDINLINE(0xA8B7);
  167. EXTERN_API( void )
  168. PaintOval                       (const Rect *           r)                                  ONEWORDINLINE(0xA8B8);
  169. EXTERN_API( void )
  170. EraseOval                       (const Rect *           r)                                  ONEWORDINLINE(0xA8B9);
  171. EXTERN_API( void )
  172. InvertOval                      (const Rect *           r)                                  ONEWORDINLINE(0xA8BA);
  173. EXTERN_API( void )
  174. FillOval                        (const Rect *           r,
  175.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8BB);
  176. EXTERN_API( void )
  177. FrameRoundRect                  (const Rect *           r,
  178.                                  short                  ovalWidth,
  179.                                  short                  ovalHeight)                         ONEWORDINLINE(0xA8B0);
  180. EXTERN_API( void )
  181. PaintRoundRect                  (const Rect *           r,
  182.                                  short                  ovalWidth,
  183.                                  short                  ovalHeight)                         ONEWORDINLINE(0xA8B1);
  184. EXTERN_API( void )
  185. EraseRoundRect                  (const Rect *           r,
  186.                                  short                  ovalWidth,
  187.                                  short                  ovalHeight)                         ONEWORDINLINE(0xA8B2);
  188. EXTERN_API( void )
  189. InvertRoundRect                 (const Rect *           r,
  190.                                  short                  ovalWidth,
  191.                                  short                  ovalHeight)                         ONEWORDINLINE(0xA8B3);
  192. EXTERN_API( void )
  193. FillRoundRect                   (const Rect *           r,
  194.                                  short                  ovalWidth,
  195.                                  short                  ovalHeight,
  196.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8B4);
  197. EXTERN_API( void )
  198. FrameArc                        (const Rect *           r,
  199.                                  short                  startAngle,
  200.                                  short                  arcAngle)                           ONEWORDINLINE(0xA8BE);
  201. EXTERN_API( void )
  202. PaintArc                        (const Rect *           r,
  203.                                  short                  startAngle,
  204.                                  short                  arcAngle)                           ONEWORDINLINE(0xA8BF);
  205. EXTERN_API( void )
  206. EraseArc                        (const Rect *           r,
  207.                                  short                  startAngle,
  208.                                  short                  arcAngle)                           ONEWORDINLINE(0xA8C0);
  209. EXTERN_API( void )
  210. InvertArc                       (const Rect *           r,
  211.                                  short                  startAngle,
  212.                                  short                  arcAngle)                           ONEWORDINLINE(0xA8C1);
  213. EXTERN_API( void )
  214. FillArc                         (const Rect *           r,
  215.                                  short                  startAngle,
  216.                                  short                  arcAngle,
  217.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8C2);
  218. EXTERN_API( RgnHandle )
  219. NewRgn                          (void)                                                      ONEWORDINLINE(0xA8D8);
  220. EXTERN_API( void )
  221. OpenRgn                         (void)                                                      ONEWORDINLINE(0xA8DA);
  222. EXTERN_API( void )
  223. CloseRgn                        (RgnHandle              dstRgn)                             ONEWORDINLINE(0xA8DB);
  224. EXTERN_API( OSErr )
  225. BitMapToRegion                  (RgnHandle              region,
  226.                                  const BitMap *         bMap)                               ONEWORDINLINE(0xA8D7);
  227. EXTERN_API( void )
  228. DisposeRgn                      (RgnHandle              rgn)                                ONEWORDINLINE(0xA8D9);
  229. #if TARGET_OS_MAC
  230.     #define MacCopyRgn CopyRgn
  231. #endif
  232. EXTERN_API( void )
  233. MacCopyRgn                      (RgnHandle              srcRgn,
  234.                                  RgnHandle              dstRgn)                             ONEWORDINLINE(0xA8DC);
  235. EXTERN_API( void )
  236. SetEmptyRgn                     (RgnHandle              rgn)                                ONEWORDINLINE(0xA8DD);
  237. #if TARGET_OS_MAC
  238.     #define MacSetRectRgn SetRectRgn
  239. #endif
  240. EXTERN_API( void )
  241. MacSetRectRgn                   (RgnHandle              rgn,
  242.                                  short                  left,
  243.                                  short                  top,
  244.                                  short                  right,
  245.                                  short                  bottom)                             ONEWORDINLINE(0xA8DE);
  246. EXTERN_API( void )
  247. RectRgn                         (RgnHandle              rgn,
  248.                                  const Rect *           r)                                  ONEWORDINLINE(0xA8DF);
  249. #if TARGET_OS_MAC
  250.     #define MacOffsetRgn OffsetRgn
  251. #endif
  252. EXTERN_API( void )
  253. MacOffsetRgn                    (RgnHandle              rgn,
  254.                                  short                  dh,
  255.                                  short                  dv)                                 ONEWORDINLINE(0xA8E0);
  256. EXTERN_API( void )
  257. InsetRgn                        (RgnHandle              rgn,
  258.                                  short                  dh,
  259.                                  short                  dv)                                 ONEWORDINLINE(0xA8E1);
  260. EXTERN_API( void )
  261. SectRgn                         (RgnHandle              srcRgnA,
  262.                                  RgnHandle              srcRgnB,
  263.                                  RgnHandle              dstRgn)                             ONEWORDINLINE(0xA8E4);
  264. #if TARGET_OS_MAC
  265.     #define MacUnionRgn UnionRgn
  266. #endif
  267. EXTERN_API( void )
  268. MacUnionRgn                     (RgnHandle              srcRgnA,
  269.                                  RgnHandle              srcRgnB,
  270.                                  RgnHandle              dstRgn)                             ONEWORDINLINE(0xA8E5);
  271. EXTERN_API( void )
  272. DiffRgn                         (RgnHandle              srcRgnA,
  273.                                  RgnHandle              srcRgnB,
  274.                                  RgnHandle              dstRgn)                             ONEWORDINLINE(0xA8E6);
  275. #if TARGET_OS_MAC
  276.     #define MacXorRgn XorRgn
  277. #endif
  278. EXTERN_API( void )
  279. MacXorRgn                       (RgnHandle              srcRgnA,
  280.                                  RgnHandle              srcRgnB,
  281.                                  RgnHandle              dstRgn)                             ONEWORDINLINE(0xA8E7);
  282. EXTERN_API( Boolean )
  283. RectInRgn                       (const Rect *           r,
  284.                                  RgnHandle              rgn)                                ONEWORDINLINE(0xA8E9);
  285. #if TARGET_OS_MAC
  286.     #define MacEqualRgn EqualRgn
  287. #endif
  288. EXTERN_API( Boolean )
  289. MacEqualRgn                     (RgnHandle              rgnA,
  290.                                  RgnHandle              rgnB)                               ONEWORDINLINE(0xA8E3);
  291. EXTERN_API( Boolean )
  292. EmptyRgn                        (RgnHandle              rgn)                                ONEWORDINLINE(0xA8E2);
  293. #if TARGET_OS_MAC
  294.     #define MacFrameRgn FrameRgn
  295. #endif
  296. EXTERN_API( void )
  297. MacFrameRgn                     (RgnHandle              rgn)                                ONEWORDINLINE(0xA8D2);
  298. #if TARGET_OS_MAC
  299.     #define MacPaintRgn PaintRgn
  300. #endif
  301. EXTERN_API( void )
  302. MacPaintRgn                     (RgnHandle              rgn)                                ONEWORDINLINE(0xA8D3);
  303. EXTERN_API( void )
  304. EraseRgn                        (RgnHandle              rgn)                                ONEWORDINLINE(0xA8D4);
  305. #if TARGET_OS_MAC
  306.     #define MacInvertRgn InvertRgn
  307. #endif
  308. EXTERN_API( void )
  309. MacInvertRgn                    (RgnHandle              rgn)                                ONEWORDINLINE(0xA8D5);
  310. #if TARGET_OS_MAC
  311.     #define MacFillRgn FillRgn
  312. #endif
  313. EXTERN_API( void )
  314. MacFillRgn                      (RgnHandle              rgn,
  315.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8D6);
  316. EXTERN_API( void )
  317. ScrollRect                      (const Rect *           r,
  318.                                  short                  dh,
  319.                                  short                  dv,
  320.                                  RgnHandle              updateRgn)                          ONEWORDINLINE(0xA8EF);
  321. EXTERN_API( void )
  322. CopyBits                        (const BitMap *         srcBits,
  323.                                  const BitMap *         dstBits,
  324.                                  const Rect *           srcRect,
  325.                                  const Rect *           dstRect,
  326.                                  short                  mode,
  327.                                  RgnHandle              maskRgn) /* can be NULL */          ONEWORDINLINE(0xA8EC);
  328. EXTERN_API( void )
  329. SeedFill                        (const void *           srcPtr,
  330.                                  void *                 dstPtr,
  331.                                  short                  srcRow,
  332.                                  short                  dstRow,
  333.                                  short                  height,
  334.                                  short                  words,
  335.                                  short                  seedH,
  336.                                  short                  seedV)                              ONEWORDINLINE(0xA839);
  337. EXTERN_API( void )
  338. CalcMask                        (const void *           srcPtr,
  339.                                  void *                 dstPtr,
  340.                                  short                  srcRow,
  341.                                  short                  dstRow,
  342.                                  short                  height,
  343.                                  short                  words)                              ONEWORDINLINE(0xA838);
  344. EXTERN_API( void )
  345. CopyMask                        (const BitMap *         srcBits,
  346.                                  const BitMap *         maskBits,
  347.                                  const BitMap *         dstBits,
  348.                                  const Rect *           srcRect,
  349.                                  const Rect *           maskRect,
  350.                                  const Rect *           dstRect)                            ONEWORDINLINE(0xA817);
  351. EXTERN_API( PicHandle )
  352. OpenPicture                     (const Rect *           picFrame)                           ONEWORDINLINE(0xA8F3);
  353. EXTERN_API( void )
  354. PicComment                      (short                  kind,
  355.                                  short                  dataSize,
  356.                                  Handle                 dataHandle)                         ONEWORDINLINE(0xA8F2);
  357. EXTERN_API( void )
  358. ClosePicture                    (void)                                                      ONEWORDINLINE(0xA8F4);
  359. EXTERN_API( void )
  360. DrawPicture                     (PicHandle              myPicture,
  361.                                  const Rect *           dstRect)                            ONEWORDINLINE(0xA8F6);
  362. EXTERN_API( void )
  363. KillPicture                     (PicHandle              myPicture)                          ONEWORDINLINE(0xA8F5);
  364. EXTERN_API( PolyHandle )
  365. OpenPoly                        (void)                                                      ONEWORDINLINE(0xA8CB);
  366. EXTERN_API( void )
  367. ClosePoly                       (void)                                                      ONEWORDINLINE(0xA8CC);
  368. EXTERN_API( void )
  369. KillPoly                        (PolyHandle             poly)                               ONEWORDINLINE(0xA8CD);
  370. EXTERN_API( void )
  371. OffsetPoly                      (PolyHandle             poly,
  372.                                  short                  dh,
  373.                                  short                  dv)                                 ONEWORDINLINE(0xA8CE);
  374. EXTERN_API( void )
  375. FramePoly                       (PolyHandle             poly)                               ONEWORDINLINE(0xA8C6);
  376. EXTERN_API( void )
  377. PaintPoly                       (PolyHandle             poly)                               ONEWORDINLINE(0xA8C7);
  378. EXTERN_API( void )
  379. ErasePoly                       (PolyHandle             poly)                               ONEWORDINLINE(0xA8C8);
  380. EXTERN_API( void )
  381. InvertPoly                      (PolyHandle             poly)                               ONEWORDINLINE(0xA8C9);
  382. EXTERN_API( void )
  383. FillPoly                        (PolyHandle             poly,
  384.                                  const Pattern *        pat)                                ONEWORDINLINE(0xA8CA);
  385. EXTERN_API( void )
  386. SetPt                           (Point *                pt,
  387.                                  short                  h,
  388.                                  short                  v)                                  ONEWORDINLINE(0xA880);
  389. EXTERN_API( void )
  390. LocalToGlobal                   (Point *                pt)                                 ONEWORDINLINE(0xA870);
  391. EXTERN_API( void )
  392. GlobalToLocal                   (Point *                pt)                                 ONEWORDINLINE(0xA871);
  393. EXTERN_API( short )
  394. Random                          (void)                                                      ONEWORDINLINE(0xA861);
  395. EXTERN_API( void )
  396. StuffHex                        (void *                 thingPtr,
  397.                                  ConstStr255Param       s)                                  ONEWORDINLINE(0xA866);
  398. #if TARGET_OS_MAC
  399.     #define MacGetPixel GetPixel
  400. #endif
  401. EXTERN_API( Boolean )
  402. MacGetPixel                     (short                  h,
  403.                                  short                  v)                                  ONEWORDINLINE(0xA865);
  404. EXTERN_API( void )
  405. ScalePt                         (Point *                pt,
  406.                                  const Rect *           srcRect,
  407.                                  const Rect *           dstRect)                            ONEWORDINLINE(0xA8F8);
  408. EXTERN_API( void )
  409. MapPt                           (Point *                pt,
  410.                                  const Rect *           srcRect,
  411.                                  const Rect *           dstRect)                            ONEWORDINLINE(0xA8F9);
  412. EXTERN_API( void )
  413. MapRect                         (Rect *                 r,
  414.                                  const Rect *           srcRect,
  415.                                  const Rect *           dstRect)                            ONEWORDINLINE(0xA8FA);
  416. EXTERN_API( void )
  417. MapRgn                          (RgnHandle              rgn,
  418.                                  const Rect *           srcRect,
  419.                                  const Rect *           dstRect)                            ONEWORDINLINE(0xA8FB);
  420. EXTERN_API( void )
  421. MapPoly                         (PolyHandle             poly,
  422.                                  const Rect *           srcRect,
  423.                                  const Rect *           dstRect)                            ONEWORDINLINE(0xA8FC);
  424. EXTERN_API( void )
  425. SetStdProcs                     (QDProcs *              procs)                              ONEWORDINLINE(0xA8EA);
  426. EXTERN_API( void )
  427. StdRect                         (GrafVerb               verb,
  428.                                  const Rect *           r)                                  ONEWORDINLINE(0xA8A0);
  429. EXTERN_API( void )
  430. StdRRect                        (GrafVerb               verb,
  431.                                  const Rect *           r,
  432.                                  short                  ovalWidth,
  433.                                  short                  ovalHeight)                         ONEWORDINLINE(0xA8AF);
  434. EXTERN_API( void )
  435. StdOval                         (GrafVerb               verb,
  436.                                  const Rect *           r)                                  ONEWORDINLINE(0xA8B6);
  437. EXTERN_API( void )
  438. StdArc                          (GrafVerb               verb,
  439.                                  const Rect *           r,
  440.                                  short                  startAngle,
  441.                                  short                  arcAngle)                           ONEWORDINLINE(0xA8BD);
  442. EXTERN_API( void )
  443. StdPoly                         (GrafVerb               verb,
  444.                                  PolyHandle             poly)                               ONEWORDINLINE(0xA8C5);
  445. EXTERN_API( void )
  446. StdRgn                          (GrafVerb               verb,
  447.                                  RgnHandle              rgn)                                ONEWORDINLINE(0xA8D1);
  448. EXTERN_API( void )
  449. StdBits                         (const BitMap *         srcBits,
  450.                                  const Rect *           srcRect,
  451.                                  const Rect *           dstRect,
  452.                                  short                  mode,
  453.                                  RgnHandle              maskRgn)                            ONEWORDINLINE(0xA8EB);
  454. EXTERN_API( void )
  455. StdComment                      (short                  kind,
  456.                                  short                  dataSize,
  457.                                  Handle                 dataHandle)                         ONEWORDINLINE(0xA8F1);
  458. EXTERN_API( void )
  459. StdGetPic                       (void *                 dataPtr,
  460.                                  short                  byteCount)                          ONEWORDINLINE(0xA8EE);
  461. EXTERN_API( void )
  462. StdPutPic                       (const void *           dataPtr,
  463.                                  short                  byteCount)                          ONEWORDINLINE(0xA8F0);
  464. EXTERN_API( void )
  465. StdOpcode                       (const Rect *           fromRect,
  466.                                  const Rect *           toRect,
  467.                                  UInt16                 opcode,
  468.                                  SInt16                 version)                            ONEWORDINLINE(0xABF8);
  469. EXTERN_API( void )
  470. AddPt                           (Point                  src,
  471.                                  Point *                dst)                                ONEWORDINLINE(0xA87E);
  472. EXTERN_API( Boolean )
  473. EqualPt                         (Point                  pt1,
  474.                                  Point                  pt2)                                ONEWORDINLINE(0xA881);
  475. #if TARGET_OS_MAC
  476.     #define MacPtInRect PtInRect
  477. #endif
  478. EXTERN_API( Boolean )
  479. MacPtInRect                     (Point                  pt,
  480.                                  const Rect *           r)                                  ONEWORDINLINE(0xA8AD);
  481. EXTERN_API( void )
  482. Pt2Rect                         (Point                  pt1,
  483.                                  Point                  pt2,
  484.                                  Rect *                 dstRect)                            ONEWORDINLINE(0xA8AC);
  485. EXTERN_API( void )
  486. PtToAngle                       (const Rect *           r,
  487.                                  Point                  pt,
  488.                                  short *                angle)                              ONEWORDINLINE(0xA8C3);
  489. EXTERN_API( void )
  490. SubPt                           (Point                  src,
  491.                                  Point *                dst)                                ONEWORDINLINE(0xA87F);
  492. EXTERN_API( Boolean )
  493. PtInRgn                         (Point                  pt,
  494.                                  RgnHandle              rgn)                                ONEWORDINLINE(0xA8E8);
  495. EXTERN_API( void )
  496. StdLine                         (Point                  newPt)                              ONEWORDINLINE(0xA890);
  497. #if CALL_NOT_IN_CARBON
  498. EXTERN_API( void )
  499. OpenCPort                       (CGrafPtr               port)                               ONEWORDINLINE(0xAA00);
  500. EXTERN_API( void )
  501. InitCPort                       (CGrafPtr               port)                               ONEWORDINLINE(0xAA01);
  502. EXTERN_API( void )
  503. CloseCPort                      (CGrafPtr               port)                               ONEWORDINLINE(0xAA02);
  504. #endif  /* CALL_NOT_IN_CARBON */
  505. EXTERN_API( PixMapHandle )
  506. NewPixMap                       (void)                                                      ONEWORDINLINE(0xAA03);
  507. EXTERN_API( void )
  508. DisposePixMap                   (PixMapHandle           pm)                                 ONEWORDINLINE(0xAA04);
  509. EXTERN_API( void )
  510. CopyPixMap                      (PixMapHandle           srcPM,
  511.                                  PixMapHandle           dstPM)                              ONEWORDINLINE(0xAA05);
  512. EXTERN_API( PixPatHandle )
  513. NewPixPat                       (void)                                                      ONEWORDINLINE(0xAA07);
  514. EXTERN_API( void )
  515. DisposePixPat                   (PixPatHandle           pp)                                 ONEWORDINLINE(0xAA08);
  516. EXTERN_API( void )
  517. CopyPixPat                      (PixPatHandle           srcPP,
  518.                                  PixPatHandle           dstPP)                              ONEWORDINLINE(0xAA09);
  519. EXTERN_API( void )
  520. PenPixPat                       (PixPatHandle           pp)                                 ONEWORDINLINE(0xAA0A);
  521. EXTERN_API( void )
  522. BackPixPat                      (PixPatHandle           pp)                                 ONEWORDINLINE(0xAA0B);
  523. EXTERN_API( PixPatHandle )
  524. GetPixPat                       (short                  patID)                              ONEWORDINLINE(0xAA0C);
  525. EXTERN_API( void )
  526. MakeRGBPat                      (PixPatHandle           pp,
  527.                                  const RGBColor *       myColor)                            ONEWORDINLINE(0xAA0D);
  528. EXTERN_API( void )
  529. FillCRect                       (const Rect *           r,
  530.                                  PixPatHandle           pp)                                 ONEWORDINLINE(0xAA0E);
  531. EXTERN_API( void )
  532. FillCOval                       (const Rect *           r,
  533.                                  PixPatHandle           pp)                                 ONEWORDINLINE(0xAA0F);
  534. EXTERN_API( void )
  535. FillCRoundRect                  (const Rect *           r,
  536.                                  short                  ovalWidth,
  537.                                  short                  ovalHeight,
  538.                                  PixPatHandle           pp)                                 ONEWORDINLINE(0xAA10);
  539. EXTERN_API( void )
  540. FillCArc                        (const Rect *           r,
  541.                                  short                  startAngle,
  542.                                  short                  arcAngle,
  543.                                  PixPatHandle           pp)                                 ONEWORDINLINE(0xAA11);
  544. EXTERN_API( void )
  545. FillCRgn                        (RgnHandle              rgn,
  546.                                  PixPatHandle           pp)                                 ONEWORDINLINE(0xAA12);
  547. EXTERN_API( void )
  548. FillCPoly                       (PolyHandle             poly,
  549.                                  PixPatHandle           pp)                                 ONEWORDINLINE(0xAA13);
  550. EXTERN_API( void )
  551. RGBForeColor                    (const RGBColor *       color)                              ONEWORDINLINE(0xAA14);
  552. EXTERN_API( void )
  553. RGBBackColor                    (const RGBColor *       color)                              ONEWORDINLINE(0xAA15);
  554. EXTERN_API( void )
  555. SetCPixel                       (short                  h,
  556.                                  short                  v,
  557.                                  const RGBColor *       cPix)                               ONEWORDINLINE(0xAA16);
  558. EXTERN_API( void )
  559. SetPortPix                      (PixMapHandle           pm)                                 ONEWORDINLINE(0xAA06);
  560. EXTERN_API( void )
  561. GetCPixel                       (short                  h,
  562.                                  short                  v,
  563.                                  RGBColor *             cPix)                               ONEWORDINLINE(0xAA17);
  564. EXTERN_API( void )
  565. GetForeColor                    (RGBColor *             color)                              ONEWORDINLINE(0xAA19);
  566. EXTERN_API( void )
  567. GetBackColor                    (RGBColor *             color)                              ONEWORDINLINE(0xAA1A);
  568. EXTERN_API( void )
  569. SeedCFill                       (const BitMap *         srcBits,
  570.                                  const BitMap *         dstBits,
  571.                                  const Rect *           srcRect,
  572.                                  const Rect *           dstRect,
  573.                                  short                  seedH,
  574.                                  short                  seedV,
  575.                                  ColorSearchUPP         matchProc,
  576.                                  long                   matchData)                          ONEWORDINLINE(0xAA50);
  577. EXTERN_API( void )
  578. CalcCMask                       (const BitMap *         srcBits,
  579.                                  const BitMap *         dstBits,
  580.                                  const Rect *           srcRect,
  581.                                  const Rect *           dstRect,
  582.                                  const RGBColor *       seedRGB,
  583.                                  ColorSearchUPP         matchProc,
  584.                                  long                   matchData)                          ONEWORDINLINE(0xAA4F);
  585. EXTERN_API( PicHandle )
  586. OpenCPicture                    (const OpenCPicParams * newHeader)                          ONEWORDINLINE(0xAA20);
  587. EXTERN_API( void )
  588. OpColor                         (const RGBColor *       color)                              ONEWORDINLINE(0xAA21);
  589. EXTERN_API( void )
  590. HiliteColor                     (const RGBColor *       color)                              ONEWORDINLINE(0xAA22);
  591. EXTERN_API( void )
  592. DisposeCTable                   (CTabHandle             cTable)                             ONEWORDINLINE(0xAA24);
  593. EXTERN_API( CTabHandle )
  594. GetCTable                       (short                  ctID)                               ONEWORDINLINE(0xAA18);
  595. EXTERN_API( CCrsrHandle )
  596. GetCCursor                      (short                  crsrID)                             ONEWORDINLINE(0xAA1B);
  597. EXTERN_API( void )
  598. SetCCursor                      (CCrsrHandle            cCrsr)                              ONEWORDINLINE(0xAA1C);
  599. EXTERN_API( void )
  600. AllocCursor                     (void)                                                      ONEWORDINLINE(0xAA1D);
  601. EXTERN_API( void )
  602. DisposeCCursor                  (CCrsrHandle            cCrsr)                              ONEWORDINLINE(0xAA26);
  603. /* GetCIcon(), PlotCIcon(), and DisposeCIcon() moved to Icons.h*/
  604. EXTERN_API( void )
  605. SetStdCProcs                    (CQDProcs *             procs)                              ONEWORDINLINE(0xAA4E);
  606. EXTERN_API( GDHandle )
  607. GetMaxDevice                    (const Rect *           globalRect)                         ONEWORDINLINE(0xAA27);
  608. EXTERN_API( long )
  609. GetCTSeed                       (void)                                                      ONEWORDINLINE(0xAA28);
  610. EXTERN_API( GDHandle )
  611. GetDeviceList                   (void)                                                      ONEWORDINLINE(0xAA29);
  612. EXTERN_API( GDHandle )
  613. GetMainDevice                   (void)                                                      ONEWORDINLINE(0xAA2A);
  614. EXTERN_API( GDHandle )
  615. GetNextDevice                   (GDHandle               curDevice)                          ONEWORDINLINE(0xAA2B);
  616. EXTERN_API( Boolean )
  617. TestDeviceAttribute             (GDHandle               gdh,
  618.                                  short                  attribute)                          ONEWORDINLINE(0xAA2C);
  619. EXTERN_API( void )
  620. SetDeviceAttribute              (GDHandle               gdh,
  621.                                  short                  attribute,
  622.                                  Boolean                value)                              ONEWORDINLINE(0xAA2D);
  623. EXTERN_API( void )
  624. InitGDevice                     (short                  qdRefNum,
  625.                                  long                   mode,
  626.                                  GDHandle               gdh)                                ONEWORDINLINE(0xAA2E);
  627. EXTERN_API( GDHandle )
  628. NewGDevice                      (short                  refNum,
  629.                                  long                   mode)                               ONEWORDINLINE(0xAA2F);
  630. EXTERN_API( void )
  631. DisposeGDevice                  (GDHandle               gdh)                                ONEWORDINLINE(0xAA30);
  632. EXTERN_API( void )
  633. SetGDevice                      (GDHandle               gd)                                 ONEWORDINLINE(0xAA31);
  634. EXTERN_API( GDHandle )
  635. GetGDevice                      (void)                                                      ONEWORDINLINE(0xAA32);
  636. EXTERN_API( long )
  637. Color2Index                     (const RGBColor *       myColor)                            ONEWORDINLINE(0xAA33);
  638. EXTERN_API( void )
  639. Index2Color                     (long                   index,
  640.                                  RGBColor *             aColor)                             ONEWORDINLINE(0xAA34);
  641. EXTERN_API( void )
  642. InvertColor                     (RGBColor *             myColor)                            ONEWORDINLINE(0xAA35);
  643. EXTERN_API( Boolean )
  644. RealColor                       (const RGBColor *       color)                              ONEWORDINLINE(0xAA36);
  645. EXTERN_API( void )
  646. GetSubTable                     (CTabHandle             myColors,
  647.                                  short                  iTabRes,
  648.                                  CTabHandle             targetTbl)                          ONEWORDINLINE(0xAA37);
  649. EXTERN_API( void )
  650. MakeITable                      (CTabHandle             cTabH,
  651.                                  ITabHandle             iTabH,
  652.                                  short                  res)                                ONEWORDINLINE(0xAA39);
  653. EXTERN_API( void )
  654. AddSearch                       (ColorSearchUPP         searchProc)                         ONEWORDINLINE(0xAA3A);
  655. EXTERN_API( void )
  656. AddComp                         (ColorComplementUPP     compProc)                           ONEWORDINLINE(0xAA3B);
  657. EXTERN_API( void )
  658. DelSearch                       (ColorSearchUPP         searchProc)                         ONEWORDINLINE(0xAA4C);
  659. EXTERN_API( void )
  660. DelComp                         (ColorComplementUPP     compProc)                           ONEWORDINLINE(0xAA4D);
  661. EXTERN_API( void )
  662. SetClientID                     (short                  id)                                 ONEWORDINLINE(0xAA3C);
  663. EXTERN_API( void )
  664. ProtectEntry                    (short                  index,
  665.                                  Boolean                protect)                            ONEWORDINLINE(0xAA3D);
  666. EXTERN_API( void )
  667. ReserveEntry                    (short                  index,
  668.                                  Boolean                reserve)                            ONEWORDINLINE(0xAA3E);
  669. EXTERN_API( void )
  670. SetEntries                      (short                  start,
  671.                                  short                  count,
  672.                                  CSpecArray             aTable)                             ONEWORDINLINE(0xAA3F);
  673. EXTERN_API( void )
  674. SaveEntries                     (CTabHandle             srcTable,
  675.                                  CTabHandle             resultTable,
  676.                                  ReqListRec *           selection)                          ONEWORDINLINE(0xAA49);
  677. EXTERN_API( void )
  678. RestoreEntries                  (CTabHandle             srcTable,
  679.                                  CTabHandle             dstTable,
  680.                                  ReqListRec *           selection)                          ONEWORDINLINE(0xAA4A);
  681. EXTERN_API( short )
  682. QDError                         (void)                                                      ONEWORDINLINE(0xAA40);
  683. EXTERN_API( void )
  684. CopyDeepMask                    (const BitMap *         srcBits,
  685.                                  const BitMap *         maskBits,
  686.                                  const BitMap *         dstBits,
  687.                                  const Rect *           srcRect,
  688.                                  const Rect *           maskRect,
  689.                                  const Rect *           dstRect,
  690.                                  short                  mode,
  691.                                  RgnHandle              maskRgn) /* can be NULL */          ONEWORDINLINE(0xAA51);
  692. EXTERN_API( void )
  693. DeviceLoop                      (RgnHandle              drawingRgn,
  694.                                  DeviceLoopDrawingUPP   drawingProc,
  695.                                  long                   userData,
  696.                                  DeviceLoopFlags        flags)                              ONEWORDINLINE(0xABCA);
  697.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  698.                                                                                             #pragma parameter __A0 GetMaskTable
  699.                                                                                             #endif
  700. EXTERN_API( Ptr )
  701. GetMaskTable                    (void)                                                      ONEWORDINLINE(0xA836);
  702. EXTERN_API( PatHandle )
  703. GetPattern                      (short                  patternID)                          ONEWORDINLINE(0xA9B8);
  704. #if TARGET_OS_MAC
  705.     #define MacGetCursor GetCursor
  706. #endif
  707. EXTERN_API( CursHandle )
  708. MacGetCursor                    (short                  cursorID)                           ONEWORDINLINE(0xA9B9);
  709. EXTERN_API( PicHandle )
  710. GetPicture                      (short                  pictureID)                          ONEWORDINLINE(0xA9BC);
  711. EXTERN_API( long )
  712. DeltaPoint                      (Point                  ptA,
  713.                                  Point                  ptB)                                ONEWORDINLINE(0xA94F);
  714. EXTERN_API( void )
  715. ShieldCursor                    (const Rect *           shieldRect,
  716.                                  Point                  offsetPt)                           ONEWORDINLINE(0xA855);
  717. EXTERN_API( void )
  718. ScreenRes                       (short *                scrnHRes,
  719.                                  short *                scrnVRes)                           SIXWORDINLINE(0x225F, 0x32B8, 0x0102, 0x225F, 0x32B8, 0x0104);
  720. EXTERN_API( void )
  721. GetIndPattern                   (Pattern *              thePat,
  722.                                  short                  patternListID,
  723.                                  short                  index);
  724. #if CALL_NOT_IN_CARBON
  725. EXTERN_API_C( Boolean )
  726. ptinrect                        (const Point *          pt,
  727.                                  const Rect *           r);
  728. EXTERN_API_C( void )
  729. pt2rect                         (const Point *          pt1,
  730.                                  const Point *          pt2,
  731.                                  Rect *                 destRect);
  732. EXTERN_API_C( void )
  733. pttoangle                       (const Rect *           r,
  734.                                  const Point *          pt,
  735.                                  short *                angle);
  736. EXTERN_API_C( Boolean )
  737. ptinrgn                         (const Point *          pt,
  738.                                  RgnHandle              rgn);
  739. EXTERN_API_C( void )
  740. addpt                           (const Point *          src,
  741.                                  Point *                dst);
  742. EXTERN_API_C( void )
  743. subpt                           (const Point *          src,
  744.                                  Point *                dst);
  745. EXTERN_API_C( Boolean )
  746. equalpt                         (const Point *          pt1,
  747.                                  const Point *          pt2);
  748. EXTERN_API_C( void )
  749. stuffhex                        (void *                 thingPtr,
  750.                                  const char *           s);
  751. EXTERN_API_C( void )
  752. stdline                         (const Point *          newPt);
  753. EXTERN_API_C( void )
  754. shieldcursor                    (const Rect *           shieldRect,
  755.                                  Point *                offsetPt);
  756. #endif  /* CALL_NOT_IN_CARBON */
  757. EXTERN_API_C( long )
  758. deltapoint                      (Point *                ptA,
  759.                                  Point *                ptB);
  760. #if OLDROUTINENAMES
  761. #define DisposPixMap(pm) DisposePixMap(pm)
  762. #define DisposPixPat(pp) DisposePixPat(pp)
  763. #define DisposCTable(cTable) DisposeCTable(cTable)
  764. #define DisposCCursor(cCrsr) DisposeCCursor(cCrsr)
  765. #define DisposGDevice(gdh) DisposeGDevice(gdh)
  766. #endif  /* OLDROUTINENAMES */
  767. /*
  768.     From ToolUtils.i
  769. */
  770. EXTERN_API( void )
  771. PackBits                        (Ptr *                  srcPtr,
  772.                                  Ptr *                  dstPtr,
  773.                                  short                  srcBytes)                           ONEWORDINLINE(0xA8CF);
  774. EXTERN_API( void )
  775. UnpackBits                      (Ptr *                  srcPtr,
  776.                                  Ptr *                  dstPtr,
  777.                                  short                  dstBytes)                           ONEWORDINLINE(0xA8D0);
  778. EXTERN_API( Fixed )
  779. SlopeFromAngle                  (short                  angle)                              ONEWORDINLINE(0xA8BC);
  780. EXTERN_API( short )
  781. AngleFromSlope                  (Fixed                  slope)                              ONEWORDINLINE(0xA8C4);
  782. /* New transfer modes */
  783. enum {
  784.     colorXorXFer                = 52,
  785.     noiseXFer                   = 53,
  786.     customXFer                  = 54
  787. };
  788. /* Custom XFer flags */
  789. enum {
  790.     kXFer1PixelAtATime          = 0x00000001,                   /* 1 pixel passed to custom XFer proc*/
  791.     kXFerConvertPixelToRGB32    = 0x00000002                    /* All color depths converted to 32 bit RGB*/
  792. };
  793. struct CustomXFerRec {
  794.     UInt32                          version;
  795.     void *                          srcPixels;
  796.     void *                          destPixels;
  797.     void *                          resultPixels;
  798.     UInt32                          refCon;
  799.     UInt32                          pixelSize;
  800.     UInt32                          pixelCount;
  801.     Point                           firstPixelHV;
  802.     Rect                            destBounds;
  803. };
  804. typedef struct CustomXFerRec            CustomXFerRec;
  805. typedef CustomXFerRec *                 CustomXFerRecPtr;
  806. typedef CALLBACK_API( void , CustomXFerProcPtr )(CustomXFerRecPtr info);
  807. EXTERN_API( OSErr )
  808. GetPortCustomXFerProc           (CGrafPtr               port,
  809.                                  CustomXFerProcPtr *    proc,
  810.                                  UInt32 *               flags,
  811.                                  UInt32 *               refCon)                             FOURWORDINLINE(0x203C, 0x0010, 0x0019, 0xAB1D);
  812. EXTERN_API( OSErr )
  813. SetPortCustomXFerProc           (CGrafPtr               port,
  814.                                  CustomXFerProcPtr      proc,
  815.                                  UInt32                 flags,
  816.                                  UInt32                 refCon)                             FOURWORDINLINE(0x203C, 0x0010, 0x001A, 0xAB1D);
  817. enum {
  818.     kCursorComponentsVersion    = 0x00010001
  819. };
  820. enum {
  821.     kCursorComponentType        = FOUR_CHAR_CODE('curs')
  822. };
  823. /* Cursor Component capabilities flags */
  824. enum {
  825.     cursorDoesAnimate           = 1L << 0,
  826.     cursorDoesHardware          = 1L << 1,
  827.     cursorDoesUnreadableScreenBits = 1L << 2
  828. };
  829. /* Cursor Component output mode flags */
  830. enum {
  831.     kRenderCursorInHardware     = 1L << 0,
  832.     kRenderCursorInSoftware     = 1L << 1
  833. };
  834. /* Cursor Component Info */
  835. struct CursorInfo {
  836.     long                            version;                    /* use kCursorComponentsVersion */
  837.     long                            capabilities;
  838.     long                            animateDuration;            /* approximate time between animate tickles */
  839.     Rect                            bounds;
  840.     Point                           hotspot;
  841.     long                            reserved;                   /* must set to zero */
  842. };
  843. typedef struct CursorInfo               CursorInfo;
  844. /* Cursor Component Selectors */
  845. enum {
  846.     kCursorComponentInit        = 0x0001,
  847.     kCursorComponentGetInfo     = 0x0002,
  848.     kCursorComponentSetOutputMode = 0x0003,
  849.     kCursorComponentSetData     = 0x0004,
  850.     kCursorComponentReconfigure = 0x0005,
  851.     kCursorComponentDraw        = 0x0006,
  852.     kCursorComponentErase       = 0x0007,
  853.     kCursorComponentMove        = 0x0008,
  854.     kCursorComponentAnimate     = 0x0009,
  855.     kCursorComponentLastReserved = 0x0050
  856. };
  857. EXTERN_API( OSErr )
  858. OpenCursorComponent             (Component              c,
  859.                                  ComponentInstance *    ci)                                 FOURWORDINLINE(0x203C, 0x0008, 0x000B, 0xABE0);
  860. EXTERN_API( OSErr )
  861. CloseCursorComponent            (ComponentInstance      ci)                                 FOURWORDINLINE(0x203C, 0x0004, 0x000C, 0xABE0);
  862. EXTERN_API( OSErr )
  863. SetCursorComponent              (ComponentInstance      ci)                                 FOURWORDINLINE(0x203C, 0x0004, 0x000D, 0xABE0);
  864. EXTERN_API( OSErr )
  865. CursorComponentChanged          (ComponentInstance      ci)                                 FOURWORDINLINE(0x203C, 0x0004, 0x000E, 0xABE0);
  866. EXTERN_API( OSErr )
  867. CursorComponentSetData          (ComponentInstance      ci,
  868.                                  long                   data)                               FOURWORDINLINE(0x203C, 0x0008, 0x000F, 0xABE0);
  869. #if ACCESSOR_CALLS_ARE_FUNCTIONS
  870. /* GrafPort */
  871. /* Getters */
  872. EXTERN_API( PixMapHandle )
  873. GetPortPixMap                   (CGrafPtr               port);
  874. EXTERN_API( Rect *)
  875. GetPortBounds                   (CGrafPtr               port,
  876.                                  Rect *                 rect);
  877. EXTERN_API( RGBColor *)
  878. GetPortForeColor                (CGrafPtr               port,
  879.                                  RGBColor *             foreColor);
  880. EXTERN_API( RGBColor *)
  881. GetPortBackColor                (CGrafPtr               port,
  882.                                  RGBColor *             backColor);
  883. EXTERN_API( RGBColor *)
  884. GetPortOpColor                  (CGrafPtr               port,
  885.                                  RGBColor *             opColor);
  886. EXTERN_API( RGBColor *)
  887. GetPortHiliteColor              (CGrafPtr               port,
  888.                                  RGBColor *             hiliteColor);
  889. EXTERN_API( CQDProcsPtr )
  890. GetPortGrafProcs                (CGrafPtr               port);
  891. EXTERN_API( short )
  892. GetPortTextFont                 (CGrafPtr               port);
  893. EXTERN_API( Style )
  894. GetPortTextFace                 (CGrafPtr               port);
  895. EXTERN_API( short )
  896. GetPortTextMode                 (CGrafPtr               port);
  897. EXTERN_API( short )
  898. GetPortTextSize                 (CGrafPtr               port);
  899. EXTERN_API( short )
  900. GetPortChExtra                  (CGrafPtr               port);
  901. EXTERN_API( short )
  902. GetPortFracHPenLocation         (CGrafPtr               port);
  903. EXTERN_API( Fixed )
  904. GetPortSpExtra                  (CGrafPtr               port);
  905. EXTERN_API( short )
  906. GetPortPenVisibility            (CGrafPtr               port);
  907. EXTERN_API( RgnHandle )
  908. GetPortVisibleRegion            (CGrafPtr               port,
  909.                                  RgnHandle              visRgn);
  910. EXTERN_API( RgnHandle )
  911. GetPortClipRegion               (CGrafPtr               port,
  912.                                  RgnHandle              clipRgn);
  913. EXTERN_API( PixPatHandle )
  914. GetPortBackPixPat               (CGrafPtr               port,
  915.                                  PixPatHandle           backPattern);
  916. EXTERN_API( PixPatHandle )
  917. GetPortPenPixPat                (CGrafPtr               port,
  918.                                  PixPatHandle           penPattern);
  919. EXTERN_API( PixPatHandle )
  920. GetPortFillPixPat               (CGrafPtr               port,
  921.                                  PixPatHandle           fillPattern);
  922. EXTERN_API( Point *)
  923. GetPortPenSize                  (CGrafPtr               port,
  924.                                  Point *                penSize);
  925. EXTERN_API( SInt32 )
  926. GetPortPenMode                  (CGrafPtr               port);
  927. EXTERN_API( Point *)
  928. GetPortPenLocation              (CGrafPtr               port,
  929.                                  Point *                penLocation);
  930. EXTERN_API( Boolean )
  931. IsPortRegionBeingDefined        (CGrafPtr               port);
  932. EXTERN_API( Boolean )
  933. IsPortPictureBeingDefined       (CGrafPtr               port);
  934. EXTERN_API( Boolean )
  935. IsPortOffscreen                 (CGrafPtr               port);
  936. /* Setters */
  937. EXTERN_API( void )
  938. SetPortBounds                   (CGrafPtr               port,
  939.                                  const Rect *           rect);
  940. EXTERN_API( void )
  941. SetPortOpColor                  (CGrafPtr               port,
  942.                                  const RGBColor *       opColor);
  943. EXTERN_API( void )
  944. SetPortGrafProcs                (CGrafPtr               port,
  945.                                  CQDProcs *             procs);
  946. EXTERN_API( void )
  947. SetPortVisibleRegion            (CGrafPtr               port,
  948.                                  RgnHandle              visRgn);
  949. EXTERN_API( void )
  950. SetPortClipRegion               (CGrafPtr               port,
  951.                                  RgnHandle              clipRgn);
  952. EXTERN_API( void )
  953. SetPortPenPixPat                (CGrafPtr               port,
  954.                                  PixPatHandle           penPattern);
  955. EXTERN_API( void )
  956. SetPortBackPixPat               (CGrafPtr               port,
  957.                                  PixPatHandle           backPattern);
  958. EXTERN_API( void )
  959. SetPortPenSize                  (CGrafPtr               port,
  960.                                  Point                  penSize);
  961. EXTERN_API( void )
  962. SetPortPenMode                  (CGrafPtr               port,
  963.                                  SInt32                 penMode);
  964. EXTERN_API( void )
  965. SetPortFracHPenLocation         (CGrafPtr               port,
  966.                                  short                  pnLocHFrac);
  967. /* PixMap */
  968. EXTERN_API( Rect *)
  969. GetPixBounds                    (PixMapHandle           pixMap,
  970.                                  Rect *                 bounds);
  971. EXTERN_API( short )
  972. GetPixDepth                     (PixMapHandle           pixMap);
  973. /* QDGlobals */
  974. /* Getters */
  975. EXTERN_API( long )
  976. GetQDGlobalsRandomSeed          (void);
  977. EXTERN_API( BitMap *)
  978. GetQDGlobalsScreenBits          (BitMap *               screenBits);
  979. EXTERN_API( Cursor *)
  980. GetQDGlobalsArrow               (Cursor *               arrow);
  981. EXTERN_API( Pattern *)
  982. GetQDGlobalsDarkGray            (Pattern *              dkGray);
  983. EXTERN_API( Pattern *)
  984. GetQDGlobalsLightGray           (Pattern *              ltGray);
  985. EXTERN_API( Pattern *)
  986. GetQDGlobalsGray                (Pattern *              gray);
  987. EXTERN_API( Pattern *)
  988. GetQDGlobalsBlack               (Pattern *              black);
  989. EXTERN_API( Pattern *)
  990. GetQDGlobalsWhite               (Pattern *              white);
  991. EXTERN_API( CGrafPtr )
  992. GetQDGlobalsThePort             (void);
  993. /* Setters */
  994. EXTERN_API( void )
  995. SetQDGlobalsRandomSeed          (long                   randomSeed);
  996. EXTERN_API( void )
  997. SetQDGlobalsArrow               (const Cursor *         arrow);
  998. /* Regions */
  999. EXTERN_API( Rect *)
  1000. GetRegionBounds                 (RgnHandle              region,
  1001.                                  Rect *                 bounds);
  1002. EXTERN_API( Boolean )
  1003. IsRegionRectangular             (RgnHandle              region);
  1004. /* Utilities */
  1005. /* To prevent upward dependencies, GetPortWindow is defined in Window Manager interface: */
  1006. /*      pascal WindowPtr        GetPortWindow(CGrafPtr port); */
  1007. /* NewPtr/OpenCPort doesn't work with opaque structures */
  1008. EXTERN_API( CGrafPtr )
  1009. CreateNewPort                   (void);
  1010. EXTERN_API( void )
  1011. DisposePort                     (CGrafPtr               port);
  1012. #endif  /* ACCESSOR_CALLS_ARE_FUNCTIONS */
  1013. /*
  1014.    Routines available on Mac OS X to flush buffered window ports...
  1015.    These calls do nothing on Mac OS 8/9. QDIsPortBuffered will always return false there.
  1016. */
  1017. EXTERN_API( Boolean )
  1018. QDIsPortBuffered                (CGrafPtr               port);
  1019. EXTERN_API( Boolean )
  1020. QDIsPortBufferDirty             (CGrafPtr               port);
  1021. EXTERN_API( void )
  1022. QDFlushPortBuffer               (CGrafPtr               port,
  1023.                                  RgnHandle              region);
  1024. #if PRAGMA_STRUCT_ALIGN
  1025.     #pragma options align=reset
  1026. #elif PRAGMA_STRUCT_PACKPUSH
  1027.     #pragma pack(pop)
  1028. #elif PRAGMA_STRUCT_PACK
  1029.     #pragma pack()
  1030. #endif
  1031. #ifdef PRAGMA_IMPORT_OFF
  1032. #pragma import off
  1033. #elif PRAGMA_IMPORT
  1034. #pragma import reset
  1035. #endif
  1036. #ifdef __cplusplus
  1037. }
  1038. #endif
  1039. #endif /* __QUICKDRAW__ */