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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       GXPrinting.h
  3.  
  4.      Contains:   This file contains all printing APIs except for driver/extension specific ones.
  5.  
  6.      Version:    Technology: Quickdraw GX 1.1
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1994-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 __GXPRINTING__
  18. #define __GXPRINTING__
  19. #ifndef __CONDITIONALMACROS__
  20. #include "ConditionalMacros.h"
  21. #endif
  22. #ifndef __COLLECTIONS__
  23. #include "Collections.h"
  24. #endif
  25. #ifndef __DIALOGS__
  26. #include "Dialogs.h"
  27. #endif
  28. #ifndef __MACERRORS__
  29. #include "MacErrors.h"
  30. #endif
  31. #ifndef __FILES__
  32. #include "Files.h"
  33. #endif
  34. #ifndef __GXFONTS__
  35. #include "GXFonts.h"
  36. #endif
  37. #ifndef __GXMATH__
  38. #include "GXMath.h"
  39. #endif
  40. #ifndef __GXTYPES__
  41. #include "GXTypes.h"
  42. #endif
  43. #ifndef __LISTS__
  44. #include "Lists.h"
  45. #endif
  46. #ifndef __MENUS__
  47. #include "Menus.h"
  48. #endif
  49. #ifndef __GXMESSAGES__
  50. #include "GXMessages.h"
  51. #endif
  52. #ifndef __PRINTING__
  53. #include "Printing.h"
  54. #endif
  55. #ifndef __QUICKDRAW__
  56. #include "Quickdraw.h"
  57. #endif
  58. #if PRAGMA_ONCE
  59. #pragma once
  60. #endif
  61. #ifdef __cplusplus
  62. extern "C" {
  63. #endif
  64. #if PRAGMA_IMPORT
  65. #pragma import on
  66. #endif
  67. #if PRAGMA_STRUCT_ALIGN
  68.     #pragma options align=mac68k
  69. #elif PRAGMA_STRUCT_PACKPUSH
  70.     #pragma pack(push, 2)
  71. #elif PRAGMA_STRUCT_PACK
  72.     #pragma pack(2)
  73. #endif
  74. /********************************************************************
  75.                     Start of old "GXPrintingManager.h/a/p" interface file.
  76.             *********************************************************************/
  77. /* ------------------------------------------------------------------------------
  78.                             Printing Manager API Contants and Types
  79. -------------------------------------------------------------------------------- */
  80. typedef unsigned long                   gxOwnerSignature;
  81. #if OLDROUTINENAMES
  82. typedef unsigned long                   Signature;
  83. #endif  /* OLDROUTINENAMES */
  84. /*
  85.     ABSTRACT DATA TYPES
  86. */
  87. /*
  88.    typedef struct gxPrivatePrinterRecord *gxPrinter;
  89.    typedef struct gxPrivateJobRecord *gxJob;
  90.    typedef struct gxPrivateFormatRecord *gxFormat;
  91.    typedef struct gxPrivatePaperTypeRecord *gxPaperType;
  92.    typedef struct gxPrivatePrintFileRecord *gxPrintFile;
  93. */
  94. typedef struct OpaquegxPrinter*         gxPrinter;
  95. typedef struct OpaquegxJob*             gxJob;
  96. typedef struct OpaquegxFormat*          gxFormat;
  97. typedef struct OpaquegxPaperType*       gxPaperType;
  98. typedef struct OpaquegxPrintFile*       gxPrintFile;
  99. /* Possible values for LoopStatus */
  100. typedef Boolean                         gxLoopStatus;
  101. enum {
  102.     gxStopLooping               = false,
  103.     gxKeepLooping               = true
  104. };
  105. typedef CALLBACK_API( gxLoopStatus , GXViewDeviceProcPtr )(gxViewDevice aViewDevice, void *refCon);
  106. typedef STACK_UPP_TYPE(GXViewDeviceProcPtr)                     GXViewDeviceUPP;
  107. #if OPAQUE_UPP_TYPES
  108. #if CALL_NOT_IN_CARBON
  109.     EXTERN_API(GXViewDeviceUPP)
  110.     NewGXViewDeviceUPP             (GXViewDeviceProcPtr     userRoutine);
  111.     EXTERN_API(void)
  112.     DisposeGXViewDeviceUPP         (GXViewDeviceUPP         userUPP);
  113.     EXTERN_API(gxLoopStatus)
  114.     InvokeGXViewDeviceUPP          (gxViewDevice            aViewDevice,
  115.                                     void *                  refCon,
  116.                                     GXViewDeviceUPP         userUPP);
  117. #endif  /* CALL_NOT_IN_CARBON */
  118. #else
  119.     enum { uppGXViewDeviceProcInfo = 0x000003D0 };                  /* pascal 1_byte Func(4_bytes, 4_bytes) */
  120.     #define NewGXViewDeviceUPP(userRoutine)                         (GXViewDeviceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXViewDeviceProcInfo, GetCurrentArchitecture())
  121.     #define DisposeGXViewDeviceUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  122.     #define InvokeGXViewDeviceUPP(aViewDevice, refCon, userUPP)     (gxLoopStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppGXViewDeviceProcInfo, (aViewDevice), (refCon))
  123. #endif
  124. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  125. #define NewGXViewDeviceProc(userRoutine)                        NewGXViewDeviceUPP(userRoutine)
  126. #define CallGXViewDeviceProc(userRoutine, aViewDevice, refCon)  InvokeGXViewDeviceUPP(aViewDevice, refCon, userRoutine)
  127. typedef CALLBACK_API( gxLoopStatus , GXFormatProcPtr )(gxFormat aFormat, void *refCon);
  128. typedef STACK_UPP_TYPE(GXFormatProcPtr)                         GXFormatUPP;
  129. #if OPAQUE_UPP_TYPES
  130. #if CALL_NOT_IN_CARBON
  131.     EXTERN_API(GXFormatUPP)
  132.     NewGXFormatUPP                 (GXFormatProcPtr         userRoutine);
  133.     EXTERN_API(void)
  134.     DisposeGXFormatUPP             (GXFormatUPP             userUPP);
  135.     EXTERN_API(gxLoopStatus)
  136.     InvokeGXFormatUPP              (gxFormat                aFormat,
  137.                                     void *                  refCon,
  138.                                     GXFormatUPP             userUPP);
  139. #endif  /* CALL_NOT_IN_CARBON */
  140. #else
  141.     enum { uppGXFormatProcInfo = 0x000003D0 };                      /* pascal 1_byte Func(4_bytes, 4_bytes) */
  142.     #define NewGXFormatUPP(userRoutine)                             (GXFormatUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFormatProcInfo, GetCurrentArchitecture())
  143.     #define DisposeGXFormatUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  144.     #define InvokeGXFormatUPP(aFormat, refCon, userUPP)             (gxLoopStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppGXFormatProcInfo, (aFormat), (refCon))
  145. #endif
  146. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  147. #define NewGXFormatProc(userRoutine)                            NewGXFormatUPP(userRoutine)
  148. #define CallGXFormatProc(userRoutine, aFormat, refCon)          InvokeGXFormatUPP(aFormat, refCon, userRoutine)
  149. typedef CALLBACK_API( gxLoopStatus , GXPaperTypeProcPtr )(gxPaperType aPapertype, void *refCon);
  150. typedef STACK_UPP_TYPE(GXPaperTypeProcPtr)                      GXPaperTypeUPP;
  151. #if OPAQUE_UPP_TYPES
  152. #if CALL_NOT_IN_CARBON
  153.     EXTERN_API(GXPaperTypeUPP)
  154.     NewGXPaperTypeUPP              (GXPaperTypeProcPtr      userRoutine);
  155.     EXTERN_API(void)
  156.     DisposeGXPaperTypeUPP          (GXPaperTypeUPP          userUPP);
  157.     EXTERN_API(gxLoopStatus)
  158.     InvokeGXPaperTypeUPP           (gxPaperType             aPapertype,
  159.                                     void *                  refCon,
  160.                                     GXPaperTypeUPP          userUPP);
  161. #endif  /* CALL_NOT_IN_CARBON */
  162. #else
  163.     enum { uppGXPaperTypeProcInfo = 0x000003D0 };                   /* pascal 1_byte Func(4_bytes, 4_bytes) */
  164.     #define NewGXPaperTypeUPP(userRoutine)                          (GXPaperTypeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPaperTypeProcInfo, GetCurrentArchitecture())
  165.     #define DisposeGXPaperTypeUPP(userUPP)                          DisposeRoutineDescriptor(userUPP)
  166.     #define InvokeGXPaperTypeUPP(aPapertype, refCon, userUPP)       (gxLoopStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppGXPaperTypeProcInfo, (aPapertype), (refCon))
  167. #endif
  168. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  169. #define NewGXPaperTypeProc(userRoutine)                         NewGXPaperTypeUPP(userRoutine)
  170. #define CallGXPaperTypeProc(userRoutine, aPapertype, refCon)    InvokeGXPaperTypeUPP(aPapertype, refCon, userRoutine)
  171. typedef CALLBACK_API( OSErr , GXPrintingFlattenProcPtr )(long size, void *data, void *refCon);
  172. typedef STACK_UPP_TYPE(GXPrintingFlattenProcPtr)                GXPrintingFlattenUPP;
  173. #if OPAQUE_UPP_TYPES
  174. #if CALL_NOT_IN_CARBON
  175.     EXTERN_API(GXPrintingFlattenUPP)
  176.     NewGXPrintingFlattenUPP        (GXPrintingFlattenProcPtr userRoutine);
  177.     EXTERN_API(void)
  178.     DisposeGXPrintingFlattenUPP    (GXPrintingFlattenUPP    userUPP);
  179.     EXTERN_API(OSErr)
  180.     InvokeGXPrintingFlattenUPP     (long                    size,
  181.                                     void *                  data,
  182.                                     void *                  refCon,
  183.                                     GXPrintingFlattenUPP    userUPP);
  184. #endif  /* CALL_NOT_IN_CARBON */
  185. #else
  186.     enum { uppGXPrintingFlattenProcInfo = 0x00000FE0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  187.     #define NewGXPrintingFlattenUPP(userRoutine)                    (GXPrintingFlattenUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintingFlattenProcInfo, GetCurrentArchitecture())
  188.     #define DisposeGXPrintingFlattenUPP(userUPP)                    DisposeRoutineDescriptor(userUPP)
  189.     #define InvokeGXPrintingFlattenUPP(size, data, refCon, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXPrintingFlattenProcInfo, (size), (data), (refCon))
  190. #endif
  191. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  192. #define NewGXPrintingFlattenProc(userRoutine)                   NewGXPrintingFlattenUPP(userRoutine)
  193. #define CallGXPrintingFlattenProc(userRoutine, size, data, refCon) InvokeGXPrintingFlattenUPP(size, data, refCon, userRoutine)
  194. #if OLDROUTINENAMES
  195. typedef GXViewDeviceProcPtr             gxViewDeviceProc;
  196. typedef GXFormatProcPtr                 gxFormatProc;
  197. typedef GXPaperTypeProcPtr              gxPaperTypeProc;
  198. typedef GXPrintingFlattenProcPtr        gxPrintingFlattenProc;
  199. #endif  /* OLDROUTINENAMES */
  200. /*
  201.     The following constants are used to set collection item flags in printing
  202.     collections. The Printing Manager purges certain items whenever a driver
  203.     switch occurs. If the formatting driver changes, all items marked as
  204.     gxVolatileFormattingDriverCategory will be purged.  If the output driver
  205.     changes, all items marked as gxVolatileOutputDriverCategory will be purged.
  206.     Note that to prevent items from being flattened when GXFlattenJob is called,
  207.     you should unset the collectionPersistenceBit (defined in Collections.h),
  208.     which is on by default.
  209. */
  210. /* Structure stored in collection items' user attribute bits */
  211. typedef short                           gxCollectionCategory;
  212. enum {
  213.     gxNoCollectionCategory      = 0x0000,
  214.     gxOutputDriverCategory      = 0x0001,
  215.     gxFormattingDriverCategory  = 0x0002,
  216.     gxDriverVolatileCategory    = 0x0004,
  217.     gxVolatileOutputDriverCategory = gxOutputDriverCategory + gxDriverVolatileCategory,
  218.     gxVolatileFormattingDriverCategory = gxFormattingDriverCategory + gxDriverVolatileCategory
  219. };
  220. /*
  221.     >>>>>> JOB COLLECTION ITEMS <<<<<<
  222. */
  223. /* gxJobInfo COLLECTION ITEM */
  224. enum {
  225.     gxJobTag                    = FOUR_CHAR_CODE('job ')
  226. };
  227. struct gxJobInfo {
  228.     long                            numPages;                   /* Number of pages in the document */
  229.     long                            priority;                   /* Priority of this job plus "is it on hold?" */
  230.     unsigned long                   timeToPrint;                /* When to print job, if scheduled */
  231.     long                            jobTimeout;                 /* Timeout value, in ticks */
  232.     long                            firstPageToPrint;           /* Start printing from this page */
  233.     short                           jobAlert;                   /* How to alert user when printing */
  234.     Str31                           appName;                    /* Which application printed the document */
  235.     Str31                           documentName;               /* The name of the document being printed */
  236.     Str31                           userName;                   /* The owner name of the machine that printed the document */
  237. };
  238. typedef struct gxJobInfo                gxJobInfo;
  239. /* gxPDDDefaultSettingTag COLLECTION ITEM */
  240. enum {
  241.     gxPDDDefaultSettingTag      = FOUR_CHAR_CODE('pdds')
  242. };
  243. struct gxPDDDefaultSettingInfo {
  244.     Boolean                         useDefaultSetting;          /* true if PDD default setting should be used */
  245.     SInt8                           pad;
  246. };
  247. typedef struct gxPDDDefaultSettingInfo  gxPDDDefaultSettingInfo;
  248. /* priority field constants */
  249. enum {
  250.     gxPrintJobHoldingBit        = 0x00001000                    /* This bit is set if the job is on hold. */
  251. };
  252. enum {
  253.     gxPrintJobUrgent            = 0x00000001,
  254.     gxPrintJobAtTime            = 0x00000002,
  255.     gxPrintJobASAP              = 0x00000003,
  256.     gxPrintJobHolding           = (gxPrintJobHoldingBit + gxPrintJobASAP),
  257.     gxPrintJobHoldingAtTime     = (gxPrintJobHoldingBit + gxPrintJobAtTime),
  258.     gxPrintJobHoldingUrgent     = (gxPrintJobHoldingBit + gxPrintJobUrgent)
  259. };
  260. /* jobAlert field constants */
  261. enum {
  262.     gxNoPrintTimeAlert          = 0,                            /* Don't alert user when we print */
  263.     gxAlertBefore               = 1,                            /* Alert user before we print */
  264.     gxAlertAfter                = 2,                            /* Alert user after we print */
  265.     gxAlertBothTimes            = 3                             /* Alert before and after we print */
  266. };
  267. /* jobTimeout field constants */
  268. enum {
  269.     gxThirtySeconds             = 1800,                         /* 30 seconds in ticks */
  270.     gxTwoMinutes                = 7200                          /* 2 minutes in ticks */
  271. };
  272. /* gxCollationTag COLLECTION ITEM */
  273. enum {
  274.     gxCollationTag              = FOUR_CHAR_CODE('sort')
  275. };
  276. struct gxCollationInfo {
  277.     Boolean                         collation;                  /* True if copies are to be collated */
  278.     char                            padByte;
  279. };
  280. typedef struct gxCollationInfo          gxCollationInfo;
  281. /* gxCopiesTag COLLECTION ITEM */
  282. enum {
  283.     gxCopiesTag                 = FOUR_CHAR_CODE('copy')
  284. };
  285. struct gxCopiesInfo {
  286.     long                            copies;                     /* Number of copies of the document to print */
  287. };
  288. typedef struct gxCopiesInfo             gxCopiesInfo;
  289. /* gxPageRangeTag COLLECTION ITEM */
  290. enum {
  291.     gxPageRangeTag              = FOUR_CHAR_CODE('rang')
  292. };
  293. struct gxSimplePageRangeInfo {
  294.     char                            optionChosen;               /* From options listed below */
  295.     Boolean                         printAll;                   /* True if user wants to print all pages */
  296.     long                            fromPage;                   /* For gxDefaultPageRange, current value */
  297.     long                            toPage;                     /* For gxDefaultPageRange, current value */
  298. };
  299. typedef struct gxSimplePageRangeInfo    gxSimplePageRangeInfo;
  300. struct gxPageRangeInfo {
  301.     gxSimplePageRangeInfo           simpleRange;                /* Info which will be returned for GetJobPageRange */
  302.     Str31                           fromString;                 /* For gxCustomizePageRange, current value */
  303.     Str31                           toString;                   /* For gxCustomizePageRange, current value */
  304.     long                            minFromPage;                /* For gxDefaultPageRange, we parse with this, ignored if nil */
  305.     long                            maxToPage;                  /* For gxDefaultPageRange, we parse with this, ignored if nil */
  306.     char                            replaceString[1];           /* For gxReplacePageRange, string to display */
  307. };
  308. typedef struct gxPageRangeInfo          gxPageRangeInfo;
  309. /* optionChosen field constants for SimplePageRangeInfo */
  310. enum {
  311.     gxDefaultPageRange          = 0,
  312.     gxReplacePageRange          = 1,
  313.     gxCustomizePageRange        = 2
  314. };
  315. /* gxQualityTag COLLECTION ITEM */
  316. enum {
  317.     gxQualityTag                = FOUR_CHAR_CODE('qual')
  318. };
  319. struct gxQualityInfo {
  320.     Boolean                         disableQuality;             /* True to disable standard quality controls */
  321.     char                            padByte;
  322.     short                           defaultQuality;             /* The default quality value */
  323.     short                           currentQuality;             /* The current quality value */
  324.     short                           qualityCount;               /* The number of quality menu items in popup menu */
  325.     char                            qualityNames[1];            /* An array of packed pascal strings for popup menu titles */
  326. };
  327. typedef struct gxQualityInfo            gxQualityInfo;
  328. /* gxFileDestinationTag COLLECTION ITEM */
  329. enum {
  330.     gxFileDestinationTag        = FOUR_CHAR_CODE('dest')
  331. };
  332. struct gxFileDestinationInfo {
  333.     Boolean                         toFile;                     /* True if destination is a file */
  334.     char                            padByte;
  335. };
  336. typedef struct gxFileDestinationInfo    gxFileDestinationInfo;
  337. /* gxFileLocationTag COLLECTION ITEM */
  338. enum {
  339.     gxFileLocationTag           = FOUR_CHAR_CODE('floc')
  340. };
  341. struct gxFileLocationInfo {
  342.     FSSpec                          fileSpec;                   /* Location to put file, if destination is file */
  343. };
  344. typedef struct gxFileLocationInfo       gxFileLocationInfo;
  345. /* gxFileFormatTag COLLECTION ITEM */
  346. enum {
  347.     gxFileFormatTag             = FOUR_CHAR_CODE('ffmt')
  348. };
  349. struct gxFileFormatInfo {
  350.     Str31                           fileFormatName;             /* Name of file format (e.g. "PostScript") if destination is file */
  351. };
  352. typedef struct gxFileFormatInfo         gxFileFormatInfo;
  353. /* gxFileFontsTag COLLECTION ITEM */
  354. enum {
  355.     gxFileFontsTag              = FOUR_CHAR_CODE('incf')
  356. };
  357. struct gxFileFontsInfo {
  358.     char                            includeFonts;               /* Which fonts to include, if destination is file */
  359.     char                            padByte;
  360. };
  361. typedef struct gxFileFontsInfo          gxFileFontsInfo;
  362. /* includeFonts field constants */
  363. enum {
  364.     gxIncludeNoFonts            = 1,                            /* Include no fonts */
  365.     gxIncludeAllFonts           = 2,                            /* Include all fonts */
  366.     gxIncludeNonStandardFonts   = 3                             /* Include only fonts that aren't in the standard LW set */
  367. };
  368. /* gxPaperFeedTag COLLECTION ITEM */
  369. enum {
  370.     gxPaperFeedTag              = FOUR_CHAR_CODE('feed')
  371. };
  372. struct gxPaperFeedInfo {
  373.     Boolean                         autoFeed;                   /* True if automatic feed, false if manual */
  374.     char                            padByte;
  375. };
  376. typedef struct gxPaperFeedInfo          gxPaperFeedInfo;
  377. /* gxTrayFeedTag COLLECTION ITEM */
  378. enum {
  379.     gxTrayFeedTag               = FOUR_CHAR_CODE('tray')
  380. };
  381. typedef long                            gxTrayIndex;
  382. struct gxTrayFeedInfo {
  383.     gxTrayIndex                     feedTrayIndex;              /* Tray to feed paper from */
  384.     Boolean                         manualFeedThisPage;         /* Signals manual feeding for the page */
  385.     char                            padByte;
  386. };
  387. typedef struct gxTrayFeedInfo           gxTrayFeedInfo;
  388. /* gxManualFeedTag COLLECTION ITEM */
  389. enum {
  390.     gxManualFeedTag             = FOUR_CHAR_CODE('manf')
  391. };
  392. struct gxManualFeedInfo {
  393.     long                            numPaperTypeNames;          /* Number of paperTypes to manually feed */
  394.     Str31                           paperTypeNames[1];          /* Array of names of paperTypes to manually feed */
  395. };
  396. typedef struct gxManualFeedInfo         gxManualFeedInfo;
  397. /* gxNormalMappingTag COLLECTION ITEM */
  398. enum {
  399.     gxNormalMappingTag          = FOUR_CHAR_CODE('nmap')
  400. };
  401. struct gxNormalMappingInfo {
  402.     Boolean                         normalPaperMapping;         /* True if not overriding normal paper mapping */
  403.     char                            padByte;
  404. };
  405. typedef struct gxNormalMappingInfo      gxNormalMappingInfo;
  406. /* gxSpecialMappingTag COLLECTION ITEM */
  407. enum {
  408.     gxSpecialMappingTag         = FOUR_CHAR_CODE('smap')
  409. };
  410. struct gxSpecialMappingInfo {
  411.     char                            specialMapping;             /* Enumerated redirect, scale or tile setting */
  412.     char                            padByte;
  413. };
  414. typedef struct gxSpecialMappingInfo     gxSpecialMappingInfo;
  415. /* specialMapping field constants */
  416. enum {
  417.     gxRedirectPages             = 1,                            /* Redirect pages to a papertype and clip if necessary */
  418.     gxScalePages                = 2,                            /* Scale pages if necessary */
  419.     gxTilePages                 = 3                             /* Tile pages if necessary */
  420. };
  421. /* gxTrayMappingTag COLLECTION ITEM */
  422. enum {
  423.     gxTrayMappingTag            = FOUR_CHAR_CODE('tmap')
  424. };
  425. struct gxTrayMappingInfo {
  426.     gxTrayIndex                     mapPaperToTray;             /* Tray to map all paper to */
  427. };
  428. typedef struct gxTrayMappingInfo        gxTrayMappingInfo;
  429. /* gxPaperMappingTag COLLECTION ITEM */
  430. /* This collection item contains a flattened paper type resource */
  431. enum {
  432.     gxPaperMappingTag           = FOUR_CHAR_CODE('pmap')
  433. };
  434. /* gxPrintPanelTag COLLECTION ITEM */
  435. enum {
  436.     gxPrintPanelTag             = FOUR_CHAR_CODE('ppan')
  437. };
  438. struct gxPrintPanelInfo {
  439.     Str31                           startPanelName;             /* Name of starting panel in Print dialog */
  440. };
  441. typedef struct gxPrintPanelInfo         gxPrintPanelInfo;
  442. /* gxFormatPanelTag COLLECTION ITEM */
  443. enum {
  444.     gxFormatPanelTag            = FOUR_CHAR_CODE('fpan')
  445. };
  446. struct gxFormatPanelInfo {
  447.     Str31                           startPanelName;             /* Name of starting panel in Format dialog */
  448. };
  449. typedef struct gxFormatPanelInfo        gxFormatPanelInfo;
  450. /* gxTranslatedDocumentTag COLLECTION ITEM */
  451. enum {
  452.     gxTranslatedDocumentTag     = FOUR_CHAR_CODE('trns')
  453. };
  454. struct gxTranslatedDocumentInfo {
  455.     long                            translatorInfo;             /* Information from the translation process */
  456. };
  457. typedef struct gxTranslatedDocumentInfo gxTranslatedDocumentInfo;
  458. /* gxCoverPageTag COLLECTION ITEM */
  459. enum {
  460.     gxCoverPageTag              = FOUR_CHAR_CODE('cvpg')
  461. };
  462. struct gxCoverPageInfo {
  463.     long                            coverPage;                  /* Use same enum values as for PrintRecord field in GXPrinterDrivers.h */
  464. };
  465. typedef struct gxCoverPageInfo          gxCoverPageInfo;
  466. /*
  467.     >>>>>> FORMAT COLLECTION ITEMS <<<<<<
  468. */
  469. /* gxPaperTypeLockTag COLLECTION ITEM */
  470. enum {
  471.     gxPaperTypeLockTag          = FOUR_CHAR_CODE('ptlk')
  472. };
  473. struct gxPaperTypeLockInfo {
  474.     Boolean                         paperTypeLocked;            /* True if format's paperType is locked */
  475.     char                            padByte;
  476. };
  477. typedef struct gxPaperTypeLockInfo      gxPaperTypeLockInfo;
  478. /* gxOrientationTag COLLECTION ITEM */
  479. enum {
  480.     gxOrientationTag            = FOUR_CHAR_CODE('layo')
  481. };
  482. struct gxOrientationInfo {
  483.     char                            orientation;                /* An enumerated orientation value */
  484.     char                            padByte;
  485. };
  486. typedef struct gxOrientationInfo        gxOrientationInfo;
  487. /* orientation field constants */
  488. enum {
  489.     gxPortraitLayout            = 0,                            /* Portrait */
  490.     gxLandscapeLayout           = 1,                            /* Landscape */
  491.     gxRotatedPortraitLayout     = 2,                            /* Portrait, rotated 180. */
  492.     gxRotatedLandscapeLayout    = 3                             /* Landscape, rotated 180.  */
  493. };
  494. /* gxScalingTag COLLECTION ITEM */
  495. enum {
  496.     gxScalingTag                = FOUR_CHAR_CODE('scal')
  497. };
  498. struct gxScalingInfo {
  499.     Fixed                           horizontalScaleFactor;      /* Current horizontal scaling factor */
  500.     Fixed                           verticalScaleFactor;        /* Current vertical scaling factor */
  501.     short                           minScaling;                 /* Minimum scaling allowed */
  502.     short                           maxScaling;                 /* Maximum scaling allowed */
  503. };
  504. typedef struct gxScalingInfo            gxScalingInfo;
  505. /* gxDirectModeTag COLLECTION ITEM */
  506. enum {
  507.     gxDirectModeTag             = FOUR_CHAR_CODE('dirm')
  508. };
  509. struct gxDirectModeInfo {
  510.     Boolean                         directModeOn;               /* True if a direct mode is enabled */
  511.     char                            padByte;
  512. };
  513. typedef struct gxDirectModeInfo         gxDirectModeInfo;
  514. /* gxFormatHalftoneTag COLLECTION ITEM */
  515. enum {
  516.     gxFormatHalftoneTag         = FOUR_CHAR_CODE('half')
  517. };
  518. struct gxFormatHalftoneInfo {
  519.     long                            numHalftones;               /* Number of halftone records */
  520.     gxHalftone                      halftones[1];               /* The halftone records */
  521. };
  522. typedef struct gxFormatHalftoneInfo     gxFormatHalftoneInfo;
  523. /* gxInvertPageTag COLLECTION ITEM */
  524. enum {
  525.     gxInvertPageTag             = FOUR_CHAR_CODE('invp')
  526. };
  527. struct gxInvertPageInfo {
  528.     char                            padByte;
  529.     Boolean                         invert;                     /* If true, invert page */
  530. };
  531. typedef struct gxInvertPageInfo         gxInvertPageInfo;
  532. /* gxFlipPageHorizontalTag COLLECTION ITEM */
  533. enum {
  534.     gxFlipPageHorizontalTag     = FOUR_CHAR_CODE('flph')
  535. };
  536. struct gxFlipPageHorizontalInfo {
  537.     char                            padByte;
  538.     Boolean                         flipHorizontal;             /* If true, flip x coordinates on page */
  539. };
  540. typedef struct gxFlipPageHorizontalInfo gxFlipPageHorizontalInfo;
  541. /* gxFlipPageVerticalTag COLLECTION ITEM */
  542. enum {
  543.     gxFlipPageVerticalTag       = FOUR_CHAR_CODE('flpv')
  544. };
  545. struct gxFlipPageVerticalInfo {
  546.     char                            padByte;
  547.     Boolean                         flipVertical;               /* If true, flip y coordinates on page */
  548. };
  549. typedef struct gxFlipPageVerticalInfo   gxFlipPageVerticalInfo;
  550. /* gxPreciseBitmapsTag COLLECTION ITEM */
  551. enum {
  552.     gxPreciseBitmapsTag         = FOUR_CHAR_CODE('pbmp')
  553. };
  554. struct gxPreciseBitmapInfo {
  555.     Boolean                         preciseBitmaps;             /* If true, scale page by 96% */
  556.     char                            padByte;
  557. };
  558. typedef struct gxPreciseBitmapInfo      gxPreciseBitmapInfo;
  559. /*
  560.     >>>>>> PAPERTYPE COLLECTION ITEMS <<<<<<
  561. */
  562. /* gxBaseTag COLLECTION ITEM */
  563. enum {
  564.     gxBaseTag                   = FOUR_CHAR_CODE('base')
  565. };
  566. struct gxBaseInfo {
  567.     long                            baseType;                   /* PaperType's base type */
  568. };
  569. typedef struct gxBaseInfo               gxBaseInfo;
  570. /* baseType field constants */
  571. enum {
  572.     gxUnknownBase               = 0,                            /* Base paper type from which this paper type is */
  573.     gxUSLetterBase              = 1,                            /* derived.  This is not a complete set. */
  574.     gxUSLegalBase               = 2,
  575.     gxA4LetterBase              = 3,
  576.     gxB5LetterBase              = 4,
  577.     gxTabloidBase               = 5
  578. };
  579. /* gxCreatorTag COLLECTION ITEM */
  580. enum {
  581.     gxCreatorTag                = FOUR_CHAR_CODE('crea')
  582. };
  583. struct gxCreatorInfo {
  584.     OSType                          creator;                    /* PaperType's creator */
  585. };
  586. typedef struct gxCreatorInfo            gxCreatorInfo;
  587. /* gxUnitsTag COLLECTION ITEM */
  588. enum {
  589.     gxUnitsTag                  = FOUR_CHAR_CODE('unit')
  590. };
  591. struct gxUnitsInfo {
  592.     char                            units;                      /* PaperType's units (used by PaperType Editor). */
  593.     char                            padByte;
  594. };
  595. typedef struct gxUnitsInfo              gxUnitsInfo;
  596. /* units field constants */
  597. enum {
  598.     gxPicas                     = 0,                            /* Pica measurement */
  599.     gxMMs                       = 1,                            /* Millimeter measurement */
  600.     gxInches                    = 2                             /* Inches measurement */
  601. };
  602. /* gxFlagsTag COLLECTION ITEM */
  603. enum {
  604.     gxFlagsTag                  = FOUR_CHAR_CODE('flag')
  605. };
  606. struct gxFlagsInfo {
  607.     long                            flags;                      /* PaperType's flags */
  608. };
  609. typedef struct gxFlagsInfo              gxFlagsInfo;
  610. /* flags field constants */
  611. enum {
  612.     gxOldPaperTypeFlag          = 0x00800000,                   /* Indicates a paper type for compatibility printing */
  613.     gxNewPaperTypeFlag          = 0x00400000,                   /* Indicates a paper type for QuickDraw GX-aware printing */
  614.     gxOldAndNewFlag             = 0x00C00000,                   /* Indicates a paper type that's both old and new */
  615.     gxDefaultPaperTypeFlag      = 0x00100000                    /* Indicates the default paper type in the group */
  616. };
  617. /* gxCommentTag COLLECTION ITEM */
  618. enum {
  619.     gxCommentTag                = FOUR_CHAR_CODE('cmnt')
  620. };
  621. struct gxCommentInfo {
  622.     Str255                          comment;                    /* PaperType's comment */
  623. };
  624. typedef struct gxCommentInfo            gxCommentInfo;
  625. /*
  626.     >>>>>> PRINTER VIEWDEVICE TAGS <<<<<<
  627. */
  628. /* gxPenTableTag COLLECTION ITEM */
  629. enum {
  630.     gxPenTableTag               = FOUR_CHAR_CODE('pent')
  631. };
  632. struct gxPenTableEntry {
  633.     Str31                           penName;                    /* Name of the pen */
  634.     gxColor                         penColor;                   /* Color to use from the color set */
  635.     Fixed                           penThickness;               /* Size of the pen */
  636.     short                           penUnits;                   /* Specifies units in which pen thickness is defined */
  637.     short                           penPosition;                /* Pen position in the carousel, -1 (kPenNotLoaded) if not loaded */
  638. };
  639. typedef struct gxPenTableEntry          gxPenTableEntry;
  640. struct gxPenTable {
  641.     long                            numPens;                    /* Number of pen entries in the following array */
  642.     gxPenTableEntry                 pens[1];                    /* Array of pen entries */
  643. };
  644. typedef struct gxPenTable               gxPenTable;
  645. typedef gxPenTable *                    gxPenTablePtr;
  646. typedef gxPenTablePtr *                 gxPenTableHdl;
  647. /* penUnits field constants */
  648. enum {
  649.     gxDeviceUnits               = 0,
  650.     gxMMUnits                   = 1,
  651.     gxInchesUnits               = 2
  652. };
  653. /* penPosition field constants */
  654. enum {
  655.     gxPenNotLoaded              = -1
  656. };
  657. /*
  658.     >>>>>> DIALOG-RELATED CONSTANTS AND TYPES <<<<<<
  659. */
  660. typedef long                            gxDialogResult;
  661. enum {
  662.     gxCancelSelected            = 0L,
  663.     gxOKSelected                = 1L,
  664.     gxRevertSelected            = 2L
  665. };
  666. struct gxEditMenuRecord {
  667.     short                           editMenuID;
  668.     short                           cutItem;
  669.     short                           copyItem;
  670.     short                           pasteItem;
  671.     short                           clearItem;
  672.     short                           undoItem;
  673. };
  674. typedef struct gxEditMenuRecord         gxEditMenuRecord;
  675. /*
  676.     >>>>>> JOB FORMAT MODE CONSTANTS AND TYPES <<<<<<
  677. */
  678. typedef OSType                          gxJobFormatMode;
  679. struct gxJobFormatModeTable {
  680.     long                            numModes;                   /* Number of job format modes to choose from */
  681.     gxJobFormatMode                 modes[1];                   /* The job format modes */
  682. };
  683. typedef struct gxJobFormatModeTable     gxJobFormatModeTable;
  684. typedef gxJobFormatModeTable *          gxJobFormatModeTablePtr;
  685. typedef gxJobFormatModeTablePtr *       gxJobFormatModeTableHdl;
  686. enum {
  687.     gxGraphicsJobFormatMode     = FOUR_CHAR_CODE('grph'),
  688.     gxTextJobFormatMode         = FOUR_CHAR_CODE('text'),
  689.     gxPostScriptJobFormatMode   = FOUR_CHAR_CODE('post')
  690. };
  691. typedef long                            gxQueryType;
  692. enum {
  693.     gxGetJobFormatLineConstraintQuery = 0L,
  694.     gxGetJobFormatFontsQuery    = 1L,
  695.     gxGetJobFormatFontCommonStylesQuery = 2L,
  696.     gxGetJobFormatFontConstraintQuery = 3L,
  697.     gxSetStyleJobFormatCommonStyleQuery = 4L
  698. };
  699. /* Structures used for Text mode field constants */
  700. struct gxPositionConstraintTable {
  701.     gxPoint                         phase;                      /* Position phase */
  702.     gxPoint                         offset;                     /* Position offset */
  703.     long                            numSizes;                   /* Number of available font sizes */
  704.     Fixed                           sizes[1];                   /* The available font sizes */
  705. };
  706. typedef struct gxPositionConstraintTable gxPositionConstraintTable;
  707. typedef gxPositionConstraintTable *     gxPositionConstraintTablePtr;
  708. typedef gxPositionConstraintTablePtr *  gxPositionConstraintTableHdl;
  709. /* numSizes field constants */
  710. enum {
  711.     gxConstraintRange           = -1
  712. };
  713. struct gxStyleNameTable {
  714.     long                            numStyleNames;              /* Number of style names */
  715.     Str255                          styleNames[1];              /* The style names */
  716. };
  717. typedef struct gxStyleNameTable         gxStyleNameTable;
  718. typedef gxStyleNameTable *              gxStyleNameTablePtr;
  719. typedef gxStyleNameTablePtr *           gxStyleNameTableHdl;
  720. struct gxFontTable {
  721.     long                            numFonts;                   /* Number of font references */
  722.     gxFont                          fonts[1];                   /* The font references */
  723. };
  724. typedef struct gxFontTable              gxFontTable;
  725. typedef gxFontTable *                   gxFontTablePtr;
  726. typedef gxFontTablePtr *                gxFontTableHdl;
  727. /* ------------------------------------------------------------------------------
  728.                                 Printing Manager API Functions
  729. -------------------------------------------------------------------------------- */
  730. /*
  731.     Global Routines
  732. */
  733. #if CALL_NOT_IN_CARBON
  734. EXTERN_API( OSErr )
  735. GXInitPrinting                  (void)                                                      FOURWORDINLINE(0x203C, 0x0000, 0x0000, 0xABFE);
  736. EXTERN_API( OSErr )
  737. GXExitPrinting                  (void)                                                      FOURWORDINLINE(0x203C, 0x0000, 0x0001, 0xABFE);
  738. /*
  739.     Error-Handling Routines
  740. */
  741. EXTERN_API( OSErr )
  742. GXGetJobError                   (gxJob                  aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x000E, 0xABFE);
  743. EXTERN_API( void )
  744. GXSetJobError                   (gxJob                  aJob,
  745.                                  OSErr                  anErr)                              FOURWORDINLINE(0x203C, 0x0000, 0x000F, 0xABFE);
  746. /*
  747.     Job Routines
  748. */
  749. EXTERN_API( OSErr )
  750. GXNewJob                        (gxJob *                aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x0002, 0xABFE);
  751. EXTERN_API( OSErr )
  752. GXDisposeJob                    (gxJob                  aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x0003, 0xABFE);
  753. EXTERN_API( void )
  754. GXFlattenJob                    (gxJob                  aJob,
  755.                                  GXPrintingFlattenUPP   flattenProc,
  756.                                  void *                 aVoid)                              FOURWORDINLINE(0x203C, 0x0000, 0x0004, 0xABFE);
  757. EXTERN_API( gxJob )
  758. GXUnflattenJob                  (gxJob                  aJob,
  759.                                  GXPrintingFlattenUPP   flattenProc,
  760.                                  void *                 aVoid)                              FOURWORDINLINE(0x203C, 0x0000, 0x0005, 0xABFE);
  761. EXTERN_API( Handle )
  762. GXFlattenJobToHdl               (gxJob                  aJob,
  763.                                  Handle                 aHdl)                               FOURWORDINLINE(0x203C, 0x0000, 0x0006, 0xABFE);
  764. EXTERN_API( gxJob )
  765. GXUnflattenJobFromHdl           (gxJob                  aJob,
  766.                                  Handle                 aHdl)                               FOURWORDINLINE(0x203C, 0x0000, 0x0007, 0xABFE);
  767. EXTERN_API( void )
  768. GXInstallApplicationOverride    (gxJob                  aJob,
  769.                                  short                  messageID,
  770.                                  void *                 override)                           FOURWORDINLINE(0x203C, 0x0000, 0x0008, 0xABFE);
  771. EXTERN_API( Collection )
  772. GXGetJobCollection              (gxJob                  aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x001D, 0xABFE);
  773. EXTERN_API( void *)
  774. GXGetJobRefCon                  (gxJob                  aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x001E, 0xABFE);
  775. EXTERN_API( void )
  776. GXSetJobRefCon                  (gxJob                  aJob,
  777.                                  void *                 refCon)                             FOURWORDINLINE(0x203C, 0x0000, 0x001F, 0xABFE);
  778. EXTERN_API( gxJob )
  779. GXCopyJob                       (gxJob                  srcJob,
  780.                                  gxJob                  dstJob)                             FOURWORDINLINE(0x203C, 0x0000, 0x0020, 0xABFE);
  781. EXTERN_API( void )
  782. GXSelectJobFormattingPrinter    (gxJob                  aJob,
  783.                                  Str31                  printerName)                        FOURWORDINLINE(0x203C, 0x0000, 0x0021, 0xABFE);
  784. EXTERN_API( void )
  785. GXSelectJobOutputPrinter        (gxJob                  aJob,
  786.                                  Str31                  printerName)                        FOURWORDINLINE(0x203C, 0x0000, 0x0022, 0xABFE);
  787. EXTERN_API( void )
  788. GXForEachJobFormatDo            (gxJob                  aJob,
  789.                                  GXFormatUPP            formatProc,
  790.                                  void *                 refCon)                             FOURWORDINLINE(0x203C, 0x0000, 0x0023, 0xABFE);
  791. EXTERN_API( long )
  792. GXCountJobFormats               (gxJob                  aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x0024, 0xABFE);
  793. EXTERN_API( Boolean )
  794. GXUpdateJob                     (gxJob                  aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x0025, 0xABFE);
  795. EXTERN_API( void )
  796. GXConvertPrintRecord            (gxJob                  aJob,
  797.                                  THPrint                hPrint)                             FOURWORDINLINE(0x203C, 0x0000, 0x0026, 0xABFE);
  798. EXTERN_API( void )
  799. GXIdleJob                       (gxJob                  aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x0057, 0xABFE);
  800. /*
  801.     Job Format Modes Routines
  802. */
  803. EXTERN_API( void )
  804. GXSetAvailableJobFormatModes    (gxJob                  aJob,
  805.                                  gxJobFormatModeTableHdl  formatModeTable)                  FOURWORDINLINE(0x203C, 0x0000, 0x003B, 0xABFE);
  806. EXTERN_API( gxJobFormatMode )
  807. GXGetPreferredJobFormatMode     (gxJob                  aJob,
  808.                                  Boolean *              directOnly)                         FOURWORDINLINE(0x203C, 0x0000, 0x003C, 0xABFE);
  809. EXTERN_API( gxJobFormatMode )
  810. GXGetJobFormatMode              (gxJob                  aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x003D, 0xABFE);
  811. EXTERN_API( void )
  812. GXSetJobFormatMode              (gxJob                  aJob,
  813.                                  gxJobFormatMode        formatMode)                         FOURWORDINLINE(0x203C, 0x0000, 0x003E, 0xABFE);
  814. EXTERN_API( void )
  815. GXJobFormatModeQuery            (gxJob                  aJob,
  816.                                  gxQueryType            aQueryType,
  817.                                  void *                 srcData,
  818.                                  void *                 dstData)                            FOURWORDINLINE(0x203C, 0x0000, 0x003F, 0xABFE);
  819. /*
  820.     Format Routines
  821. */
  822. EXTERN_API( gxFormat )
  823. GXNewFormat                     (gxJob                  aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x0009, 0xABFE);
  824. EXTERN_API( void )
  825. GXDisposeFormat                 (gxFormat               aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x000A, 0xABFE);
  826. EXTERN_API( gxFormat )
  827. GXGetJobFormat                  (gxJob                  aJob,
  828.                                  long                   whichFormat)                        FOURWORDINLINE(0x203C, 0x0000, 0x0013, 0xABFE);
  829. EXTERN_API( gxJob )
  830. GXGetFormatJob                  (gxFormat               aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0014, 0xABFE);
  831. EXTERN_API( gxPaperType )
  832. GXGetFormatPaperType            (gxFormat               aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0015, 0xABFE);
  833. EXTERN_API( void )
  834. GXGetFormatDimensions           (gxFormat               aFormat,
  835.                                  gxRectangle *          pageSize,
  836.                                  gxRectangle *          paperSize)                          FOURWORDINLINE(0x203C, 0x0000, 0x0016, 0xABFE);
  837. EXTERN_API( Collection )
  838. GXGetFormatCollection           (gxFormat               aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0033, 0xABFE);
  839. EXTERN_API( void )
  840. GXChangedFormat                 (gxFormat               aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0034, 0xABFE);
  841. EXTERN_API( gxFormat )
  842. GXCopyFormat                    (gxFormat               srcFormat,
  843.                                  gxFormat               dstFormat)                          FOURWORDINLINE(0x203C, 0x0000, 0x0035, 0xABFE);
  844. EXTERN_API( gxFormat )
  845. GXCloneFormat                   (gxFormat               aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0036, 0xABFE);
  846. EXTERN_API( long )
  847. GXCountFormatOwners             (gxFormat               aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0037, 0xABFE);
  848. EXTERN_API( void )
  849. GXGetFormatMapping              (gxFormat               aFormat,
  850.                                  gxMapping *            fmtMapping)                         FOURWORDINLINE(0x203C, 0x0000, 0x0038, 0xABFE);
  851. EXTERN_API( gxShape )
  852. GXGetFormatForm                 (gxFormat               aFormat,
  853.                                  gxShape *              mask)                               FOURWORDINLINE(0x203C, 0x0000, 0x0039, 0xABFE);
  854. EXTERN_API( void )
  855. GXSetFormatForm                 (gxFormat               aFormat,
  856.                                  gxShape                form,
  857.                                  gxShape                mask)                               FOURWORDINLINE(0x203C, 0x0000, 0x003A, 0xABFE);
  858. /*
  859.     PaperType Routines
  860. */
  861. EXTERN_API( gxPaperType )
  862. GXNewPaperType                  (gxJob                  aJob,
  863.                                  Str31                  name,
  864.                                  gxRectangle *          pageSize,
  865.                                  gxRectangle *          paperSize)                          FOURWORDINLINE(0x203C, 0x0000, 0x000B, 0xABFE);
  866. EXTERN_API( void )
  867. GXDisposePaperType              (gxPaperType            aPaperType)                         FOURWORDINLINE(0x203C, 0x0000, 0x000C, 0xABFE);
  868. EXTERN_API( gxPaperType )
  869. GXGetNewPaperType               (gxJob                  aJob,
  870.                                  short                  resID)                              FOURWORDINLINE(0x203C, 0x0000, 0x000D, 0xABFE);
  871. EXTERN_API( long )
  872. GXCountJobPaperTypes            (gxJob                  aJob,
  873.                                  Boolean                forFormatDevice)                    FOURWORDINLINE(0x203C, 0x0000, 0x0042, 0xABFE);
  874. EXTERN_API( gxPaperType )
  875. GXGetJobPaperType               (gxJob                  aJob,
  876.                                  long                   whichPaperType,
  877.                                  Boolean                forFormatDevice,
  878.                                  gxPaperType            aPaperType)                         FOURWORDINLINE(0x203C, 0x0000, 0x0043, 0xABFE);
  879. EXTERN_API( void )
  880. GXForEachJobPaperTypeDo         (gxJob                  aJob,
  881.                                  GXPaperTypeUPP         aProc,
  882.                                  void *                 refCon,
  883.                                  Boolean                forFormattingPrinter)               FOURWORDINLINE(0x203C, 0x0000, 0x0044, 0xABFE);
  884. EXTERN_API( gxPaperType )
  885. GXCopyPaperType                 (gxPaperType            srcPaperType,
  886.                                  gxPaperType            dstPaperType)                       FOURWORDINLINE(0x203C, 0x0000, 0x0045, 0xABFE);
  887. EXTERN_API( void )
  888. GXGetPaperTypeName              (gxPaperType            aPaperType,
  889.                                  Str31                  papertypeName)                      FOURWORDINLINE(0x203C, 0x0000, 0x0046, 0xABFE);
  890. EXTERN_API( void )
  891. GXGetPaperTypeDimensions        (gxPaperType            aPaperType,
  892.                                  gxRectangle *          pageSize,
  893.                                  gxRectangle *          paperSize)                          FOURWORDINLINE(0x203C, 0x0000, 0x0047, 0xABFE);
  894. EXTERN_API( gxJob )
  895. GXGetPaperTypeJob               (gxPaperType            aPaperType)                         FOURWORDINLINE(0x203C, 0x0000, 0x0048, 0xABFE);
  896. EXTERN_API( Collection )
  897. GXGetPaperTypeCollection        (gxPaperType            aPaperType)                         FOURWORDINLINE(0x203C, 0x0000, 0x0049, 0xABFE);
  898. /*
  899.     Printer Routines
  900. */
  901. EXTERN_API( gxPrinter )
  902. GXGetJobFormattingPrinter       (gxJob                  aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x0027, 0xABFE);
  903. EXTERN_API( gxPrinter )
  904. GXGetJobOutputPrinter           (gxJob                  aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x0028, 0xABFE);
  905. EXTERN_API( gxPrinter )
  906. GXGetJobPrinter                 (gxJob                  aJob)                               FOURWORDINLINE(0x203C, 0x0000, 0x0029, 0xABFE);
  907. EXTERN_API( gxJob )
  908. GXGetPrinterJob                 (gxPrinter              aPrinter)                           FOURWORDINLINE(0x203C, 0x0000, 0x002A, 0xABFE);
  909. EXTERN_API( void )
  910. GXForEachPrinterViewDeviceDo    (gxPrinter              aPrinter,
  911.                                  GXViewDeviceUPP        aProc,
  912.                                  void *                 refCon)                             FOURWORDINLINE(0x203C, 0x0000, 0x002B, 0xABFE);
  913. EXTERN_API( long )
  914. GXCountPrinterViewDevices       (gxPrinter              aPrinter)                           FOURWORDINLINE(0x203C, 0x0000, 0x002C, 0xABFE);
  915. EXTERN_API( gxViewDevice )
  916. GXGetPrinterViewDevice          (gxPrinter              aPrinter,
  917.                                  long                   whichViewDevice)                    FOURWORDINLINE(0x203C, 0x0000, 0x002D, 0xABFE);
  918. EXTERN_API( void )
  919. GXSelectPrinterViewDevice       (gxPrinter              aPrinter,
  920.                                  long                   whichViewDevice)                    FOURWORDINLINE(0x203C, 0x0000, 0x002E, 0xABFE);
  921. EXTERN_API( void )
  922. GXGetPrinterName                (gxPrinter              aPrinter,
  923.                                  Str31                  printerName)                        FOURWORDINLINE(0x203C, 0x0000, 0x002F, 0xABFE);
  924. EXTERN_API( OSType )
  925. GXGetPrinterType                (gxPrinter              aPrinter)                           FOURWORDINLINE(0x203C, 0x0000, 0x0030, 0xABFE);
  926. EXTERN_API( void )
  927. GXGetPrinterDriverName          (gxPrinter              aPrinter,
  928.                                  Str31                  driverName)                         FOURWORDINLINE(0x203C, 0x0000, 0x0031, 0xABFE);
  929. EXTERN_API( OSType )
  930. GXGetPrinterDriverType          (gxPrinter              aPrinter)                           FOURWORDINLINE(0x203C, 0x0000, 0x0032, 0xABFE);
  931. /*
  932.     Dialog Routines
  933. */
  934. EXTERN_API( gxDialogResult )
  935. GXJobDefaultFormatDialog        (gxJob                  aJob,
  936.                                  gxEditMenuRecord *     anEditMenuRec)                      FOURWORDINLINE(0x203C, 0x0000, 0x0010, 0xABFE);
  937. EXTERN_API( gxDialogResult )
  938. GXJobPrintDialog                (gxJob                  aJob,
  939.                                  gxEditMenuRecord *     anEditMenuRec)                      FOURWORDINLINE(0x203C, 0x0000, 0x0011, 0xABFE);
  940. EXTERN_API( gxDialogResult )
  941. GXFormatDialog                  (gxFormat               aFormat,
  942.                                  gxEditMenuRecord *     anEditMenuRec,
  943.                                  StringPtr              title)                              FOURWORDINLINE(0x203C, 0x0000, 0x0012, 0xABFE);
  944. EXTERN_API( void )
  945. GXEnableJobScalingPanel         (gxJob                  aJob,
  946.                                  Boolean                enabled)                            FOURWORDINLINE(0x203C, 0x0000, 0x0040, 0xABFE);
  947. EXTERN_API( void )
  948. GXGetJobPanelDimensions         (gxJob                  aJob,
  949.                                  Rect *                 panelArea)                          FOURWORDINLINE(0x203C, 0x0000, 0x0041, 0xABFE);
  950. /*
  951.     Spooling Routines
  952. */
  953. EXTERN_API( void )
  954. GXGetJobPageRange               (gxJob                  theJob,
  955.                                  long *                 firstPage,
  956.                                  long *                 lastPage)                           FOURWORDINLINE(0x203C, 0x0000, 0x0017, 0xABFE);
  957. EXTERN_API( void )
  958. GXStartJob                      (gxJob                  theJob,
  959.                                  StringPtr              docName,
  960.                                  long                   pageCount)                          FOURWORDINLINE(0x203C, 0x0000, 0x0018, 0xABFE);
  961. EXTERN_API( void )
  962. GXPrintPage                     (gxJob                  theJob,
  963.                                  long                   pageNumber,
  964.                                  gxFormat               theFormat,
  965.                                  gxShape                thePage)                            FOURWORDINLINE(0x203C, 0x0000, 0x0019, 0xABFE);
  966. EXTERN_API( Boolean )
  967. GXStartPage                     (gxJob                  theJob,
  968.                                  long                   pageNumber,
  969.                                  gxFormat               theFormat,
  970.                                  long                   numViewPorts,
  971.                                  gxViewPort *           viewPortList)                       FOURWORDINLINE(0x203C, 0x0000, 0x001A, 0xABFE);
  972. EXTERN_API( void )
  973. GXFinishPage                    (gxJob                  theJob)                             FOURWORDINLINE(0x203C, 0x0000, 0x001B, 0xABFE);
  974. EXTERN_API( void )
  975. GXFinishJob                     (gxJob                  theJob)                             FOURWORDINLINE(0x203C, 0x0000, 0x001C, 0xABFE);
  976. /*
  977.     PrintFile Routines
  978. */
  979. EXTERN_API( gxPrintFile )
  980. GXOpenPrintFile                 (gxJob                  theJob,
  981.                                  FSSpecPtr              anFSSpec,
  982.                                  char                   permission)                         FOURWORDINLINE(0x203C, 0x0000, 0x004A, 0xABFE);
  983. EXTERN_API( void )
  984. GXClosePrintFile                (gxPrintFile            aPrintFile)                         FOURWORDINLINE(0x203C, 0x0000, 0x004B, 0xABFE);
  985. EXTERN_API( gxJob )
  986. GXGetPrintFileJob               (gxPrintFile            aPrintFile)                         FOURWORDINLINE(0x203C, 0x0000, 0x004C, 0xABFE);
  987. EXTERN_API( long )
  988. GXCountPrintFilePages           (gxPrintFile            aPrintFile)                         FOURWORDINLINE(0x203C, 0x0000, 0x004D, 0xABFE);
  989. EXTERN_API( void )
  990. GXReadPrintFilePage             (gxPrintFile            aPrintFile,
  991.                                  long                   pageNumber,
  992.                                  long                   numViewPorts,
  993.                                  gxViewPort *           viewPortList,
  994.                                  gxFormat *             pgFormat,
  995.                                  gxShape *              pgShape)                            FOURWORDINLINE(0x203C, 0x0000, 0x004E, 0xABFE);
  996. EXTERN_API( void )
  997. GXReplacePrintFilePage          (gxPrintFile            aPrintFile,
  998.                                  long                   pageNumber,
  999.                                  gxFormat               aFormat,
  1000.                                  gxShape                aShape)                             FOURWORDINLINE(0x203C, 0x0000, 0x004F, 0xABFE);
  1001. EXTERN_API( void )
  1002. GXInsertPrintFilePage           (gxPrintFile            aPrintFile,
  1003.                                  long                   atPageNumber,
  1004.                                  gxFormat               pgFormat,
  1005.                                  gxShape                pgShape)                            FOURWORDINLINE(0x203C, 0x0000, 0x0050, 0xABFE);
  1006. EXTERN_API( void )
  1007. GXDeletePrintFilePageRange      (gxPrintFile            aPrintFile,
  1008.                                  long                   fromPageNumber,
  1009.                                  long                   toPageNumber)                       FOURWORDINLINE(0x203C, 0x0000, 0x0051, 0xABFE);
  1010. EXTERN_API( void )
  1011. GXSavePrintFile                 (gxPrintFile            aPrintFile,
  1012.                                  FSSpec *               anFSSpec)                           FOURWORDINLINE(0x203C, 0x0000, 0x0052, 0xABFE);
  1013. /*
  1014.     ColorSync Routines
  1015. */
  1016. EXTERN_API( long )
  1017. GXFindPrinterProfile            (gxPrinter              aPrinter,
  1018.                                  void *                 searchData,
  1019.                                  long                   index,
  1020.                                  gxColorProfile *       returnedProfile)                    FOURWORDINLINE(0x203C, 0x0000, 0x0053, 0xABFE);
  1021. EXTERN_API( long )
  1022. GXFindFormatProfile             (gxFormat               aFormat,
  1023.                                  void *                 searchData,
  1024.                                  long                   index,
  1025.                                  gxColorProfile *       returnedProfile)                    FOURWORDINLINE(0x203C, 0x0000, 0x0054, 0xABFE);
  1026. EXTERN_API( void )
  1027. GXSetPrinterProfile             (gxPrinter              aPrinter,
  1028.                                  gxColorProfile         oldProfile,
  1029.                                  gxColorProfile         newProfile)                         FOURWORDINLINE(0x203C, 0x0000, 0x0055, 0xABFE);
  1030. EXTERN_API( void )
  1031. GXSetFormatProfile              (gxFormat               aFormat,
  1032.                                  gxColorProfile         oldProfile,
  1033.                                  gxColorProfile         newProfile)                         FOURWORDINLINE(0x203C, 0x0000, 0x0056, 0xABFE);
  1034. /************************************************************************
  1035.                         Start of old "GXPrintingResEquates.h/a/p" interface file.
  1036.                 *************************************************************************/
  1037. /*    ------------------------------------
  1038.                 Basic client types
  1039.     ------------------------------------ */
  1040. #endif  /* CALL_NOT_IN_CARBON */
  1041. enum {
  1042.     gxPrintingManagerType       = FOUR_CHAR_CODE('pmgr'),
  1043.     gxImagingSystemType         = FOUR_CHAR_CODE('gxis'),
  1044.     gxPrinterDriverType         = FOUR_CHAR_CODE('pdvr'),
  1045.     gxPrintingExtensionType     = FOUR_CHAR_CODE('pext'),
  1046.     gxUnknownPrinterType        = FOUR_CHAR_CODE('none'),
  1047.     gxAnyPrinterType            = FOUR_CHAR_CODE('univ'),
  1048.     gxQuickdrawPrinterType      = FOUR_CHAR_CODE('qdrw'),
  1049.     gxPortableDocPrinterType    = FOUR_CHAR_CODE('gxpd'),
  1050.     gxRasterPrinterType         = FOUR_CHAR_CODE('rast'),
  1051.     gxPostscriptPrinterType     = FOUR_CHAR_CODE('post'),
  1052.     gxVectorPrinterType         = FOUR_CHAR_CODE('vect')
  1053. };
  1054. /* All pre-defined printing collection items have this ID */
  1055. enum {
  1056.     gxPrintingTagID             = -28672
  1057. };
  1058. /*    ----------------------------------------------------------------------
  1059.         Resource types and IDs used by both extension and driver writers
  1060.     ---------------------------------------------------------------------- */
  1061. /* Resources in a printer driver or extension must be based off of these IDs */
  1062. enum {
  1063.     gxPrintingDriverBaseID      = -27648,
  1064.     gxPrintingExtensionBaseID   = -27136
  1065. };
  1066. /*    Override resources tell the system what messages a driver or extension
  1067.         is overriding.  A driver may have a series of these resources. */
  1068. /* Override resource type for 68k resource-based code:*/
  1069. enum {
  1070.     gxOverrideType              = FOUR_CHAR_CODE('over')
  1071. };
  1072. /* Override resource type for PowerPC datafork-based code:*/
  1073. enum {
  1074.     gxNativeOverrideType        = FOUR_CHAR_CODE('povr')
  1075. };
  1076. /*    --------------------------------------------------------------
  1077.         Message ID definitions by both extension and driver writers
  1078.     --------------------------------------------------------------- */
  1079. /* Identifiers for universal message overrides. */
  1080. enum {
  1081.     gxInitializeMsg             = 0,
  1082.     gxShutDownMsg               = 1,
  1083.     gxJobIdleMsg                = 2,
  1084.     gxJobStatusMsg              = 3,
  1085.     gxPrintingEventMsg          = 4,
  1086.     gxJobDefaultFormatDialogMsg = 5,
  1087.     gxFormatDialogMsg           = 6,
  1088.     gxJobPrintDialogMsg         = 7,
  1089.     gxFilterPanelEventMsg       = 8,
  1090.     gxHandlePanelEventMsg       = 9,
  1091.     gxParsePageRangeMsg         = 10,
  1092.     gxDefaultJobMsg             = 11,
  1093.     gxDefaultFormatMsg          = 12,
  1094.     gxDefaultPaperTypeMsg       = 13,
  1095.     gxDefaultPrinterMsg         = 14,
  1096.     gxCreateSpoolFileMsg        = 15,
  1097.     gxSpoolPageMsg              = 16,
  1098.     gxSpoolDataMsg              = 17,
  1099.     gxSpoolResourceMsg          = 18,
  1100.     gxCompleteSpoolFileMsg      = 19,
  1101.     gxCountPagesMsg             = 20,
  1102.     gxDespoolPageMsg            = 21,
  1103.     gxDespoolDataMsg            = 22,
  1104.     gxDespoolResourceMsg        = 23,
  1105.     gxCloseSpoolFileMsg         = 24,
  1106.     gxStartJobMsg               = 25,
  1107.     gxFinishJobMsg              = 26,
  1108.     gxStartPageMsg              = 27,
  1109.     gxFinishPageMsg             = 28,
  1110.     gxPrintPageMsg              = 29,
  1111.     gxSetupImageDataMsg         = 30,
  1112.     gxImageJobMsg               = 31,
  1113.     gxImageDocumentMsg          = 32,
  1114.     gxImagePageMsg              = 33,
  1115.     gxRenderPageMsg             = 34,
  1116.     gxCreateImageFileMsg        = 35,
  1117.     gxOpenConnectionMsg         = 36,
  1118.     gxCloseConnectionMsg        = 37,
  1119.     gxStartSendPageMsg          = 38,
  1120.     gxFinishSendPageMsg         = 39,
  1121.     gxWriteDataMsg              = 40,
  1122.     gxBufferDataMsg             = 41,
  1123.     gxDumpBufferMsg             = 42,
  1124.     gxFreeBufferMsg             = 43,
  1125.     gxCheckStatusMsg            = 44,
  1126.     gxGetDeviceStatusMsg        = 45,
  1127.     gxFetchTaggedDataMsg        = 46,
  1128.     gxGetDTPMenuListMsg         = 47,
  1129.     gxDTPMenuSelectMsg          = 48,
  1130.     gxHandleAlertFilterMsg      = 49,
  1131.     gxJobFormatModeQueryMsg     = 50,
  1132.     gxWriteStatusToDTPWindowMsg = 51,
  1133.     gxInitializeStatusAlertMsg  = 52,
  1134.     gxHandleAlertStatusMsg      = 53,
  1135.     gxHandleAlertEventMsg       = 54,
  1136.     gxCleanupStartJobMsg        = 55,
  1137.     gxCleanupStartPageMsg       = 56,
  1138.     gxCleanupOpenConnectionMsg  = 57,
  1139.     gxCleanupStartSendPageMsg   = 58,
  1140.     gxDefaultDesktopPrinterMsg  = 59,
  1141.     gxCaptureOutputDeviceMsg    = 60,
  1142.     gxOpenConnectionRetryMsg    = 61,
  1143.     gxExamineSpoolFileMsg       = 62,
  1144.     gxFinishSendPlaneMsg        = 63,
  1145.     gxDoesPaperFitMsg           = 64,
  1146.     gxChooserMessageMsg         = 65,
  1147.     gxFindPrinterProfileMsg     = 66,
  1148.     gxFindFormatProfileMsg      = 67,
  1149.     gxSetPrinterProfileMsg      = 68,
  1150.     gxSetFormatProfileMsg       = 69,
  1151.     gxHandleAltDestinationMsg   = 70,
  1152.     gxSetupPageImageDataMsg     = 71
  1153. };
  1154. /* Identifiers for Quickdraw message overrides. */
  1155. enum {
  1156.     gxPrOpenDocMsg              = 0,
  1157.     gxPrCloseDocMsg             = 1,
  1158.     gxPrOpenPageMsg             = 2,
  1159.     gxPrClosePageMsg            = 3,
  1160.     gxPrintDefaultMsg           = 4,
  1161.     gxPrStlDialogMsg            = 5,
  1162.     gxPrJobDialogMsg            = 6,
  1163.     gxPrStlInitMsg              = 7,
  1164.     gxPrJobInitMsg              = 8,
  1165.     gxPrDlgMainMsg              = 9,
  1166.     gxPrValidateMsg             = 10,
  1167.     gxPrJobMergeMsg             = 11,
  1168.     gxPrGeneralMsg              = 12,
  1169.     gxConvertPrintRecordToMsg   = 13,
  1170.     gxConvertPrintRecordFromMsg = 14,
  1171.     gxPrintRecordToJobMsg       = 15
  1172. };
  1173. /* Identifiers for raster imaging message overrides. */
  1174. enum {
  1175.     gxRasterDataInMsg           = 0,
  1176.     gxRasterLineFeedMsg         = 1,
  1177.     gxRasterPackageBitmapMsg    = 2
  1178. };
  1179. /* Identifiers for PostScript imaging message overrides. */
  1180. enum {
  1181.     gxPostscriptQueryPrinterMsg = 0,
  1182.     gxPostscriptInitializePrinterMsg = 1,
  1183.     gxPostscriptResetPrinterMsg = 2,
  1184.     gxPostscriptExitServerMsg   = 3,
  1185.     gxPostscriptGetStatusTextMsg = 4,
  1186.     gxPostscriptGetPrinterTextMsg = 5,
  1187.     gxPostscriptScanStatusTextMsg = 6,
  1188.     gxPostscriptScanPrinterTextMsg = 7,
  1189.     gxPostscriptGetDocumentProcSetListMsg = 8,
  1190.     gxPostscriptDownloadProcSetListMsg = 9,
  1191.     gxPostscriptGetPrinterGlyphsInformationMsg = 10,
  1192.     gxPostscriptStreamFontMsg   = 11,
  1193.     gxPostscriptDoDocumentHeaderMsg = 12,
  1194.     gxPostscriptDoDocumentSetUpMsg = 13,
  1195.     gxPostscriptDoDocumentTrailerMsg = 14,
  1196.     gxPostscriptDoPageSetUpMsg  = 15,
  1197.     gxPostscriptSelectPaperTypeMsg = 16,
  1198.     gxPostscriptDoPageTrailerMsg = 17,
  1199.     gxPostscriptEjectPageMsg    = 18,
  1200.     gxPostscriptProcessShapeMsg = 19,
  1201.     gxPostScriptEjectPendingPageMsg = 20
  1202. };
  1203. /* Identifiers for Vector imaging message overrides. */
  1204. enum {
  1205.     gxVectorPackageDataMsg      = 0,
  1206.     gxVectorLoadPensMsg         = 1,
  1207.     gxVectorVectorizeShapeMsg   = 2
  1208. };
  1209. /* Dialog related resource types */
  1210. enum {
  1211.     gxPrintingAlertType         = FOUR_CHAR_CODE('plrt'),
  1212.     gxStatusType                = FOUR_CHAR_CODE('stat'),
  1213.     gxExtendedDITLType          = FOUR_CHAR_CODE('xdtl'),
  1214.     gxPrintPanelType            = FOUR_CHAR_CODE('ppnl'),
  1215.     gxCollectionType            = FOUR_CHAR_CODE('cltn')
  1216. };
  1217. /* Communication resource types */
  1218. /*
  1219.     The looker resource is used by the Chooser PACK to determine what kind
  1220.     of communications this driver supports. (In order to generate/handle the 
  1221.     pop-up menu for "Connect via:".
  1222.     
  1223.     The looker resource is also used by PrinterShare to determine the AppleTalk NBP Type
  1224.     for servers created for this driver.
  1225. */
  1226. enum {
  1227.     gxLookerType                = FOUR_CHAR_CODE('look'),
  1228.     gxLookerID                  = -4096
  1229. };
  1230. /* The communications method and private data used to connect to the printer */
  1231. enum {
  1232.     gxDeviceCommunicationsType  = FOUR_CHAR_CODE('comm')
  1233. };
  1234. /*    -------------------------------------------------
  1235.     Resource types and IDs used by extension writers
  1236.     ------------------------------------------------- */
  1237. enum {
  1238.     gxExtensionUniversalOverrideID = gxPrintingExtensionBaseID
  1239. };
  1240. enum {
  1241.     gxExtensionImagingOverrideSelectorID = gxPrintingExtensionBaseID
  1242. };
  1243. enum {
  1244.     gxExtensionScopeType        = FOUR_CHAR_CODE('scop'),
  1245.     gxDriverScopeID             = gxPrintingExtensionBaseID,
  1246.     gxPrinterScopeID            = gxPrintingExtensionBaseID + 1,
  1247.     gxPrinterExceptionScopeID   = gxPrintingExtensionBaseID + 2
  1248. };
  1249. enum {
  1250.     gxExtensionLoadType         = FOUR_CHAR_CODE('load'),
  1251.     gxExtensionLoadID           = gxPrintingExtensionBaseID
  1252. };
  1253. enum {
  1254.     gxExtensionLoadFirst        = 0x00000100,
  1255.     gxExtensionLoadAnywhere     = 0x7FFFFFFF,
  1256.     gxExtensionLoadLast         = (long)0xFFFFFF00
  1257. };
  1258. enum {
  1259.     gxExtensionOptimizationType = FOUR_CHAR_CODE('eopt'),
  1260.     gxExtensionOptimizationID   = gxPrintingExtensionBaseID
  1261. };
  1262. /*    -----------------------------------------------
  1263.     Resource types and IDs used by driver writers
  1264.     ----------------------------------------------- */
  1265. enum {
  1266.     gxDriverUniversalOverrideID = gxPrintingDriverBaseID,
  1267.     gxDriverImagingOverrideID   = gxPrintingDriverBaseID + 1,
  1268.     gxDriverCompatibilityOverrideID = gxPrintingDriverBaseID + 2
  1269. };
  1270. enum {
  1271.     gxDriverFileFormatType      = FOUR_CHAR_CODE('pfil'),
  1272.     gxDriverFileFormatID        = gxPrintingDriverBaseID
  1273. };
  1274. enum {
  1275.     gxDestinationAdditionType   = FOUR_CHAR_CODE('dsta'),
  1276.     gxDestinationAdditionID     = gxPrintingDriverBaseID
  1277. };
  1278. /* IMAGING RESOURCES */
  1279. /*    The imaging system resource specifies which imaging system a printer
  1280.         driver wishes to use. */
  1281. enum {
  1282.     gxImagingSystemSelectorType = FOUR_CHAR_CODE('isys'),
  1283.     gxImagingSystemSelectorID   = gxPrintingDriverBaseID
  1284. };
  1285. /* 'exft' resource ID -- exclude font list */
  1286. enum {
  1287.     kExcludeFontListType        = FOUR_CHAR_CODE('exft'),
  1288.     kExcludeFontListID          = gxPrintingDriverBaseID
  1289. };
  1290. /* Resource for type for color matching */
  1291. enum {
  1292.     gxColorMatchingDataType     = FOUR_CHAR_CODE('prof'),
  1293.     gxColorMatchingDataID       = gxPrintingDriverBaseID
  1294. };
  1295. /* Resource type and id for the tray count */
  1296. enum {
  1297.     gxTrayCountDataType         = FOUR_CHAR_CODE('tray'),
  1298.     gxTrayCountDataID           = gxPrintingDriverBaseID
  1299. };
  1300. /* Resource type for the tray names */
  1301. enum {
  1302.     gxTrayNameDataType          = FOUR_CHAR_CODE('tryn')
  1303. };
  1304. /* Resource type for manual feed preferences, stored in DTP. */
  1305. enum {
  1306.     gxManualFeedAlertPrefsType  = FOUR_CHAR_CODE('mfpr'),
  1307.     gxManualFeedAlertPrefsID    = gxPrintingDriverBaseID
  1308. };
  1309. /* Resource type for desktop printer output characteristics, stored in DTP. */
  1310. enum {
  1311.     gxDriverOutputType          = FOUR_CHAR_CODE('outp'),
  1312.     gxDriverOutputTypeID        = 1
  1313. };
  1314. /* IO Resources */
  1315. /* Resource type and ID for default IO and buffering resources */
  1316. enum {
  1317.     gxUniversalIOPrefsType      = FOUR_CHAR_CODE('iobm'),
  1318.     gxUniversalIOPrefsID        = gxPrintingDriverBaseID
  1319. };
  1320. /*    Resource types and IDs for default implementation of CaptureOutputDevice.
  1321.         The default implementation of CaptureOutputDevice only handles PAP devices */
  1322. enum {
  1323.     gxCaptureType               = FOUR_CHAR_CODE('cpts'),
  1324.     gxCaptureStringID           = gxPrintingDriverBaseID,
  1325.     gxReleaseStringID           = gxPrintingDriverBaseID + 1,
  1326.     gxUncapturedAppleTalkType   = gxPrintingDriverBaseID + 2,
  1327.     gxCapturedAppleTalkType     = gxPrintingDriverBaseID + 3
  1328. };
  1329. /* Resource type and ID for custom halftone matrix */
  1330. enum {
  1331.     gxCustomMatrixType          = FOUR_CHAR_CODE('dmat'),
  1332.     gxCustomMatrixID            = gxPrintingDriverBaseID
  1333. };
  1334. /* Resource type and ID for raster driver rendering preferences */
  1335. enum {
  1336.     gxRasterPrefsType           = FOUR_CHAR_CODE('rdip'),
  1337.     gxRasterPrefsID             = gxPrintingDriverBaseID
  1338. };
  1339. /* Resource type for specifiying a colorset */
  1340. enum {
  1341.     gxColorSetResType           = FOUR_CHAR_CODE('crst')
  1342. };
  1343. /* Resource type and ID for raster driver packaging preferences */
  1344. enum {
  1345.     gxRasterPackType            = FOUR_CHAR_CODE('rpck'),
  1346.     gxRasterPackID              = gxPrintingDriverBaseID
  1347. };
  1348. /* Resource type and ID for raster driver packaging options */
  1349. enum {
  1350.     gxRasterNumNone             = 0,                            /* Number isn't output at all */
  1351.     gxRasterNumDirect           = 1,                            /* Lowest minWidth bytes as data */
  1352.     gxRasterNumToASCII          = 2                             /* minWidth ASCII characters */
  1353. };
  1354. enum {
  1355.     gxRasterPackOptionsType     = FOUR_CHAR_CODE('ropt'),
  1356.     gxRasterPackOptionsID       = gxPrintingDriverBaseID
  1357. };
  1358. /* Resource type for the PostScript imaging system procedure set control resource */
  1359. enum {
  1360.     gxPostscriptProcSetControlType = FOUR_CHAR_CODE('prec')
  1361. };
  1362. /* Resource type for the PostScript imaging system printer font resource */
  1363. enum {
  1364.     gxPostscriptPrinterFontType = FOUR_CHAR_CODE('pfnt')
  1365. };
  1366. /* Resource type and ID for the PostScript imaging system imaging preferences */
  1367. enum {
  1368.     gxPostscriptPrefsType       = FOUR_CHAR_CODE('pdip'),
  1369.     gxPostscriptPrefsID         = gxPrintingDriverBaseID
  1370. };
  1371. /* Resource type and ID for the PostScript imaging system default scanning code */
  1372. enum {
  1373.     gxPostscriptScanningType    = FOUR_CHAR_CODE('scan'),
  1374.     gxPostscriptScanningID      = gxPrintingDriverBaseID
  1375. };
  1376. /* Old Application Support Resources */
  1377. enum {
  1378.     gxCustType                  = FOUR_CHAR_CODE('cust'),
  1379.     gxCustID                    = -8192
  1380. };
  1381. enum {
  1382.     gxReslType                  = FOUR_CHAR_CODE('resl'),
  1383.     gxReslID                    = -8192
  1384. };
  1385. enum {
  1386.     gxDiscreteResolution        = 0
  1387. };
  1388. enum {
  1389.     gxStlDialogResID            = -8192
  1390. };
  1391. enum {
  1392.     gxJobDialogResID            = -8191
  1393. };
  1394. enum {
  1395.     gxScaleTableType            = FOUR_CHAR_CODE('stab'),
  1396.     gxDITLControlType           = FOUR_CHAR_CODE('dctl')
  1397. };
  1398. /*    The default implementation of gxPrintDefault loads and
  1399.     PrValidates a print record stored in the following driver resource. */
  1400. enum {
  1401.     gxPrintRecordType           = FOUR_CHAR_CODE('PREC'),
  1402.     gxDefaultPrintRecordID      = 0
  1403. };
  1404. /*
  1405.     -----------------------------------------------
  1406.     Resource types and IDs used in papertype files
  1407.     -----------------------------------------------
  1408. */
  1409. /* Resource type and ID for driver papertypes placed in individual files */
  1410. enum {
  1411.     gxSignatureType             = FOUR_CHAR_CODE('sig '),
  1412.     gxPapertypeSignatureID      = 0
  1413. };
  1414. /* Papertype creator types */
  1415. enum {
  1416.     gxDrvrPaperType             = FOUR_CHAR_CODE('drpt'),
  1417.     gxSysPaperType              = FOUR_CHAR_CODE('sypt'),       /* System paper type creator */
  1418.     gxUserPaperType             = FOUR_CHAR_CODE('uspt'),       /* User paper type creator */
  1419.                                                                 /* Driver creator types == driver file's creator value */
  1420.     gxPaperTypeType             = FOUR_CHAR_CODE('ptyp')
  1421. };
  1422. /*********************************************************************
  1423.                     Start of old "GXPrintingMessages.h/a/p" interface file.
  1424.             **********************************************************************/
  1425. /* ------------------------------------------------------------------------------
  1426.                                     Constants and Types
  1427. -------------------------------------------------------------------------------- */
  1428. /*
  1429.     ABSTRACT DATA TYPES
  1430. */
  1431. typedef struct OpaquegxSpoolFile*       gxSpoolFile;
  1432. /*
  1433.     DIALOG PANEL CONSTANTS AND TYPES
  1434. */
  1435. typedef long                            gxPanelEvent;
  1436. /* Dialog panel event equates */
  1437. enum {
  1438.     gxPanelNoEvt                = 0L,
  1439.     gxPanelOpenEvt              = 1L,                           /* Initialize and draw */
  1440.     gxPanelCloseEvt             = 2L,                           /* Your panel is going away (panel switchL, confirm or cancel) */
  1441.     gxPanelHitEvt               = 3L,                           /* There's a hit in your panel */
  1442.     gxPanelActivateEvt          = 4L,                           /* The dialog window has just been activated */
  1443.     gxPanelDeactivateEvt        = 5L,                           /* The dialog window is about to be deactivated */
  1444.     gxPanelIconFocusEvt         = 6L,                           /* The focus changes from the panel to the icon list */
  1445.     gxPanelPanelFocusEvt        = 7L,                           /* The focus changes from the icon list to the panel */
  1446.     gxPanelFilterEvt            = 8L,                           /* Every event is filtered */
  1447.     gxPanelCancelEvt            = 9L,                           /* The user has cancelled the dialog */
  1448.     gxPanelConfirmEvt           = 10L,                          /* The user has confirmed the dialog */
  1449.     gxPanelDialogEvt            = 11L,                          /* Event to be handle by dialoghandler */
  1450.     gxPanelOtherEvt             = 12L,                          /* osEvts, etc. */
  1451.     gxPanelUserWillConfirmEvt   = 13L                           /* User has selected confirm, time to parse panel interdependencies */
  1452. };
  1453. /* Constants for panel responses to dialog handler calls */
  1454. typedef long                            gxPanelResult;
  1455. enum {
  1456.     gxPanelNoResult             = 0,
  1457.     gxPanelCancelConfirmation   = 1                             /* Only valid from panelUserWillConfirmEvt - used to keep the dialog from going away */
  1458. };
  1459. /* Panel event info record for FilterPanelEvent and HandlePanelEvent messages */
  1460. struct gxPanelInfoRecord {
  1461.     gxPanelEvent                    panelEvt;                   /* Why we were called */
  1462.     short                           panelResId;                 /* 'ppnl' resource ID of current panel */
  1463.     DialogPtr                       pDlg;                       /* Pointer to dialog */
  1464.     EventRecord *                   theEvent;                   /* Pointer to event */
  1465.     short                           itemHit;                    /* Actual item number as Dialog Mgr thinks */
  1466.     short                           itemCount;                  /* Number of items before your items */
  1467.     short                           evtAction;                  /* Once this event is processed, the action that will result */
  1468.                                                                 /* (evtAction is only meaningful during filtering) */
  1469.     short                           errorStringId;              /* STR ID of string to put in error alert (0 means no string) */
  1470.     gxFormat                        theFormat;                  /* The current format (only meaningful in a format dialog) */
  1471.     void *                          refCon;                     /* refCon passed in PanelSetupRecord */
  1472. };
  1473. typedef struct gxPanelInfoRecord        gxPanelInfoRecord;
  1474. /* Constants for the evtAction field in PanelInfoRecord */
  1475. enum {
  1476.     gxOtherAction               = 0,                            /* Current item will not change */
  1477.     gxClosePanelAction          = 1,                            /* Panel will be closed */
  1478.     gxCancelDialogAction        = 2,                            /* Dialog will be cancelled */
  1479.     gxConfirmDialogAction       = 3                             /* Dialog will be confirmed */
  1480. };
  1481. /* Constants for the panelKind field in gxPanelSetupRecord */
  1482. typedef long                            gxPrintingPanelKind;
  1483. /* The gxPanelSetupInfo structure is passed to GXSetupDialogPanel */
  1484. struct gxPanelSetupRecord {
  1485.     gxPrintingPanelKind             panelKind;
  1486.     short                           panelResId;
  1487.     short                           resourceRefNum;
  1488.     void *                          refCon;
  1489. };
  1490. typedef struct gxPanelSetupRecord       gxPanelSetupRecord;
  1491. enum {
  1492.     gxApplicationPanel          = 0L,
  1493.     gxExtensionPanel            = 1L,
  1494.     gxDriverPanel               = 2L
  1495. };
  1496. /* Constants returned by gxParsePageRange message */
  1497. typedef long                            gxParsePageRangeResult;
  1498. enum {
  1499.     gxRangeNotParsed            = 0L,                           /* Default initial value */
  1500.     gxRangeParsed               = 1L,                           /* Range has been parsed */
  1501.     gxRangeBadFromValue         = 2L,                           /* From value is bad */
  1502.     gxRangeBadToValue           = 3L                            /* To value is bad */
  1503. };
  1504. /*
  1505.     STATUS-RELATED CONSTANTS AND TYPES
  1506. */
  1507. /* Structure for status messages */
  1508. struct gxStatusRecord {
  1509.     unsigned short                  statusType;                 /* One of the ids listed above (nonFatalError, etc. ) */
  1510.     unsigned short                  statusId;                   /* Specific status (out of paper, etc.) */
  1511.     unsigned short                  statusAlertId;              /*    Printing alert ID (if any) for status */
  1512.     gxOwnerSignature                statusOwner;                /* Creator type of status owner */
  1513.     short                           statResId;                  /* ID for 'stat' resource */
  1514.     short                           statResIndex;               /* Index into 'stat' resource for this status */
  1515.     short                           dialogResult;               /* ID of button string selected on dismissal of printing alert */
  1516.     unsigned short                  bufferLen;                  /* Number of bytes in status buffer - total record size must be <= 512 */
  1517.     char                            statusBuffer[1];            /* User response from alert */
  1518. };
  1519. typedef struct gxStatusRecord           gxStatusRecord;
  1520. /* Constants for statusType field of gxStatusRecord */
  1521. enum {
  1522.     gxNonFatalError             = 1,                            /* An error occurred, but the job can continue */
  1523.     gxFatalError                = 2,                            /* A fatal error occurred-- halt job */
  1524.     gxPrinterReady              = 3,                            /* Tells QDGX to leave alert mode */
  1525.     gxUserAttention             = 4,                            /* Signals initiation of a modal alert */
  1526.     gxUserAlert                 = 5,                            /* Signals initiation of a moveable modal alert */
  1527.     gxPageTransmission          = 6,                            /* Signals page sent to printer, increments page count in strings to user */
  1528.     gxOpenConnectionStatus      = 7,                            /* Signals QDGX to begin animation on printer icon */
  1529.     gxInformationalStatus       = 8,                            /* Default status type, no side effects */
  1530.     gxSpoolingPageStatus        = 9,                            /* Signals page spooled, increments page count in spooling dialog */
  1531.     gxEndStatus                 = 10,                           /* Signals end of spooling */
  1532.     gxPercentageStatus          = 11                            /* Signals QDGX as to the amount of the job which is currently complete */
  1533. };
  1534. /* Structure for gxWriteStatusToDTPWindow message */
  1535. struct gxDisplayRecord {
  1536.     Boolean                         useText;                    /* Use text as opposed to a picture */
  1537.     char                            padByte;
  1538.     Handle                          hPicture;                   /* if !useText, the picture handle */
  1539.     Str255                          theText;                    /* if useText, the text */
  1540. };
  1541. typedef struct gxDisplayRecord          gxDisplayRecord;
  1542. /*-----------------------------------------------*/
  1543. /* paper mapping-related constants and types...  */
  1544. /*-----------------------------------------------*/
  1545. typedef long                            gxTrayMapping;
  1546. enum {
  1547.     gxDefaultTrayMapping        = 0L,
  1548.     gxConfiguredTrayMapping     = 1L
  1549. };
  1550. /* ------------------------------------------------------------------------------
  1551.                 API Functions callable only from within message overrides
  1552. -------------------------------------------------------------------------------- */
  1553. #define GXPRINTINGDISPATCH(segID, selector) {0x203C, 0x0001, 0, 0x223C, (segID & 0x0FFF), selector << 2, 0xABFE}
  1554. /*
  1555.     Message Sending API Routines
  1556. */
  1557. #if TARGET_CPU_68K
  1558. #if CALL_NOT_IN_CARBON
  1559. EXTERN_API_C( OSErr )
  1560. GXPrintingDispatch              (long                   selector,
  1561.                                  ...)                                                       SIXWORDINLINE(0x221F, 0x203C, 0x0001, 0x0000, 0xABFE, 0x598F);
  1562. #endif  /* CALL_NOT_IN_CARBON */
  1563. #endif  /* TARGET_CPU_68K */
  1564. /*
  1565.     How to use the GXPRINTINGDISPATCH macro...
  1566.     
  1567.     If your driver or extension is large, you may want to segment it
  1568.     across smaller boundaries than is permitted by the messaging system.
  1569.     Without using the Printing Manager's segmentation manager directly,
  1570.     the smallest segment you can create consists of the code to override
  1571.     a single message.  If you are overriding workhorse messages such as
  1572.     RenderPage, you may want to divide up the work among many functions
  1573.     distributed across several segments.  Here's how...
  1574.     
  1575.     The Printing Manager segment scheme involves the construction of a
  1576.     single 32-bit dispatch selector, which contains all the information
  1577.     necessary for the dispatcher to find a single routine.  It contains the
  1578.     segment's resource ID, and the offset within the segment which contains
  1579.     the start of the routine.  The GXPRINTINGDISPATCH macro will construct the
  1580.     dispatch selector for you, as well as the code to do the dispatch.
  1581.     
  1582.     Usually, it is convenient to start your segment with a long aligned jump table,
  1583.     beginning after the 4 byte header required by the Printing Manager.  The
  1584.     macro assumes this is the case and takes a 1-based routine selector from
  1585.     which it conmstructs the offset.
  1586.     
  1587.     For example, if your code is in resource 'pdvr' (print driver), ID=2
  1588.     at offset=12 (third routine in segment), you would declare your
  1589.     routine as follows:
  1590.     
  1591.     OSErr MyRenderingRoutine (long param1, Ptr param2)
  1592.         = GXPRINTINGDISPATCH(2, 3);
  1593.         
  1594.     Remember, ALL segment dispatches must return OSErr.  If your routine
  1595.     does not generate errors, you must still declare it to return OSErr
  1596.     and have the routine itself return noErr.
  1597.     
  1598.     An alternative way to call across segments is to call the GXPrintingDispatch
  1599.     function directly.  You must construct the 32-bit selector yourself and pass
  1600.     it as the first parameter.  This is usually not preferable since you don't get
  1601.     type-checking unless you declare a prototype as shown above, and your code
  1602.     isn't as easy to read.
  1603.     
  1604.     So given the above prototype, there are two ways to call the function:
  1605.     
  1606.         anErr = MyRenderingRoutine(p1, p2);         // Free type checking!
  1607.         
  1608.     or:
  1609.     
  1610.         #define kMyRenderRoutineSelector 0x0002000C
  1611.         anErr = GXPrintingDispatch(kMyRenderRoutineSelector, p1, p2);       // No type-checking!
  1612.     
  1613.     
  1614.     Both have the same effect.
  1615. */
  1616. #if CALL_NOT_IN_CARBON
  1617. EXTERN_API_C( gxJob )
  1618. GXGetJob                        (void)                                                      FOURWORDINLINE(0x203C, 0x0001, 0x0001, 0xABFE);
  1619. EXTERN_API_C( short )
  1620. GXGetMessageHandlerResFile      (void)                                                      FOURWORDINLINE(0x203C, 0x0001, 0x0002, 0xABFE);
  1621. EXTERN_API_C( Boolean )
  1622. GXSpoolingAborted               (void)                                                      FOURWORDINLINE(0x203C, 0x0001, 0x0003, 0xABFE);
  1623. EXTERN_API_C( OSErr )
  1624. GXJobIdle                       (void)                                                      FOURWORDINLINE(0x203C, 0x0001, 0x0004, 0xABFE);
  1625. EXTERN_API_C( OSErr )
  1626. GXReportStatus                  (long                   statusID,
  1627.                                  unsigned long          statusIndex)                        FOURWORDINLINE(0x203C, 0x0001, 0x0005, 0xABFE);
  1628. EXTERN_API_C( OSErr )
  1629. GXAlertTheUser                  (gxStatusRecord *       statusRec)                          FOURWORDINLINE(0x203C, 0x0001, 0x0006, 0xABFE);
  1630. EXTERN_API_C( OSErr )
  1631. GXSetupDialogPanel              (gxPanelSetupRecord *   panelRec)                           FOURWORDINLINE(0x203C, 0x0001, 0x0007, 0xABFE);
  1632. EXTERN_API_C( OSErr )
  1633. GXCountTrays                    (gxTrayIndex *          numTrays)                           FOURWORDINLINE(0x203C, 0x0001, 0x0008, 0xABFE);
  1634. EXTERN_API_C( OSErr )
  1635. GXGetTrayName                   (gxTrayIndex            trayNumber,
  1636.                                  Str31                  trayName)                           FOURWORDINLINE(0x203C, 0x0001, 0x0009, 0xABFE);
  1637. EXTERN_API_C( OSErr )
  1638. GXSetTrayPaperType              (gxTrayIndex            whichTray,
  1639.                                  gxPaperType            aPapertype)                         FOURWORDINLINE(0x203C, 0x0001, 0x000A, 0xABFE);
  1640. EXTERN_API_C( OSErr )
  1641. GXGetTrayPaperType              (gxTrayIndex            whichTray,
  1642.                                  gxPaperType            aPapertype)                         FOURWORDINLINE(0x203C, 0x0001, 0x000B, 0xABFE);
  1643. EXTERN_API_C( OSErr )
  1644. GXGetTrayMapping                (gxTrayMapping *        trayMapping)                        FOURWORDINLINE(0x203C, 0x0001, 0x000C, 0xABFE);
  1645. EXTERN_API_C( void )
  1646. GXCleanupStartJob               (void)                                                      FOURWORDINLINE(0x203C, 0x0001, 0x000D, 0xABFE);
  1647. EXTERN_API_C( void )
  1648. GXCleanupStartPage              (void)                                                      FOURWORDINLINE(0x203C, 0x0001, 0x000E, 0xABFE);
  1649. EXTERN_API_C( void )
  1650. GXCleanupOpenConnection         (void)                                                      FOURWORDINLINE(0x203C, 0x0001, 0x000F, 0xABFE);
  1651. EXTERN_API_C( void )
  1652. GXCleanupStartSendPage          (void)                                                      FOURWORDINLINE(0x203C, 0x0001, 0x0010, 0xABFE);
  1653. /* ------------------------------------------------------------------------------
  1654.                     Constants and types for Universal Printing Messages
  1655. -------------------------------------------------------------------------------- */
  1656. /* Options for gxCreateSpoolFile message */
  1657. #endif  /* CALL_NOT_IN_CARBON */
  1658. enum {
  1659.     gxNoCreateOptions           = 0x00000000,                   /* Just create the file */
  1660.     gxInhibitAlias              = 0x00000001,                   /* Do not create an alias in the PMD folder */
  1661.     gxInhibitUniqueName         = 0x00000002,                   /* Do not append to the filename to make it unique */
  1662.     gxResolveBitmapAlias        = 0x00000004                    /* Resolve bitmap aliases and duplicate data in file */
  1663. };
  1664. /* Options for gxCloseSpoolFile message */
  1665. enum {
  1666.     gxNoCloseOptions            = 0x00000000,                   /* Just close the file */
  1667.     gxDeleteOnClose             = 0x00000001,                   /* Delete the file rather than closing it */
  1668.     gxUpdateJobData             = 0x00000002,                   /* Write current job information into file prior to closing */
  1669.     gxMakeRemoteFile            = 0x00000004                    /* Mark job as a remote file */
  1670. };
  1671. /* Options for gxCreateImageFile message */
  1672. enum {
  1673.     gxNoImageFile               = 0x00000000,                   /* Don't create image file */
  1674.     gxMakeImageFile             = 0x00000001,                   /* Create an image file */
  1675.     gxEachPlane                 = 0x00000002,                   /* Only save up planes before rewinding */
  1676.     gxEachPage                  = 0x00000004,                   /* Save up entire pages before rewinding */
  1677.     gxEntireFile                = gxEachPlane + gxEachPage      /* Save up the entire file before rewinding */
  1678. };
  1679. /* Options for gxBufferData message */
  1680. enum {
  1681.     gxNoBufferOptions           = 0x00000000,
  1682.     gxMakeBufferHex             = 0x00000001,
  1683.     gxDontSplitBuffer           = 0x00000002
  1684. };
  1685. /* Structure for gxDumpBuffer and gxFreeBuffer messages */
  1686. struct gxPrintingBuffer {
  1687.     long                            size;                       /* Size of buffer in bytes */
  1688.     long                            userData;                   /* Client assigned id for the buffer */
  1689.     char                            data[1];                    /* Array of size bytes */
  1690. };
  1691. typedef struct gxPrintingBuffer         gxPrintingBuffer;
  1692. /* Structure for gxRenderPage message */
  1693. struct gxPageInfoRecord {
  1694.     long                            docPageNum;                 /* Number of page being printed */
  1695.     long                            copyNum;                    /* Copy number being printed */
  1696.     Boolean                         formatChanged;              /* True if format changed from last page */
  1697.     Boolean                         pageChanged;                /* True if page contents changed from last page */
  1698.     long                            internalUse;                /* Private */
  1699. };
  1700. typedef struct gxPageInfoRecord         gxPageInfoRecord;
  1701. /* ------------------------------------------------------------------------------
  1702.     
  1703.                                     Universal Printing Messages
  1704.     
  1705.     -------------------------------------------------------------------------------- */
  1706. typedef CALLBACK_API_C( OSErr , GXJobIdleProcPtr )(void );
  1707. typedef STACK_UPP_TYPE(GXJobIdleProcPtr)                        GXJobIdleUPP;
  1708. #if OPAQUE_UPP_TYPES
  1709. #if CALL_NOT_IN_CARBON
  1710.     EXTERN_API(GXJobIdleUPP)
  1711.     NewGXJobIdleUPP                (GXJobIdleProcPtr        userRoutine);
  1712.     EXTERN_API(void)
  1713.     DisposeGXJobIdleUPP            (GXJobIdleUPP            userUPP);
  1714.     EXTERN_API(OSErr)
  1715.     InvokeGXJobIdleUPP             (GXJobIdleUPP            userUPP);
  1716. #endif  /* CALL_NOT_IN_CARBON */
  1717. #else
  1718.     enum { uppGXJobIdleProcInfo = 0x00000021 };                     /* 2_bytes Func() */
  1719.     #define NewGXJobIdleUPP(userRoutine)                            (GXJobIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobIdleProcInfo, GetCurrentArchitecture())
  1720.     #define DisposeGXJobIdleUPP(userUPP)                            DisposeRoutineDescriptor(userUPP)
  1721.     #define InvokeGXJobIdleUPP(userUPP)                             (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXJobIdleProcInfo)
  1722. #endif
  1723. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  1724. #define NewGXJobIdleProc(userRoutine)                           NewGXJobIdleUPP(userRoutine)
  1725. #define CallGXJobIdleProc(userRoutine)                          InvokeGXJobIdleUPP(userRoutine)
  1726. #define Send_GXJobIdle() MacSendMessage(0x00000002)
  1727. #define Forward_GXJobIdle() ForwardThisMessage((void *) (0))
  1728. typedef CALLBACK_API_C( OSErr , GXJobStatusProcPtr )(gxStatusRecord *pStatus);
  1729. typedef STACK_UPP_TYPE(GXJobStatusProcPtr)                      GXJobStatusUPP;
  1730. #if OPAQUE_UPP_TYPES
  1731. #if CALL_NOT_IN_CARBON
  1732.     EXTERN_API(GXJobStatusUPP)
  1733.     NewGXJobStatusUPP              (GXJobStatusProcPtr      userRoutine);
  1734.     EXTERN_API(void)
  1735.     DisposeGXJobStatusUPP          (GXJobStatusUPP          userUPP);
  1736.     EXTERN_API(OSErr)
  1737.     InvokeGXJobStatusUPP           (gxStatusRecord *        pStatus,
  1738.                                     GXJobStatusUPP          userUPP);
  1739. #endif  /* CALL_NOT_IN_CARBON */
  1740. #else
  1741.     enum { uppGXJobStatusProcInfo = 0x000000E1 };                   /* 2_bytes Func(4_bytes) */
  1742.     #define NewGXJobStatusUPP(userRoutine)                          (GXJobStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobStatusProcInfo, GetCurrentArchitecture())
  1743.     #define DisposeGXJobStatusUPP(userUPP)                          DisposeRoutineDescriptor(userUPP)
  1744.     #define InvokeGXJobStatusUPP(pStatus, userUPP)                  (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXJobStatusProcInfo, (pStatus))
  1745. #endif
  1746. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */