Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Environment and Utilities /
Chapter 1 - QuickDraw GX and the Macintosh Environment


Summary of QuickDraw GX and the Macintosh Environment

Constants and Data Types

Gestalt Selectors and Attributes

#define gestaltGXVersion            'qdgx'   /* Overall GX vers. selector */
#define gestaltGraphicsVersion      'grfx'   /* GX graphics vers. selector */
#define gestaltPrintingMgrVersion   'pmgr'   /* GX printing vers. selector */
#define gestaltCurrentGraphicsVersion  0x00010000           /* version 1.0 */

#define gestaltGraphicsAttr         'gfxa'       /* GX attributes selector */
#define gestaltGraphicsisDebugging  0x00000001
#define gestaltGraphicsisLoaded     0x00000002
#define gestaltGraphicsIsPowerPC    0x00000004

Translator Options and Statistics

   enum gxTranslationOptions {
      gxDefaultOptionsTranslation   = 0x0000,
      gxOptimizedTranslation        = 0x0001,
      gxReplaceLineWidthTranslation = 0x0002,
      gxSimpleScalingTranslation    = 0x0004,
      gxSimpleGeometryTranslation   = 0x0008,
      gxSimpleLinesTranslation      = 0x000C,
      gxLayoutTextTranslation       = 0x0010,
      gxRasterTargetTranslation     = 0x0020,
      gxPostScriptTargetTranslation = 0x0040,
      gxVectorTargetTranslation     = 0x0080
   };
   typedef long gxTranslationOption;
   enum gxTranslationStatistics {
      gxContainsFormsBegin       = 0x0001,
      gxContainsFormsEnd         = 0x0002,
      gxContainsPostScript       = 0x0004,
      gxContainsEmptyPostScript  = 0x0008
   };
   typedef long gxTranslationStatistic;

Macintosh Interface Functions

Associating View Ports With Macintosh Windows

gxViewPort GXNewWindowViewPort
			(WindowPtr qdWindow);
gxWindowPtr GXGetViewPortWindow
			(gxViewPort portOrder);
gxViewPort GXGetWindowViewPort
			(WindowPtr qdWindow);

Associating View Devices With Macintosh Graphics Devices

GDHandle GXGetViewDeviceGDevice
			(gxViewDevice theDevice);
gxViewDevice GXGetGDeviceViewDevice
			(GDHandle qdGDevice);

Converting From QuickDraw to QuickDraw GX Coordinates

void GXConvertQDPoint	(const Point *shortPt, gxViewPort portOrder, 
			gxPoint *fixedPt);
void GXGetGlobalMouse	(gxPoint *globalPt);
void GXGetViewPortMouse	(gxViewPort portOrder, gxPoint *localPt);

Installing a View Port Filter

void GXSetViewPortFilter	(gxViewPort portOrder, 
				gxUserViewPortFilter filter, long refCon)
				gxUserViewPortFilter GXGetViewPortFilter
				(gxViewPort portOrder, long *refCon)

QuickDraw-to-QuickDraw GX Translator Functions

Converting QuickDraw Font and Style

long GXConvertQDFont		(gxStyle theStyle, long txFont, long txFace);

Converting QuickDraw Pictures

gxShape GXConvertPICTToShape
				(const PicHandle pict, 
				gxTranslationOptions options,
				const Rect *srcRect, 
				const Rect *dstRect, 
				Point styleStretch, 
				gxShape destination, 
				gxTranslationStatistics *stats);

Installing and Removing the Translator

void GXInstallQDTranslator	(GrafPtr port, gxTranslationOptions options, 
				const Rect *srcRect, const Rect *dstRect, 
				Point styleStretch, 
				gxShapeSpoolFunction userFunction,
				long refCon);
translationStatistics *GXRemoveQDTranslator
				(GrafPtr port,
				translationStatistic *statistics);

Application-Defined Functions

Filtering Drawing Calls to a View Port

void MyViewPortFilter		(gxShape toFilter, gxViewPort portOrder, 
				long refCon);

Handling Translated QuickDraw Data

OSErr MyShapeSpooler		(gxShape toSpool, void *refCon);


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996