Quickdraw.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:128k
- EXTERN_API( GrafPtr )
- GetHWNDPort (void * theHWND);
- #define GetPortHWND(port) (HWND)GetPortNativeWindow(port)
- #define GetHWNDPort(theHWND) GetNativeWindowPort(theHWND)
- EXTERN_API( void *)
- GetPortHDC (GrafPtr port);
- EXTERN_API( void *)
- GetPortHBITMAP (GrafPtr port);
- EXTERN_API( void *)
- GetPortHPALETTE (GrafPtr port);
- EXTERN_API( void *)
- GetPortHFONT (GrafPtr port);
- EXTERN_API( void *)
- GetDIBFromPICT (PicHandle hPict);
- EXTERN_API( PicHandle )
- GetPICTFromDIB (void * h);
- #endif /* CALL_NOT_IN_CARBON */
- #endif /* TARGET_OS_WIN32 */
- #if TARGET_OS_MAC
- #define MacSetPort SetPort
- #endif
- EXTERN_API( void )
- MacSetPort (GrafPtr port) ONEWORDINLINE(0xA873);
- EXTERN_API( void )
- GetPort (GrafPtr * port) ONEWORDINLINE(0xA874);
- EXTERN_API( void )
- GrafDevice (short device) ONEWORDINLINE(0xA872);
- EXTERN_API( void )
- SetPortBits (const BitMap * bm) ONEWORDINLINE(0xA875);
- EXTERN_API( void )
- PortSize (short width,
- short height) ONEWORDINLINE(0xA876);
- EXTERN_API( void )
- MovePortTo (short leftGlobal,
- short topGlobal) ONEWORDINLINE(0xA877);
- EXTERN_API( void )
- SetOrigin (short h,
- short v) ONEWORDINLINE(0xA878);
- EXTERN_API( void )
- SetClip (RgnHandle rgn) ONEWORDINLINE(0xA879);
- EXTERN_API( void )
- GetClip (RgnHandle rgn) ONEWORDINLINE(0xA87A);
- EXTERN_API( void )
- ClipRect (const Rect * r) ONEWORDINLINE(0xA87B);
- EXTERN_API( void )
- BackPat (const Pattern * pat) ONEWORDINLINE(0xA87C);
- EXTERN_API( void )
- InitCursor (void) ONEWORDINLINE(0xA850);
- #if TARGET_OS_MAC
- #define MacSetCursor SetCursor
- #endif
- EXTERN_API( void )
- MacSetCursor (const Cursor * crsr) ONEWORDINLINE(0xA851);
- EXTERN_API( void )
- HideCursor (void) ONEWORDINLINE(0xA852);
- #if TARGET_OS_MAC
- #define MacShowCursor ShowCursor
- #endif
- EXTERN_API( void )
- MacShowCursor (void) ONEWORDINLINE(0xA853);
- EXTERN_API( void )
- ObscureCursor (void) ONEWORDINLINE(0xA856);
- EXTERN_API( void )
- HidePen (void) ONEWORDINLINE(0xA896);
- EXTERN_API( void )
- ShowPen (void) ONEWORDINLINE(0xA897);
- EXTERN_API( void )
- GetPen (Point * pt) ONEWORDINLINE(0xA89A);
- EXTERN_API( void )
- GetPenState (PenState * pnState) ONEWORDINLINE(0xA898);
- EXTERN_API( void )
- SetPenState (const PenState * pnState) ONEWORDINLINE(0xA899);
- EXTERN_API( void )
- PenSize (short width,
- short height) ONEWORDINLINE(0xA89B);
- EXTERN_API( void )
- PenMode (short mode) ONEWORDINLINE(0xA89C);
- EXTERN_API( void )
- PenPat (const Pattern * pat) ONEWORDINLINE(0xA89D);
- EXTERN_API( void )
- PenNormal (void) ONEWORDINLINE(0xA89E);
- EXTERN_API( void )
- MoveTo (short h,
- short v) ONEWORDINLINE(0xA893);
- EXTERN_API( void )
- Move (short dh,
- short dv) ONEWORDINLINE(0xA894);
- #if TARGET_OS_MAC
- #define MacLineTo LineTo
- #endif
- EXTERN_API( void )
- MacLineTo (short h,
- short v) ONEWORDINLINE(0xA891);
- EXTERN_API( void )
- Line (short dh,
- short dv) ONEWORDINLINE(0xA892);
- EXTERN_API( void )
- ForeColor (long color) ONEWORDINLINE(0xA862);
- EXTERN_API( void )
- BackColor (long color) ONEWORDINLINE(0xA863);
- EXTERN_API( void )
- ColorBit (short whichBit) ONEWORDINLINE(0xA864);
- #if TARGET_OS_MAC
- #define MacSetRect SetRect
- #endif
- EXTERN_API( void )
- MacSetRect (Rect * r,
- short left,
- short top,
- short right,
- short bottom) ONEWORDINLINE(0xA8A7);
- #if TARGET_OS_MAC
- #define MacOffsetRect OffsetRect
- #endif
- EXTERN_API( void )
- MacOffsetRect (Rect * r,
- short dh,
- short dv) ONEWORDINLINE(0xA8A8);
- #if TARGET_OS_MAC
- #define MacInsetRect InsetRect
- #endif
- EXTERN_API( void )
- MacInsetRect (Rect * r,
- short dh,
- short dv) ONEWORDINLINE(0xA8A9);
- EXTERN_API( Boolean )
- SectRect (const Rect * src1,
- const Rect * src2,
- Rect * dstRect) ONEWORDINLINE(0xA8AA);
- #if TARGET_OS_MAC
- #define MacUnionRect UnionRect
- #endif
- EXTERN_API( void )
- MacUnionRect (const Rect * src1,
- const Rect * src2,
- Rect * dstRect) ONEWORDINLINE(0xA8AB);
- #if TARGET_OS_MAC
- #define MacEqualRect EqualRect
- #endif
- EXTERN_API( Boolean )
- MacEqualRect (const Rect * rect1,
- const Rect * rect2) ONEWORDINLINE(0xA8A6);
- EXTERN_API( Boolean )
- EmptyRect (const Rect * r) ONEWORDINLINE(0xA8AE);
- #if TARGET_OS_MAC
- #define MacFrameRect FrameRect
- #endif
- EXTERN_API( void )
- MacFrameRect (const Rect * r) ONEWORDINLINE(0xA8A1);
- EXTERN_API( void )
- PaintRect (const Rect * r) ONEWORDINLINE(0xA8A2);
- EXTERN_API( void )
- EraseRect (const Rect * r) ONEWORDINLINE(0xA8A3);
- #if TARGET_OS_MAC
- #define MacInvertRect InvertRect
- #endif
- EXTERN_API( void )
- MacInvertRect (const Rect * r) ONEWORDINLINE(0xA8A4);
- #if TARGET_OS_MAC
- #define MacFillRect FillRect
- #endif
- EXTERN_API( void )
- MacFillRect (const Rect * r,
- const Pattern * pat) ONEWORDINLINE(0xA8A5);
- EXTERN_API( void )
- FrameOval (const Rect * r) ONEWORDINLINE(0xA8B7);
- EXTERN_API( void )
- PaintOval (const Rect * r) ONEWORDINLINE(0xA8B8);
- EXTERN_API( void )
- EraseOval (const Rect * r) ONEWORDINLINE(0xA8B9);
- EXTERN_API( void )
- InvertOval (const Rect * r) ONEWORDINLINE(0xA8BA);
- EXTERN_API( void )
- FillOval (const Rect * r,
- const Pattern * pat) ONEWORDINLINE(0xA8BB);
- EXTERN_API( void )
- FrameRoundRect (const Rect * r,
- short ovalWidth,
- short ovalHeight) ONEWORDINLINE(0xA8B0);
- EXTERN_API( void )
- PaintRoundRect (const Rect * r,
- short ovalWidth,
- short ovalHeight) ONEWORDINLINE(0xA8B1);
- EXTERN_API( void )
- EraseRoundRect (const Rect * r,
- short ovalWidth,
- short ovalHeight) ONEWORDINLINE(0xA8B2);
- EXTERN_API( void )
- InvertRoundRect (const Rect * r,
- short ovalWidth,
- short ovalHeight) ONEWORDINLINE(0xA8B3);
- EXTERN_API( void )
- FillRoundRect (const Rect * r,
- short ovalWidth,
- short ovalHeight,
- const Pattern * pat) ONEWORDINLINE(0xA8B4);
- EXTERN_API( void )
- FrameArc (const Rect * r,
- short startAngle,
- short arcAngle) ONEWORDINLINE(0xA8BE);
- EXTERN_API( void )
- PaintArc (const Rect * r,
- short startAngle,
- short arcAngle) ONEWORDINLINE(0xA8BF);
- EXTERN_API( void )
- EraseArc (const Rect * r,
- short startAngle,
- short arcAngle) ONEWORDINLINE(0xA8C0);
- EXTERN_API( void )
- InvertArc (const Rect * r,
- short startAngle,
- short arcAngle) ONEWORDINLINE(0xA8C1);
- EXTERN_API( void )
- FillArc (const Rect * r,
- short startAngle,
- short arcAngle,
- const Pattern * pat) ONEWORDINLINE(0xA8C2);
- EXTERN_API( RgnHandle )
- NewRgn (void) ONEWORDINLINE(0xA8D8);
- EXTERN_API( void )
- OpenRgn (void) ONEWORDINLINE(0xA8DA);
- EXTERN_API( void )
- CloseRgn (RgnHandle dstRgn) ONEWORDINLINE(0xA8DB);
- EXTERN_API( OSErr )
- BitMapToRegion (RgnHandle region,
- const BitMap * bMap) ONEWORDINLINE(0xA8D7);
- EXTERN_API( void )
- DisposeRgn (RgnHandle rgn) ONEWORDINLINE(0xA8D9);
- #if TARGET_OS_MAC
- #define MacCopyRgn CopyRgn
- #endif
- EXTERN_API( void )
- MacCopyRgn (RgnHandle srcRgn,
- RgnHandle dstRgn) ONEWORDINLINE(0xA8DC);
- EXTERN_API( void )
- SetEmptyRgn (RgnHandle rgn) ONEWORDINLINE(0xA8DD);
- #if TARGET_OS_MAC
- #define MacSetRectRgn SetRectRgn
- #endif
- EXTERN_API( void )
- MacSetRectRgn (RgnHandle rgn,
- short left,
- short top,
- short right,
- short bottom) ONEWORDINLINE(0xA8DE);
- EXTERN_API( void )
- RectRgn (RgnHandle rgn,
- const Rect * r) ONEWORDINLINE(0xA8DF);
- #if TARGET_OS_MAC
- #define MacOffsetRgn OffsetRgn
- #endif
- EXTERN_API( void )
- MacOffsetRgn (RgnHandle rgn,
- short dh,
- short dv) ONEWORDINLINE(0xA8E0);
- EXTERN_API( void )
- InsetRgn (RgnHandle rgn,
- short dh,
- short dv) ONEWORDINLINE(0xA8E1);
- EXTERN_API( void )
- SectRgn (RgnHandle srcRgnA,
- RgnHandle srcRgnB,
- RgnHandle dstRgn) ONEWORDINLINE(0xA8E4);
- #if TARGET_OS_MAC
- #define MacUnionRgn UnionRgn
- #endif
- EXTERN_API( void )
- MacUnionRgn (RgnHandle srcRgnA,
- RgnHandle srcRgnB,
- RgnHandle dstRgn) ONEWORDINLINE(0xA8E5);
- EXTERN_API( void )
- DiffRgn (RgnHandle srcRgnA,
- RgnHandle srcRgnB,
- RgnHandle dstRgn) ONEWORDINLINE(0xA8E6);
- #if TARGET_OS_MAC
- #define MacXorRgn XorRgn
- #endif
- EXTERN_API( void )
- MacXorRgn (RgnHandle srcRgnA,
- RgnHandle srcRgnB,
- RgnHandle dstRgn) ONEWORDINLINE(0xA8E7);
- EXTERN_API( Boolean )
- RectInRgn (const Rect * r,
- RgnHandle rgn) ONEWORDINLINE(0xA8E9);
- #if TARGET_OS_MAC
- #define MacEqualRgn EqualRgn
- #endif
- EXTERN_API( Boolean )
- MacEqualRgn (RgnHandle rgnA,
- RgnHandle rgnB) ONEWORDINLINE(0xA8E3);
- EXTERN_API( Boolean )
- EmptyRgn (RgnHandle rgn) ONEWORDINLINE(0xA8E2);
- #if TARGET_OS_MAC
- #define MacFrameRgn FrameRgn
- #endif
- EXTERN_API( void )
- MacFrameRgn (RgnHandle rgn) ONEWORDINLINE(0xA8D2);
- #if TARGET_OS_MAC
- #define MacPaintRgn PaintRgn
- #endif
- EXTERN_API( void )
- MacPaintRgn (RgnHandle rgn) ONEWORDINLINE(0xA8D3);
- EXTERN_API( void )
- EraseRgn (RgnHandle rgn) ONEWORDINLINE(0xA8D4);
- #if TARGET_OS_MAC
- #define MacInvertRgn InvertRgn
- #endif
- EXTERN_API( void )
- MacInvertRgn (RgnHandle rgn) ONEWORDINLINE(0xA8D5);
- #if TARGET_OS_MAC
- #define MacFillRgn FillRgn
- #endif
- EXTERN_API( void )
- MacFillRgn (RgnHandle rgn,
- const Pattern * pat) ONEWORDINLINE(0xA8D6);
- EXTERN_API( void )
- ScrollRect (const Rect * r,
- short dh,
- short dv,
- RgnHandle updateRgn) ONEWORDINLINE(0xA8EF);
- EXTERN_API( void )
- CopyBits (const BitMap * srcBits,
- const BitMap * dstBits,
- const Rect * srcRect,
- const Rect * dstRect,
- short mode,
- RgnHandle maskRgn) /* can be NULL */ ONEWORDINLINE(0xA8EC);
- EXTERN_API( void )
- SeedFill (const void * srcPtr,
- void * dstPtr,
- short srcRow,
- short dstRow,
- short height,
- short words,
- short seedH,
- short seedV) ONEWORDINLINE(0xA839);
- EXTERN_API( void )
- CalcMask (const void * srcPtr,
- void * dstPtr,
- short srcRow,
- short dstRow,
- short height,
- short words) ONEWORDINLINE(0xA838);
- EXTERN_API( void )
- CopyMask (const BitMap * srcBits,
- const BitMap * maskBits,
- const BitMap * dstBits,
- const Rect * srcRect,
- const Rect * maskRect,
- const Rect * dstRect) ONEWORDINLINE(0xA817);
- EXTERN_API( PicHandle )
- OpenPicture (const Rect * picFrame) ONEWORDINLINE(0xA8F3);
- EXTERN_API( void )
- PicComment (short kind,
- short dataSize,
- Handle dataHandle) ONEWORDINLINE(0xA8F2);
- EXTERN_API( void )
- ClosePicture (void) ONEWORDINLINE(0xA8F4);
- EXTERN_API( void )
- DrawPicture (PicHandle myPicture,
- const Rect * dstRect) ONEWORDINLINE(0xA8F6);
- EXTERN_API( void )
- KillPicture (PicHandle myPicture) ONEWORDINLINE(0xA8F5);
- EXTERN_API( PolyHandle )
- OpenPoly (void) ONEWORDINLINE(0xA8CB);
- EXTERN_API( void )
- ClosePoly (void) ONEWORDINLINE(0xA8CC);
- EXTERN_API( void )
- KillPoly (PolyHandle poly) ONEWORDINLINE(0xA8CD);
- EXTERN_API( void )
- OffsetPoly (PolyHandle poly,
- short dh,
- short dv) ONEWORDINLINE(0xA8CE);
- EXTERN_API( void )
- FramePoly (PolyHandle poly) ONEWORDINLINE(0xA8C6);
- EXTERN_API( void )
- PaintPoly (PolyHandle poly) ONEWORDINLINE(0xA8C7);
- EXTERN_API( void )
- ErasePoly (PolyHandle poly) ONEWORDINLINE(0xA8C8);
- EXTERN_API( void )
- InvertPoly (PolyHandle poly) ONEWORDINLINE(0xA8C9);
- EXTERN_API( void )
- FillPoly (PolyHandle poly,
- const Pattern * pat) ONEWORDINLINE(0xA8CA);
- EXTERN_API( void )
- SetPt (Point * pt,
- short h,
- short v) ONEWORDINLINE(0xA880);
- EXTERN_API( void )
- LocalToGlobal (Point * pt) ONEWORDINLINE(0xA870);
- EXTERN_API( void )
- GlobalToLocal (Point * pt) ONEWORDINLINE(0xA871);
- EXTERN_API( short )
- Random (void) ONEWORDINLINE(0xA861);
- EXTERN_API( void )
- StuffHex (void * thingPtr,
- ConstStr255Param s) ONEWORDINLINE(0xA866);
- #if TARGET_OS_MAC
- #define MacGetPixel GetPixel
- #endif
- EXTERN_API( Boolean )
- MacGetPixel (short h,
- short v) ONEWORDINLINE(0xA865);
- EXTERN_API( void )
- ScalePt (Point * pt,
- const Rect * srcRect,
- const Rect * dstRect) ONEWORDINLINE(0xA8F8);
- EXTERN_API( void )
- MapPt (Point * pt,
- const Rect * srcRect,
- const Rect * dstRect) ONEWORDINLINE(0xA8F9);
- EXTERN_API( void )
- MapRect (Rect * r,
- const Rect * srcRect,
- const Rect * dstRect) ONEWORDINLINE(0xA8FA);
- EXTERN_API( void )
- MapRgn (RgnHandle rgn,
- const Rect * srcRect,
- const Rect * dstRect) ONEWORDINLINE(0xA8FB);
- EXTERN_API( void )
- MapPoly (PolyHandle poly,
- const Rect * srcRect,
- const Rect * dstRect) ONEWORDINLINE(0xA8FC);
- EXTERN_API( void )
- SetStdProcs (QDProcs * procs) ONEWORDINLINE(0xA8EA);
- EXTERN_API( void )
- StdRect (GrafVerb verb,
- const Rect * r) ONEWORDINLINE(0xA8A0);
- EXTERN_API( void )
- StdRRect (GrafVerb verb,
- const Rect * r,
- short ovalWidth,
- short ovalHeight) ONEWORDINLINE(0xA8AF);
- EXTERN_API( void )
- StdOval (GrafVerb verb,
- const Rect * r) ONEWORDINLINE(0xA8B6);
- EXTERN_API( void )
- StdArc (GrafVerb verb,
- const Rect * r,
- short startAngle,
- short arcAngle) ONEWORDINLINE(0xA8BD);
- EXTERN_API( void )
- StdPoly (GrafVerb verb,
- PolyHandle poly) ONEWORDINLINE(0xA8C5);
- EXTERN_API( void )
- StdRgn (GrafVerb verb,
- RgnHandle rgn) ONEWORDINLINE(0xA8D1);
- EXTERN_API( void )
- StdBits (const BitMap * srcBits,
- const Rect * srcRect,
- const Rect * dstRect,
- short mode,
- RgnHandle maskRgn) ONEWORDINLINE(0xA8EB);
- EXTERN_API( void )
- StdComment (short kind,
- short dataSize,
- Handle dataHandle) ONEWORDINLINE(0xA8F1);
- EXTERN_API( void )
- StdGetPic (void * dataPtr,
- short byteCount) ONEWORDINLINE(0xA8EE);
- EXTERN_API( void )
- StdPutPic (const void * dataPtr,
- short byteCount) ONEWORDINLINE(0xA8F0);
- EXTERN_API( void )
- StdOpcode (const Rect * fromRect,
- const Rect * toRect,
- UInt16 opcode,
- SInt16 version) ONEWORDINLINE(0xABF8);
- EXTERN_API( void )
- AddPt (Point src,
- Point * dst) ONEWORDINLINE(0xA87E);
- EXTERN_API( Boolean )
- EqualPt (Point pt1,
- Point pt2) ONEWORDINLINE(0xA881);
- #if TARGET_OS_MAC
- #define MacPtInRect PtInRect
- #endif
- EXTERN_API( Boolean )
- MacPtInRect (Point pt,
- const Rect * r) ONEWORDINLINE(0xA8AD);
- EXTERN_API( void )
- Pt2Rect (Point pt1,
- Point pt2,
- Rect * dstRect) ONEWORDINLINE(0xA8AC);
- EXTERN_API( void )
- PtToAngle (const Rect * r,
- Point pt,
- short * angle) ONEWORDINLINE(0xA8C3);
- EXTERN_API( void )
- SubPt (Point src,
- Point * dst) ONEWORDINLINE(0xA87F);
- EXTERN_API( Boolean )
- PtInRgn (Point pt,
- RgnHandle rgn) ONEWORDINLINE(0xA8E8);
- EXTERN_API( void )
- StdLine (Point newPt) ONEWORDINLINE(0xA890);
- #if CALL_NOT_IN_CARBON
- EXTERN_API( void )
- OpenCPort (CGrafPtr port) ONEWORDINLINE(0xAA00);
- EXTERN_API( void )
- InitCPort (CGrafPtr port) ONEWORDINLINE(0xAA01);
- EXTERN_API( void )
- CloseCPort (CGrafPtr port) ONEWORDINLINE(0xAA02);
- #endif /* CALL_NOT_IN_CARBON */
- EXTERN_API( PixMapHandle )
- NewPixMap (void) ONEWORDINLINE(0xAA03);
- EXTERN_API( void )
- DisposePixMap (PixMapHandle pm) ONEWORDINLINE(0xAA04);
- EXTERN_API( void )
- CopyPixMap (PixMapHandle srcPM,
- PixMapHandle dstPM) ONEWORDINLINE(0xAA05);
- EXTERN_API( PixPatHandle )
- NewPixPat (void) ONEWORDINLINE(0xAA07);
- EXTERN_API( void )
- DisposePixPat (PixPatHandle pp) ONEWORDINLINE(0xAA08);
- EXTERN_API( void )
- CopyPixPat (PixPatHandle srcPP,
- PixPatHandle dstPP) ONEWORDINLINE(0xAA09);
- EXTERN_API( void )
- PenPixPat (PixPatHandle pp) ONEWORDINLINE(0xAA0A);
- EXTERN_API( void )
- BackPixPat (PixPatHandle pp) ONEWORDINLINE(0xAA0B);
- EXTERN_API( PixPatHandle )
- GetPixPat (short patID) ONEWORDINLINE(0xAA0C);
- EXTERN_API( void )
- MakeRGBPat (PixPatHandle pp,
- const RGBColor * myColor) ONEWORDINLINE(0xAA0D);
- EXTERN_API( void )
- FillCRect (const Rect * r,
- PixPatHandle pp) ONEWORDINLINE(0xAA0E);
- EXTERN_API( void )
- FillCOval (const Rect * r,
- PixPatHandle pp) ONEWORDINLINE(0xAA0F);
- EXTERN_API( void )
- FillCRoundRect (const Rect * r,
- short ovalWidth,
- short ovalHeight,
- PixPatHandle pp) ONEWORDINLINE(0xAA10);
- EXTERN_API( void )
- FillCArc (const Rect * r,
- short startAngle,
- short arcAngle,
- PixPatHandle pp) ONEWORDINLINE(0xAA11);
- EXTERN_API( void )
- FillCRgn (RgnHandle rgn,
- PixPatHandle pp) ONEWORDINLINE(0xAA12);
- EXTERN_API( void )
- FillCPoly (PolyHandle poly,
- PixPatHandle pp) ONEWORDINLINE(0xAA13);
- EXTERN_API( void )
- RGBForeColor (const RGBColor * color) ONEWORDINLINE(0xAA14);
- EXTERN_API( void )
- RGBBackColor (const RGBColor * color) ONEWORDINLINE(0xAA15);
- EXTERN_API( void )
- SetCPixel (short h,
- short v,
- const RGBColor * cPix) ONEWORDINLINE(0xAA16);
- EXTERN_API( void )
- SetPortPix (PixMapHandle pm) ONEWORDINLINE(0xAA06);
- EXTERN_API( void )
- GetCPixel (short h,
- short v,
- RGBColor * cPix) ONEWORDINLINE(0xAA17);
- EXTERN_API( void )
- GetForeColor (RGBColor * color) ONEWORDINLINE(0xAA19);
- EXTERN_API( void )
- GetBackColor (RGBColor * color) ONEWORDINLINE(0xAA1A);
- EXTERN_API( void )
- SeedCFill (const BitMap * srcBits,
- const BitMap * dstBits,
- const Rect * srcRect,
- const Rect * dstRect,
- short seedH,
- short seedV,
- ColorSearchUPP matchProc,
- long matchData) ONEWORDINLINE(0xAA50);
- EXTERN_API( void )
- CalcCMask (const BitMap * srcBits,
- const BitMap * dstBits,
- const Rect * srcRect,
- const Rect * dstRect,
- const RGBColor * seedRGB,
- ColorSearchUPP matchProc,
- long matchData) ONEWORDINLINE(0xAA4F);
- EXTERN_API( PicHandle )
- OpenCPicture (const OpenCPicParams * newHeader) ONEWORDINLINE(0xAA20);
- EXTERN_API( void )
- OpColor (const RGBColor * color) ONEWORDINLINE(0xAA21);
- EXTERN_API( void )
- HiliteColor (const RGBColor * color) ONEWORDINLINE(0xAA22);
- EXTERN_API( void )
- DisposeCTable (CTabHandle cTable) ONEWORDINLINE(0xAA24);
- EXTERN_API( CTabHandle )
- GetCTable (short ctID) ONEWORDINLINE(0xAA18);
- EXTERN_API( CCrsrHandle )
- GetCCursor (short crsrID) ONEWORDINLINE(0xAA1B);
- EXTERN_API( void )
- SetCCursor (CCrsrHandle cCrsr) ONEWORDINLINE(0xAA1C);
- EXTERN_API( void )
- AllocCursor (void) ONEWORDINLINE(0xAA1D);
- EXTERN_API( void )
- DisposeCCursor (CCrsrHandle cCrsr) ONEWORDINLINE(0xAA26);
- /* GetCIcon(), PlotCIcon(), and DisposeCIcon() moved to Icons.h*/
- EXTERN_API( void )
- SetStdCProcs (CQDProcs * procs) ONEWORDINLINE(0xAA4E);
- EXTERN_API( GDHandle )
- GetMaxDevice (const Rect * globalRect) ONEWORDINLINE(0xAA27);
- EXTERN_API( long )
- GetCTSeed (void) ONEWORDINLINE(0xAA28);
- EXTERN_API( GDHandle )
- GetDeviceList (void) ONEWORDINLINE(0xAA29);
- EXTERN_API( GDHandle )
- GetMainDevice (void) ONEWORDINLINE(0xAA2A);
- EXTERN_API( GDHandle )
- GetNextDevice (GDHandle curDevice) ONEWORDINLINE(0xAA2B);
- EXTERN_API( Boolean )
- TestDeviceAttribute (GDHandle gdh,
- short attribute) ONEWORDINLINE(0xAA2C);
- EXTERN_API( void )
- SetDeviceAttribute (GDHandle gdh,
- short attribute,
- Boolean value) ONEWORDINLINE(0xAA2D);
- EXTERN_API( void )
- InitGDevice (short qdRefNum,
- long mode,
- GDHandle gdh) ONEWORDINLINE(0xAA2E);
- EXTERN_API( GDHandle )
- NewGDevice (short refNum,
- long mode) ONEWORDINLINE(0xAA2F);
- EXTERN_API( void )
- DisposeGDevice (GDHandle gdh) ONEWORDINLINE(0xAA30);
- EXTERN_API( void )
- SetGDevice (GDHandle gd) ONEWORDINLINE(0xAA31);
- EXTERN_API( GDHandle )
- GetGDevice (void) ONEWORDINLINE(0xAA32);
- EXTERN_API( long )
- Color2Index (const RGBColor * myColor) ONEWORDINLINE(0xAA33);
- EXTERN_API( void )
- Index2Color (long index,
- RGBColor * aColor) ONEWORDINLINE(0xAA34);
- EXTERN_API( void )
- InvertColor (RGBColor * myColor) ONEWORDINLINE(0xAA35);
- EXTERN_API( Boolean )
- RealColor (const RGBColor * color) ONEWORDINLINE(0xAA36);
- EXTERN_API( void )
- GetSubTable (CTabHandle myColors,
- short iTabRes,
- CTabHandle targetTbl) ONEWORDINLINE(0xAA37);
- EXTERN_API( void )
- MakeITable (CTabHandle cTabH,
- ITabHandle iTabH,
- short res) ONEWORDINLINE(0xAA39);
- EXTERN_API( void )
- AddSearch (ColorSearchUPP searchProc) ONEWORDINLINE(0xAA3A);
- EXTERN_API( void )
- AddComp (ColorComplementUPP compProc) ONEWORDINLINE(0xAA3B);
- EXTERN_API( void )
- DelSearch (ColorSearchUPP searchProc) ONEWORDINLINE(0xAA4C);
- EXTERN_API( void )
- DelComp (ColorComplementUPP compProc) ONEWORDINLINE(0xAA4D);
- EXTERN_API( void )
- SetClientID (short id) ONEWORDINLINE(0xAA3C);
- EXTERN_API( void )
- ProtectEntry (short index,
- Boolean protect) ONEWORDINLINE(0xAA3D);
- EXTERN_API( void )
- ReserveEntry (short index,
- Boolean reserve) ONEWORDINLINE(0xAA3E);
- EXTERN_API( void )
- SetEntries (short start,
- short count,
- CSpecArray aTable) ONEWORDINLINE(0xAA3F);
- EXTERN_API( void )
- SaveEntries (CTabHandle srcTable,
- CTabHandle resultTable,
- ReqListRec * selection) ONEWORDINLINE(0xAA49);
- EXTERN_API( void )
- RestoreEntries (CTabHandle srcTable,
- CTabHandle dstTable,
- ReqListRec * selection) ONEWORDINLINE(0xAA4A);
- EXTERN_API( short )
- QDError (void) ONEWORDINLINE(0xAA40);
- EXTERN_API( void )
- CopyDeepMask (const BitMap * srcBits,
- const BitMap * maskBits,
- const BitMap * dstBits,
- const Rect * srcRect,
- const Rect * maskRect,
- const Rect * dstRect,
- short mode,
- RgnHandle maskRgn) /* can be NULL */ ONEWORDINLINE(0xAA51);
- EXTERN_API( void )
- DeviceLoop (RgnHandle drawingRgn,
- DeviceLoopDrawingUPP drawingProc,
- long userData,
- DeviceLoopFlags flags) ONEWORDINLINE(0xABCA);
- #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
- #pragma parameter __A0 GetMaskTable
- #endif
- EXTERN_API( Ptr )
- GetMaskTable (void) ONEWORDINLINE(0xA836);
- EXTERN_API( PatHandle )
- GetPattern (short patternID) ONEWORDINLINE(0xA9B8);
- #if TARGET_OS_MAC
- #define MacGetCursor GetCursor
- #endif
- EXTERN_API( CursHandle )
- MacGetCursor (short cursorID) ONEWORDINLINE(0xA9B9);
- EXTERN_API( PicHandle )
- GetPicture (short pictureID) ONEWORDINLINE(0xA9BC);
- EXTERN_API( long )
- DeltaPoint (Point ptA,
- Point ptB) ONEWORDINLINE(0xA94F);
- EXTERN_API( void )
- ShieldCursor (const Rect * shieldRect,
- Point offsetPt) ONEWORDINLINE(0xA855);
- EXTERN_API( void )
- ScreenRes (short * scrnHRes,
- short * scrnVRes) SIXWORDINLINE(0x225F, 0x32B8, 0x0102, 0x225F, 0x32B8, 0x0104);
- EXTERN_API( void )
- GetIndPattern (Pattern * thePat,
- short patternListID,
- short index);
- #if CALL_NOT_IN_CARBON
- EXTERN_API_C( Boolean )
- ptinrect (const Point * pt,
- const Rect * r);
- EXTERN_API_C( void )
- pt2rect (const Point * pt1,
- const Point * pt2,
- Rect * destRect);
- EXTERN_API_C( void )
- pttoangle (const Rect * r,
- const Point * pt,
- short * angle);
- EXTERN_API_C( Boolean )
- ptinrgn (const Point * pt,
- RgnHandle rgn);
- EXTERN_API_C( void )
- addpt (const Point * src,
- Point * dst);
- EXTERN_API_C( void )
- subpt (const Point * src,
- Point * dst);
- EXTERN_API_C( Boolean )
- equalpt (const Point * pt1,
- const Point * pt2);
- EXTERN_API_C( void )
- stuffhex (void * thingPtr,
- const char * s);
- EXTERN_API_C( void )
- stdline (const Point * newPt);
- EXTERN_API_C( void )
- shieldcursor (const Rect * shieldRect,
- Point * offsetPt);
- #endif /* CALL_NOT_IN_CARBON */
- EXTERN_API_C( long )
- deltapoint (Point * ptA,
- Point * ptB);
- #if OLDROUTINENAMES
- #define DisposPixMap(pm) DisposePixMap(pm)
- #define DisposPixPat(pp) DisposePixPat(pp)
- #define DisposCTable(cTable) DisposeCTable(cTable)
- #define DisposCCursor(cCrsr) DisposeCCursor(cCrsr)
- #define DisposGDevice(gdh) DisposeGDevice(gdh)
- #endif /* OLDROUTINENAMES */
- /*
- From ToolUtils.i
- */
- EXTERN_API( void )
- PackBits (Ptr * srcPtr,
- Ptr * dstPtr,
- short srcBytes) ONEWORDINLINE(0xA8CF);
- EXTERN_API( void )
- UnpackBits (Ptr * srcPtr,
- Ptr * dstPtr,
- short dstBytes) ONEWORDINLINE(0xA8D0);
- EXTERN_API( Fixed )
- SlopeFromAngle (short angle) ONEWORDINLINE(0xA8BC);
- EXTERN_API( short )
- AngleFromSlope (Fixed slope) ONEWORDINLINE(0xA8C4);
- /* New transfer modes */
- enum {
- colorXorXFer = 52,
- noiseXFer = 53,
- customXFer = 54
- };
- /* Custom XFer flags */
- enum {
- kXFer1PixelAtATime = 0x00000001, /* 1 pixel passed to custom XFer proc*/
- kXFerConvertPixelToRGB32 = 0x00000002 /* All color depths converted to 32 bit RGB*/
- };
- struct CustomXFerRec {
- UInt32 version;
- void * srcPixels;
- void * destPixels;
- void * resultPixels;
- UInt32 refCon;
- UInt32 pixelSize;
- UInt32 pixelCount;
- Point firstPixelHV;
- Rect destBounds;
- };
- typedef struct CustomXFerRec CustomXFerRec;
- typedef CustomXFerRec * CustomXFerRecPtr;
- typedef CALLBACK_API( void , CustomXFerProcPtr )(CustomXFerRecPtr info);
- EXTERN_API( OSErr )
- GetPortCustomXFerProc (CGrafPtr port,
- CustomXFerProcPtr * proc,
- UInt32 * flags,
- UInt32 * refCon) FOURWORDINLINE(0x203C, 0x0010, 0x0019, 0xAB1D);
- EXTERN_API( OSErr )
- SetPortCustomXFerProc (CGrafPtr port,
- CustomXFerProcPtr proc,
- UInt32 flags,
- UInt32 refCon) FOURWORDINLINE(0x203C, 0x0010, 0x001A, 0xAB1D);
- enum {
- kCursorComponentsVersion = 0x00010001
- };
- enum {
- kCursorComponentType = FOUR_CHAR_CODE('curs')
- };
- /* Cursor Component capabilities flags */
- enum {
- cursorDoesAnimate = 1L << 0,
- cursorDoesHardware = 1L << 1,
- cursorDoesUnreadableScreenBits = 1L << 2
- };
- /* Cursor Component output mode flags */
- enum {
- kRenderCursorInHardware = 1L << 0,
- kRenderCursorInSoftware = 1L << 1
- };
- /* Cursor Component Info */
- struct CursorInfo {
- long version; /* use kCursorComponentsVersion */
- long capabilities;
- long animateDuration; /* approximate time between animate tickles */
- Rect bounds;
- Point hotspot;
- long reserved; /* must set to zero */
- };
- typedef struct CursorInfo CursorInfo;
- /* Cursor Component Selectors */
- enum {
- kCursorComponentInit = 0x0001,
- kCursorComponentGetInfo = 0x0002,
- kCursorComponentSetOutputMode = 0x0003,
- kCursorComponentSetData = 0x0004,
- kCursorComponentReconfigure = 0x0005,
- kCursorComponentDraw = 0x0006,
- kCursorComponentErase = 0x0007,
- kCursorComponentMove = 0x0008,
- kCursorComponentAnimate = 0x0009,
- kCursorComponentLastReserved = 0x0050
- };
- EXTERN_API( OSErr )
- OpenCursorComponent (Component c,
- ComponentInstance * ci) FOURWORDINLINE(0x203C, 0x0008, 0x000B, 0xABE0);
- EXTERN_API( OSErr )
- CloseCursorComponent (ComponentInstance ci) FOURWORDINLINE(0x203C, 0x0004, 0x000C, 0xABE0);
- EXTERN_API( OSErr )
- SetCursorComponent (ComponentInstance ci) FOURWORDINLINE(0x203C, 0x0004, 0x000D, 0xABE0);
- EXTERN_API( OSErr )
- CursorComponentChanged (ComponentInstance ci) FOURWORDINLINE(0x203C, 0x0004, 0x000E, 0xABE0);
- EXTERN_API( OSErr )
- CursorComponentSetData (ComponentInstance ci,
- long data) FOURWORDINLINE(0x203C, 0x0008, 0x000F, 0xABE0);
- #if ACCESSOR_CALLS_ARE_FUNCTIONS
- /* GrafPort */
- /* Getters */
- EXTERN_API( PixMapHandle )
- GetPortPixMap (CGrafPtr port);
- EXTERN_API( Rect *)
- GetPortBounds (CGrafPtr port,
- Rect * rect);
- EXTERN_API( RGBColor *)
- GetPortForeColor (CGrafPtr port,
- RGBColor * foreColor);
- EXTERN_API( RGBColor *)
- GetPortBackColor (CGrafPtr port,
- RGBColor * backColor);
- EXTERN_API( RGBColor *)
- GetPortOpColor (CGrafPtr port,
- RGBColor * opColor);
- EXTERN_API( RGBColor *)
- GetPortHiliteColor (CGrafPtr port,
- RGBColor * hiliteColor);
- EXTERN_API( CQDProcsPtr )
- GetPortGrafProcs (CGrafPtr port);
- EXTERN_API( short )
- GetPortTextFont (CGrafPtr port);
- EXTERN_API( Style )
- GetPortTextFace (CGrafPtr port);
- EXTERN_API( short )
- GetPortTextMode (CGrafPtr port);
- EXTERN_API( short )
- GetPortTextSize (CGrafPtr port);
- EXTERN_API( short )
- GetPortChExtra (CGrafPtr port);
- EXTERN_API( short )
- GetPortFracHPenLocation (CGrafPtr port);
- EXTERN_API( Fixed )
- GetPortSpExtra (CGrafPtr port);
- EXTERN_API( short )
- GetPortPenVisibility (CGrafPtr port);
- EXTERN_API( RgnHandle )
- GetPortVisibleRegion (CGrafPtr port,
- RgnHandle visRgn);
- EXTERN_API( RgnHandle )
- GetPortClipRegion (CGrafPtr port,
- RgnHandle clipRgn);
- EXTERN_API( PixPatHandle )
- GetPortBackPixPat (CGrafPtr port,
- PixPatHandle backPattern);
- EXTERN_API( PixPatHandle )
- GetPortPenPixPat (CGrafPtr port,
- PixPatHandle penPattern);
- EXTERN_API( PixPatHandle )
- GetPortFillPixPat (CGrafPtr port,
- PixPatHandle fillPattern);
- EXTERN_API( Point *)
- GetPortPenSize (CGrafPtr port,
- Point * penSize);
- EXTERN_API( SInt32 )
- GetPortPenMode (CGrafPtr port);
- EXTERN_API( Point *)
- GetPortPenLocation (CGrafPtr port,
- Point * penLocation);
- EXTERN_API( Boolean )
- IsPortRegionBeingDefined (CGrafPtr port);
- EXTERN_API( Boolean )
- IsPortPictureBeingDefined (CGrafPtr port);
- EXTERN_API( Boolean )
- IsPortOffscreen (CGrafPtr port);
- /* Setters */
- EXTERN_API( void )
- SetPortBounds (CGrafPtr port,
- const Rect * rect);
- EXTERN_API( void )
- SetPortOpColor (CGrafPtr port,
- const RGBColor * opColor);
- EXTERN_API( void )
- SetPortGrafProcs (CGrafPtr port,
- CQDProcs * procs);
- EXTERN_API( void )
- SetPortVisibleRegion (CGrafPtr port,
- RgnHandle visRgn);
- EXTERN_API( void )
- SetPortClipRegion (CGrafPtr port,
- RgnHandle clipRgn);
- EXTERN_API( void )
- SetPortPenPixPat (CGrafPtr port,
- PixPatHandle penPattern);
- EXTERN_API( void )
- SetPortBackPixPat (CGrafPtr port,
- PixPatHandle backPattern);
- EXTERN_API( void )
- SetPortPenSize (CGrafPtr port,
- Point penSize);
- EXTERN_API( void )
- SetPortPenMode (CGrafPtr port,
- SInt32 penMode);
- EXTERN_API( void )
- SetPortFracHPenLocation (CGrafPtr port,
- short pnLocHFrac);
- /* PixMap */
- EXTERN_API( Rect *)
- GetPixBounds (PixMapHandle pixMap,
- Rect * bounds);
- EXTERN_API( short )
- GetPixDepth (PixMapHandle pixMap);
- /* QDGlobals */
- /* Getters */
- EXTERN_API( long )
- GetQDGlobalsRandomSeed (void);
- EXTERN_API( BitMap *)
- GetQDGlobalsScreenBits (BitMap * screenBits);
- EXTERN_API( Cursor *)
- GetQDGlobalsArrow (Cursor * arrow);
- EXTERN_API( Pattern *)
- GetQDGlobalsDarkGray (Pattern * dkGray);
- EXTERN_API( Pattern *)
- GetQDGlobalsLightGray (Pattern * ltGray);
- EXTERN_API( Pattern *)
- GetQDGlobalsGray (Pattern * gray);
- EXTERN_API( Pattern *)
- GetQDGlobalsBlack (Pattern * black);
- EXTERN_API( Pattern *)
- GetQDGlobalsWhite (Pattern * white);
- EXTERN_API( CGrafPtr )
- GetQDGlobalsThePort (void);
- /* Setters */
- EXTERN_API( void )
- SetQDGlobalsRandomSeed (long randomSeed);
- EXTERN_API( void )
- SetQDGlobalsArrow (const Cursor * arrow);
- /* Regions */
- EXTERN_API( Rect *)
- GetRegionBounds (RgnHandle region,
- Rect * bounds);
- EXTERN_API( Boolean )
- IsRegionRectangular (RgnHandle region);
- /* Utilities */
- /* To prevent upward dependencies, GetPortWindow is defined in Window Manager interface: */
- /* pascal WindowPtr GetPortWindow(CGrafPtr port); */
- /* NewPtr/OpenCPort doesn't work with opaque structures */
- EXTERN_API( CGrafPtr )
- CreateNewPort (void);
- EXTERN_API( void )
- DisposePort (CGrafPtr port);
- #endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
- /*
- Routines available on Mac OS X to flush buffered window ports...
- These calls do nothing on Mac OS 8/9. QDIsPortBuffered will always return false there.
- */
- EXTERN_API( Boolean )
- QDIsPortBuffered (CGrafPtr port);
- EXTERN_API( Boolean )
- QDIsPortBufferDirty (CGrafPtr port);
- EXTERN_API( void )
- QDFlushPortBuffer (CGrafPtr port,
- RgnHandle region);
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=reset
- #elif PRAGMA_STRUCT_PACKPUSH
- #pragma pack(pop)
- #elif PRAGMA_STRUCT_PACK
- #pragma pack()
- #endif
- #ifdef PRAGMA_IMPORT_OFF
- #pragma import off
- #elif PRAGMA_IMPORT
- #pragma import reset
- #endif
- #ifdef __cplusplus
- }
- #endif
- #endif /* __QUICKDRAW__ */