home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / MW MPW Binaries 1.1.1a2 / mwcPPC / MWCIncludes / Quickdraw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-31  |  54.0 KB  |  1,658 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        Quickdraw.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __QUICKDRAW__
  13. #define __QUICKDRAW__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. /*    #include <ConditionalMacros.h>                                */
  18. /*    #include <MixedMode.h>                                        */
  19. /*        #include <Traps.h>                                        */
  20. #endif
  21.  
  22. #ifndef __QUICKDRAWTEXT__
  23. #include <QuickdrawText.h>
  24. /*    #include <IntlResources.h>                                    */
  25. #endif
  26.  
  27. enum  {
  28.     invalColReq                    = -1,                            /*invalid color table request*/
  29. /* transfer modes */
  30.     srcCopy                        = 0,                            /*the 16 transfer modes*/
  31.     srcOr                        = 1,
  32.     srcXor                        = 2,
  33.     srcBic                        = 3,
  34.     notSrcCopy                    = 4,
  35.     notSrcOr                    = 5,
  36.     notSrcXor                    = 6,
  37.     notSrcBic                    = 7,
  38.     patCopy                        = 8,
  39.     patOr                        = 9,
  40.     patXor                        = 10,
  41.     patBic                        = 11,
  42.     notPatCopy                    = 12,
  43.     notPatOr                    = 13,
  44.     notPatXor                    = 14,
  45.     notPatBic                    = 15,
  46. /* Special Text Transfer Mode */
  47.     grayishTextOr                = 49,
  48. /* Arithmetic transfer modes */
  49.     blend                        = 32,
  50.     addPin                        = 33
  51. };
  52.  
  53. enum  {
  54.     addOver                        = 34,
  55.     subPin                        = 35,
  56.     addMax                        = 37,
  57.     adMax                        = 37,
  58.     subOver                        = 38,
  59.     adMin                        = 39,
  60.     ditherCopy                    = 64,
  61. /* Transparent mode constant */
  62.     transparent                    = 36,
  63. /* QuickDraw color separation constants */
  64.     normalBit                    = 0,                            /*normal screen mapping*/
  65.     inverseBit                    = 1,                            /*inverse screen mapping*/
  66.     redBit                        = 4,                            /*RGB additive mapping*/
  67.     greenBit                    = 3,
  68.     blueBit                        = 2,
  69.     cyanBit                        = 8,                            /*CMYBk subtractive mapping*/
  70.     magentaBit                    = 7,
  71.     yellowBit                    = 6,
  72.     blackBit                    = 5,
  73.     blackColor                    = 33,                            /*colors expressed in these mappings*/
  74.     whiteColor                    = 30,
  75.     redColor                    = 205
  76. };
  77.  
  78. enum  {
  79.     greenColor                    = 341,
  80.     blueColor                    = 409,
  81.     cyanColor                    = 273,
  82.     magentaColor                = 137,
  83.     yellowColor                    = 69,
  84.     picLParen                    = 0,                            /*standard picture comments*/
  85.     picRParen                    = 1,
  86.     clutType                    = 0,                            /*0 if lookup table*/
  87.     fixedType                    = 1,                            /*1 if fixed table*/
  88.     directType                    = 2,                            /*2 if direct values*/
  89.     gdDevType                    = 0,                            /*0 = monochrome 1 = color*/
  90.     burstDevice                    = 7
  91. };
  92.  
  93. enum  {
  94.     hasAuxMenuBar                = 6,                            /* 1 if device has an aux menu bar on it */
  95.     ext32Device                    = 8,
  96.     ramInit                        = 10,                            /*1 if initialized from 'scrn' resource*/
  97.     mainScreen                    = 11,                            /* 1 if main screen */
  98.     allInit                        = 12,                            /* 1 if all devices initialized */
  99.     screenDevice                = 13,                            /*1 if screen device [not used]*/
  100.     noDriver                    = 14,                            /* 1 if no driver for this GDevice */
  101.     screenActive                = 15,                            /*1 if in use*/
  102.     hiliteBit                    = 7,                            /*flag bit in HiliteMode (lowMem flag)*/
  103.     pHiliteBit                    = 0,                            /*flag bit in HiliteMode used with BitClr procedure*/
  104.     defQDColors                    = 127,                            /*resource ID of clut for default QDColors*/
  105. /* pixel type */
  106.     RGBDirect                    = 16,                            /* 16 & 32 bits/pixel pixelType value */
  107. /* pmVersion values */
  108.     baseAddr32                    = 4,                            /*pixmap base address is 32-bit address*/
  109.     rgnOverflowErr                = -147,                            /* Region accumulation failed. Resulting region may be currupt */
  110.     insufficientStackErr        = -149                            /* QuickDraw could not complete the operation */
  111. };
  112.  
  113. enum  {
  114.     frame,
  115.     paint,
  116.     erase,
  117.     invert,
  118.     fill
  119. };
  120.  
  121. typedef unsigned char GrafVerb;
  122.  
  123. enum  {
  124.     chunky,
  125.     chunkyPlanar,
  126.     planar
  127. };
  128.  
  129. typedef unsigned char PixelType;
  130.  
  131. typedef short Bits16[16];
  132.  
  133.  
  134. /***************   IMPORTANT NOTE REGARDING PATTERN  **************************************
  135.    Patterns were originally defined as:
  136.         typedef unsigned char Pattern[8];
  137.    The old array defintion of Pattern would cause 68000 based CPU's to crash in certain circum-
  138.    stances. The new struct definition is safe, but may require source code changes to compile.
  139.    Read the details in Appendix J of:
  140.            "MPW E.T.O. #6 Latest Libraries/Interfaces"
  141.     
  142.    Developers were warned that they should stop using the “dangerousPattern” definition of
  143.    patterns so most of them should no longer use them. We are finally removing this
  144.    definition for good.
  145. *********************************************************************************************/
  146.  
  147. #if defined(powerc) || defined (__powerc)
  148. #pragma options align=mac68k
  149. #endif
  150. struct Pattern {
  151.     unsigned char                pat[8];
  152. };
  153. #if defined(powerc) || defined(__powerc)
  154. #pragma options align=reset
  155. #endif
  156.  
  157. typedef struct Pattern Pattern;
  158.  
  159. typedef const Pattern *ConstPatternParam;
  160.  
  161. typedef Pattern *PatPtr;
  162.  
  163. typedef PatPtr *PatHandle;
  164.  
  165. typedef char QDByte, *QDPtr, **QDHandle;
  166.  
  167. typedef short QDErr;
  168.  
  169. enum  {
  170.     singleDevicesBit            = 0,
  171.     dontMatchSeedsBit            = 1,
  172.     allDevicesBit                = 2
  173. };
  174.  
  175. enum  {
  176.     singleDevices                = 1 << singleDevicesBit,
  177.     dontMatchSeeds                = 1 << dontMatchSeedsBit,
  178.     allDevices                    = 1 << allDevicesBit
  179. };
  180.  
  181. typedef unsigned long DeviceLoopFlags;
  182.  
  183. #if defined(powerc) || defined (__powerc)
  184. #pragma options align=mac68k
  185. #endif
  186. struct BitMap {
  187.     Ptr                            baseAddr;
  188.     short                        rowBytes;
  189.     Rect                        bounds;
  190. };
  191. #if defined(powerc) || defined(__powerc)
  192. #pragma options align=reset
  193. #endif
  194.  
  195. typedef struct BitMap BitMap;
  196.  
  197. typedef BitMap *BitMapPtr, **BitMapHandle;
  198.  
  199. #if defined(powerc) || defined (__powerc)
  200. #pragma options align=mac68k
  201. #endif
  202. struct Cursor {
  203.     Bits16                        data;
  204.     Bits16                        mask;
  205.     Point                        hotSpot;
  206. };
  207. #if defined(powerc) || defined(__powerc)
  208. #pragma options align=reset
  209. #endif
  210.  
  211. typedef struct Cursor Cursor;
  212.  
  213. typedef Cursor *CursPtr, **CursHandle;
  214.  
  215. #if defined(powerc) || defined (__powerc)
  216. #pragma options align=mac68k
  217. #endif
  218. struct PenState {
  219.     Point                        pnLoc;
  220.     Point                        pnSize;
  221.     short                        pnMode;
  222.     Pattern                        pnPat;
  223. };
  224. #if defined(powerc) || defined(__powerc)
  225. #pragma options align=reset
  226. #endif
  227.  
  228. typedef struct PenState PenState;
  229.  
  230. #if defined(powerc) || defined (__powerc)
  231. #pragma options align=mac68k
  232. #endif
  233. struct Region {
  234.     short                        rgnSize;                        /*size in bytes*/
  235.     Rect                        rgnBBox;                        /*enclosing rectangle*/
  236. };
  237. #if defined(powerc) || defined(__powerc)
  238. #pragma options align=reset
  239. #endif
  240.  
  241. typedef struct Region Region;
  242.  
  243. typedef Region *RgnPtr, **RgnHandle;
  244.  
  245. #if defined(powerc) || defined (__powerc)
  246. #pragma options align=mac68k
  247. #endif
  248. struct Picture {
  249.     short                        picSize;
  250.     Rect                        picFrame;
  251. };
  252. #if defined(powerc) || defined(__powerc)
  253. #pragma options align=reset
  254. #endif
  255.  
  256. typedef struct Picture Picture;
  257.  
  258. typedef Picture *PicPtr, **PicHandle;
  259.  
  260. #if defined(powerc) || defined (__powerc)
  261. #pragma options align=mac68k
  262. #endif
  263. struct Polygon {
  264.     short                        polySize;
  265.     Rect                        polyBBox;
  266.     Point                        polyPoints[1];
  267. };
  268. #if defined(powerc) || defined(__powerc)
  269. #pragma options align=reset
  270. #endif
  271.  
  272. typedef struct Polygon Polygon;
  273.  
  274. typedef Polygon *PolyPtr, **PolyHandle;
  275.  
  276. typedef pascal void (*QDTextProcPtr)(short byteCount, Ptr textBuf, Point numer, Point denom);
  277.  
  278. enum {
  279.     uppQDTextProcInfo = kPascalStackBased
  280.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  281.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr)))
  282.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Point)))
  283.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(Point)))
  284. };
  285.  
  286. #if USESROUTINEDESCRIPTORS
  287. typedef UniversalProcPtr QDTextUPP;
  288.  
  289. #define CallQDTextProc(userRoutine, byteCount, textBuf, numer, denom)        \
  290.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDTextProcInfo, (byteCount), (textBuf), (numer), (denom))
  291. #define NewQDTextProc(userRoutine)        \
  292.         (QDTextUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDTextProcInfo, GetCurrentISA())
  293. #else
  294. typedef QDTextProcPtr QDTextUPP;
  295.  
  296. #define CallQDTextProc(userRoutine, byteCount, textBuf, numer, denom)        \
  297.         (*(userRoutine))((byteCount), (textBuf), (numer), (denom))
  298. #define NewQDTextProc(userRoutine)        \
  299.         (QDTextUPP)(userRoutine)
  300. #endif
  301.  
  302. typedef pascal void (*QDLineProcPtr)(Point newPt);
  303.  
  304. enum {
  305.     uppQDLineProcInfo = kPascalStackBased
  306.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Point)))
  307. };
  308.  
  309. #if USESROUTINEDESCRIPTORS
  310. typedef UniversalProcPtr QDLineUPP;
  311.  
  312. #define CallQDLineProc(userRoutine, newPt)        \
  313.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDLineProcInfo, (newPt))
  314. #define NewQDLineProc(userRoutine)        \
  315.         (QDLineUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDLineProcInfo, GetCurrentISA())
  316. #else
  317. typedef QDLineProcPtr QDLineUPP;
  318.  
  319. #define CallQDLineProc(userRoutine, newPt)        \
  320.         (*(userRoutine))((newPt))
  321. #define NewQDLineProc(userRoutine)        \
  322.         (QDLineUPP)(userRoutine)
  323. #endif
  324.  
  325. typedef pascal void (*QDRectProcPtr)(GrafVerb verb, Rect *r);
  326.  
  327. enum {
  328.     uppQDRectProcInfo = kPascalStackBased
  329.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(GrafVerb)))
  330.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Rect*)))
  331. };
  332.  
  333. #if USESROUTINEDESCRIPTORS
  334. typedef UniversalProcPtr QDRectUPP;
  335.  
  336. #define CallQDRectProc(userRoutine, verb, r)        \
  337.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDRectProcInfo, (verb), (r))
  338. #define NewQDRectProc(userRoutine)        \
  339.         (QDRectUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRectProcInfo, GetCurrentISA())
  340. #else
  341. typedef QDRectProcPtr QDRectUPP;
  342.  
  343. #define CallQDRectProc(userRoutine, verb, r)        \
  344.         (*(userRoutine))((verb), (r))
  345. #define NewQDRectProc(userRoutine)        \
  346.         (QDRectUPP)(userRoutine)
  347. #endif
  348.  
  349. typedef pascal void (*QDRRectProcPtr)(GrafVerb verb, Rect *r, short ovalWidth, short ovalHeight);
  350.  
  351. enum {
  352.     uppQDRRectProcInfo = kPascalStackBased
  353.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(GrafVerb)))
  354.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Rect*)))
  355.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short)))
  356.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
  357. };
  358.  
  359. #if USESROUTINEDESCRIPTORS
  360. typedef UniversalProcPtr QDRRectUPP;
  361.  
  362. #define CallQDRRectProc(userRoutine, verb, r, ovalWidth, ovalHeight)        \
  363.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDRRectProcInfo, (verb), (r), (ovalWidth), (ovalHeight))
  364. #define NewQDRRectProc(userRoutine)        \
  365.         (QDRRectUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRRectProcInfo, GetCurrentISA())
  366. #else
  367. typedef QDRRectProcPtr QDRRectUPP;
  368.  
  369. #define CallQDRRectProc(userRoutine, verb, r, ovalWidth, ovalHeight)        \
  370.         (*(userRoutine))((verb), (r), (ovalWidth), (ovalHeight))
  371. #define NewQDRRectProc(userRoutine)        \
  372.         (QDRRectUPP)(userRoutine)
  373. #endif
  374.  
  375. typedef pascal void (*QDOvalProcPtr)(GrafVerb verb, Rect *r);
  376.  
  377. enum {
  378.     uppQDOvalProcInfo = kPascalStackBased
  379.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(GrafVerb)))
  380.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Rect*)))
  381. };
  382.  
  383. #if USESROUTINEDESCRIPTORS
  384. typedef UniversalProcPtr QDOvalUPP;
  385.  
  386. #define CallQDOvalProc(userRoutine, verb, r)        \
  387.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDOvalProcInfo, (verb), (r))
  388. #define NewQDOvalProc(userRoutine)        \
  389.         (QDOvalUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDOvalProcInfo, GetCurrentISA())
  390. #else
  391. typedef QDOvalProcPtr QDOvalUPP;
  392.  
  393. #define CallQDOvalProc(userRoutine, verb, r)        \
  394.         (*(userRoutine))((verb), (r))
  395. #define NewQDOvalProc(userRoutine)        \
  396.         (QDOvalUPP)(userRoutine)
  397. #endif
  398.  
  399. typedef pascal void (*QDArcProcPtr)(GrafVerb verb, Rect *r, short startAngle, short arcAngle);
  400.  
  401. enum {
  402.     uppQDArcProcInfo = kPascalStackBased
  403.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(GrafVerb)))
  404.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Rect*)))
  405.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short)))
  406.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
  407. };
  408.  
  409. #if USESROUTINEDESCRIPTORS
  410. typedef UniversalProcPtr QDArcUPP;
  411.  
  412. #define CallQDArcProc(userRoutine, verb, r, startAngle, arcAngle)        \
  413.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDArcProcInfo, (verb), (r), (startAngle), (arcAngle))
  414. #define NewQDArcProc(userRoutine)        \
  415.         (QDArcUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDArcProcInfo, GetCurrentISA())
  416. #else
  417. typedef QDArcProcPtr QDArcUPP;
  418.  
  419. #define CallQDArcProc(userRoutine, verb, r, startAngle, arcAngle)        \
  420.         (*(userRoutine))((verb), (r), (startAngle), (arcAngle))
  421. #define NewQDArcProc(userRoutine)        \
  422.         (QDArcUPP)(userRoutine)
  423. #endif
  424.  
  425. typedef pascal void (*QDPolyProcPtr)(GrafVerb verb, PolyHandle poly);
  426.  
  427. enum {
  428.     uppQDPolyProcInfo = kPascalStackBased
  429.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(GrafVerb)))
  430.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(PolyHandle)))
  431. };
  432.  
  433. #if USESROUTINEDESCRIPTORS
  434. typedef UniversalProcPtr QDPolyUPP;
  435.  
  436. #define CallQDPolyProc(userRoutine, verb, poly)        \
  437.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDPolyProcInfo, (verb), (poly))
  438. #define NewQDPolyProc(userRoutine)        \
  439.         (QDPolyUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPolyProcInfo, GetCurrentISA())
  440. #else
  441. typedef QDPolyProcPtr QDPolyUPP;
  442.  
  443. #define CallQDPolyProc(userRoutine, verb, poly)        \
  444.         (*(userRoutine))((verb), (poly))
  445. #define NewQDPolyProc(userRoutine)        \
  446.         (QDPolyUPP)(userRoutine)
  447. #endif
  448.  
  449. typedef pascal void (*QDRgnProcPtr)(GrafVerb verb, RgnHandle rgn);
  450.  
  451. enum {
  452.     uppQDRgnProcInfo = kPascalStackBased
  453.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(GrafVerb)))
  454.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(RgnHandle)))
  455. };
  456.  
  457. #if USESROUTINEDESCRIPTORS
  458. typedef UniversalProcPtr QDRgnUPP;
  459.  
  460. #define CallQDRgnProc(userRoutine, verb, rgn)        \
  461.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDRgnProcInfo, (verb), (rgn))
  462. #define NewQDRgnProc(userRoutine)        \
  463.         (QDRgnUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRgnProcInfo, GetCurrentISA())
  464. #else
  465. typedef QDRgnProcPtr QDRgnUPP;
  466.  
  467. #define CallQDRgnProc(userRoutine, verb, rgn)        \
  468.         (*(userRoutine))((verb), (rgn))
  469. #define NewQDRgnProc(userRoutine)        \
  470.         (QDRgnUPP)(userRoutine)
  471. #endif
  472.  
  473. typedef pascal void (*QDBitsProcPtr)(BitMap *srcBits, Rect *srcRect, Rect *dstRect, short mode, RgnHandle maskRgn);
  474.  
  475. enum {
  476.     uppQDBitsProcInfo = kPascalStackBased
  477.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(BitMap*)))
  478.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Rect*)))
  479.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Rect*)))
  480.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
  481.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(RgnHandle)))
  482. };
  483.  
  484. #if USESROUTINEDESCRIPTORS
  485. typedef UniversalProcPtr QDBitsUPP;
  486.  
  487. #define CallQDBitsProc(userRoutine, srcBits, srcRect, dstRect, mode, maskRgn)        \
  488.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDBitsProcInfo, (srcBits), (srcRect), (dstRect), (mode), (maskRgn))
  489. #define NewQDBitsProc(userRoutine)        \
  490.         (QDBitsUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDBitsProcInfo, GetCurrentISA())
  491. #else
  492. typedef QDBitsProcPtr QDBitsUPP;
  493.  
  494. #define CallQDBitsProc(userRoutine, srcBits, srcRect, dstRect, mode, maskRgn)        \
  495.         (*(userRoutine))((srcBits), (srcRect), (dstRect), (mode), (maskRgn))
  496. #define NewQDBitsProc(userRoutine)        \
  497.         (QDBitsUPP)(userRoutine)
  498. #endif
  499.  
  500. typedef pascal void (*QDCommentProcPtr)(short kind, short dataSize, Handle dataHandle);
  501.  
  502. enum {
  503.     uppQDCommentProcInfo = kPascalStackBased
  504.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  505.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  506.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Handle)))
  507. };
  508.  
  509. #if USESROUTINEDESCRIPTORS
  510. typedef UniversalProcPtr QDCommentUPP;
  511.  
  512. #define CallQDCommentProc(userRoutine, kind, dataSize, dataHandle)        \
  513.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDCommentProcInfo, (kind), (dataSize), (dataHandle))
  514. #define NewQDCommentProc(userRoutine)        \
  515.         (QDCommentUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDCommentProcInfo, GetCurrentISA())
  516. #else
  517. typedef QDCommentProcPtr QDCommentUPP;
  518.  
  519. #define CallQDCommentProc(userRoutine, kind, dataSize, dataHandle)        \
  520.         (*(userRoutine))((kind), (dataSize), (dataHandle))
  521. #define NewQDCommentProc(userRoutine)        \
  522.         (QDCommentUPP)(userRoutine)
  523. #endif
  524.  
  525. typedef pascal short (*QDTxMeasProcPtr)(short byteCount, Ptr textAddr, Point *numer, Point *denum, FontInfo *info);
  526.  
  527. enum {
  528.     uppQDTxMeasProcInfo = kPascalStackBased
  529.          | RESULT_SIZE(SIZE_CODE(sizeof(short)))
  530.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  531.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr)))
  532.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Point*)))
  533.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(Point*)))
  534.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(FontInfo*)))
  535. };
  536.  
  537. #if USESROUTINEDESCRIPTORS
  538. typedef UniversalProcPtr QDTxMeasUPP;
  539.  
  540. #define CallQDTxMeasProc(userRoutine, byteCount, textAddr, numer, denum, info)        \
  541.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDTxMeasProcInfo, (byteCount), (textAddr), (numer), (denum), (info))
  542. #define NewQDTxMeasProc(userRoutine)        \
  543.         (QDTxMeasUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDTxMeasProcInfo, GetCurrentISA())
  544. #else
  545. typedef QDTxMeasProcPtr QDTxMeasUPP;
  546.  
  547. #define CallQDTxMeasProc(userRoutine, byteCount, textAddr, numer, denum, info)        \
  548.         (*(userRoutine))((byteCount), (textAddr), (numer), (denum), (info))
  549. #define NewQDTxMeasProc(userRoutine)        \
  550.         (QDTxMeasUPP)(userRoutine)
  551. #endif
  552.  
  553. typedef pascal void (*QDGetPicProcPtr)(Ptr dataPtr, short byteCount);
  554.  
  555. enum {
  556.     uppQDGetPicProcInfo = kPascalStackBased
  557.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  558.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  559. };
  560.  
  561. #if USESROUTINEDESCRIPTORS
  562. typedef UniversalProcPtr QDGetPicUPP;
  563.  
  564. #define CallQDGetPicProc(userRoutine, dataPtr, byteCount)        \
  565.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDGetPicProcInfo, (dataPtr), (byteCount))
  566. #define NewQDGetPicProc(userRoutine)        \
  567.         (QDGetPicUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDGetPicProcInfo, GetCurrentISA())
  568. #else
  569. typedef QDGetPicProcPtr QDGetPicUPP;
  570.  
  571. #define CallQDGetPicProc(userRoutine, dataPtr, byteCount)        \
  572.         (*(userRoutine))((dataPtr), (byteCount))
  573. #define NewQDGetPicProc(userRoutine)        \
  574.         (QDGetPicUPP)(userRoutine)
  575. #endif
  576.  
  577. typedef pascal void (*QDPutPicProcPtr)(Ptr dataPtr, short byteCount);
  578.  
  579. enum {
  580.     uppQDPutPicProcInfo = kPascalStackBased
  581.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  582.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  583. };
  584.  
  585. #if USESROUTINEDESCRIPTORS
  586. typedef UniversalProcPtr QDPutPicUPP;
  587.  
  588. #define CallQDPutPicProc(userRoutine, dataPtr, byteCount)        \
  589.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDPutPicProcInfo, (dataPtr), (byteCount))
  590. #define NewQDPutPicProc(userRoutine)        \
  591.         (QDPutPicUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPutPicProcInfo, GetCurrentISA())
  592. #else
  593. typedef QDPutPicProcPtr QDPutPicUPP;
  594.  
  595. #define CallQDPutPicProc(userRoutine, dataPtr, byteCount)        \
  596.         (*(userRoutine))((dataPtr), (byteCount))
  597. #define NewQDPutPicProc(userRoutine)        \
  598.         (QDPutPicUPP)(userRoutine)
  599. #endif
  600.  
  601. typedef pascal void (*QDOpcodeProcPtr)(Rect *fromRect, Rect *toRect, short opcode, short version);
  602.  
  603. enum {
  604.     uppQDOpcodeProcInfo = kPascalStackBased
  605.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Rect*)))
  606.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Rect*)))
  607.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short)))
  608.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
  609. };
  610.  
  611. #if USESROUTINEDESCRIPTORS
  612. typedef UniversalProcPtr QDOpcodeUPP;
  613.  
  614. #define CallQDOpcodeProc(userRoutine, fromRect, toRect, opcode, version)        \
  615.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDOpcodeProcInfo, (fromRect), (toRect), (opcode), (version))
  616. #define NewQDOpcodeProc(userRoutine)        \
  617.         (QDOpcodeUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDOpcodeProcInfo, GetCurrentISA())
  618. #else
  619. typedef QDOpcodeProcPtr QDOpcodeUPP;
  620.  
  621. #define CallQDOpcodeProc(userRoutine, fromRect, toRect, opcode, version)        \
  622.         (*(userRoutine))((fromRect), (toRect), (opcode), (version))
  623. #define NewQDOpcodeProc(userRoutine)        \
  624.         (QDOpcodeUPP)(userRoutine)
  625. #endif
  626.  
  627. typedef pascal void (*QDJShieldCursorProcPtr)(short left, short top, short right, short bottom);
  628.  
  629. enum {
  630.     uppQDJShieldCursorProcInfo = kPascalStackBased
  631.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  632.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  633.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short)))
  634.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
  635. };
  636.  
  637. #if USESROUTINEDESCRIPTORS
  638. typedef UniversalProcPtr QDJShieldCursorUPP;
  639.  
  640. #define CallQDJShieldCursorProc(userRoutine, left, top, right, bottom)        \
  641.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQDJShieldCursorProcInfo, (left), (top), (right), (bottom))
  642. #define NewQDJShieldCursorProc(userRoutine)        \
  643.         (QDJShieldCursorUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDJShieldCursorProcInfo, GetCurrentISA())
  644. #else
  645. typedef QDJShieldCursorProcPtr QDJShieldCursorUPP;
  646.  
  647. #define CallQDJShieldCursorProc(userRoutine, left, top, right, bottom)        \
  648.         (*(userRoutine))((left), (top), (right), (bottom))
  649. #define NewQDJShieldCursorProc(userRoutine)        \
  650.         (QDJShieldCursorUPP)(userRoutine)
  651. #endif
  652.  
  653. #if defined(powerc) || defined (__powerc)
  654. #pragma options align=mac68k
  655. #endif
  656. struct QDProcs {
  657.     QDTextUPP                    textProc;
  658.     QDLineUPP                    lineProc;
  659.     QDRectUPP                    rectProc;
  660.     QDRRectUPP                    rRectProc;
  661.     QDOvalUPP                    ovalProc;
  662.     QDArcUPP                    arcProc;
  663.     QDPolyUPP                    polyProc;
  664.     QDRgnUPP                    rgnProc;
  665.     QDBitsUPP                    bitsProc;
  666.     QDCommentUPP                commentProc;
  667.     QDTxMeasUPP                    txMeasProc;
  668.     QDGetPicUPP                    getPicProc;
  669.     QDPutPicUPP                    putPicProc;
  670. };
  671. #if defined(powerc) || defined(__powerc)
  672. #pragma options align=reset
  673. #endif
  674.  
  675. typedef struct QDProcs QDProcs;
  676.  
  677. typedef QDProcs *QDProcsPtr;
  678.  
  679. #if defined(powerc) || defined (__powerc)
  680. #pragma options align=mac68k
  681. #endif
  682. struct GrafPort {
  683.     short                        device;
  684.     BitMap                        portBits;
  685.     Rect                        portRect;
  686.     RgnHandle                    visRgn;
  687.     RgnHandle                    clipRgn;
  688.     Pattern                        bkPat;
  689.     Pattern                        fillPat;
  690.     Point                        pnLoc;
  691.     Point                        pnSize;
  692.     short                        pnMode;
  693.     Pattern                        pnPat;
  694.     short                        pnVis;
  695.     short                        txFont;
  696.     Style                        txFace;                            /*txFace is unpacked byte but push as short*/
  697.     char                        filler;
  698.     short                        txMode;
  699.     short                        txSize;
  700.     Fixed                        spExtra;
  701.     long                        fgColor;
  702.     long                        bkColor;
  703.     short                        colrBit;
  704.     short                        patStretch;
  705.     Handle                        picSave;
  706.     Handle                        rgnSave;
  707.     Handle                        polySave;
  708.     QDProcsPtr                    grafProcs;
  709. };
  710. #if defined(powerc) || defined(__powerc)
  711. #pragma options align=reset
  712. #endif
  713.  
  714. typedef struct GrafPort GrafPort;
  715.  
  716. typedef GrafPort *GrafPtr;
  717.  
  718. typedef GrafPtr WindowPtr;
  719.  
  720. #if defined(powerc) || defined (__powerc)
  721. #pragma options align=mac68k
  722. #endif
  723. struct RGBColor {
  724.     unsigned short                red;                            /*magnitude of red component*/
  725.     unsigned short                green;                            /*magnitude of green component*/
  726.     unsigned short                blue;                            /*magnitude of blue component*/
  727. };
  728. #if defined(powerc) || defined(__powerc)
  729. #pragma options align=reset
  730. #endif
  731.  
  732. typedef struct RGBColor RGBColor, *RGBColorPtr, **RGBColorHdl;
  733.  
  734. typedef pascal Boolean (*ColorSearchProcPtr)(RGBColor *rgb, long *position);
  735.  
  736. enum {
  737.     uppColorSearchProcInfo = kPascalStackBased
  738.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  739.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(RGBColor*)))
  740.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long*)))
  741. };
  742.  
  743. #if USESROUTINEDESCRIPTORS
  744. typedef UniversalProcPtr ColorSearchUPP;
  745.  
  746. #define CallColorSearchProc(userRoutine, rgb, position)        \
  747.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppColorSearchProcInfo, (rgb), (position))
  748. #define NewColorSearchProc(userRoutine)        \
  749.         (ColorSearchUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorSearchProcInfo, GetCurrentISA())
  750. #else
  751. typedef ColorSearchProcPtr ColorSearchUPP;
  752.  
  753. #define CallColorSearchProc(userRoutine, rgb, position)        \
  754.         (*(userRoutine))((rgb), (position))
  755. #define NewColorSearchProc(userRoutine)        \
  756.         (ColorSearchUPP)(userRoutine)
  757. #endif
  758.  
  759. typedef pascal Boolean (*ColorComplementProcPtr)(RGBColor *rgb);
  760.  
  761. enum {
  762.     uppColorComplementProcInfo = kPascalStackBased
  763.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  764.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(RGBColor*)))
  765. };
  766.  
  767. #if USESROUTINEDESCRIPTORS
  768. typedef UniversalProcPtr ColorComplementUPP;
  769.  
  770. #define CallColorComplementProc(userRoutine, rgb)        \
  771.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppColorComplementProcInfo, (rgb))
  772. #define NewColorComplementProc(userRoutine)        \
  773.         (ColorComplementUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorComplementProcInfo, GetCurrentISA())
  774. #else
  775. typedef ColorComplementProcPtr ColorComplementUPP;
  776.  
  777. #define CallColorComplementProc(userRoutine, rgb)        \
  778.         (*(userRoutine))((rgb))
  779. #define NewColorComplementProc(userRoutine)        \
  780.         (ColorComplementUPP)(userRoutine)
  781. #endif
  782.  
  783. #if defined(powerc) || defined (__powerc)
  784. #pragma options align=mac68k
  785. #endif
  786. struct ColorSpec {
  787.     short                        value;                            /*index or other value*/
  788.     RGBColor                    rgb;                            /*true color*/
  789. };
  790. #if defined(powerc) || defined(__powerc)
  791. #pragma options align=reset
  792. #endif
  793.  
  794. typedef struct ColorSpec ColorSpec;
  795.  
  796. typedef ColorSpec *ColorSpecPtr;
  797.  
  798. typedef ColorSpec CSpecArray[1];
  799.  
  800. #if defined(powerc) || defined (__powerc)
  801. #pragma options align=mac68k
  802. #endif
  803. struct ColorTable {
  804.     long                        ctSeed;                            /*unique identifier for table*/
  805.     short                        ctFlags;                        /*high bit: 0 = PixMap; 1 = device*/
  806.     short                        ctSize;                            /*number of entries in CTTable*/
  807.     CSpecArray                    ctTable;                        /*array [0..0] of ColorSpec*/
  808. };
  809. #if defined(powerc) || defined(__powerc)
  810. #pragma options align=reset
  811. #endif
  812.  
  813. typedef struct ColorTable ColorTable;
  814.  
  815. typedef ColorTable *CTabPtr, **CTabHandle;
  816.  
  817. #if defined(powerc) || defined (__powerc)
  818. #pragma options align=mac68k
  819. #endif
  820. struct MatchRec {
  821.     unsigned short                red;
  822.     unsigned short                green;
  823.     unsigned short                blue;
  824.     long                        matchData;
  825. };
  826. #if defined(powerc) || defined(__powerc)
  827. #pragma options align=reset
  828. #endif
  829.  
  830. typedef struct MatchRec MatchRec;
  831.  
  832. #if defined(powerc) || defined (__powerc)
  833. #pragma options align=mac68k
  834. #endif
  835. struct PixMap {
  836.     Ptr                            baseAddr;                        /*pointer to pixels*/
  837.     short                        rowBytes;                        /*offset to next line*/
  838.     Rect                        bounds;                            /*encloses bitmap*/
  839.     short                        pmVersion;                        /*pixMap version number*/
  840.     short                        packType;                        /*defines packing format*/
  841.     long                        packSize;                        /*length of pixel data*/
  842.     Fixed                        hRes;                            /*horiz. resolution (ppi)*/
  843.     Fixed                        vRes;                            /*vert. resolution (ppi)*/
  844.     short                        pixelType;                        /*defines pixel type*/
  845.     short                        pixelSize;                        /*# bits in pixel*/
  846.     short                        cmpCount;                        /*# components in pixel*/
  847.     short                        cmpSize;                        /*# bits per component*/
  848.     long                        planeBytes;                        /*offset to next plane*/
  849.     CTabHandle                    pmTable;                        /*color map for this pixMap*/
  850.     long                        pmReserved;                        /*for future use. MUST BE 0*/
  851. };
  852. #if defined(powerc) || defined(__powerc)
  853. #pragma options align=reset
  854. #endif
  855.  
  856. typedef struct PixMap PixMap;
  857.  
  858. typedef PixMap *PixMapPtr, **PixMapHandle;
  859.  
  860. #if defined(powerc) || defined (__powerc)
  861. #pragma options align=mac68k
  862. #endif
  863. struct PixPat {
  864.     short                        patType;                        /*type of pattern*/
  865.     PixMapHandle                patMap;                            /*the pattern's pixMap*/
  866.     Handle                        patData;                        /*pixmap's data*/
  867.     Handle                        patXData;                        /*expanded Pattern data*/
  868.     short                        patXValid;                        /*flags whether expanded Pattern valid*/
  869.     Handle                        patXMap;                        /*Handle to expanded Pattern data*/
  870.     Pattern                        pat1Data;                        /*old-Style pattern/RGB color*/
  871. };
  872. #if defined(powerc) || defined(__powerc)
  873. #pragma options align=reset
  874. #endif
  875.  
  876. typedef struct PixPat PixPat;
  877.  
  878. typedef PixPat *PixPatPtr, **PixPatHandle;
  879.  
  880. #if defined(powerc) || defined (__powerc)
  881. #pragma options align=mac68k
  882. #endif
  883. struct CCrsr {
  884.     short                        crsrType;                        /*type of cursor*/
  885.     PixMapHandle                crsrMap;                        /*the cursor's pixmap*/
  886.     Handle                        crsrData;                        /*cursor's data*/
  887.     Handle                        crsrXData;                        /*expanded cursor data*/
  888.     short                        crsrXValid;                        /*depth of expanded data (0 if none)*/
  889.     Handle                        crsrXHandle;                    /*future use*/
  890.     Bits16                        crsr1Data;                        /*one-bit cursor*/
  891.     Bits16                        crsrMask;                        /*cursor's mask*/
  892.     Point                        crsrHotSpot;                    /*cursor's hotspot*/
  893.     long                        crsrXTable;                        /*private*/
  894.     long                        crsrID;                            /*private*/
  895. };
  896. #if defined(powerc) || defined(__powerc)
  897. #pragma options align=reset
  898. #endif
  899.  
  900. typedef struct CCrsr CCrsr;
  901.  
  902. typedef CCrsr *CCrsrPtr, **CCrsrHandle;
  903.  
  904. #if defined(powerc) || defined (__powerc)
  905. #pragma options align=mac68k
  906. #endif
  907. struct CIcon {
  908.     PixMap                        iconPMap;                        /*the icon's pixMap*/
  909.     BitMap                        iconMask;                        /*the icon's mask*/
  910.     BitMap                        iconBMap;                        /*the icon's bitMap*/
  911.     Handle                        iconData;                        /*the icon's data*/
  912.     short                        iconMaskData[1];                /*icon's mask and BitMap data*/
  913. };
  914. #if defined(powerc) || defined(__powerc)
  915. #pragma options align=reset
  916. #endif
  917.  
  918. typedef struct CIcon CIcon;
  919.  
  920. typedef CIcon *CIconPtr, **CIconHandle;
  921.  
  922. #if defined(powerc) || defined (__powerc)
  923. #pragma options align=mac68k
  924. #endif
  925. struct GammaTbl {
  926.     short                        gVersion;                        /*gamma version number*/
  927.     short                        gType;                            /*gamma data type*/
  928.     short                        gFormulaSize;                    /*Formula data size*/
  929.     short                        gChanCnt;                        /*number of channels of data*/
  930.     short                        gDataCnt;                        /*number of values/channel*/
  931.     short                        gDataWidth;                        /*bits/corrected value (data packed to next larger byte size)*/
  932.     short                        gFormulaData[1];                /*data for formulas followed by gamma values*/
  933. };
  934. #if defined(powerc) || defined(__powerc)
  935. #pragma options align=reset
  936. #endif
  937.  
  938. typedef struct GammaTbl GammaTbl;
  939.  
  940. typedef GammaTbl *GammaTblPtr, **GammaTblHandle;
  941.  
  942. #if defined(powerc) || defined (__powerc)
  943. #pragma options align=mac68k
  944. #endif
  945. struct ITab {
  946.     long                        iTabSeed;                        /*copy of CTSeed from source CTable*/
  947.     short                        iTabRes;                        /*bits/channel resolution of iTable*/
  948.     unsigned char                iTTable[1];                        /*byte colortable index values*/
  949. };
  950. #if defined(powerc) || defined(__powerc)
  951. #pragma options align=reset
  952. #endif
  953.  
  954. typedef struct ITab ITab;
  955.  
  956. typedef ITab *ITabPtr, **ITabHandle;
  957.  
  958. #if defined(powerc) || defined (__powerc)
  959. #pragma options align=mac68k
  960. #endif
  961. struct SProcRec {
  962.     Handle                        nxtSrch;                        /*SProcHndl Handle to next SProcRec*/
  963.     ColorSearchUPP                srchProc;                        /*search procedure proc ptr*/
  964. };
  965. #if defined(powerc) || defined(__powerc)
  966. #pragma options align=reset
  967. #endif
  968.  
  969. typedef struct SProcRec SProcRec;
  970.  
  971. typedef SProcRec *SProcPtr, **SProcHndl;
  972.  
  973. #if defined(powerc) || defined (__powerc)
  974. #pragma options align=mac68k
  975. #endif
  976. struct CProcRec {
  977.     Handle                        nxtComp;                        /*CProcHndl Handle to next CProcRec*/
  978.     ColorComplementUPP            compProc;                        /*complement procedure proc ptr*/
  979. };
  980. #if defined(powerc) || defined(__powerc)
  981. #pragma options align=reset
  982. #endif
  983.  
  984. typedef struct CProcRec CProcRec;
  985.  
  986. typedef CProcRec *CProcPtr, **CProcHndl;
  987.  
  988. #if defined(powerc) || defined (__powerc)
  989. #pragma options align=mac68k
  990. #endif
  991. struct GDevice {
  992.     short                        gdRefNum;                        /*driver's unit number*/
  993.     short                        gdID;                            /*client ID for search procs*/
  994.     short                        gdType;                            /*fixed/CLUT/direct*/
  995.     ITabHandle                    gdITable;                        /*Handle to inverse lookup table*/
  996.     short                        gdResPref;                        /*preferred resolution of GDITable*/
  997.     SProcHndl                    gdSearchProc;                    /*search proc list head*/
  998.     CProcHndl                    gdCompProc;                        /*complement proc list*/
  999.     short                        gdFlags;                        /*grafDevice flags word*/
  1000.     PixMapHandle                gdPMap;                            /*describing pixMap*/
  1001.     long                        gdRefCon;                        /*reference value*/
  1002.     Handle                        gdNextGD;                        /*GDHandle Handle of next gDevice*/
  1003.     Rect                        gdRect;                            /* device's bounds in global coordinates*/
  1004.     long                        gdMode;                            /*device's current mode*/
  1005.     short                        gdCCBytes;                        /*depth of expanded cursor data*/
  1006.     short                        gdCCDepth;                        /*depth of expanded cursor data*/
  1007.     Handle                        gdCCXData;                        /*Handle to cursor's expanded data*/
  1008.     Handle                        gdCCXMask;                        /*Handle to cursor's expanded mask*/
  1009.     long                        gdReserved;                        /*future use. MUST BE 0*/
  1010. };
  1011. #if defined(powerc) || defined(__powerc)
  1012. #pragma options align=reset
  1013. #endif
  1014.  
  1015. typedef struct GDevice GDevice;
  1016.  
  1017. typedef GDevice *GDPtr, **GDHandle;
  1018.  
  1019. #if defined(powerc) || defined (__powerc)
  1020. #pragma options align=mac68k
  1021. #endif
  1022. struct GrafVars {
  1023.     RGBColor                    rgbOpColor;                        /*color for addPin  subPin and average*/
  1024.     RGBColor                    rgbHiliteColor;                    /*color for hiliting*/
  1025.     Handle                        pmFgColor;                        /*palette Handle for foreground color*/
  1026.     short                        pmFgIndex;                        /*index value for foreground*/
  1027.     Handle                        pmBkColor;                        /*palette Handle for background color*/
  1028.     short                        pmBkIndex;                        /*index value for background*/
  1029.     short                        pmFlags;                        /*flags for Palette Manager*/
  1030. };
  1031. #if defined(powerc) || defined(__powerc)
  1032. #pragma options align=reset
  1033. #endif
  1034.  
  1035. typedef struct GrafVars GrafVars;
  1036.  
  1037. typedef GrafVars *GVarPtr, **GVarHandle;
  1038.  
  1039. #if defined(powerc) || defined (__powerc)
  1040. #pragma options align=mac68k
  1041. #endif
  1042. struct CQDProcs {
  1043.     QDTextUPP                    textProc;
  1044.     QDLineUPP                    lineProc;
  1045.     QDRectUPP                    rectProc;
  1046.     QDRRectUPP                    rRectProc;
  1047.     QDOvalUPP                    ovalProc;
  1048.     QDArcUPP                    arcProc;
  1049.     QDPolyUPP                    polyProc;
  1050.     QDRgnUPP                    rgnProc;
  1051.     QDBitsUPP                    bitsProc;
  1052.     QDCommentUPP                commentProc;
  1053.     QDTxMeasUPP                    txMeasProc;
  1054.     QDGetPicUPP                    getPicProc;
  1055.     QDPutPicUPP                    putPicProc;
  1056.     QDOpcodeUPP                    opcodeProc;                        /*fields added to QDProcs*/
  1057.     UniversalProcPtr            newProc1;
  1058.     UniversalProcPtr            newProc2;
  1059.     UniversalProcPtr            newProc3;
  1060.     UniversalProcPtr            newProc4;
  1061.     UniversalProcPtr            newProc5;
  1062.     UniversalProcPtr            newProc6;
  1063. };
  1064. #if defined(powerc) || defined(__powerc)
  1065. #pragma options align=reset
  1066. #endif
  1067.  
  1068. typedef struct CQDProcs CQDProcs;
  1069.  
  1070. typedef CQDProcs *CQDProcsPtr;
  1071.  
  1072. #if defined(powerc) || defined (__powerc)
  1073. #pragma options align=mac68k
  1074. #endif
  1075. struct CGrafPort {
  1076.     short                        device;
  1077.     PixMapHandle                portPixMap;                        /*port's pixel map*/
  1078.     short                        portVersion;                    /*high 2 bits always set*/
  1079.     Handle                        grafVars;                        /*Handle to more fields*/
  1080.     short                        chExtra;                        /*character extra*/
  1081.     short                        pnLocHFrac;                        /*pen fraction*/
  1082.     Rect                        portRect;
  1083.     RgnHandle                    visRgn;
  1084.     RgnHandle                    clipRgn;
  1085.     PixPatHandle                bkPixPat;                        /*background pattern*/
  1086.     RGBColor                    rgbFgColor;                        /*RGB components of fg*/
  1087.     RGBColor                    rgbBkColor;                        /*RGB components of bk*/
  1088.     Point                        pnLoc;
  1089.     Point                        pnSize;
  1090.     short                        pnMode;
  1091.     PixPatHandle                pnPixPat;                        /*pen's pattern*/
  1092.     PixPatHandle                fillPixPat;                        /*fill pattern*/
  1093.     short                        pnVis;
  1094.     short                        txFont;
  1095.     Style                        txFace;                            /*txFace is unpacked byte  push as short*/
  1096.     char                        filler;
  1097.     short                        txMode;
  1098.     short                        txSize;
  1099.     Fixed                        spExtra;
  1100.     long                        fgColor;
  1101.     long                        bkColor;
  1102.     short                        colrBit;
  1103.     short                        patStretch;
  1104.     Handle                        picSave;
  1105.     Handle                        rgnSave;
  1106.     Handle                        polySave;
  1107.     CQDProcsPtr                    grafProcs;
  1108. };
  1109. #if defined(powerc) || defined(__powerc)
  1110. #pragma options align=reset
  1111. #endif
  1112.  
  1113. typedef struct CGrafPort CGrafPort;
  1114.  
  1115. typedef CGrafPort *CGrafPtr;
  1116.  
  1117. typedef CGrafPtr CWindowPtr;
  1118.  
  1119. #if defined(powerc) || defined (__powerc)
  1120. #pragma options align=mac68k
  1121. #endif
  1122. struct ReqListRec {
  1123.     short                        reqLSize;                        /*request list size*/
  1124.     short                        reqLData[1];                    /*request list data*/
  1125. };
  1126. #if defined(powerc) || defined(__powerc)
  1127. #pragma options align=reset
  1128. #endif
  1129.  
  1130. typedef struct ReqListRec ReqListRec;
  1131.  
  1132. #if defined(powerc) || defined (__powerc)
  1133. #pragma options align=mac68k
  1134. #endif
  1135. struct OpenCPicParams {
  1136.     Rect                        srcRect;
  1137.     Fixed                        hRes;
  1138.     Fixed                        vRes;
  1139.     short                        version;
  1140.     short                        reserved1;
  1141.     long                        reserved2;
  1142. };
  1143. #if defined(powerc) || defined(__powerc)
  1144. #pragma options align=reset
  1145. #endif
  1146.  
  1147. typedef struct OpenCPicParams OpenCPicParams;
  1148.  
  1149. typedef pascal void (*DeviceLoopDrawingProcPtr)(short depth, short deviceFlags, GDHandle targetDevice, long userData);
  1150.  
  1151. enum {
  1152.     uppDeviceLoopDrawingProcInfo = kPascalStackBased
  1153.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  1154.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  1155.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(GDHandle)))
  1156.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
  1157. };
  1158.  
  1159. #if USESROUTINEDESCRIPTORS
  1160. typedef UniversalProcPtr DeviceLoopDrawingUPP;
  1161.  
  1162. #define CallDeviceLoopDrawingProc(userRoutine, depth, deviceFlags, targetDevice, userData)        \
  1163.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDeviceLoopDrawingProcInfo, (depth), (deviceFlags), (targetDevice), (userData))
  1164. #define NewDeviceLoopDrawingProc(userRoutine)        \
  1165.         (DeviceLoopDrawingUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDeviceLoopDrawingProcInfo, GetCurrentISA())
  1166. #else
  1167. typedef DeviceLoopDrawingProcPtr DeviceLoopDrawingUPP;
  1168.  
  1169. #define CallDeviceLoopDrawingProc(userRoutine, depth, deviceFlags, targetDevice, userData)        \
  1170.         (*(userRoutine))((depth), (deviceFlags), (targetDevice), (userData))
  1171. #define NewDeviceLoopDrawingProc(userRoutine)        \
  1172.         (DeviceLoopDrawingUPP)(userRoutine)
  1173. #endif
  1174.  
  1175. #if defined(powerc) || defined (__powerc)
  1176. #pragma options align=mac68k
  1177. #endif
  1178. struct QDGlobals {
  1179.     char                        privates[76];
  1180.     long                        randSeed;
  1181.     BitMap                        screenBits;
  1182.     Cursor                        arrow;
  1183.     Pattern                        dkGray;
  1184.     Pattern                        ltGray;
  1185.     Pattern                        gray;
  1186.     Pattern                        black;
  1187.     Pattern                        white;
  1188.     GrafPtr                        thePort;
  1189. };
  1190. #if defined(powerc) || defined(__powerc)
  1191. #pragma options align=reset
  1192. #endif
  1193.  
  1194. typedef struct QDGlobals QDGlobals;
  1195.  
  1196. extern QDGlobals qd;
  1197.  
  1198. #ifdef __cplusplus
  1199. extern "C" {
  1200. #endif
  1201.  
  1202. extern pascal void InitGraf(void *globalPtr)
  1203.  ONEWORDINLINE(0xA86E);
  1204. extern pascal void OpenPort(GrafPtr port)
  1205.  ONEWORDINLINE(0xA86F);
  1206. extern pascal void InitPort(GrafPtr port)
  1207.  ONEWORDINLINE(0xA86D);
  1208. extern pascal void ClosePort(GrafPtr port)
  1209.  ONEWORDINLINE(0xA87D);
  1210. extern pascal void SetPort(GrafPtr port)
  1211.  ONEWORDINLINE(0xA873);
  1212. extern pascal void GetPort(GrafPtr *port)
  1213.  ONEWORDINLINE(0xA874);
  1214. extern pascal void GrafDevice(short device)
  1215.  ONEWORDINLINE(0xA872);
  1216. extern pascal void SetPortBits(const BitMap *bm)
  1217.  ONEWORDINLINE(0xA875);
  1218. extern pascal void PortSize(short width, short height)
  1219.  ONEWORDINLINE(0xA876);
  1220. extern pascal void MovePortTo(short leftGlobal, short topGlobal)
  1221.  ONEWORDINLINE(0xA877);
  1222. extern pascal void SetOrigin(short h, short v)
  1223.  ONEWORDINLINE(0xA878);
  1224. extern pascal void SetClip(RgnHandle rgn)
  1225.  ONEWORDINLINE(0xA879);
  1226. extern pascal void GetClip(RgnHandle rgn)
  1227.  ONEWORDINLINE(0xA87A);
  1228. extern pascal void ClipRect(const Rect *r)
  1229.  ONEWORDINLINE(0xA87B);
  1230. extern pascal void BackPat(ConstPatternParam pat)
  1231.  ONEWORDINLINE(0xA87C);
  1232. extern pascal void InitCursor(void)
  1233.  ONEWORDINLINE(0xA850);
  1234. extern pascal void SetCursor(const Cursor *crsr)
  1235.  ONEWORDINLINE(0xA851);
  1236. extern pascal void HideCursor(void)
  1237.  ONEWORDINLINE(0xA852);
  1238. extern pascal void ShowCursor(void)
  1239.  ONEWORDINLINE(0xA853);
  1240. extern pascal void ObscureCursor(void)
  1241.  ONEWORDINLINE(0xA856);
  1242. extern pascal void HidePen(void)
  1243.  ONEWORDINLINE(0xA896);
  1244. extern pascal void ShowPen(void)
  1245.  ONEWORDINLINE(0xA897);
  1246. extern pascal void GetPen(Point *pt)
  1247.  ONEWORDINLINE(0xA89A);
  1248. extern pascal void GetPenState(PenState *pnState)
  1249.  ONEWORDINLINE(0xA898);
  1250. extern pascal void SetPenState(const PenState *pnState)
  1251.  ONEWORDINLINE(0xA899);
  1252. extern pascal void PenSize(short width, short height)
  1253.  ONEWORDINLINE(0xA89B);
  1254. extern pascal void PenMode(short mode)
  1255.  ONEWORDINLINE(0xA89C);
  1256. extern pascal void PenPat(ConstPatternParam pat)
  1257.  ONEWORDINLINE(0xA89D);
  1258. extern pascal void PenNormal(void)
  1259.  ONEWORDINLINE(0xA89E);
  1260. extern pascal void MoveTo(short h, short v)
  1261.  ONEWORDINLINE(0xA893);
  1262. extern pascal void Move(short dh, short dv)
  1263.  ONEWORDINLINE(0xA894);
  1264. extern pascal void LineTo(short h, short v)
  1265.  ONEWORDINLINE(0xA891);
  1266. extern pascal void Line(short dh, short dv)
  1267.  ONEWORDINLINE(0xA892);
  1268. extern pascal void ForeColor(long color)
  1269.  ONEWORDINLINE(0xA862);
  1270. extern pascal void BackColor(long color)
  1271.  ONEWORDINLINE(0xA863);
  1272. extern pascal void ColorBit(short whichBit)
  1273.  ONEWORDINLINE(0xA864);
  1274. extern pascal void SetRect(Rect *r, short left, short top, short right, short bottom)
  1275.  ONEWORDINLINE(0xA8A7);
  1276. extern pascal void OffsetRect(Rect *r, short dh, short dv)
  1277.  ONEWORDINLINE(0xA8A8);
  1278. extern pascal void InsetRect(Rect *r, short dh, short dv)
  1279.  ONEWORDINLINE(0xA8A9);
  1280. extern pascal Boolean SectRect(const Rect *src1, const Rect *src2, Rect *dstRect)
  1281.  ONEWORDINLINE(0xA8AA);
  1282. extern pascal void UnionRect(const Rect *src1, const Rect *src2, Rect *dstRect)
  1283.  ONEWORDINLINE(0xA8AB);
  1284. extern pascal Boolean EqualRect(const Rect *rect1, const Rect *rect2)
  1285.  ONEWORDINLINE(0xA8A6);
  1286. extern pascal Boolean EmptyRect(const Rect *r)
  1287.  ONEWORDINLINE(0xA8AE);
  1288. extern pascal void FrameRect(const Rect *r)
  1289.  ONEWORDINLINE(0xA8A1);
  1290. extern pascal void PaintRect(const Rect *r)
  1291.  ONEWORDINLINE(0xA8A2);
  1292. extern pascal void EraseRect(const Rect *r)
  1293.  ONEWORDINLINE(0xA8A3);
  1294. extern pascal void InvertRect(const Rect *r)
  1295.  ONEWORDINLINE(0xA8A4);
  1296. extern pascal void FillRect(const Rect *r, ConstPatternParam pat)
  1297.  ONEWORDINLINE(0xA8A5);
  1298. extern pascal void FrameOval(const Rect *r)
  1299.  ONEWORDINLINE(0xA8B7);
  1300. extern pascal void PaintOval(const Rect *r)
  1301.  ONEWORDINLINE(0xA8B8);
  1302. extern pascal void EraseOval(const Rect *r)
  1303.  ONEWORDINLINE(0xA8B9);
  1304. extern pascal void InvertOval(const Rect *r)
  1305.  ONEWORDINLINE(0xA8BA);
  1306. extern pascal void FillOval(const Rect *r, ConstPatternParam pat)
  1307.  ONEWORDINLINE(0xA8BB);
  1308. extern pascal void FrameRoundRect(const Rect *r, short ovalWidth, short ovalHeight)
  1309.  ONEWORDINLINE(0xA8B0);
  1310. extern pascal void PaintRoundRect(const Rect *r, short ovalWidth, short ovalHeight)
  1311.  ONEWORDINLINE(0xA8B1);
  1312. extern pascal void EraseRoundRect(const Rect *r, short ovalWidth, short ovalHeight)
  1313.  ONEWORDINLINE(0xA8B2);
  1314. extern pascal void InvertRoundRect(const Rect *r, short ovalWidth, short ovalHeight)
  1315.  ONEWORDINLINE(0xA8B3);
  1316. extern pascal void FillRoundRect(const Rect *r, short ovalWidth, short ovalHeight, ConstPatternParam pat)
  1317.  ONEWORDINLINE(0xA8B4);
  1318. extern pascal void FrameArc(const Rect *r, short startAngle, short arcAngle)
  1319.  ONEWORDINLINE(0xA8BE);
  1320. extern pascal void PaintArc(const Rect *r, short startAngle, short arcAngle)
  1321.  ONEWORDINLINE(0xA8BF);
  1322. extern pascal void EraseArc(const Rect *r, short startAngle, short arcAngle)
  1323.  ONEWORDINLINE(0xA8C0);
  1324. extern pascal void InvertArc(const Rect *r, short startAngle, short arcAngle)
  1325.  ONEWORDINLINE(0xA8C1);
  1326. extern pascal void FillArc(const Rect *r, short startAngle, short arcAngle, ConstPatternParam pat)
  1327.  ONEWORDINLINE(0xA8C2);
  1328. extern pascal RgnHandle NewRgn(void)
  1329.  ONEWORDINLINE(0xA8D8);
  1330. extern pascal void OpenRgn(void)
  1331.  ONEWORDINLINE(0xA8DA);
  1332. extern pascal void CloseRgn(RgnHandle dstRgn)
  1333.  ONEWORDINLINE(0xA8DB);
  1334. #if !SystemSevenOrLater
  1335. extern pascal OSErr BitMapToRegionGlue(RgnHandle region, const BitMap *bMap);
  1336. #endif
  1337.  
  1338. extern pascal OSErr BitMapToRegion(RgnHandle region, const BitMap *bMap)
  1339.  ONEWORDINLINE(0xA8D7);
  1340. extern pascal void DisposeRgn(RgnHandle rgn)
  1341.  ONEWORDINLINE(0xA8D9);
  1342. extern pascal void CopyRgn(RgnHandle srcRgn, RgnHandle dstRgn)
  1343.  ONEWORDINLINE(0xA8DC);
  1344. extern pascal void SetEmptyRgn(RgnHandle rgn)
  1345.  ONEWORDINLINE(0xA8DD);
  1346. extern pascal void SetRectRgn(RgnHandle rgn, short left, short top, short right, short bottom)
  1347.  ONEWORDINLINE(0xA8DE);
  1348. extern pascal void RectRgn(RgnHandle rgn, const Rect *r)
  1349.  ONEWORDINLINE(0xA8DF);
  1350. extern pascal void OffsetRgn(RgnHandle rgn, short dh, short dv)
  1351.  ONEWORDINLINE(0xA8E0);
  1352. extern pascal void InsetRgn(RgnHandle rgn, short dh, short dv)
  1353.  ONEWORDINLINE(0xA8E1);
  1354. extern pascal void SectRgn(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn)
  1355.  ONEWORDINLINE(0xA8E4);
  1356. extern pascal void UnionRgn(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn)
  1357.  ONEWORDINLINE(0xA8E5);
  1358. extern pascal void DiffRgn(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn)
  1359.  ONEWORDINLINE(0xA8E6);
  1360. extern pascal void XorRgn(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn)
  1361.  ONEWORDINLINE(0xA8E7);
  1362. extern pascal Boolean RectInRgn(const Rect *r, RgnHandle rgn)
  1363.  ONEWORDINLINE(0xA8E9);
  1364. extern pascal Boolean EqualRgn(RgnHandle rgnA, RgnHandle rgnB)
  1365.  ONEWORDINLINE(0xA8E3);
  1366. extern pascal Boolean EmptyRgn(RgnHandle rgn)
  1367.  ONEWORDINLINE(0xA8E2);
  1368. extern pascal void FrameRgn(RgnHandle rgn)
  1369.  ONEWORDINLINE(0xA8D2);
  1370. extern pascal void PaintRgn(RgnHandle rgn)
  1371.  ONEWORDINLINE(0xA8D3);
  1372. extern pascal void EraseRgn(RgnHandle rgn)
  1373.  ONEWORDINLINE(0xA8D4);
  1374. extern pascal void InvertRgn(RgnHandle rgn)
  1375.  ONEWORDINLINE(0xA8D5);
  1376. extern pascal void FillRgn(RgnHandle rgn, ConstPatternParam pat)
  1377.  ONEWORDINLINE(0xA8D6);
  1378. extern pascal void ScrollRect(const Rect *r, short dh, short dv, RgnHandle updateRgn)
  1379.  ONEWORDINLINE(0xA8EF);
  1380. extern pascal void CopyBits(const BitMap *srcBits, const BitMap *dstBits, const Rect *srcRect, const Rect *dstRect, short mode, RgnHandle maskRgn)
  1381.  ONEWORDINLINE(0xA8EC);
  1382. extern pascal void SeedFill(const void *srcPtr, void *dstPtr, short srcRow, short dstRow, short height, short words, short seedH, short seedV)
  1383.  ONEWORDINLINE(0xA839);
  1384. extern pascal void CalcMask(const void *srcPtr, void *dstPtr, short srcRow, short dstRow, short height, short words)
  1385.  ONEWORDINLINE(0xA838);
  1386. extern pascal void CopyMask(const BitMap *srcBits, const BitMap *maskBits, const BitMap *dstBits, const Rect *srcRect, const Rect *maskRect, const Rect *dstRect)
  1387.  ONEWORDINLINE(0xA817);
  1388. extern pascal PicHandle OpenPicture(const Rect *picFrame)
  1389.  ONEWORDINLINE(0xA8F3);
  1390. extern pascal void PicComment(short kind, short dataSize, Handle dataHandle)
  1391.  ONEWORDINLINE(0xA8F2);
  1392. extern pascal void ClosePicture(void)
  1393.  ONEWORDINLINE(0xA8F4);
  1394. extern pascal void DrawPicture(PicHandle myPicture, const Rect *dstRect)
  1395.  ONEWORDINLINE(0xA8F6);
  1396. extern pascal void KillPicture(PicHandle myPicture)
  1397.  ONEWORDINLINE(0xA8F5);
  1398. extern pascal PolyHandle OpenPoly(void)
  1399.  ONEWORDINLINE(0xA8CB);
  1400. extern pascal void ClosePoly(void)
  1401.  ONEWORDINLINE(0xA8CC);
  1402. extern pascal void KillPoly(PolyHandle poly)
  1403.  ONEWORDINLINE(0xA8CD);
  1404. extern pascal void OffsetPoly(PolyHandle poly, short dh, short dv)
  1405.  ONEWORDINLINE(0xA8CE);
  1406. extern pascal void FramePoly(PolyHandle poly)
  1407.  ONEWORDINLINE(0xA8C6);
  1408. extern pascal void PaintPoly(PolyHandle poly)
  1409.  ONEWORDINLINE(0xA8C7);
  1410. extern pascal void ErasePoly(PolyHandle poly)
  1411.  ONEWORDINLINE(0xA8C8);
  1412. extern pascal void InvertPoly(PolyHandle poly)
  1413.  ONEWORDINLINE(0xA8C9);
  1414. extern pascal void FillPoly(PolyHandle poly, ConstPatternParam pat)
  1415.  ONEWORDINLINE(0xA8CA);
  1416. extern pascal void SetPt(Point *pt, short h, short v)
  1417.  ONEWORDINLINE(0xA880);
  1418. extern pascal void LocalToGlobal(Point *pt)
  1419.  ONEWORDINLINE(0xA870);
  1420. extern pascal void GlobalToLocal(Point *pt)
  1421.  ONEWORDINLINE(0xA871);
  1422. extern pascal short Random(void)
  1423.  ONEWORDINLINE(0xA861);
  1424. extern pascal void StuffHex(void *thingPtr, ConstStr255Param s)
  1425.  ONEWORDINLINE(0xA866);
  1426. extern pascal Boolean GetPixel(short h, short v)
  1427.  ONEWORDINLINE(0xA865);
  1428. extern pascal void ScalePt(Point *pt, const Rect *srcRect, const Rect *dstRect)
  1429.  ONEWORDINLINE(0xA8F8);
  1430. extern pascal void MapPt(Point *pt, const Rect *srcRect, const Rect *dstRect)
  1431.  ONEWORDINLINE(0xA8F9);
  1432. extern pascal void MapRect(Rect *r, const Rect *srcRect, const Rect *dstRect)
  1433.  ONEWORDINLINE(0xA8FA);
  1434. extern pascal void MapRgn(RgnHandle rgn, const Rect *srcRect, const Rect *dstRect)
  1435.  ONEWORDINLINE(0xA8FB);
  1436. extern pascal void MapPoly(PolyHandle poly, const Rect *srcRect, const Rect *dstRect)
  1437.  ONEWORDINLINE(0xA8FC);
  1438. extern pascal void SetStdProcs(QDProcs *procs)
  1439.  ONEWORDINLINE(0xA8EA);
  1440. extern pascal void StdRect(GrafVerb verb, const Rect *r)
  1441.  ONEWORDINLINE(0xA8A0);
  1442. extern pascal void StdRRect(GrafVerb verb, const Rect *r, short ovalWidth, short ovalHeight)
  1443.  ONEWORDINLINE(0xA8AF);
  1444. extern pascal void StdOval(GrafVerb verb, const Rect *r)
  1445.  ONEWORDINLINE(0xA8B6);
  1446. extern pascal void StdArc(GrafVerb verb, const Rect *r, short startAngle, short arcAngle)
  1447.  ONEWORDINLINE(0xA8BD);
  1448. extern pascal void StdPoly(GrafVerb verb, PolyHandle poly)
  1449.  ONEWORDINLINE(0xA8C5);
  1450. extern pascal void StdRgn(GrafVerb verb, RgnHandle rgn)
  1451.  ONEWORDINLINE(0xA8D1);
  1452. extern pascal void StdBits(const BitMap *srcBits, const Rect *srcRect, const Rect *dstRect, short mode, RgnHandle maskRgn)
  1453.  ONEWORDINLINE(0xA8EB);
  1454. extern pascal void StdComment(short kind, short dataSize, Handle dataHandle)
  1455.  ONEWORDINLINE(0xA8F1);
  1456. extern pascal void StdGetPic(void *dataPtr, short byteCount)
  1457.  ONEWORDINLINE(0xA8EE);
  1458. extern pascal void StdPutPic(const void *dataPtr, short byteCount)
  1459.  ONEWORDINLINE(0xA8F0);
  1460. extern pascal void AddPt(Point src, Point *dst)
  1461.  ONEWORDINLINE(0xA87E);
  1462. extern void subpt(Point *src, Point *dst);
  1463. extern pascal Boolean EqualPt(Point pt1, Point pt2)
  1464.  ONEWORDINLINE(0xA881);
  1465. extern pascal Boolean PtInRect(Point pt, const Rect *r)
  1466.  ONEWORDINLINE(0xA8AD);
  1467. extern pascal void Pt2Rect(Point pt1, Point pt2, Rect *dstRect)
  1468.  ONEWORDINLINE(0xA8AC);
  1469. extern pascal void PtToAngle(const Rect *r, Point pt, short *angle)
  1470.  ONEWORDINLINE(0xA8C3);
  1471. extern pascal void SubPt(Point src, Point *dst)
  1472.  ONEWORDINLINE(0xA87F);
  1473. extern pascal Boolean PtInRgn(Point pt, RgnHandle rgn)
  1474.  ONEWORDINLINE(0xA8E8);
  1475. extern pascal void StdLine(Point newPt)
  1476.  ONEWORDINLINE(0xA890);
  1477. extern pascal void OpenCPort(CGrafPtr port)
  1478.  ONEWORDINLINE(0xAA00);
  1479. extern pascal void InitCPort(CGrafPtr port)
  1480.  ONEWORDINLINE(0xAA01);
  1481. extern pascal void CloseCPort(CGrafPtr port)
  1482.  ONEWORDINLINE(0xA87D);
  1483. extern pascal PixMapHandle NewPixMap(void)
  1484.  ONEWORDINLINE(0xAA03);
  1485. extern pascal void DisposePixMap(PixMapHandle pm)
  1486.  ONEWORDINLINE(0xAA04);
  1487. extern pascal void CopyPixMap(PixMapHandle srcPM, PixMapHandle dstPM)
  1488.  ONEWORDINLINE(0xAA05);
  1489. extern pascal PixPatHandle NewPixPat(void)
  1490.  ONEWORDINLINE(0xAA07);
  1491. extern pascal void DisposePixPat(PixPatHandle pp)
  1492.  ONEWORDINLINE(0xAA08);
  1493. extern pascal void CopyPixPat(PixPatHandle srcPP, PixPatHandle dstPP)
  1494.  ONEWORDINLINE(0xAA09);
  1495. extern pascal void PenPixPat(PixPatHandle pp)
  1496.  ONEWORDINLINE(0xAA0A);
  1497. extern pascal void BackPixPat(PixPatHandle pp)
  1498.  ONEWORDINLINE(0xAA0B);
  1499. extern pascal PixPatHandle GetPixPat(short patID)
  1500.  ONEWORDINLINE(0xAA0C);
  1501. extern pascal void MakeRGBPat(PixPatHandle pp, const RGBColor *myColor)
  1502.  ONEWORDINLINE(0xAA0D);
  1503. extern pascal void FillCRect(const Rect *r, PixPatHandle pp)
  1504.  ONEWORDINLINE(0xAA0E);
  1505. extern pascal void FillCOval(const Rect *r, PixPatHandle pp)
  1506.  ONEWORDINLINE(0xAA0F);
  1507. extern pascal void FillCRoundRect(const Rect *r, short ovalWidth, short ovalHeight, PixPatHandle pp)
  1508.  ONEWORDINLINE(0xAA10);
  1509. extern pascal void FillCArc(const Rect *r, short startAngle, short arcAngle, PixPatHandle pp)
  1510.  ONEWORDINLINE(0xAA11);
  1511. extern pascal void FillCRgn(RgnHandle rgn, PixPatHandle pp)
  1512.  ONEWORDINLINE(0xAA12);
  1513. extern pascal void FillCPoly(PolyHandle poly, PixPatHandle pp)
  1514.  ONEWORDINLINE(0xAA13);
  1515. extern pascal void RGBForeColor(const RGBColor *color)
  1516.  ONEWORDINLINE(0xAA14);
  1517. extern pascal void RGBBackColor(const RGBColor *color)
  1518.  ONEWORDINLINE(0xAA15);
  1519. extern pascal void SetCPixel(short h, short v, const RGBColor *cPix)
  1520.  ONEWORDINLINE(0xAA16);
  1521. extern pascal void SetPortPix(PixMapHandle pm)
  1522.  ONEWORDINLINE(0xAA06);
  1523. extern pascal void GetCPixel(short h, short v, RGBColor *cPix)
  1524.  ONEWORDINLINE(0xAA17);
  1525. extern pascal void GetForeColor(RGBColor *color)
  1526.  ONEWORDINLINE(0xAA19);
  1527. extern pascal void GetBackColor(RGBColor *color)
  1528.  ONEWORDINLINE(0xAA1A);
  1529. extern pascal void SeedCFill(const BitMap *srcBits, const BitMap *dstBits, const Rect *srcRect, const Rect *dstRect, short seedH, short seedV, ColorSearchUPP matchProc, long matchData)
  1530.  ONEWORDINLINE(0xAA50);
  1531. extern pascal void CalcCMask(const BitMap *srcBits, const BitMap *dstBits, const Rect *srcRect, const Rect *dstRect, const RGBColor *seedRGB, ColorSearchUPP matchProc, long matchData)
  1532.  ONEWORDINLINE(0xAA4F);
  1533. extern pascal PicHandle OpenCPicture(const OpenCPicParams *newHeader)
  1534.  ONEWORDINLINE(0xAA20);
  1535. extern pascal void OpColor(const RGBColor *color)
  1536.  ONEWORDINLINE(0xAA21);
  1537. extern pascal void HiliteColor(const RGBColor *color)
  1538.  ONEWORDINLINE(0xAA22);
  1539. extern pascal void DisposeCTable(CTabHandle cTable)
  1540.  ONEWORDINLINE(0xAA24);
  1541. extern pascal CTabHandle GetCTable(short ctID)
  1542.  ONEWORDINLINE(0xAA18);
  1543. extern pascal CCrsrHandle GetCCursor(short crsrID)
  1544.  ONEWORDINLINE(0xAA1B);
  1545. extern pascal void SetCCursor(CCrsrHandle cCrsr)
  1546.  ONEWORDINLINE(0xAA1C);
  1547. extern pascal void AllocCursor(void)
  1548.  ONEWORDINLINE(0xAA1D);
  1549. extern pascal void DisposeCCursor(CCrsrHandle cCrsr)
  1550.  ONEWORDINLINE(0xAA26);
  1551. extern pascal CIconHandle GetCIcon(short iconID)
  1552.  ONEWORDINLINE(0xAA1E);
  1553. extern pascal void PlotCIcon(const Rect *theRect, CIconHandle theIcon)
  1554.  ONEWORDINLINE(0xAA1F);
  1555. extern pascal void DisposeCIcon(CIconHandle theIcon)
  1556.  ONEWORDINLINE(0xAA25);
  1557. extern pascal void SetStdCProcs(CQDProcs *procs)
  1558.  ONEWORDINLINE(0xAA4E);
  1559. extern pascal GDHandle GetMaxDevice(const Rect *globalRect)
  1560.  ONEWORDINLINE(0xAA27);
  1561. extern pascal long GetCTSeed(void)
  1562.  ONEWORDINLINE(0xAA28);
  1563. extern pascal GDHandle GetDeviceList(void)
  1564.  ONEWORDINLINE(0xAA29);
  1565. extern pascal GDHandle GetMainDevice(void)
  1566.  ONEWORDINLINE(0xAA2A);
  1567. extern pascal GDHandle GetNextDevice(GDHandle curDevice)
  1568.  ONEWORDINLINE(0xAA2B);
  1569. extern pascal Boolean TestDeviceAttribute(GDHandle gdh, short attribute)
  1570.  ONEWORDINLINE(0xAA2C);
  1571. extern pascal void SetDeviceAttribute(GDHandle gdh, short attribute, Boolean value)
  1572.  ONEWORDINLINE(0xAA2D);
  1573. extern pascal void InitGDevice(short qdRefNum, long mode, GDHandle gdh)
  1574.  ONEWORDINLINE(0xAA2E);
  1575. extern pascal GDHandle NewGDevice(short refNum, long mode)
  1576.  ONEWORDINLINE(0xAA2F);
  1577. extern pascal void DisposeGDevice(GDHandle gdh)
  1578.  ONEWORDINLINE(0xAA30);
  1579. extern pascal void SetGDevice(GDHandle gd)
  1580.  ONEWORDINLINE(0xAA31);
  1581. extern pascal GDHandle GetGDevice(void)
  1582.  ONEWORDINLINE(0xAA32);
  1583. extern pascal long Color2Index(const RGBColor *myColor)
  1584.  ONEWORDINLINE(0xAA33);
  1585. extern pascal void Index2Color(long index, RGBColor *aColor)
  1586.  ONEWORDINLINE(0xAA34);
  1587. extern pascal void InvertColor(RGBColor *myColor)
  1588.  ONEWORDINLINE(0xAA35);
  1589. extern pascal Boolean RealColor(const RGBColor *color)
  1590.  ONEWORDINLINE(0xAA36);
  1591. extern pascal void GetSubTable(CTabHandle myColors, short iTabRes, CTabHandle targetTbl)
  1592.  ONEWORDINLINE(0xAA37);
  1593. extern pascal void MakeITable(CTabHandle cTabH, ITabHandle iTabH, short res)
  1594.  ONEWORDINLINE(0xAA39);
  1595. extern pascal void AddSearch(ColorSearchUPP searchProc)
  1596.  ONEWORDINLINE(0xAA3A);
  1597. extern pascal void AddComp(ColorComplementUPP compProc)
  1598.  ONEWORDINLINE(0xAA3B);
  1599. extern pascal void DelSearch(ColorSearchUPP searchProc)
  1600.  ONEWORDINLINE(0xAA4C);
  1601. extern pascal void DelComp(ColorComplementUPP compProc)
  1602.  ONEWORDINLINE(0xAA4D);
  1603. extern pascal void SetClientID(short id)
  1604.  ONEWORDINLINE(0xAA3C);
  1605. extern pascal void ProtectEntry(short index, Boolean protect)
  1606.  ONEWORDINLINE(0xAA3D);
  1607. extern Boolean equalpt(Point *pt1, Point *pt2);
  1608. extern pascal void ReserveEntry(short index, Boolean reserve)
  1609.  ONEWORDINLINE(0xAA3E);
  1610. extern pascal void SetEntries(short start, short count, CSpecArray aTable)
  1611.  ONEWORDINLINE(0xAA3F);
  1612. extern Boolean ptinrect(Point *pt, const Rect *r);
  1613. extern pascal void SaveEntries(CTabHandle srcTable, CTabHandle resultTable, ReqListRec *selection)
  1614.  ONEWORDINLINE(0xAA49);
  1615. extern pascal void RestoreEntries(CTabHandle srcTable, CTabHandle dstTable, ReqListRec *selection)
  1616.  ONEWORDINLINE(0xAA4A);
  1617. extern void pt2rect(Point *pt1, Point *pt2, const Rect *destRect);
  1618. extern pascal short QDError(void)
  1619.  ONEWORDINLINE(0xAA40);
  1620. extern pascal void CopyDeepMask(const BitMap *srcBits, const BitMap *maskBits, const BitMap *dstBits, const Rect *srcRect, const Rect *maskRect, const Rect *dstRect, short mode, RgnHandle maskRgn)
  1621.  ONEWORDINLINE(0xAA51);
  1622. extern pascal void DeviceLoop(RgnHandle drawingRgn, DeviceLoopDrawingUPP drawingProc, long userData, DeviceLoopFlags flags)
  1623.  ONEWORDINLINE(0xABCA);
  1624.  
  1625. #if USES68KINLINES
  1626. #pragma parameter __A0 GetMaskTable
  1627. #endif
  1628. extern pascal Ptr GetMaskTable(void)
  1629.  ONEWORDINLINE(0xA836);
  1630. extern void pttoangle(const Rect *r, Point *pt, short *angle);
  1631. extern Boolean ptinrgn(Point *pt, RgnHandle rgn);
  1632. extern void stdline(Point *newPt);
  1633. extern void drawstring(char *s);
  1634. extern void addpt(Point *src, Point *dst);
  1635. extern void stuffhex(Ptr thingPtr, char *s);
  1636. extern short stringwidth(char *s);
  1637. #if OLDROUTINENAMES
  1638. #define DisposPixMap(pm) DisposePixMap(pm)
  1639.  
  1640. #define DisposPixPat(pp) DisposePixPat(pp)
  1641.  
  1642. #define DisposCTable(cTable) DisposeCTable(cTable)
  1643.  
  1644. #define DisposCCursor(cCrsr) DisposeCCursor(cCrsr)
  1645.  
  1646. #define DisposCIcon(theIcon) DisposeCIcon(theIcon)
  1647.  
  1648. #define DisposGDevice(gdh) DisposeGDevice(gdh)
  1649.  
  1650. #endif
  1651.  
  1652. #ifdef __cplusplus
  1653. }
  1654. #endif
  1655.  
  1656. #endif
  1657.  
  1658.