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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       GXPrinterDrivers.h
  3.  
  4.      Contains:   This file defines data types and API functions for printer driver development.
  5.  
  6.      Version:    Technology: Quickdraw GX 1.1
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1995-2001 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __GXPRINTERDRIVERS__
  18. #define __GXPRINTERDRIVERS__
  19. #ifndef __SCALERSTREAMTYPES__
  20. #include "ScalerStreamTypes.h"
  21. #endif
  22. #ifndef __GXMESSAGES__
  23. #include "GXMessages.h"
  24. #endif
  25. #ifndef __PRINTING__
  26. #include "Printing.h"
  27. #endif
  28. #ifndef __GXPRINTING__
  29. #include "GXPrinting.h"
  30. #endif
  31. #if PRAGMA_ONCE
  32. #pragma once
  33. #endif
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. #if PRAGMA_IMPORT
  38. #pragma import on
  39. #endif
  40. #if PRAGMA_STRUCT_ALIGN
  41.     #pragma options align=mac68k
  42. #elif PRAGMA_STRUCT_PACKPUSH
  43.     #pragma pack(push, 2)
  44. #elif PRAGMA_STRUCT_PACK
  45.     #pragma pack(2)
  46. #endif
  47. /* ------------------------------------------------------------------------------
  48.                         Desktop Printer Constants and Types
  49. -------------------------------------------------------------------------------- */
  50. /* Manual feed alert preferences structure for gxManualFeedAlertPrefsType desktop printer resource */
  51. struct gxManualFeedAlertPrefs {
  52.     long                            alertFlags;                 /*    Flags--first word is for driver's private use, the rest is predefined. */
  53. };
  54. typedef struct gxManualFeedAlertPrefs   gxManualFeedAlertPrefs;
  55. typedef gxManualFeedAlertPrefs *        gxManualFeedAlertPrefsPtr;
  56. typedef gxManualFeedAlertPrefsPtr *     gxManualFeedAlertPrefsHdl;
  57. /* Constants for the alertFlags field of gxManualFeedAlertPrefs.*/
  58. enum {
  59.     gxShowAlerts                = 0x00000001,                   /* Show alerts for this desktop printer. */
  60.     gxAlertOnPaperChange        = 0x00000002                    /* ...only if the papertype changes. */
  61. };
  62. enum {
  63.     gxDefaultMFeedAlertSettings = (gxShowAlerts | gxAlertOnPaperChange)
  64. };
  65. /* Driver output settings structure for desktop printer gxDriverOutputType resource */
  66. struct gxDriverOutputSettings {
  67.     long                            driverflags;                /*    Flags -- for use by driver. */
  68.     long                            outputSettings;             /*    Flags -- predefined. */
  69. };
  70. typedef struct gxDriverOutputSettings   gxDriverOutputSettings;
  71. typedef gxDriverOutputSettings *        gxDriverOutputSettingsPtr;
  72. typedef gxDriverOutputSettingsPtr *     gxDriverOutputSettingsHdl;
  73. /* Constants for the outputSettings field of gxDriverOutputSettings. */
  74. enum {
  75.     gxCanConfigureTrays         = 0x00000001                    /* Desktop printer represents a device with a paper feed. */
  76. };
  77. /* ------------------------------------------------------------------------------
  78.                         Printing Driver Constants and Types
  79. -------------------------------------------------------------------------------- */
  80. enum {
  81.     gxInputTraysMenuItem        = -1                            /* Menu item number for "Input Trays..." */
  82. };
  83. /* Buffering and IO preferences-- this structure mirrors the 'iobm' resource */
  84. struct gxIOPrefsRec {
  85.     unsigned long                   communicationsOptions;      /* Standard or nonstandard I/O? */
  86.     unsigned long                   numBuffers;                 /* Requested number of buffers for QDGX to create */
  87.     unsigned long                   bufferSize;                 /* The size of each buffer */
  88.     unsigned long                   numReqBlocks;               /* The number of async I/O request blocks which will be needed */
  89.     unsigned long                   openCloseTimeout;           /* The open/close timeout (in ticks) */
  90.     unsigned long                   readWriteTimeout;           /* The read/write timeout (in ticks) */
  91. };
  92. typedef struct gxIOPrefsRec             gxIOPrefsRec;
  93. typedef gxIOPrefsRec *                  gxIOPrefsPtr;
  94. typedef gxIOPrefsPtr *                  gxIOPrefsHdl;
  95. /* Constants for the communicationsOptions field of IOPrefsRec. */
  96. enum {
  97.     gxUseCustomIO               = 0x00000001                    /* Driver uses a non-standard IO mechanism */
  98. };
  99. /* Information about writing to a file */
  100. struct gxPrintDestinationRec {
  101.     Boolean                         printToFile;                /* True if output is to go to a file */
  102.     char                            padByte;
  103.     FSSpec                          fSpec;                      /* If going to a file, the FSSpec for the file */
  104.     char                            includeFonts;               /* True if fonts are to be included */
  105.     char                            pad2;
  106.     Str31                           fileFormat;                 /* Format to write file */
  107. };
  108. typedef struct gxPrintDestinationRec    gxPrintDestinationRec;
  109. typedef gxPrintDestinationRec *         gxPrintDestinationPtr;
  110. typedef gxPrintDestinationPtr *         gxPrintDestinationHdl;
  111. /* This structure is the content of each cell in the standard PACK LDEF */
  112. struct gxPortListRec {
  113.     char                            firstMarker;                /* Markers to indicate icon or non-icon version */
  114.     char                            secondMarker;               /* if these are * and *, then the cell is an icon cell. */
  115.                                                                 /* Otherwise, it is assumed to be a standard text LDEF */
  116.                                                                 /* cell */
  117.     Handle                          iconSuiteHandle;            /* The icon suite to draw for this cell */
  118.     Handle                          outputDriverName;           /* Handle to the output driver name (for serial) */
  119.     Handle                          inputDriverName;            /* Handle to the input driver name (for serial) */
  120.     Str255                          iconName;                   /* Name to draw under the icon */
  121. };
  122. typedef struct gxPortListRec            gxPortListRec;
  123. typedef gxPortListRec *                 gxPortListPtr;
  124. /* ------------------------------------------------------------------------------
  125.                         Printing Driver Constants for resources in the desktop printer
  126. -------------------------------------------------------------------------------- */
  127. enum {
  128.     gxDeviceCommunicationsID    = 0
  129. };
  130. /* ----------------------------------o 'prod' o---------------------------------- */
  131. /*
  132.       For PostScript devices, the device and version names of the device.
  133.       (0) product name is of type PString
  134.       (1) version is of type PString
  135.       (2) revision is of type PString
  136.       (3) vm available is of type long
  137.       (4) font stream type is of type scalerStreamTypeFlag
  138.       (5) language level is of type long
  139. */
  140. enum {
  141.     gxPostscriptProductInfoType = FOUR_CHAR_CODE('prod'),
  142.     gxPostscriptProductNameID   = 0,
  143.     gxPostscriptVersionID       = 1,
  144.     gxPostscriptRevisionID      = 2,
  145.     gxPostscriptVMAvailableID   = 3,
  146.     gxPostscriptFontStreamTypeID = 4,
  147.     gxPostscriptLanguageLevelID = 5
  148. };
  149. /* PPD support definitions*/
  150. enum {
  151.     gxPPDInformationTag         = FOUR_CHAR_CODE('ppda'),       /* tag used for job collection*/
  152.     gxPPDInformationTagID       = gxPrintingTagID               /* ID for job collection tag*/
  153. };
  154. enum {
  155.     gxPPDInformationType        = gxPPDInformationTag,          /* rsource type as stored in desktop printer*/
  156.     gxPPDInformationResID       = gxPrintingDriverBaseID        /* ID of rsource stored in desktop printer*/
  157. };
  158. struct gxPPDFileInfoRec {
  159.     unsigned long                   dataOffset;                 /* byte offset to beginning of ppd data*/
  160.     unsigned long                   dataLength;                 /* length of ppd data*/
  161.     unsigned long                   reserved;                   /* reserved*/
  162.     unsigned long                   aliasRecordSize;            /* size of alias record below*/
  163.     unsigned char                   ppdAlias[1];                /* the actual alias record data*/
  164. };
  165. typedef struct gxPPDFileInfoRec         gxPPDFileInfoRec;
  166. typedef gxPPDFileInfoRec *              gxPPDFileInfoPtr;
  167. typedef gxPPDFileInfoPtr *              gxPPDFileInfoHdl;
  168. /* ------------------------------------------------------------------------------
  169.                         Printing Driver Constants for status alerts
  170. -------------------------------------------------------------------------------- */
  171. /* Structure passed in statusBuffer of StatusRecord for manual feed alert */
  172. struct gxManualFeedRecord {
  173.     Boolean                         canAutoFeed;                /* True if driver can switch to auto feed */
  174.     char                            pad1;
  175.     Str31                           paperTypeName;              /* Name of paperType to feed manually */
  176. };
  177. typedef struct gxManualFeedRecord       gxManualFeedRecord;
  178. /* Structure passed in statusBuffer of StatusRecord for out of paper alert */
  179. struct gxOutOfPaperRecord {
  180.     Str31                           paperTypeName;              /* Name of printing document */
  181. };
  182. typedef struct gxOutOfPaperRecord       gxOutOfPaperRecord;
  183. /* The DITL id for the auto feed button in the manual feed alert */
  184. enum {
  185.     gxAutoFeedButtonId          = 3
  186. };
  187. /* Status resource id for the alerts */
  188. enum {
  189.     gxUnivAlertStatusResourceId = -28508
  190. };
  191. /* Status resource indices for alerts */
  192. enum {
  193.     gxUnivSetTrayIndex          = 0,
  194.     gxUnivManualFeedIndex       = 2,
  195.     gxUnivFailToPrintIndex      = 3,
  196.     gxUnivPaperJamIndex         = 4,
  197.     gxUnivOutOfPaperIndex       = 5,
  198.     gxUnivNoPaperTrayIndex      = 6,
  199.     gxUnivPrinterReadyIndex     = 7,
  200.     gxUnivAlertBeforeIndex      = 9,
  201.     gxUnivAlertAfterIndex       = 10
  202. };
  203. /* Allocation sizes for status buffers needed for automatic alerts */
  204. enum {
  205.     gxDefaultStatusBufferSize   = 10,
  206.     gxManualFeedStatusBufferSize = 34,
  207.     gxOutOfPaperStatusBufferSize = 42
  208. };
  209. /* ------------------------------------------------------------------------------
  210.                                 Old Application Support
  211. -------------------------------------------------------------------------------- */
  212. /* The format of a 'cust' resource  */
  213. struct gxCustomizationRec {
  214.     short                           horizontalResolution;       /* Horizontal res (integral part) */
  215.     short                           verticalResolution;         /* Vertical res (integral part) */
  216.     short                           upDriverType;               /* "upDriver" emulation type */
  217.     Point                           patternStretch;             /* Pattern stretch factor */
  218.     short                           translatorSettings;         /* Translator settings to use */
  219. };
  220. typedef struct gxCustomizationRec       gxCustomizationRec;
  221. typedef gxCustomizationRec *            gxCustomizationPtr;
  222. typedef gxCustomizationPtr *            gxCustomizationHdl;
  223. /* The format of a 'resl' resource */
  224. struct gxResolutionRec {
  225.     short                           rangeType;                  /* Always 1 */
  226.     short                           xMinimumResolution;         /* Min X resolution available */
  227.     short                           xMaximumResolution;         /* Max X resolution available */
  228.     short                           yMinimumResolution;         /* Min Y resolution available */
  229.     short                           yMaximumResolution;         /* Max Y resolution available */
  230.     short                           resolutionCount;            /* Number of resolutions */
  231.     Point                           resolutions[1];             /* Array of resolutions */
  232. };
  233. typedef struct gxResolutionRec          gxResolutionRec;
  234. typedef gxResolutionRec *               gxResolutionPtr;
  235. typedef gxResolutionPtr *               gxResolutionHdl;
  236. /*
  237.         Constants for the "universal" print record.
  238. */
  239. /* Constant for version number in universal print record */
  240. enum {
  241.     gxPrintRecordVersion        = 8
  242. };
  243. /* Constants for feed field in universal print record */
  244. enum {
  245.     gxAutoFeed                  = 0,
  246.     gxManualFeed                = 1
  247. };
  248. /* Constants for options field in universal print record */
  249. enum {
  250.     gxPreciseBitmap             = 0x0001,                       /* Tall adjusted (IW), precise bitmap (LW, SC) */
  251.     gxBiggerPages               = 0x0002,                       /* No gaps (IW), larger print area (LW) */
  252.     gxGraphicSmoothing          = 0x0004,                       /* Graphic smoothing (LW) */
  253.     gxTextSmoothing             = 0x0008,                       /* Text smoothing (SC) */
  254.     gxFontSubstitution          = 0x0010,                       /* Font substitution */
  255.     gxInvertPage                = 0x0020,                       /* B/W invert image */
  256.     gxFlipPageHoriz             = 0x0040,                       /* Flip horizontal */
  257.     gxFlipPageVert              = 0x0080,                       /* Flip vertical */
  258.     gxColorMode                 = 0x0100,                       /* Color printing */
  259.     gxBidirectional             = 0x0200,                       /* Bidirectional printing */
  260.     gxUserFlag0                 = 0x0400,                       /* User flag 0 */
  261.     gxUserFlag1                 = 0x0800,                       /* User flag 1 */
  262.     gxUserFlag2                 = 0x1000,                       /* User flag 2 */
  263.     gxReservedFlag0             = 0x2000,                       /* Reserved flag 0 */
  264.     gxReservedFlag1             = 0x4000,                       /* Reserved flag 1 */
  265.     gxReservedFlag2             = 0x8000                        /* Reserved flag 2 */
  266. };
  267. /* Constants for orientation field in universal print record */
  268. enum {
  269.     gxPortraitOrientation       = 0,
  270.     gxLandscapeOrientation      = 1,
  271.     gxAltPortraitOrientation    = 2,
  272.     gxAltLandscapeOrientation   = 3
  273. };
  274. /* Constants for qualityMode field in universal print record */
  275. enum {
  276.     gxBestQuality               = 0,
  277.     gxFasterQuality             = 1,
  278.     gxDraftQuality              = 2
  279. };
  280. /* Constants for firstTray and remainingTray fields in universal print record */
  281. enum {
  282.     gxFirstTray                 = 0,
  283.     gxSecondTray                = 1,
  284.     gxThirdTray                 = 2
  285. };
  286. /* Constants for coverPage field in universal print record */
  287. enum {
  288.     gxNoCoverPage               = 0,
  289.     gxFirstPageCover            = 1,
  290.     gxLastPageCover             = 2
  291. };
  292. /* Constants for headMotion field in universal print record */
  293. enum {
  294.     gxUnidirectionalMotion      = 0,
  295.     gxBidirectionalMotion       = 1
  296. };
  297. /* Constants for saveFile field in universal print record */
  298. enum {
  299.     gxNoFile                    = 0,
  300.     gxPostScriptFile            = 1
  301. };
  302. /* The format of the "universal" print record */
  303. struct gxUniversalPrintRecord {
  304.     short                           printRecordVersion;         /* Print record version */
  305.                                                                 /* prInfo subrecord */
  306.     short                           appDev;                     /* Device kind, always 0 */
  307.     short                           appVRes;                    /* Application vertical resolution */
  308.     short                           appHRes;                    /* Application horizontal resolution */
  309.     Rect                            appPage;                    /* Page size, in application resolution */
  310.     Rect                            appPaper;                   /* Paper rectangle [offset from rPage] */
  311.                                                                 /* prStl subrecord */
  312.     short                           devType;                    /* Device type, always 0xA900 (was wDev) */
  313.     short                           pageV;                      /* Page height in 120ths of an inch */
  314.     short                           pageH;                      /* Page width in 120ths of an inch */
  315.     char                            fillByte;                   /* Page calculation mode */
  316.     char                            feed;                       /* Feed mode */
  317.                                                                 /* prInfoPT subrecord */
  318.     short                           devKind;                    /* Device kind, always 0 */
  319.     short                           devVRes;                    /* Device vertical resolution */
  320.     short                           devHRes;                    /* Device horizontal resolution */
  321.     Rect                            devPage;                    /* Device page size */
  322.                                                                 /* prXInfo subrecord */
  323.     short                           actualCopies;               /* Actual number of copies for this job */
  324.     short                           options;                    /* Options for this device */
  325.     short                           reduction;                  /* Reduce/enlarge factor */
  326.     char                            orientation;                /* Orientation of paper ( 0=portrait, 1=landscape ) */
  327.                                                                 /* Clusters and PopUps */
  328.     char                            qualityMode;                /* Quality mode */
  329.     char                            coverPage;                  /* Cover page */
  330.     char                            firstTray;                  /* First feed tray */
  331.     char                            remainingTray;              /* Remaining feed tray */
  332.     char                            headMotion;                 /* Head motion */
  333.     char                            saveFile;                   /* Save file */
  334.     char                            userCluster1;               /* Three clusters left over */
  335.     char                            userCluster2;
  336.     char                            userCluster3;
  337.                                                                 /* prJob subrecord */
  338.     short                           firstPage;                  /* First page */
  339.     short                           lastPage;                   /* Last page */
  340.     short                           copies;                     /* Number of copies, always 1 */
  341.     char                            reserved1;                  /* Always true, unused */
  342.     char                            reserved2;                  /* Always true, unused */
  343.     PrIdleUPP                       pIdleProc;                  /* Idle proc */
  344.     Ptr                             pFileName;                  /* Spool file name pointer */
  345.     short                           fileVol;                    /* Spool file vRefNum */
  346.     char                            fileVers;                   /* File version, must be 0 */
  347.     char                            reserved3;                  /* Always 0 */
  348.     short                           printX[19];                 /* Internal use */
  349. };
  350. typedef struct gxUniversalPrintRecord   gxUniversalPrintRecord;
  351. typedef gxUniversalPrintRecord *        gxUniversalPrintRecordPtr;
  352. typedef gxUniversalPrintRecordPtr *     gxUniversalPrintRecordHdl;
  353. /* ------------------------------------------------------------------------------
  354.                             Compatibility Printing Messages
  355. -------------------------------------------------------------------------------- */
  356. #define Forward_GXPrOpenDoc(hPrint, pPort) 
  357.         ForwardThisMessage((void *) (hPrint), (void *) (pPort))
  358.  
  359. #define Forward_GXPrCloseDoc(pPort) 
  360.         ForwardThisMessage((void *) (pPort))
  361.  
  362. #define Forward_GXPrOpenPage(pPort, pRect, resolution) 
  363.         ForwardThisMessage((void *) (pPort), (void *) (pRect), (void *) (resolution))
  364.  
  365. #define Forward_GXPrClosePage(pPort) 
  366.         ForwardThisMessage((void *) (pPort))
  367.  
  368. #define Forward_GXPrintDefault(hPrint) 
  369.         ForwardThisMessage((void *) (hPrint))
  370.  
  371. #define Forward_GXPrStlDialog(hPrint, confirmed) 
  372.         ForwardThisMessage((void *) (hPrint), (void *) (confirmed))
  373.  
  374. #define Forward_GXPrJobDialog(hPrint, confirmed) 
  375.         ForwardThisMessage((void *) (hPrint), (void *) (confirmed))
  376.  
  377. #define Forward_GXPrStlInit(hPrint, pDlg) 
  378.         ForwardThisMessage((void *) (hPrint), (void *) (pDlg))
  379.  
  380. #define Forward_GXPrJobInit(hPrint, pDlg) 
  381.         ForwardThisMessage((void *) (hPrint), (void *) (pDlg))
  382.  
  383. #define Forward_GXPrDlgMain(hPrint, initProc, confirmed) 
  384.         ForwardThisMessage((void *) (hPrint), (void *) (initProc), (void *) (confirmed))
  385.  
  386. #define Forward_GXPrValidate(hPrint, changedPrintRecord) 
  387.         ForwardThisMessage((void *) (hPrint), (void *) (changedPrintRecord))
  388.  
  389. #define Forward_GXPrJobMerge(srcPrint, destPrint) 
  390.         ForwardThisMessage((void *) (srcPrint), (void *) (destPrint))
  391.  
  392. #define Forward_GXPrGeneral(dataPtr) 
  393.         ForwardThisMessage((void *) (dataPtr))
  394.  
  395. #define Forward_GXConvertPrintRecordTo(hPrint) 
  396.         ForwardThisMessage((void *) (hPrint))
  397.  
  398. #define Forward_GXConvertPrintRecordFrom(hPrint) 
  399.         ForwardThisMessage((void *) (hPrint))
  400.  
  401. #define Forward_GXPrintRecordToJob(hPrint, aJob) 
  402.         ForwardThisMessage((void *) (hPrint), (void *) (aJob))
  403. /* ------------------------------------------------------------------------------
  404.                         Raster Driver Contants and Types
  405. -------------------------------------------------------------------------------- */
  406. typedef long                            gxRasterPlaneOptions;
  407. /* Input structure for setting up the offscreen */
  408. struct gxPlaneSetupRec {
  409.     gxRasterPlaneOptions            planeOptions;               /* Options for the offscreen package */
  410.     gxHalftone                      planeHalftone;              /* OPTIONAL: halftone structure for this plane */
  411.     gxColorSpace                    planeSpace;                 /* OPTIONAL: noSpace will get the graphics default */
  412.     gxColorSet                      planeSet;                   /* OPTIONAL: NIL gets the default */
  413.     gxColorProfile                  planeProfile;               /* OPTIONAL: NIL gets no matching */
  414. };
  415. typedef struct gxPlaneSetupRec          gxPlaneSetupRec;
  416. /* Constants for planeOptions field in gxPlaneSetupRec */
  417. enum {
  418.     gxDefaultOffscreen          = 0x00000000,                   /* Default value - bits are allocated for the client, halftoning takes place */
  419.     gxDontSetHalftone           = 0x00000001,                   /* Don't call SetViewPortHalftone */
  420.     gxDotTypeIsDitherLevel      = 0x00000002                    /* Call SetViewPortDither using the dotType as the level */
  421. };
  422. struct gxOffscreenSetupRec {
  423.     short                           width;                      /* Width in pixels */
  424.     short                           minHeight;                  /* Minimum height in pixels - actual height returned here */
  425.     short                           maxHeight;                  /* Maximum height in pixels */
  426.     Fixed                           ramPercentage;              /* Maximum percentage of RAM to take */
  427.     long                            ramSlop;                    /* Amount of RAM to be sure to leave */
  428.     short                           depth;                      /* Depths in bits of each plane */
  429.     gxMapping                       vpMapping;                  /* Mapping to assign to offscreen viewPorts */
  430.     gxMapping                       vdMapping;                  /* Mapping to assign to offscreen viewDevices */
  431.     short                           planes;                     /* Number of planes to allocate of depth bits each (can be more than 4) */
  432.     gxPlaneSetupRec                 planeSetup[4];              /* Parameters for each plane, 4 is provided because it is most handy for writers of devices */
  433. };
  434. typedef struct gxOffscreenSetupRec      gxOffscreenSetupRec;
  435. /* The format of one plane in the offscreen planar area */
  436. struct gxOffscreenPlaneRec {
  437.     gxViewPort                      theViewPort;                /* viewPort for the offscreen */
  438.     gxViewDevice                    theDevice;                  /* viewDevice for the offscreen */
  439.     gxViewGroup                     theViewGroup;               /* The viewGroup that they share */
  440.     gxShape                         theBitmap;                  /* The offscreen bitmap shape */
  441.     gxBitmap                        theBits;                    /* The bits of the offscreen */
  442. };
  443. typedef struct gxOffscreenPlaneRec      gxOffscreenPlaneRec;
  444. /* The format of an entire offscreen area */
  445. struct gxOffscreenRec {
  446.     short                           numberOfPlanes;             /* Number of planes we have */
  447.     Handle                          offscreenStorage;           /* Handle containing the bitmaps image data */
  448.     gxOffscreenPlaneRec             thePlanes[1];               /* Planes to draw in */
  449. };
  450. typedef struct gxOffscreenRec           gxOffscreenRec;
  451. typedef gxOffscreenRec *                gxOffscreenPtr;
  452. typedef gxOffscreenPtr *                gxOffscreenHdl;
  453. typedef long                            gxRasterRenderOptions;
  454. /* Structure that mirrors 'rdip' resource. */
  455. struct gxRasterPrefsRec {
  456.     gxRasterRenderOptions           renderOptions;              /* Options for the raster imaging system */
  457.     Fixed                           hImageRes;                  /* Horizontal resolution to image at */
  458.     Fixed                           vImageRes;                  /* Vertical resolution to image at */
  459.     short                           minBandSize;                /* Minimum band size to use (in pixels) */
  460.     short                           maxBandSize;                /* Maximum band size to use (in pixels), 0 == entire page */
  461.     Fixed                           ramPercentage;              /* Maximum percentage of RAM to take */
  462.     long                            ramSlop;                    /* Amount of RAM to be sure to leave */
  463.     short                           depth;                      /* Depth in pixels (PER PLANE!) */
  464.     short                           numPlanes;                  /* Number of planes to render */
  465.     gxPlaneSetupRec                 planeSetup[1];              /* One for each plane */
  466. };
  467. typedef struct gxRasterPrefsRec         gxRasterPrefsRec;
  468. /* Constants for renderOptions field in gxRasterPrefsRec. */
  469. enum {
  470.     gxDefaultRaster             = 0x00000000,                   /* Default raster options */
  471.     gxDontResolveTransferModes  = 0x00000001,                   /* 0=Resolve, 1=Don't Resolve */
  472.     gxRenderInReverse           = 0x00000002,                   /* Traverse image in reverse order */
  473.     gxOnePlaneAtATime           = 0x00000004,                   /* Render each plane separately */
  474.     gxSendAllBands              = 0x00000008                    /* Send even empty bands */
  475. };
  476. typedef gxRasterPrefsRec *              gxRasterPrefsPtr;
  477. typedef gxRasterPrefsPtr *              gxRasterPrefsHdl;
  478. typedef long                            gxRasterPackageOptions;
  479. /* Structure that mirrors 'rpck' resource. */
  480. struct gxRasterPackageRec {
  481.     Ptr                             bufferSize;                 /* Buffer size for packaging (>= maximum head pass size) */
  482.     short                           colorPasses;                /* 1 (b/w) or 4 (CMYK) is typical */
  483.     short                           headHeight;                 /* Printhead height in pixels */
  484.     short                           numberPasses;               /* Number of head passes it takes to == iHeadHeight */
  485.     short                           passOffset;                 /* Offset between passes, in pixels */
  486.     gxRasterPackageOptions          packageOptions;             /* Packaging options */
  487. };
  488. typedef struct gxRasterPackageRec       gxRasterPackageRec;
  489. typedef gxRasterPackageRec *            gxRasterPackagePtr;
  490. typedef gxRasterPackagePtr *            gxRasterPackageHdl;
  491. /* Constants for packageOptions field in gxRasterPackageRec. */
  492. enum {
  493.     gxSendAllColors             = 0x00000001,                   /* Send even clean bands through */
  494.     gxInterlaceColor            = 0x00000002,                   /* Ribbon contamination is a concern */
  495.     gxOverlayColor              = 0x00000004,                   /* Color printer without a ribbon problem */
  496.     gxUseColor                  = (gxInterlaceColor | gxOverlayColor) /* This is a color printer */
  497. };
  498. /* Structure for RasterPackageBitmap message */
  499. struct gxRasterPackageBitmapRec {
  500.     gxBitmap *                      bitmapToPackage;            /* Bitmap containing the data to package */
  501.     unsigned short                  startRaster;                /* Raster to begin the packaging from */
  502.     unsigned short                  colorBand;                  /* For which color pass this is a packaging request */
  503.     Boolean                         isBandDirty;                /* Whether there are any dirty bits in this band */
  504.     char                            padByte;
  505.     Rect                            dirtyRect;                  /* Which bits are dirty */
  506. };
  507. typedef struct gxRasterPackageBitmapRec gxRasterPackageBitmapRec;
  508. /* Structure of number record in gxRasterPackageControlsRec */
  509. struct gxStandardNumberRec {
  510.     short                           numberType;                 /* Type of numberic output desired */
  511.     short                           minWidth;                   /* Minimum output width of the number */
  512.     char                            padChar;                    /* Pad character for numbers shorter than the minWidth */
  513.     char                            padChar2;
  514.     Str31                           startString;                /* Prefix string */
  515.     Str31                           endString;                  /* Postfix string */
  516. };
  517. typedef struct gxStandardNumberRec      gxStandardNumberRec;
  518. typedef gxStandardNumberRec *           gxStandardNumberPtr;
  519. /* Structure that mirrors 'ropt' resource */
  520. struct gxRasterPackageControlsRec {
  521.     short                           startPageStringID;          /* 'wstr' to send to the device at start of page */
  522.     short                           formFeedStringID;           /* 'wstr' to send to the device to cause a form feed */
  523.     short                           forwardMax;                 /* Line feed strings */
  524.     gxStandardNumberRec             forwardLineFeed;            /* Number record for forward line feed */
  525.     short                           reverseMax;                 /* Max number of reverse line feeds device can do */
  526.     gxStandardNumberRec             reverseLineFeed;            /* Number record for forward line feed */
  527. };
  528. typedef struct gxRasterPackageControlsRec gxRasterPackageControlsRec;
  529. typedef gxRasterPackageControlsRec *    gxRasterPackageControlsPtr;
  530. typedef gxRasterPackageControlsPtr *    gxRasterPackageControlsHdl;
  531. /* Raster imaging system imageData structure */
  532. struct gxRasterImageDataRec {
  533.     gxRasterRenderOptions           renderOptions;              /* Options for the raster imaging system */
  534.     Fixed                           hImageRes;                  /* horizontal resolution to image at */
  535.     Fixed                           vImageRes;                  /* vertical resolution to image at */
  536.     short                           minBandSize;                /* smallest band that makes sense for this device */
  537.     short                           maxBandSize;                /* biggest band that makes sense, or 0 for "full page" */
  538.     gxRectangle                     pageSize;                   /* size of page for device */
  539.                                                                 /* Values used within the RasterDataIn message */
  540.     short                           currentYPos;                /* Current position moving down the page */
  541.     gxRasterPackageRec              packagingInfo;              /* Raster packaging record */
  542.                                                                 /* Values used within the remaining messages */
  543.     Boolean                         optionsValid;               /* Were options specified by the driver? */
  544.     char                            padByte;
  545.     gxRasterPackageControlsRec      packageControls;            /* Options for the packaging messages */
  546.     gxOffscreenSetupRec             theSetup;                   /* setup for the offscreen code, variable length componant */
  547. };
  548. typedef struct gxRasterImageDataRec     gxRasterImageDataRec;
  549. typedef gxRasterImageDataRec *          gxRasterImageDataPtr;
  550. typedef gxRasterImageDataPtr *          gxRasterImageDataHdl;
  551. /* ------------------------------------------------------------------------------
  552.                                 Raster Driver Imaging Messages
  553. -------------------------------------------------------------------------------- */
  554. #define Send_GXRasterDataIn(offScreen, bandRectangle, dirtyRectangle) 
  555.         MacSendMessage(0x00010000, offScreen, bandRectangle, dirtyRectangle)
  556.  
  557. #define Forward_GXRasterDataIn(offScreen, bandRectangle, dirtyRectangle) 
  558.         ForwardThisMessage((void *) (offScreen), (void *) (bandRectangle), (void *) (dirtyRectangle))
  559.  
  560. #define Send_GXRasterLineFeed(lineFeedSize, buffer, bufferPos, imageDataHdl) 
  561.         MacSendMessage(0x00010001, lineFeedSize, buffer, bufferPos, imageDataHdl)
  562.  
  563. #define Forward_GXRasterLineFeed(lineFeedSize, buffer, bufferPos, imageDataHdl) 
  564.         ForwardThisMessage((void *) (lineFeedSize), (void *) (buffer), (void *) (bufferPos), (void *) (imageDataHdl))
  565.  
  566. #define Send_GXRasterPackageBitmap(whatToPackage, buffer, bufferPos, imageDataHdl) 
  567.         MacSendMessage(0x00010002, whatToPackage, buffer, bufferPos, imageDataHdl)
  568.  
  569. #define Forward_GXRasterPackageBitmap(whatToPackage, buffer, bufferPos, imageDataHdl) 
  570.         ForwardThisMessage((void *) (whatToPackage), (void *) (buffer), (void *) (bufferPos), (void *) (imageDataHdl))
  571. /* ------------------------------------------------------------------------------
  572.                         Vector Driver Contants and Types
  573. -------------------------------------------------------------------------------- */
  574. /* Vector device halftone component record */
  575. struct gxVHalftoneCompRec {
  576.     Fixed                           angle;                      /* Angle to halftone at. Must be 0, 90, 45 or 135 */
  577.     long                            penIndex;                   /* index of the pen to draw this component with */
  578. };
  579. typedef struct gxVHalftoneCompRec       gxVHalftoneCompRec;
  580. /* Vector device halftone record */
  581. struct gxVHalftoneRec {
  582.     gxColorSpace                    halftoneSpace;
  583.     gxVHalftoneCompRec              halftoneComps[4];           /* Info for each color component */
  584.     long                            penIndexForBW;              /* Pen index to draw one bit deep or black and white bitmap with */
  585. };
  586. typedef struct gxVHalftoneRec           gxVHalftoneRec;
  587. /* Vector shape rendering information */
  588. typedef long                            gxVectorShapeOptions;
  589. struct gxVectorShapeDataRec {
  590.     gxVectorShapeOptions            shapeOptions;               /* Options to control shape handling */
  591.     long                            maxPolyPoints;              /* Maximum number of polygon points that device can support */
  592.     Fixed                           shapeError;                 /* Defines allowed deviation from the original shape */
  593.     Fixed                           textSize;                   /* Text above this size is filled; text below this size is outlined */
  594.     Fixed                           frameSize;                  /* Frame's smaller than this -> shape stroked; frame's larger -> shape is filled */
  595. };
  596. typedef struct gxVectorShapeDataRec     gxVectorShapeDataRec;
  597. /* Constants for shapeOptions field in gxVectorShapeDataRec. */
  598. enum {
  599.     gxUnidirectionalFill        = 0x00000001,                   /* Generate scanlines in one direction only.  Useful for transparencies */
  600.     gxAlsoOutlineFilledShape    = 0x00000002                    /* Turn on this bit to also outline solid filled shapes */
  601. };
  602. /* Vector device rendering information */
  603. typedef long                            gxVectorRenderOptions;
  604. /* Vector imaging system imageData structure */
  605. struct gxVectorImageDataRec {
  606.     gxVectorRenderOptions           renderOptions;              /* Options to control rendering: color sort, clipping, etc. */
  607.     Fixed                           devRes;                     /* Device resolution */
  608.     gxTransform                     devTransform;               /* Mapping, clip and halftoning information for colored bitmaps */
  609.     gxColorSet                      clrSet;                     /* Entire set of colors; usually indexed color space for pen plotters */
  610.     gxColor                         bgColor;                    /* The background color in the color space specified by the clrSpace field */
  611.     gxVHalftoneRec                  halftoneInfo;               /* Defines halftone information for color bitmaps */
  612.     gxPenTableHdl                   hPenTable;                  /* Complete list of pens along with their pen positions and thickness */
  613.     gxRectangle                     pageRect;                   /* Page dimensions */
  614.     gxVectorShapeDataRec            shapeData;                  /* Information on how to render a shape */
  615. };
  616. typedef struct gxVectorImageDataRec     gxVectorImageDataRec;
  617. typedef gxVectorImageDataRec *          gxVectorImageDataPtr;
  618. typedef gxVectorImageDataPtr *          gxVectorImageDataHdl;
  619. /* Constants for renderOptions field in gxVectorImageDataRec. */
  620. enum {
  621.     gxColorSort                 = 0x00000001,                   /* Set for pen plotters */
  622.     gxATransferMode             = 0x00000002,                   /* Set if transfer modes need to be resolved */
  623.     gxNoOverlap                 = 0x00000004,                   /* Set if non-overlapping output is desired*/
  624.     gxAColorBitmap              = 0x00000008,                   /* Set if color bitmap output is desired */
  625.     gxSortbyPenPos              = 0x00000010,                   /* Set if shapes are to be drawn in the order of the pen index */
  626.                                                                 /* in the pen table. NOTE: this is not the pen position in the carousel */
  627.     gxPenLessPlotter            = 0x00000020,                   /* Indicates raster printer/plotter */
  628.     gxCutterPlotter             = 0x00000040,                   /* Indicates cutter */
  629.     gxNoBackGround              = 0x00000080                    /* Set if shapes that map to the background color should not be sent to driver */
  630. };
  631. /* ------------------------------------------------------------------------------
  632.                                 Vector Driver Imaging Messages
  633. -------------------------------------------------------------------------------- */
  634. #define Send_GXVectorPackageShape(theShape, penIndex) 
  635.         MacSendMessage(0x00010000, theShape, penIndex)
  636.  
  637. #define Forward_GXVectorPackageShape(theShape, penIndex) 
  638.         ForwardThisMessage((void *) (theShape), (void *) (penIndex))
  639.  
  640. #define Send_GXVectorLoadPens(penTable, shapeCounts, penTableChanged) 
  641.         MacSendMessage(0x00010001, penTable, shapeCounts, penTableChanged)
  642.  
  643. #define Forward_GXVectorLoadPens(penTable, shapeCounts, penTableChanged) 
  644.         ForwardThisMessage((void *) (penTable), (void *) (shapeCounts), (void *) (penTableChanged))
  645.  
  646. #define Send_GXVectorVectorizeShape(theShape, penIndex, vectorData) 
  647.         MacSendMessage(0x00010002, theShape, penIndex, vectorData)
  648.  
  649. #define Forward_GXVectorVectorizeShape(theShape, penIndex, vectorData) 
  650.         ForwardThisMessage((void *) (theShape), (void *) (penIndex), (void *) (vectorData))
  651. /* ------------------------------------------------------------------------------
  652.                             PostScript Driver Contants and Types
  653. -------------------------------------------------------------------------------- */
  654. enum {
  655.     gxPostSynonym               = FOUR_CHAR_CODE('post')
  656. };
  657. /* PostScript glyphs record */
  658. struct gxPrinterGlyphsRec {
  659.     gxFont                          theFont;                    /*  ---> Font reference */
  660.     long                            nGlyphs;                    /*  ---> Number of glyphs in the font */
  661.     gxFontPlatform                  platform;                   /* <---  How printer font is encoded */
  662.     gxFontScript                    script;                     /* <---  Script if platform != glyphPlatform */
  663.     gxFontLanguage                  language;                   /* <---  Language if platform != glyphPlatform */
  664.     long                            vmUsage;                    /* <---  How much PostScript VM font uses */
  665.                                                                 /* Size of this array is long-alligned(nGlyphs) */
  666.     unsigned long                   glyphBits[1];               /* <---  Bit array of which system glyphs are in printer */
  667. };
  668. typedef struct gxPrinterGlyphsRec       gxPrinterGlyphsRec;
  669. /* PostScript device rendering information */
  670. typedef long                            gxPostScriptRenderOptions;
  671. struct gxPostScriptImageDataRec {
  672.     short                           languageLevel;              /* PostScript language level */
  673.     gxColorSpace                    devCSpace;                  /* The printer's color space */
  674.     gxColorProfile                  devCProfile;                /* The printer's color profile for matching */
  675.     gxPostScriptRenderOptions       renderOptions;              /* Options for the imaging system */
  676.     long                            pathLimit;                  /* Maximum path size */
  677.     short                           gsaveLimit;                 /* Maximum number of gsaves allowed */
  678.     short                           opStackLimit;               /* Operand stack limit */
  679.     scalerStreamTypeFlag            fontType;                   /* These are the font types that the printer supports  */
  680.     long                            printerVM;                  /* How much memory is in the printer */
  681.     long                            reserved0;
  682. };
  683. typedef struct gxPostScriptImageDataRec gxPostScriptImageDataRec;
  684. typedef gxPostScriptImageDataRec *      gxPostScriptImageDataPtr;
  685. typedef gxPostScriptImageDataPtr *      gxPostScriptImageDataHdl;
  686. /* Constants for renderOptions field in gxPostScriptImageDataRec. */
  687. enum {
  688.     gxNeedsHexOption            = 0x00000001,                   /* Convert all binary data to hex */
  689.     gxNeedsCommentsOption       = 0x00000002,                   /* Issue PostScript comments */
  690.     gxBoundingBoxesOption       = 0x00000004,                   /* Calculate the values for */
  691.     gxPortablePostScriptOption  = 0x00000008,                   /* Generate portable PostScript */
  692.     gxTextClipsToPathOption     = 0x00000010,                   /* Convert all clips that are composed of text to path shapes */
  693.     gxFlattenClipPathOption     = 0x00000020,                   /* Convert all clips that are path shapes to polygons (helps better control point limit) */
  694.     gxUseCharpath1Option        = 0x00000040,                   /* (ignored if text clips are converted to paths)  When the clip is text,  */
  695.                                                                 /* Do it one glyph at a time, redrawing the main shape each time */
  696.     gxUseLevel2ColorOption      = 0x00000080,                   /* When printing to level-2 use level-2 device independent color */
  697.     gxNoEPSIllegalOperators     = 0x00000100,                   /* Don't use any operators prohibited by the Encapsulated PostScript File Format V3.0 */
  698.     gxEPSTargetOption           = gxNoEPSIllegalOperators + gxNeedsCommentsOption + gxBoundingBoxesOption, /* PostScript intended for EPS Use. */
  699.     gxPageIndependentPostScript = 0x00000200                    /* Don't generate PostScript with page interdependencies */
  700. };
  701. /* Structure for gxPostScriptGetProcSetList / gxPostScriptDownLoadProcSetList */
  702. struct gxProcSetListRec {
  703.     gxOwnerSignature                clientid;
  704.     OSType                          controlType;                /* The driver will call FetchTaggedData on each of these resources */
  705.     short                           controlid;
  706.     OSType                          dataType;
  707.     long                            reserved0;
  708. };
  709. typedef struct gxProcSetListRec         gxProcSetListRec;
  710. typedef gxProcSetListRec *              gxProcSetListPtr;
  711. typedef gxProcSetListPtr *              gxProcSetListHdl;
  712. /* Possible results of querying printer (returned by gxPostScriptQueryPrinter message) */
  713. enum {
  714.     gxPrinterOK                 = 0,
  715.     gxIntializePrinter          = 1,
  716.     gxFilePrinting              = 2,
  717.     gxResetPrinter              = 128
  718. };
  719. /* ------------------------------------------------------------------------------
  720.                                 PostScript Driver Imaging Messages
  721. -------------------------------------------------------------------------------- */
  722. /* Device control messages */
  723. #define Send_GXPostScriptQueryPrinter(queryData) 
  724.         MacSendMessage(0x00010000, queryData)
  725. #define Forward_GXPostScriptQueryPrinter(queryData) 
  726.         ForwardThisMessage((void *) (queryData))
  727. #define Send_GXPostScriptInitializePrinter() 
  728.         MacSendMessage(0x00010001)
  729. #define Forward_GXPostScriptInitializePrinter() 
  730.         ForwardThisMessage((void *) (0))
  731. #define Send_GXPostScriptResetPrinter() 
  732.         MacSendMessage(0x00010002)
  733. #define Forward_GXPostScriptResetPrinter() 
  734.         ForwardThisMessage((void *) (0))
  735. #define Send_GXPostScriptExitServer() 
  736.         MacSendMessage(0x00010003)
  737. #define Forward_GXPostScriptExitServer() 
  738.         ForwardThisMessage((void *) (0))
  739. /* Device communication messages */
  740. #define Send_GXPostScriptGetStatusText(textHdl) 
  741.         MacSendMessage(0x00010004, textHdl)
  742. #define Forward_GXPostScriptGetStatusText(textHdl) 
  743.         ForwardThisMessage((void *) (textHdl))
  744. #define Send_GXPostScriptGetPrinterText(textHdl) 
  745.         MacSendMessage(0x00010005, textHdl)
  746. #define Forward_GXPostScriptGetPrinterText(textHdl) 
  747.         ForwardThisMessage((void *) (textHdl))
  748. #define Send_GXPostScriptScanStatusText(textHdl) 
  749.         MacSendMessage(0x00010006, textHdl)
  750. #define Forward_GXPostScriptScanStatusText(textHdl) 
  751.         ForwardThisMessage((void *) (textHdl))
  752. #define Send_GXPostScriptScanPrinterText(textHdl) 
  753.         MacSendMessage(0x00010007, textHdl)
  754. #define Forward_GXPostScriptScanPrinterText(textHdl) 
  755.         ForwardThisMessage((void *) (textHdl))
  756. /* Proc set management messages */
  757. #define Send_GXPostScriptGetDocumentProcSetList(procSet, imageDataHdl) 
  758.         MacSendMessage(0x00010008, procSet, imageDataHdl)
  759. #define Forward_GXPostScriptGetDocumentProcSetList(procSet, imageDataHdl) 
  760.         ForwardThisMessage((void *) (procSet), (void *) (imageDataHdl))
  761. #define Send_GXPostScriptDownloadProcSetList(procSet, imageDataHdl) 
  762.         MacSendMessage(0x00010009, procSet, imageDataHdl)
  763. #define Forward_GXPostScriptDownloadProcSetList(procSet, imageDataHdl) 
  764.         ForwardThisMessage((void *) (procSet), (void *) (imageDataHdl))
  765. /* Font management messages */
  766. #define Send_GXPostScriptGetPrinterGlyphsInformation(glyphsInfo) 
  767.         MacSendMessage(0x0001000A, glyphsInfo)
  768. #define Forward_GXPostScriptGetPrinterGlyphsInformation(glyphsInfo) 
  769.         ForwardThisMessage((void *) (glyphsInfo))
  770. #define Send_GXPostScriptStreamFont(fontref, streamPtr) 
  771.         MacSendMessage(0x0001000B, fontref, streamPtr)
  772. #define Forward_GXPostScriptStreamFont(fontref, streamPtr) 
  773.         ForwardThisMessage((void *) (fontref), (void *) (streamPtr))
  774. /* Document structuring and formatting messages */
  775. #define Send_GXPostScriptDoDocumentHeader(imageDataHdl) 
  776.         MacSendMessage(0x0001000C, imageDataHdl)
  777. #define Forward_GXPostScriptDoDocumentHeader(imageDataHdl) 
  778.         ForwardThisMessage((void *) (imageDataHdl))
  779.     
  780. #define Send_GXPostScriptDoDocumentSetup(imageDataHdl) 
  781.         MacSendMessage(0x0001000D, imageDataHdl)
  782. #define Forward_GXPostScriptDoDocumentSetup(imageDataHdl) 
  783.         ForwardThisMessage((void *) (imageDataHdl))
  784. #define Send_GXPostScriptDoDocumentTrailer(imageDataHdl) 
  785.         MacSendMessage(0x0001000E, imageDataHdl)
  786. #define Forward_GXPostScriptDoDocumentTrailer(imageDataHdl) 
  787.         ForwardThisMessage((void *) (imageDataHdl))
  788. /* Page structuring and formatting messages */
  789. #define Send_GXPostScriptDoPageSetup(pageFormat, thePage, imageDataHdl) 
  790.         MacSendMessage(0x0001000F, pageFormat, thePage, imageDataHdl)
  791. #define Forward_GXPostScriptDoPageSetup(pageFormat, thePage, imageDataHdl) 
  792.         ForwardThisMessage((void *) (pageFormat), (void *) (thePage), (void *) (imageDataHdl))
  793. #define Send_GXPostScriptSelectPaperType(thePapertype, thePage, imageDataHdl) 
  794.         MacSendMessage(0x00010010, thePapertype, thePage, imageDataHdl)
  795. #define Forward_GXPostScriptSelectPaperType(thePapertype, thePage, imageDataHdl) 
  796.         ForwardThisMessage((void *) (thePapertype), (void *) (thePage), (void *) (imageDataHdl))
  797. #define Send_GXPostScriptDoPageTrailer(imageDataHdl) 
  798.         MacSendMessage(0x00010011, imageDataHdl)
  799. #define Forward_GXPostScriptDoPageTrailer(imageDataHdl) 
  800.         ForwardThisMessage((void *) (imageDataHdl))
  801. #define Send_GXPostScriptEjectPage(thePapertype, pagenumber, copiescount, erasepage, imageDataHdl) 
  802.         MacSendMessage(0x00010012, thePapertype, pagenumber, copiescount, erasepage, imageDataHdl)
  803. #define Forward_GXPostScriptEjectPage(thePapertype, pagenumber, copiescount, erasepage, imageDataHdl) 
  804.         ForwardThisMessage((void *) (thePapertype), (void *) (pagenumber), (void *) (copiescount), 
  805.                            (void *) (erasepage), (void *) (imageDataHdl))
  806. #define Send_GXPostScriptEjectPendingPage(pageWasEjected) 
  807.         MacSendMessage(0x00010014, pageWasEjected)
  808. #define Forward_GXPostScriptEjectPendingPage(pageWasEjected) 
  809.         ForwardThisMessage((void *) (pageWasEjected))
  810. /* Shape imaging messages */
  811. #define Send_GXPostScriptProcessShape(page, trcount, trlist) 
  812.         MacSendMessage(0x00010013, page, trcount, trlist)
  813. #define Forward_GXPostScriptProcessShape(page, trcount, trlist) 
  814.         ForwardThisMessage((void *) (page), (void *) (trcount), (void *) (trlist))
  815. /* ------------------------------------------------------------------------------
  816.                                             Driver API Functions
  817. -------------------------------------------------------------------------------- */
  818. /* Constants for printer gxViewDevice bitmaps. */
  819. enum {
  820.     gxMissingImagePointer       = -4
  821. };
  822. #if CALL_NOT_IN_CARBON
  823. EXTERN_API_C( OSErr )
  824. GXAddPrinterViewDevice          (gxPrinter              thePrinter,
  825.                                  gxViewDevice           theViewDevice)                      FOURWORDINLINE(0x203C, 0x0002, 0x0000, 0xABFE);
  826. EXTERN_API_C( OSErr )
  827. GXGetAvailableJobFormatModes    (gxJobFormatModeTableHdl * theFormatModes)                  FOURWORDINLINE(0x203C, 0x0002, 0x0001, 0xABFE);
  828. EXTERN_API_C( OSErr )
  829. GXSetPreferredJobFormatMode     (gxJobFormatMode        theFormatMode,
  830.                                  Boolean                directOnly)                         FOURWORDINLINE(0x203C, 0x0002, 0x0002, 0xABFE);
  831. EXTERN_API_C( OSErr )
  832. GXPrintingAlert                 (long                   iconId,
  833.                                  long                   txtSize,
  834.                                  long                   defaultTitleNum,
  835.                                  long                   cancelTitleNum,
  836.                                  long                   textLength,
  837.                                  Ptr                    pAlertMsg,
  838.                                  StringPtr              actionTitle,
  839.                                  StringPtr              title2,
  840.                                  StringPtr              title3,
  841.                                  StringPtr              msgFont,
  842.                                  ModalFilterUPP         filterProc,
  843.                                  short *                itemHit,
  844.                                  StringPtr              alertTitle)                         FOURWORDINLINE(0x203C, 0x0002, 0x0003, 0xABFE);
  845. EXTERN_API_C( OSErr )
  846. GXGetPrintingAlert              (long                   alertResId,
  847.                                  ModalFilterUPP         filterProc,
  848.                                  short *                itemHit)                            FOURWORDINLINE(0x203C, 0x0002, 0x0004, 0xABFE);
  849. EXTERN_API_C( OSErr )
  850. GXFetchDTPData                  (Str31                  dtpName,
  851.                                  OSType                 theType,
  852.                                  long                   theID,
  853.                                  Handle *               theData)                            FOURWORDINLINE(0x203C, 0x0002, 0x0005, 0xABFE);
  854. EXTERN_API_C( OSErr )
  855. GXWriteDTPData                  (Str31                  dtpName,
  856.                                  OSType                 theType,
  857.                                  long                   theID,
  858.                                  Handle                 theData)                            FOURWORDINLINE(0x203C, 0x0002, 0x0006, 0xABFE);
  859. EXTERN_API_C( OSErr )
  860. GXHandleChooserMessage          (gxJob *                aJob,
  861.                                  Str31                  driverName,
  862.                                  long                   message,
  863.                                  long                   caller,
  864.                                  StringPtr              objName,
  865.                                  StringPtr              zoneName,
  866.                                  ListHandle             theList,
  867.                                  long                   p2)                                 FOURWORDINLINE(0x203C, 0x0002, 0x0007, 0xABFE);
  868. #endif  /* CALL_NOT_IN_CARBON */
  869. #if PRAGMA_STRUCT_ALIGN
  870.     #pragma options align=reset
  871. #elif PRAGMA_STRUCT_PACKPUSH
  872.     #pragma pack(pop)
  873. #elif PRAGMA_STRUCT_PACK
  874.     #pragma pack()
  875. #endif
  876. #ifdef PRAGMA_IMPORT_OFF
  877. #pragma import off
  878. #elif PRAGMA_IMPORT
  879. #pragma import reset
  880. #endif
  881. #ifdef __cplusplus
  882. }
  883. #endif
  884. #endif /* __GXPRINTERDRIVERS__ */