GXPrinting.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:222k
- /*
- File: GXPrinting.h
-
- Contains: This file contains all printing APIs except for driver/extension specific ones.
-
- Version: Technology: Quickdraw GX 1.1
- Release: QuickTime 6.0.2
-
- Copyright: (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://developer.apple.com/bugreporter/
-
- */
- #ifndef __GXPRINTING__
- #define __GXPRINTING__
- #ifndef __CONDITIONALMACROS__
- #include "ConditionalMacros.h"
- #endif
- #ifndef __COLLECTIONS__
- #include "Collections.h"
- #endif
- #ifndef __DIALOGS__
- #include "Dialogs.h"
- #endif
- #ifndef __MACERRORS__
- #include "MacErrors.h"
- #endif
- #ifndef __FILES__
- #include "Files.h"
- #endif
- #ifndef __GXFONTS__
- #include "GXFonts.h"
- #endif
- #ifndef __GXMATH__
- #include "GXMath.h"
- #endif
- #ifndef __GXTYPES__
- #include "GXTypes.h"
- #endif
- #ifndef __LISTS__
- #include "Lists.h"
- #endif
- #ifndef __MENUS__
- #include "Menus.h"
- #endif
- #ifndef __GXMESSAGES__
- #include "GXMessages.h"
- #endif
- #ifndef __PRINTING__
- #include "Printing.h"
- #endif
- #ifndef __QUICKDRAW__
- #include "Quickdraw.h"
- #endif
- #if PRAGMA_ONCE
- #pragma once
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- #if PRAGMA_IMPORT
- #pragma import on
- #endif
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=mac68k
- #elif PRAGMA_STRUCT_PACKPUSH
- #pragma pack(push, 2)
- #elif PRAGMA_STRUCT_PACK
- #pragma pack(2)
- #endif
- /********************************************************************
- Start of old "GXPrintingManager.h/a/p" interface file.
- *********************************************************************/
- /* ------------------------------------------------------------------------------
- Printing Manager API Contants and Types
- -------------------------------------------------------------------------------- */
- typedef unsigned long gxOwnerSignature;
- #if OLDROUTINENAMES
- typedef unsigned long Signature;
- #endif /* OLDROUTINENAMES */
- /*
- ABSTRACT DATA TYPES
- */
- /*
- typedef struct gxPrivatePrinterRecord *gxPrinter;
- typedef struct gxPrivateJobRecord *gxJob;
- typedef struct gxPrivateFormatRecord *gxFormat;
- typedef struct gxPrivatePaperTypeRecord *gxPaperType;
- typedef struct gxPrivatePrintFileRecord *gxPrintFile;
- */
- typedef struct OpaquegxPrinter* gxPrinter;
- typedef struct OpaquegxJob* gxJob;
- typedef struct OpaquegxFormat* gxFormat;
- typedef struct OpaquegxPaperType* gxPaperType;
- typedef struct OpaquegxPrintFile* gxPrintFile;
- /* Possible values for LoopStatus */
- typedef Boolean gxLoopStatus;
- enum {
- gxStopLooping = false,
- gxKeepLooping = true
- };
- typedef CALLBACK_API( gxLoopStatus , GXViewDeviceProcPtr )(gxViewDevice aViewDevice, void *refCon);
- typedef STACK_UPP_TYPE(GXViewDeviceProcPtr) GXViewDeviceUPP;
- #if OPAQUE_UPP_TYPES
- #if CALL_NOT_IN_CARBON
- EXTERN_API(GXViewDeviceUPP)
- NewGXViewDeviceUPP (GXViewDeviceProcPtr userRoutine);
- EXTERN_API(void)
- DisposeGXViewDeviceUPP (GXViewDeviceUPP userUPP);
- EXTERN_API(gxLoopStatus)
- InvokeGXViewDeviceUPP (gxViewDevice aViewDevice,
- void * refCon,
- GXViewDeviceUPP userUPP);
- #endif /* CALL_NOT_IN_CARBON */
- #else
- enum { uppGXViewDeviceProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
- #define NewGXViewDeviceUPP(userRoutine) (GXViewDeviceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXViewDeviceProcInfo, GetCurrentArchitecture())
- #define DisposeGXViewDeviceUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define InvokeGXViewDeviceUPP(aViewDevice, refCon, userUPP) (gxLoopStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppGXViewDeviceProcInfo, (aViewDevice), (refCon))
- #endif
- /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
- #define NewGXViewDeviceProc(userRoutine) NewGXViewDeviceUPP(userRoutine)
- #define CallGXViewDeviceProc(userRoutine, aViewDevice, refCon) InvokeGXViewDeviceUPP(aViewDevice, refCon, userRoutine)
- typedef CALLBACK_API( gxLoopStatus , GXFormatProcPtr )(gxFormat aFormat, void *refCon);
- typedef STACK_UPP_TYPE(GXFormatProcPtr) GXFormatUPP;
- #if OPAQUE_UPP_TYPES
- #if CALL_NOT_IN_CARBON
- EXTERN_API(GXFormatUPP)
- NewGXFormatUPP (GXFormatProcPtr userRoutine);
- EXTERN_API(void)
- DisposeGXFormatUPP (GXFormatUPP userUPP);
- EXTERN_API(gxLoopStatus)
- InvokeGXFormatUPP (gxFormat aFormat,
- void * refCon,
- GXFormatUPP userUPP);
- #endif /* CALL_NOT_IN_CARBON */
- #else
- enum { uppGXFormatProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
- #define NewGXFormatUPP(userRoutine) (GXFormatUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFormatProcInfo, GetCurrentArchitecture())
- #define DisposeGXFormatUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define InvokeGXFormatUPP(aFormat, refCon, userUPP) (gxLoopStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppGXFormatProcInfo, (aFormat), (refCon))
- #endif
- /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
- #define NewGXFormatProc(userRoutine) NewGXFormatUPP(userRoutine)
- #define CallGXFormatProc(userRoutine, aFormat, refCon) InvokeGXFormatUPP(aFormat, refCon, userRoutine)
- typedef CALLBACK_API( gxLoopStatus , GXPaperTypeProcPtr )(gxPaperType aPapertype, void *refCon);
- typedef STACK_UPP_TYPE(GXPaperTypeProcPtr) GXPaperTypeUPP;
- #if OPAQUE_UPP_TYPES
- #if CALL_NOT_IN_CARBON
- EXTERN_API(GXPaperTypeUPP)
- NewGXPaperTypeUPP (GXPaperTypeProcPtr userRoutine);
- EXTERN_API(void)
- DisposeGXPaperTypeUPP (GXPaperTypeUPP userUPP);
- EXTERN_API(gxLoopStatus)
- InvokeGXPaperTypeUPP (gxPaperType aPapertype,
- void * refCon,
- GXPaperTypeUPP userUPP);
- #endif /* CALL_NOT_IN_CARBON */
- #else
- enum { uppGXPaperTypeProcInfo = 0x000003D0 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
- #define NewGXPaperTypeUPP(userRoutine) (GXPaperTypeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPaperTypeProcInfo, GetCurrentArchitecture())
- #define DisposeGXPaperTypeUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define InvokeGXPaperTypeUPP(aPapertype, refCon, userUPP) (gxLoopStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppGXPaperTypeProcInfo, (aPapertype), (refCon))
- #endif
- /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
- #define NewGXPaperTypeProc(userRoutine) NewGXPaperTypeUPP(userRoutine)
- #define CallGXPaperTypeProc(userRoutine, aPapertype, refCon) InvokeGXPaperTypeUPP(aPapertype, refCon, userRoutine)
- typedef CALLBACK_API( OSErr , GXPrintingFlattenProcPtr )(long size, void *data, void *refCon);
- typedef STACK_UPP_TYPE(GXPrintingFlattenProcPtr) GXPrintingFlattenUPP;
- #if OPAQUE_UPP_TYPES
- #if CALL_NOT_IN_CARBON
- EXTERN_API(GXPrintingFlattenUPP)
- NewGXPrintingFlattenUPP (GXPrintingFlattenProcPtr userRoutine);
- EXTERN_API(void)
- DisposeGXPrintingFlattenUPP (GXPrintingFlattenUPP userUPP);
- EXTERN_API(OSErr)
- InvokeGXPrintingFlattenUPP (long size,
- void * data,
- void * refCon,
- GXPrintingFlattenUPP userUPP);
- #endif /* CALL_NOT_IN_CARBON */
- #else
- enum { uppGXPrintingFlattenProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
- #define NewGXPrintingFlattenUPP(userRoutine) (GXPrintingFlattenUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintingFlattenProcInfo, GetCurrentArchitecture())
- #define DisposeGXPrintingFlattenUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define InvokeGXPrintingFlattenUPP(size, data, refCon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXPrintingFlattenProcInfo, (size), (data), (refCon))
- #endif
- /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
- #define NewGXPrintingFlattenProc(userRoutine) NewGXPrintingFlattenUPP(userRoutine)
- #define CallGXPrintingFlattenProc(userRoutine, size, data, refCon) InvokeGXPrintingFlattenUPP(size, data, refCon, userRoutine)
- #if OLDROUTINENAMES
- typedef GXViewDeviceProcPtr gxViewDeviceProc;
- typedef GXFormatProcPtr gxFormatProc;
- typedef GXPaperTypeProcPtr gxPaperTypeProc;
- typedef GXPrintingFlattenProcPtr gxPrintingFlattenProc;
- #endif /* OLDROUTINENAMES */
- /*
- The following constants are used to set collection item flags in printing
- collections. The Printing Manager purges certain items whenever a driver
- switch occurs. If the formatting driver changes, all items marked as
- gxVolatileFormattingDriverCategory will be purged. If the output driver
- changes, all items marked as gxVolatileOutputDriverCategory will be purged.
- Note that to prevent items from being flattened when GXFlattenJob is called,
- you should unset the collectionPersistenceBit (defined in Collections.h),
- which is on by default.
- */
- /* Structure stored in collection items' user attribute bits */
- typedef short gxCollectionCategory;
- enum {
- gxNoCollectionCategory = 0x0000,
- gxOutputDriverCategory = 0x0001,
- gxFormattingDriverCategory = 0x0002,
- gxDriverVolatileCategory = 0x0004,
- gxVolatileOutputDriverCategory = gxOutputDriverCategory + gxDriverVolatileCategory,
- gxVolatileFormattingDriverCategory = gxFormattingDriverCategory + gxDriverVolatileCategory
- };
- /*
- >>>>>> JOB COLLECTION ITEMS <<<<<<
- */
- /* gxJobInfo COLLECTION ITEM */
- enum {
- gxJobTag = FOUR_CHAR_CODE('job ')
- };
- struct gxJobInfo {
- long numPages; /* Number of pages in the document */
- long priority; /* Priority of this job plus "is it on hold?" */
- unsigned long timeToPrint; /* When to print job, if scheduled */
- long jobTimeout; /* Timeout value, in ticks */
- long firstPageToPrint; /* Start printing from this page */
- short jobAlert; /* How to alert user when printing */
- Str31 appName; /* Which application printed the document */
- Str31 documentName; /* The name of the document being printed */
- Str31 userName; /* The owner name of the machine that printed the document */
- };
- typedef struct gxJobInfo gxJobInfo;
- /* gxPDDDefaultSettingTag COLLECTION ITEM */
- enum {
- gxPDDDefaultSettingTag = FOUR_CHAR_CODE('pdds')
- };
- struct gxPDDDefaultSettingInfo {
- Boolean useDefaultSetting; /* true if PDD default setting should be used */
- SInt8 pad;
- };
- typedef struct gxPDDDefaultSettingInfo gxPDDDefaultSettingInfo;
- /* priority field constants */
- enum {
- gxPrintJobHoldingBit = 0x00001000 /* This bit is set if the job is on hold. */
- };
- enum {
- gxPrintJobUrgent = 0x00000001,
- gxPrintJobAtTime = 0x00000002,
- gxPrintJobASAP = 0x00000003,
- gxPrintJobHolding = (gxPrintJobHoldingBit + gxPrintJobASAP),
- gxPrintJobHoldingAtTime = (gxPrintJobHoldingBit + gxPrintJobAtTime),
- gxPrintJobHoldingUrgent = (gxPrintJobHoldingBit + gxPrintJobUrgent)
- };
- /* jobAlert field constants */
- enum {
- gxNoPrintTimeAlert = 0, /* Don't alert user when we print */
- gxAlertBefore = 1, /* Alert user before we print */
- gxAlertAfter = 2, /* Alert user after we print */
- gxAlertBothTimes = 3 /* Alert before and after we print */
- };
- /* jobTimeout field constants */
- enum {
- gxThirtySeconds = 1800, /* 30 seconds in ticks */
- gxTwoMinutes = 7200 /* 2 minutes in ticks */
- };
- /* gxCollationTag COLLECTION ITEM */
- enum {
- gxCollationTag = FOUR_CHAR_CODE('sort')
- };
- struct gxCollationInfo {
- Boolean collation; /* True if copies are to be collated */
- char padByte;
- };
- typedef struct gxCollationInfo gxCollationInfo;
- /* gxCopiesTag COLLECTION ITEM */
- enum {
- gxCopiesTag = FOUR_CHAR_CODE('copy')
- };
- struct gxCopiesInfo {
- long copies; /* Number of copies of the document to print */
- };
- typedef struct gxCopiesInfo gxCopiesInfo;
- /* gxPageRangeTag COLLECTION ITEM */
- enum {
- gxPageRangeTag = FOUR_CHAR_CODE('rang')
- };
- struct gxSimplePageRangeInfo {
- char optionChosen; /* From options listed below */
- Boolean printAll; /* True if user wants to print all pages */
- long fromPage; /* For gxDefaultPageRange, current value */
- long toPage; /* For gxDefaultPageRange, current value */
- };
- typedef struct gxSimplePageRangeInfo gxSimplePageRangeInfo;
- struct gxPageRangeInfo {
- gxSimplePageRangeInfo simpleRange; /* Info which will be returned for GetJobPageRange */
- Str31 fromString; /* For gxCustomizePageRange, current value */
- Str31 toString; /* For gxCustomizePageRange, current value */
- long minFromPage; /* For gxDefaultPageRange, we parse with this, ignored if nil */
- long maxToPage; /* For gxDefaultPageRange, we parse with this, ignored if nil */
- char replaceString[1]; /* For gxReplacePageRange, string to display */
- };
- typedef struct gxPageRangeInfo gxPageRangeInfo;
- /* optionChosen field constants for SimplePageRangeInfo */
- enum {
- gxDefaultPageRange = 0,
- gxReplacePageRange = 1,
- gxCustomizePageRange = 2
- };
- /* gxQualityTag COLLECTION ITEM */
- enum {
- gxQualityTag = FOUR_CHAR_CODE('qual')
- };
- struct gxQualityInfo {
- Boolean disableQuality; /* True to disable standard quality controls */
- char padByte;
- short defaultQuality; /* The default quality value */
- short currentQuality; /* The current quality value */
- short qualityCount; /* The number of quality menu items in popup menu */
- char qualityNames[1]; /* An array of packed pascal strings for popup menu titles */
- };
- typedef struct gxQualityInfo gxQualityInfo;
- /* gxFileDestinationTag COLLECTION ITEM */
- enum {
- gxFileDestinationTag = FOUR_CHAR_CODE('dest')
- };
- struct gxFileDestinationInfo {
- Boolean toFile; /* True if destination is a file */
- char padByte;
- };
- typedef struct gxFileDestinationInfo gxFileDestinationInfo;
- /* gxFileLocationTag COLLECTION ITEM */
- enum {
- gxFileLocationTag = FOUR_CHAR_CODE('floc')
- };
- struct gxFileLocationInfo {
- FSSpec fileSpec; /* Location to put file, if destination is file */
- };
- typedef struct gxFileLocationInfo gxFileLocationInfo;
- /* gxFileFormatTag COLLECTION ITEM */
- enum {
- gxFileFormatTag = FOUR_CHAR_CODE('ffmt')
- };
- struct gxFileFormatInfo {
- Str31 fileFormatName; /* Name of file format (e.g. "PostScript") if destination is file */
- };
- typedef struct gxFileFormatInfo gxFileFormatInfo;
- /* gxFileFontsTag COLLECTION ITEM */
- enum {
- gxFileFontsTag = FOUR_CHAR_CODE('incf')
- };
- struct gxFileFontsInfo {
- char includeFonts; /* Which fonts to include, if destination is file */
- char padByte;
- };
- typedef struct gxFileFontsInfo gxFileFontsInfo;
- /* includeFonts field constants */
- enum {
- gxIncludeNoFonts = 1, /* Include no fonts */
- gxIncludeAllFonts = 2, /* Include all fonts */
- gxIncludeNonStandardFonts = 3 /* Include only fonts that aren't in the standard LW set */
- };
- /* gxPaperFeedTag COLLECTION ITEM */
- enum {
- gxPaperFeedTag = FOUR_CHAR_CODE('feed')
- };
- struct gxPaperFeedInfo {
- Boolean autoFeed; /* True if automatic feed, false if manual */
- char padByte;
- };
- typedef struct gxPaperFeedInfo gxPaperFeedInfo;
- /* gxTrayFeedTag COLLECTION ITEM */
- enum {
- gxTrayFeedTag = FOUR_CHAR_CODE('tray')
- };
- typedef long gxTrayIndex;
- struct gxTrayFeedInfo {
- gxTrayIndex feedTrayIndex; /* Tray to feed paper from */
- Boolean manualFeedThisPage; /* Signals manual feeding for the page */
- char padByte;
- };
- typedef struct gxTrayFeedInfo gxTrayFeedInfo;
- /* gxManualFeedTag COLLECTION ITEM */
- enum {
- gxManualFeedTag = FOUR_CHAR_CODE('manf')
- };
- struct gxManualFeedInfo {
- long numPaperTypeNames; /* Number of paperTypes to manually feed */
- Str31 paperTypeNames[1]; /* Array of names of paperTypes to manually feed */
- };
- typedef struct gxManualFeedInfo gxManualFeedInfo;
- /* gxNormalMappingTag COLLECTION ITEM */
- enum {
- gxNormalMappingTag = FOUR_CHAR_CODE('nmap')
- };
- struct gxNormalMappingInfo {
- Boolean normalPaperMapping; /* True if not overriding normal paper mapping */
- char padByte;
- };
- typedef struct gxNormalMappingInfo gxNormalMappingInfo;
- /* gxSpecialMappingTag COLLECTION ITEM */
- enum {
- gxSpecialMappingTag = FOUR_CHAR_CODE('smap')
- };
- struct gxSpecialMappingInfo {
- char specialMapping; /* Enumerated redirect, scale or tile setting */
- char padByte;
- };
- typedef struct gxSpecialMappingInfo gxSpecialMappingInfo;
- /* specialMapping field constants */
- enum {
- gxRedirectPages = 1, /* Redirect pages to a papertype and clip if necessary */
- gxScalePages = 2, /* Scale pages if necessary */
- gxTilePages = 3 /* Tile pages if necessary */
- };
- /* gxTrayMappingTag COLLECTION ITEM */
- enum {
- gxTrayMappingTag = FOUR_CHAR_CODE('tmap')
- };
- struct gxTrayMappingInfo {
- gxTrayIndex mapPaperToTray; /* Tray to map all paper to */
- };
- typedef struct gxTrayMappingInfo gxTrayMappingInfo;
- /* gxPaperMappingTag COLLECTION ITEM */
- /* This collection item contains a flattened paper type resource */
- enum {
- gxPaperMappingTag = FOUR_CHAR_CODE('pmap')
- };
- /* gxPrintPanelTag COLLECTION ITEM */
- enum {
- gxPrintPanelTag = FOUR_CHAR_CODE('ppan')
- };
- struct gxPrintPanelInfo {
- Str31 startPanelName; /* Name of starting panel in Print dialog */
- };
- typedef struct gxPrintPanelInfo gxPrintPanelInfo;
- /* gxFormatPanelTag COLLECTION ITEM */
- enum {
- gxFormatPanelTag = FOUR_CHAR_CODE('fpan')
- };
- struct gxFormatPanelInfo {
- Str31 startPanelName; /* Name of starting panel in Format dialog */
- };
- typedef struct gxFormatPanelInfo gxFormatPanelInfo;
- /* gxTranslatedDocumentTag COLLECTION ITEM */
- enum {
- gxTranslatedDocumentTag = FOUR_CHAR_CODE('trns')
- };
- struct gxTranslatedDocumentInfo {
- long translatorInfo; /* Information from the translation process */
- };
- typedef struct gxTranslatedDocumentInfo gxTranslatedDocumentInfo;
- /* gxCoverPageTag COLLECTION ITEM */
- enum {
- gxCoverPageTag = FOUR_CHAR_CODE('cvpg')
- };
- struct gxCoverPageInfo {
- long coverPage; /* Use same enum values as for PrintRecord field in GXPrinterDrivers.h */
- };
- typedef struct gxCoverPageInfo gxCoverPageInfo;
- /*
- >>>>>> FORMAT COLLECTION ITEMS <<<<<<
- */
- /* gxPaperTypeLockTag COLLECTION ITEM */
- enum {
- gxPaperTypeLockTag = FOUR_CHAR_CODE('ptlk')
- };
- struct gxPaperTypeLockInfo {
- Boolean paperTypeLocked; /* True if format's paperType is locked */
- char padByte;
- };
- typedef struct gxPaperTypeLockInfo gxPaperTypeLockInfo;
- /* gxOrientationTag COLLECTION ITEM */
- enum {
- gxOrientationTag = FOUR_CHAR_CODE('layo')
- };
- struct gxOrientationInfo {
- char orientation; /* An enumerated orientation value */
- char padByte;
- };
- typedef struct gxOrientationInfo gxOrientationInfo;
- /* orientation field constants */
- enum {
- gxPortraitLayout = 0, /* Portrait */
- gxLandscapeLayout = 1, /* Landscape */
- gxRotatedPortraitLayout = 2, /* Portrait, rotated 180. */
- gxRotatedLandscapeLayout = 3 /* Landscape, rotated 180. */
- };
- /* gxScalingTag COLLECTION ITEM */
- enum {
- gxScalingTag = FOUR_CHAR_CODE('scal')
- };
- struct gxScalingInfo {
- Fixed horizontalScaleFactor; /* Current horizontal scaling factor */
- Fixed verticalScaleFactor; /* Current vertical scaling factor */
- short minScaling; /* Minimum scaling allowed */
- short maxScaling; /* Maximum scaling allowed */
- };
- typedef struct gxScalingInfo gxScalingInfo;
- /* gxDirectModeTag COLLECTION ITEM */
- enum {
- gxDirectModeTag = FOUR_CHAR_CODE('dirm')
- };
- struct gxDirectModeInfo {
- Boolean directModeOn; /* True if a direct mode is enabled */
- char padByte;
- };
- typedef struct gxDirectModeInfo gxDirectModeInfo;
- /* gxFormatHalftoneTag COLLECTION ITEM */
- enum {
- gxFormatHalftoneTag = FOUR_CHAR_CODE('half')
- };
- struct gxFormatHalftoneInfo {
- long numHalftones; /* Number of halftone records */
- gxHalftone halftones[1]; /* The halftone records */
- };
- typedef struct gxFormatHalftoneInfo gxFormatHalftoneInfo;
- /* gxInvertPageTag COLLECTION ITEM */
- enum {
- gxInvertPageTag = FOUR_CHAR_CODE('invp')
- };
- struct gxInvertPageInfo {
- char padByte;
- Boolean invert; /* If true, invert page */
- };
- typedef struct gxInvertPageInfo gxInvertPageInfo;
- /* gxFlipPageHorizontalTag COLLECTION ITEM */
- enum {
- gxFlipPageHorizontalTag = FOUR_CHAR_CODE('flph')
- };
- struct gxFlipPageHorizontalInfo {
- char padByte;
- Boolean flipHorizontal; /* If true, flip x coordinates on page */
- };
- typedef struct gxFlipPageHorizontalInfo gxFlipPageHorizontalInfo;
- /* gxFlipPageVerticalTag COLLECTION ITEM */
- enum {
- gxFlipPageVerticalTag = FOUR_CHAR_CODE('flpv')
- };
- struct gxFlipPageVerticalInfo {
- char padByte;
- Boolean flipVertical; /* If true, flip y coordinates on page */
- };
- typedef struct gxFlipPageVerticalInfo gxFlipPageVerticalInfo;
- /* gxPreciseBitmapsTag COLLECTION ITEM */
- enum {
- gxPreciseBitmapsTag = FOUR_CHAR_CODE('pbmp')
- };
- struct gxPreciseBitmapInfo {
- Boolean preciseBitmaps; /* If true, scale page by 96% */
- char padByte;
- };
- typedef struct gxPreciseBitmapInfo gxPreciseBitmapInfo;
- /*
- >>>>>> PAPERTYPE COLLECTION ITEMS <<<<<<
- */
- /* gxBaseTag COLLECTION ITEM */
- enum {
- gxBaseTag = FOUR_CHAR_CODE('base')
- };
- struct gxBaseInfo {
- long baseType; /* PaperType's base type */
- };
- typedef struct gxBaseInfo gxBaseInfo;
- /* baseType field constants */
- enum {
- gxUnknownBase = 0, /* Base paper type from which this paper type is */
- gxUSLetterBase = 1, /* derived. This is not a complete set. */
- gxUSLegalBase = 2,
- gxA4LetterBase = 3,
- gxB5LetterBase = 4,
- gxTabloidBase = 5
- };
- /* gxCreatorTag COLLECTION ITEM */
- enum {
- gxCreatorTag = FOUR_CHAR_CODE('crea')
- };
- struct gxCreatorInfo {
- OSType creator; /* PaperType's creator */
- };
- typedef struct gxCreatorInfo gxCreatorInfo;
- /* gxUnitsTag COLLECTION ITEM */
- enum {
- gxUnitsTag = FOUR_CHAR_CODE('unit')
- };
- struct gxUnitsInfo {
- char units; /* PaperType's units (used by PaperType Editor). */
- char padByte;
- };
- typedef struct gxUnitsInfo gxUnitsInfo;
- /* units field constants */
- enum {
- gxPicas = 0, /* Pica measurement */
- gxMMs = 1, /* Millimeter measurement */
- gxInches = 2 /* Inches measurement */
- };
- /* gxFlagsTag COLLECTION ITEM */
- enum {
- gxFlagsTag = FOUR_CHAR_CODE('flag')
- };
- struct gxFlagsInfo {
- long flags; /* PaperType's flags */
- };
- typedef struct gxFlagsInfo gxFlagsInfo;
- /* flags field constants */
- enum {
- gxOldPaperTypeFlag = 0x00800000, /* Indicates a paper type for compatibility printing */
- gxNewPaperTypeFlag = 0x00400000, /* Indicates a paper type for QuickDraw GX-aware printing */
- gxOldAndNewFlag = 0x00C00000, /* Indicates a paper type that's both old and new */
- gxDefaultPaperTypeFlag = 0x00100000 /* Indicates the default paper type in the group */
- };
- /* gxCommentTag COLLECTION ITEM */
- enum {
- gxCommentTag = FOUR_CHAR_CODE('cmnt')
- };
- struct gxCommentInfo {
- Str255 comment; /* PaperType's comment */
- };
- typedef struct gxCommentInfo gxCommentInfo;
- /*
- >>>>>> PRINTER VIEWDEVICE TAGS <<<<<<
- */
- /* gxPenTableTag COLLECTION ITEM */
- enum {
- gxPenTableTag = FOUR_CHAR_CODE('pent')
- };
- struct gxPenTableEntry {
- Str31 penName; /* Name of the pen */
- gxColor penColor; /* Color to use from the color set */
- Fixed penThickness; /* Size of the pen */
- short penUnits; /* Specifies units in which pen thickness is defined */
- short penPosition; /* Pen position in the carousel, -1 (kPenNotLoaded) if not loaded */
- };
- typedef struct gxPenTableEntry gxPenTableEntry;
- struct gxPenTable {
- long numPens; /* Number of pen entries in the following array */
- gxPenTableEntry pens[1]; /* Array of pen entries */
- };
- typedef struct gxPenTable gxPenTable;
- typedef gxPenTable * gxPenTablePtr;
- typedef gxPenTablePtr * gxPenTableHdl;
- /* penUnits field constants */
- enum {
- gxDeviceUnits = 0,
- gxMMUnits = 1,
- gxInchesUnits = 2
- };
- /* penPosition field constants */
- enum {
- gxPenNotLoaded = -1
- };
- /*
- >>>>>> DIALOG-RELATED CONSTANTS AND TYPES <<<<<<
- */
- typedef long gxDialogResult;
- enum {
- gxCancelSelected = 0L,
- gxOKSelected = 1L,
- gxRevertSelected = 2L
- };
- struct gxEditMenuRecord {
- short editMenuID;
- short cutItem;
- short copyItem;
- short pasteItem;
- short clearItem;
- short undoItem;
- };
- typedef struct gxEditMenuRecord gxEditMenuRecord;
- /*
- >>>>>> JOB FORMAT MODE CONSTANTS AND TYPES <<<<<<
- */
- typedef OSType gxJobFormatMode;
- struct gxJobFormatModeTable {
- long numModes; /* Number of job format modes to choose from */
- gxJobFormatMode modes[1]; /* The job format modes */
- };
- typedef struct gxJobFormatModeTable gxJobFormatModeTable;
- typedef gxJobFormatModeTable * gxJobFormatModeTablePtr;
- typedef gxJobFormatModeTablePtr * gxJobFormatModeTableHdl;
- enum {
- gxGraphicsJobFormatMode = FOUR_CHAR_CODE('grph'),
- gxTextJobFormatMode = FOUR_CHAR_CODE('text'),
- gxPostScriptJobFormatMode = FOUR_CHAR_CODE('post')
- };
- typedef long gxQueryType;
- enum {
- gxGetJobFormatLineConstraintQuery = 0L,
- gxGetJobFormatFontsQuery = 1L,
- gxGetJobFormatFontCommonStylesQuery = 2L,
- gxGetJobFormatFontConstraintQuery = 3L,
- gxSetStyleJobFormatCommonStyleQuery = 4L
- };
- /* Structures used for Text mode field constants */
- struct gxPositionConstraintTable {
- gxPoint phase; /* Position phase */
- gxPoint offset; /* Position offset */
- long numSizes; /* Number of available font sizes */
- Fixed sizes[1]; /* The available font sizes */
- };
- typedef struct gxPositionConstraintTable gxPositionConstraintTable;
- typedef gxPositionConstraintTable * gxPositionConstraintTablePtr;
- typedef gxPositionConstraintTablePtr * gxPositionConstraintTableHdl;
- /* numSizes field constants */
- enum {
- gxConstraintRange = -1
- };
- struct gxStyleNameTable {
- long numStyleNames; /* Number of style names */
- Str255 styleNames[1]; /* The style names */
- };
- typedef struct gxStyleNameTable gxStyleNameTable;
- typedef gxStyleNameTable * gxStyleNameTablePtr;
- typedef gxStyleNameTablePtr * gxStyleNameTableHdl;
- struct gxFontTable {
- long numFonts; /* Number of font references */
- gxFont fonts[1]; /* The font references */
- };
- typedef struct gxFontTable gxFontTable;
- typedef gxFontTable * gxFontTablePtr;
- typedef gxFontTablePtr * gxFontTableHdl;
- /* ------------------------------------------------------------------------------
- Printing Manager API Functions
- -------------------------------------------------------------------------------- */
- /*
- Global Routines
- */
- #if CALL_NOT_IN_CARBON
- EXTERN_API( OSErr )
- GXInitPrinting (void) FOURWORDINLINE(0x203C, 0x0000, 0x0000, 0xABFE);
- EXTERN_API( OSErr )
- GXExitPrinting (void) FOURWORDINLINE(0x203C, 0x0000, 0x0001, 0xABFE);
- /*
- Error-Handling Routines
- */
- EXTERN_API( OSErr )
- GXGetJobError (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x000E, 0xABFE);
- EXTERN_API( void )
- GXSetJobError (gxJob aJob,
- OSErr anErr) FOURWORDINLINE(0x203C, 0x0000, 0x000F, 0xABFE);
- /*
- Job Routines
- */
- EXTERN_API( OSErr )
- GXNewJob (gxJob * aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0002, 0xABFE);
- EXTERN_API( OSErr )
- GXDisposeJob (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0003, 0xABFE);
- EXTERN_API( void )
- GXFlattenJob (gxJob aJob,
- GXPrintingFlattenUPP flattenProc,
- void * aVoid) FOURWORDINLINE(0x203C, 0x0000, 0x0004, 0xABFE);
- EXTERN_API( gxJob )
- GXUnflattenJob (gxJob aJob,
- GXPrintingFlattenUPP flattenProc,
- void * aVoid) FOURWORDINLINE(0x203C, 0x0000, 0x0005, 0xABFE);
- EXTERN_API( Handle )
- GXFlattenJobToHdl (gxJob aJob,
- Handle aHdl) FOURWORDINLINE(0x203C, 0x0000, 0x0006, 0xABFE);
- EXTERN_API( gxJob )
- GXUnflattenJobFromHdl (gxJob aJob,
- Handle aHdl) FOURWORDINLINE(0x203C, 0x0000, 0x0007, 0xABFE);
- EXTERN_API( void )
- GXInstallApplicationOverride (gxJob aJob,
- short messageID,
- void * override) FOURWORDINLINE(0x203C, 0x0000, 0x0008, 0xABFE);
- EXTERN_API( Collection )
- GXGetJobCollection (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x001D, 0xABFE);
- EXTERN_API( void *)
- GXGetJobRefCon (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x001E, 0xABFE);
- EXTERN_API( void )
- GXSetJobRefCon (gxJob aJob,
- void * refCon) FOURWORDINLINE(0x203C, 0x0000, 0x001F, 0xABFE);
- EXTERN_API( gxJob )
- GXCopyJob (gxJob srcJob,
- gxJob dstJob) FOURWORDINLINE(0x203C, 0x0000, 0x0020, 0xABFE);
- EXTERN_API( void )
- GXSelectJobFormattingPrinter (gxJob aJob,
- Str31 printerName) FOURWORDINLINE(0x203C, 0x0000, 0x0021, 0xABFE);
- EXTERN_API( void )
- GXSelectJobOutputPrinter (gxJob aJob,
- Str31 printerName) FOURWORDINLINE(0x203C, 0x0000, 0x0022, 0xABFE);
- EXTERN_API( void )
- GXForEachJobFormatDo (gxJob aJob,
- GXFormatUPP formatProc,
- void * refCon) FOURWORDINLINE(0x203C, 0x0000, 0x0023, 0xABFE);
- EXTERN_API( long )
- GXCountJobFormats (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0024, 0xABFE);
- EXTERN_API( Boolean )
- GXUpdateJob (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0025, 0xABFE);
- EXTERN_API( void )
- GXConvertPrintRecord (gxJob aJob,
- THPrint hPrint) FOURWORDINLINE(0x203C, 0x0000, 0x0026, 0xABFE);
- EXTERN_API( void )
- GXIdleJob (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0057, 0xABFE);
- /*
- Job Format Modes Routines
- */
- EXTERN_API( void )
- GXSetAvailableJobFormatModes (gxJob aJob,
- gxJobFormatModeTableHdl formatModeTable) FOURWORDINLINE(0x203C, 0x0000, 0x003B, 0xABFE);
- EXTERN_API( gxJobFormatMode )
- GXGetPreferredJobFormatMode (gxJob aJob,
- Boolean * directOnly) FOURWORDINLINE(0x203C, 0x0000, 0x003C, 0xABFE);
- EXTERN_API( gxJobFormatMode )
- GXGetJobFormatMode (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x003D, 0xABFE);
- EXTERN_API( void )
- GXSetJobFormatMode (gxJob aJob,
- gxJobFormatMode formatMode) FOURWORDINLINE(0x203C, 0x0000, 0x003E, 0xABFE);
- EXTERN_API( void )
- GXJobFormatModeQuery (gxJob aJob,
- gxQueryType aQueryType,
- void * srcData,
- void * dstData) FOURWORDINLINE(0x203C, 0x0000, 0x003F, 0xABFE);
- /*
- Format Routines
- */
- EXTERN_API( gxFormat )
- GXNewFormat (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0009, 0xABFE);
- EXTERN_API( void )
- GXDisposeFormat (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x000A, 0xABFE);
- EXTERN_API( gxFormat )
- GXGetJobFormat (gxJob aJob,
- long whichFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0013, 0xABFE);
- EXTERN_API( gxJob )
- GXGetFormatJob (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0014, 0xABFE);
- EXTERN_API( gxPaperType )
- GXGetFormatPaperType (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0015, 0xABFE);
- EXTERN_API( void )
- GXGetFormatDimensions (gxFormat aFormat,
- gxRectangle * pageSize,
- gxRectangle * paperSize) FOURWORDINLINE(0x203C, 0x0000, 0x0016, 0xABFE);
- EXTERN_API( Collection )
- GXGetFormatCollection (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0033, 0xABFE);
- EXTERN_API( void )
- GXChangedFormat (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0034, 0xABFE);
- EXTERN_API( gxFormat )
- GXCopyFormat (gxFormat srcFormat,
- gxFormat dstFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0035, 0xABFE);
- EXTERN_API( gxFormat )
- GXCloneFormat (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0036, 0xABFE);
- EXTERN_API( long )
- GXCountFormatOwners (gxFormat aFormat) FOURWORDINLINE(0x203C, 0x0000, 0x0037, 0xABFE);
- EXTERN_API( void )
- GXGetFormatMapping (gxFormat aFormat,
- gxMapping * fmtMapping) FOURWORDINLINE(0x203C, 0x0000, 0x0038, 0xABFE);
- EXTERN_API( gxShape )
- GXGetFormatForm (gxFormat aFormat,
- gxShape * mask) FOURWORDINLINE(0x203C, 0x0000, 0x0039, 0xABFE);
- EXTERN_API( void )
- GXSetFormatForm (gxFormat aFormat,
- gxShape form,
- gxShape mask) FOURWORDINLINE(0x203C, 0x0000, 0x003A, 0xABFE);
- /*
- PaperType Routines
- */
- EXTERN_API( gxPaperType )
- GXNewPaperType (gxJob aJob,
- Str31 name,
- gxRectangle * pageSize,
- gxRectangle * paperSize) FOURWORDINLINE(0x203C, 0x0000, 0x000B, 0xABFE);
- EXTERN_API( void )
- GXDisposePaperType (gxPaperType aPaperType) FOURWORDINLINE(0x203C, 0x0000, 0x000C, 0xABFE);
- EXTERN_API( gxPaperType )
- GXGetNewPaperType (gxJob aJob,
- short resID) FOURWORDINLINE(0x203C, 0x0000, 0x000D, 0xABFE);
- EXTERN_API( long )
- GXCountJobPaperTypes (gxJob aJob,
- Boolean forFormatDevice) FOURWORDINLINE(0x203C, 0x0000, 0x0042, 0xABFE);
- EXTERN_API( gxPaperType )
- GXGetJobPaperType (gxJob aJob,
- long whichPaperType,
- Boolean forFormatDevice,
- gxPaperType aPaperType) FOURWORDINLINE(0x203C, 0x0000, 0x0043, 0xABFE);
- EXTERN_API( void )
- GXForEachJobPaperTypeDo (gxJob aJob,
- GXPaperTypeUPP aProc,
- void * refCon,
- Boolean forFormattingPrinter) FOURWORDINLINE(0x203C, 0x0000, 0x0044, 0xABFE);
- EXTERN_API( gxPaperType )
- GXCopyPaperType (gxPaperType srcPaperType,
- gxPaperType dstPaperType) FOURWORDINLINE(0x203C, 0x0000, 0x0045, 0xABFE);
- EXTERN_API( void )
- GXGetPaperTypeName (gxPaperType aPaperType,
- Str31 papertypeName) FOURWORDINLINE(0x203C, 0x0000, 0x0046, 0xABFE);
- EXTERN_API( void )
- GXGetPaperTypeDimensions (gxPaperType aPaperType,
- gxRectangle * pageSize,
- gxRectangle * paperSize) FOURWORDINLINE(0x203C, 0x0000, 0x0047, 0xABFE);
- EXTERN_API( gxJob )
- GXGetPaperTypeJob (gxPaperType aPaperType) FOURWORDINLINE(0x203C, 0x0000, 0x0048, 0xABFE);
- EXTERN_API( Collection )
- GXGetPaperTypeCollection (gxPaperType aPaperType) FOURWORDINLINE(0x203C, 0x0000, 0x0049, 0xABFE);
- /*
- Printer Routines
- */
- EXTERN_API( gxPrinter )
- GXGetJobFormattingPrinter (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0027, 0xABFE);
- EXTERN_API( gxPrinter )
- GXGetJobOutputPrinter (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0028, 0xABFE);
- EXTERN_API( gxPrinter )
- GXGetJobPrinter (gxJob aJob) FOURWORDINLINE(0x203C, 0x0000, 0x0029, 0xABFE);
- EXTERN_API( gxJob )
- GXGetPrinterJob (gxPrinter aPrinter) FOURWORDINLINE(0x203C, 0x0000, 0x002A, 0xABFE);
- EXTERN_API( void )
- GXForEachPrinterViewDeviceDo (gxPrinter aPrinter,
- GXViewDeviceUPP aProc,
- void * refCon) FOURWORDINLINE(0x203C, 0x0000, 0x002B, 0xABFE);
- EXTERN_API( long )
- GXCountPrinterViewDevices (gxPrinter aPrinter) FOURWORDINLINE(0x203C, 0x0000, 0x002C, 0xABFE);
- EXTERN_API( gxViewDevice )
- GXGetPrinterViewDevice (gxPrinter aPrinter,
- long whichViewDevice) FOURWORDINLINE(0x203C, 0x0000, 0x002D, 0xABFE);
- EXTERN_API( void )
- GXSelectPrinterViewDevice (gxPrinter aPrinter,
- long whichViewDevice) FOURWORDINLINE(0x203C, 0x0000, 0x002E, 0xABFE);
- EXTERN_API( void )
- GXGetPrinterName (gxPrinter aPrinter,
- Str31 printerName) FOURWORDINLINE(0x203C, 0x0000, 0x002F, 0xABFE);
- EXTERN_API( OSType )
- GXGetPrinterType (gxPrinter aPrinter) FOURWORDINLINE(0x203C, 0x0000, 0x0030, 0xABFE);
- EXTERN_API( void )
- GXGetPrinterDriverName (gxPrinter aPrinter,
- Str31 driverName) FOURWORDINLINE(0x203C, 0x0000, 0x0031, 0xABFE);
- EXTERN_API( OSType )
- GXGetPrinterDriverType (gxPrinter aPrinter) FOURWORDINLINE(0x203C, 0x0000, 0x0032, 0xABFE);
- /*
- Dialog Routines
- */
- EXTERN_API( gxDialogResult )
- GXJobDefaultFormatDialog (gxJob aJob,
- gxEditMenuRecord * anEditMenuRec) FOURWORDINLINE(0x203C, 0x0000, 0x0010, 0xABFE);
- EXTERN_API( gxDialogResult )
- GXJobPrintDialog (gxJob aJob,
- gxEditMenuRecord * anEditMenuRec) FOURWORDINLINE(0x203C, 0x0000, 0x0011, 0xABFE);
- EXTERN_API( gxDialogResult )
- GXFormatDialog (gxFormat aFormat,
- gxEditMenuRecord * anEditMenuRec,
- StringPtr title) FOURWORDINLINE(0x203C, 0x0000, 0x0012, 0xABFE);
- EXTERN_API( void )
- GXEnableJobScalingPanel (gxJob aJob,
- Boolean enabled) FOURWORDINLINE(0x203C, 0x0000, 0x0040, 0xABFE);
- EXTERN_API( void )
- GXGetJobPanelDimensions (gxJob aJob,
- Rect * panelArea) FOURWORDINLINE(0x203C, 0x0000, 0x0041, 0xABFE);
- /*
- Spooling Routines
- */
- EXTERN_API( void )
- GXGetJobPageRange (gxJob theJob,
- long * firstPage,
- long * lastPage) FOURWORDINLINE(0x203C, 0x0000, 0x0017, 0xABFE);
- EXTERN_API( void )
- GXStartJob (gxJob theJob,
- StringPtr docName,
- long pageCount) FOURWORDINLINE(0x203C, 0x0000, 0x0018, 0xABFE);
- EXTERN_API( void )
- GXPrintPage (gxJob theJob,
- long pageNumber,
- gxFormat theFormat,
- gxShape thePage) FOURWORDINLINE(0x203C, 0x0000, 0x0019, 0xABFE);
- EXTERN_API( Boolean )
- GXStartPage (gxJob theJob,
- long pageNumber,
- gxFormat theFormat,
- long numViewPorts,
- gxViewPort * viewPortList) FOURWORDINLINE(0x203C, 0x0000, 0x001A, 0xABFE);
- EXTERN_API( void )
- GXFinishPage (gxJob theJob) FOURWORDINLINE(0x203C, 0x0000, 0x001B, 0xABFE);
- EXTERN_API( void )
- GXFinishJob (gxJob theJob) FOURWORDINLINE(0x203C, 0x0000, 0x001C, 0xABFE);
- /*
- PrintFile Routines
- */
- EXTERN_API( gxPrintFile )
- GXOpenPrintFile (gxJob theJob,
- FSSpecPtr anFSSpec,
- char permission) FOURWORDINLINE(0x203C, 0x0000, 0x004A, 0xABFE);
- EXTERN_API( void )
- GXClosePrintFile (gxPrintFile aPrintFile) FOURWORDINLINE(0x203C, 0x0000, 0x004B, 0xABFE);
- EXTERN_API( gxJob )
- GXGetPrintFileJob (gxPrintFile aPrintFile) FOURWORDINLINE(0x203C, 0x0000, 0x004C, 0xABFE);
- EXTERN_API( long )
- GXCountPrintFilePages (gxPrintFile aPrintFile) FOURWORDINLINE(0x203C, 0x0000, 0x004D, 0xABFE);
- EXTERN_API( void )
- GXReadPrintFilePage (gxPrintFile aPrintFile,
- long pageNumber,
- long numViewPorts,
- gxViewPort * viewPortList,
- gxFormat * pgFormat,
- gxShape * pgShape) FOURWORDINLINE(0x203C, 0x0000, 0x004E, 0xABFE);
- EXTERN_API( void )
- GXReplacePrintFilePage (gxPrintFile aPrintFile,
- long pageNumber,
- gxFormat aFormat,
- gxShape aShape) FOURWORDINLINE(0x203C, 0x0000, 0x004F, 0xABFE);
- EXTERN_API( void )
- GXInsertPrintFilePage (gxPrintFile aPrintFile,
- long atPageNumber,
- gxFormat pgFormat,
- gxShape pgShape) FOURWORDINLINE(0x203C, 0x0000, 0x0050, 0xABFE);
- EXTERN_API( void )
- GXDeletePrintFilePageRange (gxPrintFile aPrintFile,
- long fromPageNumber,
- long toPageNumber) FOURWORDINLINE(0x203C, 0x0000, 0x0051, 0xABFE);
- EXTERN_API( void )
- GXSavePrintFile (gxPrintFile aPrintFile,
- FSSpec * anFSSpec) FOURWORDINLINE(0x203C, 0x0000, 0x0052, 0xABFE);
- /*
- ColorSync Routines
- */
- EXTERN_API( long )
- GXFindPrinterProfile (gxPrinter aPrinter,
- void * searchData,
- long index,
- gxColorProfile * returnedProfile) FOURWORDINLINE(0x203C, 0x0000, 0x0053, 0xABFE);
- EXTERN_API( long )
- GXFindFormatProfile (gxFormat aFormat,
- void * searchData,
- long index,
- gxColorProfile * returnedProfile) FOURWORDINLINE(0x203C, 0x0000, 0x0054, 0xABFE);
- EXTERN_API( void )
- GXSetPrinterProfile (gxPrinter aPrinter,
- gxColorProfile oldProfile,
- gxColorProfile newProfile) FOURWORDINLINE(0x203C, 0x0000, 0x0055, 0xABFE);
- EXTERN_API( void )
- GXSetFormatProfile (gxFormat aFormat,
- gxColorProfile oldProfile,
- gxColorProfile newProfile) FOURWORDINLINE(0x203C, 0x0000, 0x0056, 0xABFE);
- /************************************************************************
- Start of old "GXPrintingResEquates.h/a/p" interface file.
- *************************************************************************/
- /* ------------------------------------
- Basic client types
- ------------------------------------ */
- #endif /* CALL_NOT_IN_CARBON */
- enum {
- gxPrintingManagerType = FOUR_CHAR_CODE('pmgr'),
- gxImagingSystemType = FOUR_CHAR_CODE('gxis'),
- gxPrinterDriverType = FOUR_CHAR_CODE('pdvr'),
- gxPrintingExtensionType = FOUR_CHAR_CODE('pext'),
- gxUnknownPrinterType = FOUR_CHAR_CODE('none'),
- gxAnyPrinterType = FOUR_CHAR_CODE('univ'),
- gxQuickdrawPrinterType = FOUR_CHAR_CODE('qdrw'),
- gxPortableDocPrinterType = FOUR_CHAR_CODE('gxpd'),
- gxRasterPrinterType = FOUR_CHAR_CODE('rast'),
- gxPostscriptPrinterType = FOUR_CHAR_CODE('post'),
- gxVectorPrinterType = FOUR_CHAR_CODE('vect')
- };
- /* All pre-defined printing collection items have this ID */
- enum {
- gxPrintingTagID = -28672
- };
- /* ----------------------------------------------------------------------
- Resource types and IDs used by both extension and driver writers
- ---------------------------------------------------------------------- */
- /* Resources in a printer driver or extension must be based off of these IDs */
- enum {
- gxPrintingDriverBaseID = -27648,
- gxPrintingExtensionBaseID = -27136
- };
- /* Override resources tell the system what messages a driver or extension
- is overriding. A driver may have a series of these resources. */
- /* Override resource type for 68k resource-based code:*/
- enum {
- gxOverrideType = FOUR_CHAR_CODE('over')
- };
- /* Override resource type for PowerPC datafork-based code:*/
- enum {
- gxNativeOverrideType = FOUR_CHAR_CODE('povr')
- };
- /* --------------------------------------------------------------
- Message ID definitions by both extension and driver writers
- --------------------------------------------------------------- */
- /* Identifiers for universal message overrides. */
- enum {
- gxInitializeMsg = 0,
- gxShutDownMsg = 1,
- gxJobIdleMsg = 2,
- gxJobStatusMsg = 3,
- gxPrintingEventMsg = 4,
- gxJobDefaultFormatDialogMsg = 5,
- gxFormatDialogMsg = 6,
- gxJobPrintDialogMsg = 7,
- gxFilterPanelEventMsg = 8,
- gxHandlePanelEventMsg = 9,
- gxParsePageRangeMsg = 10,
- gxDefaultJobMsg = 11,
- gxDefaultFormatMsg = 12,
- gxDefaultPaperTypeMsg = 13,
- gxDefaultPrinterMsg = 14,
- gxCreateSpoolFileMsg = 15,
- gxSpoolPageMsg = 16,
- gxSpoolDataMsg = 17,
- gxSpoolResourceMsg = 18,
- gxCompleteSpoolFileMsg = 19,
- gxCountPagesMsg = 20,
- gxDespoolPageMsg = 21,
- gxDespoolDataMsg = 22,
- gxDespoolResourceMsg = 23,
- gxCloseSpoolFileMsg = 24,
- gxStartJobMsg = 25,
- gxFinishJobMsg = 26,
- gxStartPageMsg = 27,
- gxFinishPageMsg = 28,
- gxPrintPageMsg = 29,
- gxSetupImageDataMsg = 30,
- gxImageJobMsg = 31,
- gxImageDocumentMsg = 32,
- gxImagePageMsg = 33,
- gxRenderPageMsg = 34,
- gxCreateImageFileMsg = 35,
- gxOpenConnectionMsg = 36,
- gxCloseConnectionMsg = 37,
- gxStartSendPageMsg = 38,
- gxFinishSendPageMsg = 39,
- gxWriteDataMsg = 40,
- gxBufferDataMsg = 41,
- gxDumpBufferMsg = 42,
- gxFreeBufferMsg = 43,
- gxCheckStatusMsg = 44,
- gxGetDeviceStatusMsg = 45,
- gxFetchTaggedDataMsg = 46,
- gxGetDTPMenuListMsg = 47,
- gxDTPMenuSelectMsg = 48,
- gxHandleAlertFilterMsg = 49,
- gxJobFormatModeQueryMsg = 50,
- gxWriteStatusToDTPWindowMsg = 51,
- gxInitializeStatusAlertMsg = 52,
- gxHandleAlertStatusMsg = 53,
- gxHandleAlertEventMsg = 54,
- gxCleanupStartJobMsg = 55,
- gxCleanupStartPageMsg = 56,
- gxCleanupOpenConnectionMsg = 57,
- gxCleanupStartSendPageMsg = 58,
- gxDefaultDesktopPrinterMsg = 59,
- gxCaptureOutputDeviceMsg = 60,
- gxOpenConnectionRetryMsg = 61,
- gxExamineSpoolFileMsg = 62,
- gxFinishSendPlaneMsg = 63,
- gxDoesPaperFitMsg = 64,
- gxChooserMessageMsg = 65,
- gxFindPrinterProfileMsg = 66,
- gxFindFormatProfileMsg = 67,
- gxSetPrinterProfileMsg = 68,
- gxSetFormatProfileMsg = 69,
- gxHandleAltDestinationMsg = 70,
- gxSetupPageImageDataMsg = 71
- };
- /* Identifiers for Quickdraw message overrides. */
- enum {
- gxPrOpenDocMsg = 0,
- gxPrCloseDocMsg = 1,
- gxPrOpenPageMsg = 2,
- gxPrClosePageMsg = 3,
- gxPrintDefaultMsg = 4,
- gxPrStlDialogMsg = 5,
- gxPrJobDialogMsg = 6,
- gxPrStlInitMsg = 7,
- gxPrJobInitMsg = 8,
- gxPrDlgMainMsg = 9,
- gxPrValidateMsg = 10,
- gxPrJobMergeMsg = 11,
- gxPrGeneralMsg = 12,
- gxConvertPrintRecordToMsg = 13,
- gxConvertPrintRecordFromMsg = 14,
- gxPrintRecordToJobMsg = 15
- };
- /* Identifiers for raster imaging message overrides. */
- enum {
- gxRasterDataInMsg = 0,
- gxRasterLineFeedMsg = 1,
- gxRasterPackageBitmapMsg = 2
- };
- /* Identifiers for PostScript imaging message overrides. */
- enum {
- gxPostscriptQueryPrinterMsg = 0,
- gxPostscriptInitializePrinterMsg = 1,
- gxPostscriptResetPrinterMsg = 2,
- gxPostscriptExitServerMsg = 3,
- gxPostscriptGetStatusTextMsg = 4,
- gxPostscriptGetPrinterTextMsg = 5,
- gxPostscriptScanStatusTextMsg = 6,
- gxPostscriptScanPrinterTextMsg = 7,
- gxPostscriptGetDocumentProcSetListMsg = 8,
- gxPostscriptDownloadProcSetListMsg = 9,
- gxPostscriptGetPrinterGlyphsInformationMsg = 10,
- gxPostscriptStreamFontMsg = 11,
- gxPostscriptDoDocumentHeaderMsg = 12,
- gxPostscriptDoDocumentSetUpMsg = 13,
- gxPostscriptDoDocumentTrailerMsg = 14,
- gxPostscriptDoPageSetUpMsg = 15,
- gxPostscriptSelectPaperTypeMsg = 16,
- gxPostscriptDoPageTrailerMsg = 17,
- gxPostscriptEjectPageMsg = 18,
- gxPostscriptProcessShapeMsg = 19,
- gxPostScriptEjectPendingPageMsg = 20
- };
- /* Identifiers for Vector imaging message overrides. */
- enum {
- gxVectorPackageDataMsg = 0,
- gxVectorLoadPensMsg = 1,
- gxVectorVectorizeShapeMsg = 2
- };
- /* Dialog related resource types */
- enum {
- gxPrintingAlertType = FOUR_CHAR_CODE('plrt'),
- gxStatusType = FOUR_CHAR_CODE('stat'),
- gxExtendedDITLType = FOUR_CHAR_CODE('xdtl'),
- gxPrintPanelType = FOUR_CHAR_CODE('ppnl'),
- gxCollectionType = FOUR_CHAR_CODE('cltn')
- };
- /* Communication resource types */
- /*
- The looker resource is used by the Chooser PACK to determine what kind
- of communications this driver supports. (In order to generate/handle the
- pop-up menu for "Connect via:".
-
- The looker resource is also used by PrinterShare to determine the AppleTalk NBP Type
- for servers created for this driver.
- */
- enum {
- gxLookerType = FOUR_CHAR_CODE('look'),
- gxLookerID = -4096
- };
- /* The communications method and private data used to connect to the printer */
- enum {
- gxDeviceCommunicationsType = FOUR_CHAR_CODE('comm')
- };
- /* -------------------------------------------------
- Resource types and IDs used by extension writers
- ------------------------------------------------- */
- enum {
- gxExtensionUniversalOverrideID = gxPrintingExtensionBaseID
- };
- enum {
- gxExtensionImagingOverrideSelectorID = gxPrintingExtensionBaseID
- };
- enum {
- gxExtensionScopeType = FOUR_CHAR_CODE('scop'),
- gxDriverScopeID = gxPrintingExtensionBaseID,
- gxPrinterScopeID = gxPrintingExtensionBaseID + 1,
- gxPrinterExceptionScopeID = gxPrintingExtensionBaseID + 2
- };
- enum {
- gxExtensionLoadType = FOUR_CHAR_CODE('load'),
- gxExtensionLoadID = gxPrintingExtensionBaseID
- };
- enum {
- gxExtensionLoadFirst = 0x00000100,
- gxExtensionLoadAnywhere = 0x7FFFFFFF,
- gxExtensionLoadLast = (long)0xFFFFFF00
- };
- enum {
- gxExtensionOptimizationType = FOUR_CHAR_CODE('eopt'),
- gxExtensionOptimizationID = gxPrintingExtensionBaseID
- };
- /* -----------------------------------------------
- Resource types and IDs used by driver writers
- ----------------------------------------------- */
- enum {
- gxDriverUniversalOverrideID = gxPrintingDriverBaseID,
- gxDriverImagingOverrideID = gxPrintingDriverBaseID + 1,
- gxDriverCompatibilityOverrideID = gxPrintingDriverBaseID + 2
- };
- enum {
- gxDriverFileFormatType = FOUR_CHAR_CODE('pfil'),
- gxDriverFileFormatID = gxPrintingDriverBaseID
- };
- enum {
- gxDestinationAdditionType = FOUR_CHAR_CODE('dsta'),
- gxDestinationAdditionID = gxPrintingDriverBaseID
- };
- /* IMAGING RESOURCES */
- /* The imaging system resource specifies which imaging system a printer
- driver wishes to use. */
- enum {
- gxImagingSystemSelectorType = FOUR_CHAR_CODE('isys'),
- gxImagingSystemSelectorID = gxPrintingDriverBaseID
- };
- /* 'exft' resource ID -- exclude font list */
- enum {
- kExcludeFontListType = FOUR_CHAR_CODE('exft'),
- kExcludeFontListID = gxPrintingDriverBaseID
- };
- /* Resource for type for color matching */
- enum {
- gxColorMatchingDataType = FOUR_CHAR_CODE('prof'),
- gxColorMatchingDataID = gxPrintingDriverBaseID
- };
- /* Resource type and id for the tray count */
- enum {
- gxTrayCountDataType = FOUR_CHAR_CODE('tray'),
- gxTrayCountDataID = gxPrintingDriverBaseID
- };
- /* Resource type for the tray names */
- enum {
- gxTrayNameDataType = FOUR_CHAR_CODE('tryn')
- };
- /* Resource type for manual feed preferences, stored in DTP. */
- enum {
- gxManualFeedAlertPrefsType = FOUR_CHAR_CODE('mfpr'),
- gxManualFeedAlertPrefsID = gxPrintingDriverBaseID
- };
- /* Resource type for desktop printer output characteristics, stored in DTP. */
- enum {
- gxDriverOutputType = FOUR_CHAR_CODE('outp'),
- gxDriverOutputTypeID = 1
- };
- /* IO Resources */
- /* Resource type and ID for default IO and buffering resources */
- enum {
- gxUniversalIOPrefsType = FOUR_CHAR_CODE('iobm'),
- gxUniversalIOPrefsID = gxPrintingDriverBaseID
- };
- /* Resource types and IDs for default implementation of CaptureOutputDevice.
- The default implementation of CaptureOutputDevice only handles PAP devices */
- enum {
- gxCaptureType = FOUR_CHAR_CODE('cpts'),
- gxCaptureStringID = gxPrintingDriverBaseID,
- gxReleaseStringID = gxPrintingDriverBaseID + 1,
- gxUncapturedAppleTalkType = gxPrintingDriverBaseID + 2,
- gxCapturedAppleTalkType = gxPrintingDriverBaseID + 3
- };
- /* Resource type and ID for custom halftone matrix */
- enum {
- gxCustomMatrixType = FOUR_CHAR_CODE('dmat'),
- gxCustomMatrixID = gxPrintingDriverBaseID
- };
- /* Resource type and ID for raster driver rendering preferences */
- enum {
- gxRasterPrefsType = FOUR_CHAR_CODE('rdip'),
- gxRasterPrefsID = gxPrintingDriverBaseID
- };
- /* Resource type for specifiying a colorset */
- enum {
- gxColorSetResType = FOUR_CHAR_CODE('crst')
- };
- /* Resource type and ID for raster driver packaging preferences */
- enum {
- gxRasterPackType = FOUR_CHAR_CODE('rpck'),
- gxRasterPackID = gxPrintingDriverBaseID
- };
- /* Resource type and ID for raster driver packaging options */
- enum {
- gxRasterNumNone = 0, /* Number isn't output at all */
- gxRasterNumDirect = 1, /* Lowest minWidth bytes as data */
- gxRasterNumToASCII = 2 /* minWidth ASCII characters */
- };
- enum {
- gxRasterPackOptionsType = FOUR_CHAR_CODE('ropt'),
- gxRasterPackOptionsID = gxPrintingDriverBaseID
- };
- /* Resource type for the PostScript imaging system procedure set control resource */
- enum {
- gxPostscriptProcSetControlType = FOUR_CHAR_CODE('prec')
- };
- /* Resource type for the PostScript imaging system printer font resource */
- enum {
- gxPostscriptPrinterFontType = FOUR_CHAR_CODE('pfnt')
- };
- /* Resource type and ID for the PostScript imaging system imaging preferences */
- enum {
- gxPostscriptPrefsType = FOUR_CHAR_CODE('pdip'),
- gxPostscriptPrefsID = gxPrintingDriverBaseID
- };
- /* Resource type and ID for the PostScript imaging system default scanning code */
- enum {
- gxPostscriptScanningType = FOUR_CHAR_CODE('scan'),
- gxPostscriptScanningID = gxPrintingDriverBaseID
- };
- /* Old Application Support Resources */
- enum {
- gxCustType = FOUR_CHAR_CODE('cust'),
- gxCustID = -8192
- };
- enum {
- gxReslType = FOUR_CHAR_CODE('resl'),
- gxReslID = -8192
- };
- enum {
- gxDiscreteResolution = 0
- };
- enum {
- gxStlDialogResID = -8192
- };
- enum {
- gxJobDialogResID = -8191
- };
- enum {
- gxScaleTableType = FOUR_CHAR_CODE('stab'),
- gxDITLControlType = FOUR_CHAR_CODE('dctl')
- };
- /* The default implementation of gxPrintDefault loads and
- PrValidates a print record stored in the following driver resource. */
- enum {
- gxPrintRecordType = FOUR_CHAR_CODE('PREC'),
- gxDefaultPrintRecordID = 0
- };
- /*
- -----------------------------------------------
- Resource types and IDs used in papertype files
- -----------------------------------------------
- */
- /* Resource type and ID for driver papertypes placed in individual files */
- enum {
- gxSignatureType = FOUR_CHAR_CODE('sig '),
- gxPapertypeSignatureID = 0
- };
- /* Papertype creator types */
- enum {
- gxDrvrPaperType = FOUR_CHAR_CODE('drpt'),
- gxSysPaperType = FOUR_CHAR_CODE('sypt'), /* System paper type creator */
- gxUserPaperType = FOUR_CHAR_CODE('uspt'), /* User paper type creator */
- /* Driver creator types == driver file's creator value */
- gxPaperTypeType = FOUR_CHAR_CODE('ptyp')
- };
- /*********************************************************************
- Start of old "GXPrintingMessages.h/a/p" interface file.
- **********************************************************************/
- /* ------------------------------------------------------------------------------
- Constants and Types
- -------------------------------------------------------------------------------- */
- /*
- ABSTRACT DATA TYPES
- */
- typedef struct OpaquegxSpoolFile* gxSpoolFile;
- /*
- DIALOG PANEL CONSTANTS AND TYPES
- */
- typedef long gxPanelEvent;
- /* Dialog panel event equates */
- enum {
- gxPanelNoEvt = 0L,
- gxPanelOpenEvt = 1L, /* Initialize and draw */
- gxPanelCloseEvt = 2L, /* Your panel is going away (panel switchL, confirm or cancel) */
- gxPanelHitEvt = 3L, /* There's a hit in your panel */
- gxPanelActivateEvt = 4L, /* The dialog window has just been activated */
- gxPanelDeactivateEvt = 5L, /* The dialog window is about to be deactivated */
- gxPanelIconFocusEvt = 6L, /* The focus changes from the panel to the icon list */
- gxPanelPanelFocusEvt = 7L, /* The focus changes from the icon list to the panel */
- gxPanelFilterEvt = 8L, /* Every event is filtered */
- gxPanelCancelEvt = 9L, /* The user has cancelled the dialog */
- gxPanelConfirmEvt = 10L, /* The user has confirmed the dialog */
- gxPanelDialogEvt = 11L, /* Event to be handle by dialoghandler */
- gxPanelOtherEvt = 12L, /* osEvts, etc. */
- gxPanelUserWillConfirmEvt = 13L /* User has selected confirm, time to parse panel interdependencies */
- };
- /* Constants for panel responses to dialog handler calls */
- typedef long gxPanelResult;
- enum {
- gxPanelNoResult = 0,
- gxPanelCancelConfirmation = 1 /* Only valid from panelUserWillConfirmEvt - used to keep the dialog from going away */
- };
- /* Panel event info record for FilterPanelEvent and HandlePanelEvent messages */
- struct gxPanelInfoRecord {
- gxPanelEvent panelEvt; /* Why we were called */
- short panelResId; /* 'ppnl' resource ID of current panel */
- DialogPtr pDlg; /* Pointer to dialog */
- EventRecord * theEvent; /* Pointer to event */
- short itemHit; /* Actual item number as Dialog Mgr thinks */
- short itemCount; /* Number of items before your items */
- short evtAction; /* Once this event is processed, the action that will result */
- /* (evtAction is only meaningful during filtering) */
- short errorStringId; /* STR ID of string to put in error alert (0 means no string) */
- gxFormat theFormat; /* The current format (only meaningful in a format dialog) */
- void * refCon; /* refCon passed in PanelSetupRecord */
- };
- typedef struct gxPanelInfoRecord gxPanelInfoRecord;
- /* Constants for the evtAction field in PanelInfoRecord */
- enum {
- gxOtherAction = 0, /* Current item will not change */
- gxClosePanelAction = 1, /* Panel will be closed */
- gxCancelDialogAction = 2, /* Dialog will be cancelled */
- gxConfirmDialogAction = 3 /* Dialog will be confirmed */
- };
- /* Constants for the panelKind field in gxPanelSetupRecord */
- typedef long gxPrintingPanelKind;
- /* The gxPanelSetupInfo structure is passed to GXSetupDialogPanel */
- struct gxPanelSetupRecord {
- gxPrintingPanelKind panelKind;
- short panelResId;
- short resourceRefNum;
- void * refCon;
- };
- typedef struct gxPanelSetupRecord gxPanelSetupRecord;
- enum {
- gxApplicationPanel = 0L,
- gxExtensionPanel = 1L,
- gxDriverPanel = 2L
- };
- /* Constants returned by gxParsePageRange message */
- typedef long gxParsePageRangeResult;
- enum {
- gxRangeNotParsed = 0L, /* Default initial value */
- gxRangeParsed = 1L, /* Range has been parsed */
- gxRangeBadFromValue = 2L, /* From value is bad */
- gxRangeBadToValue = 3L /* To value is bad */
- };
- /*
- STATUS-RELATED CONSTANTS AND TYPES
- */
- /* Structure for status messages */
- struct gxStatusRecord {
- unsigned short statusType; /* One of the ids listed above (nonFatalError, etc. ) */
- unsigned short statusId; /* Specific status (out of paper, etc.) */
- unsigned short statusAlertId; /* Printing alert ID (if any) for status */
- gxOwnerSignature statusOwner; /* Creator type of status owner */
- short statResId; /* ID for 'stat' resource */
- short statResIndex; /* Index into 'stat' resource for this status */
- short dialogResult; /* ID of button string selected on dismissal of printing alert */
- unsigned short bufferLen; /* Number of bytes in status buffer - total record size must be <= 512 */
- char statusBuffer[1]; /* User response from alert */
- };
- typedef struct gxStatusRecord gxStatusRecord;
- /* Constants for statusType field of gxStatusRecord */
- enum {
- gxNonFatalError = 1, /* An error occurred, but the job can continue */
- gxFatalError = 2, /* A fatal error occurred-- halt job */
- gxPrinterReady = 3, /* Tells QDGX to leave alert mode */
- gxUserAttention = 4, /* Signals initiation of a modal alert */
- gxUserAlert = 5, /* Signals initiation of a moveable modal alert */
- gxPageTransmission = 6, /* Signals page sent to printer, increments page count in strings to user */
- gxOpenConnectionStatus = 7, /* Signals QDGX to begin animation on printer icon */
- gxInformationalStatus = 8, /* Default status type, no side effects */
- gxSpoolingPageStatus = 9, /* Signals page spooled, increments page count in spooling dialog */
- gxEndStatus = 10, /* Signals end of spooling */
- gxPercentageStatus = 11 /* Signals QDGX as to the amount of the job which is currently complete */
- };
- /* Structure for gxWriteStatusToDTPWindow message */
- struct gxDisplayRecord {
- Boolean useText; /* Use text as opposed to a picture */
- char padByte;
- Handle hPicture; /* if !useText, the picture handle */
- Str255 theText; /* if useText, the text */
- };
- typedef struct gxDisplayRecord gxDisplayRecord;
- /*-----------------------------------------------*/
- /* paper mapping-related constants and types... */
- /*-----------------------------------------------*/
- typedef long gxTrayMapping;
- enum {
- gxDefaultTrayMapping = 0L,
- gxConfiguredTrayMapping = 1L
- };
- /* ------------------------------------------------------------------------------
- API Functions callable only from within message overrides
- -------------------------------------------------------------------------------- */
- #define GXPRINTINGDISPATCH(segID, selector) {0x203C, 0x0001, 0, 0x223C, (segID & 0x0FFF), selector << 2, 0xABFE}
- /*
- Message Sending API Routines
- */
- #if TARGET_CPU_68K
- #if CALL_NOT_IN_CARBON
- EXTERN_API_C( OSErr )
- GXPrintingDispatch (long selector,
- ...) SIXWORDINLINE(0x221F, 0x203C, 0x0001, 0x0000, 0xABFE, 0x598F);
- #endif /* CALL_NOT_IN_CARBON */
- #endif /* TARGET_CPU_68K */
- /*
- How to use the GXPRINTINGDISPATCH macro...
-
- If your driver or extension is large, you may want to segment it
- across smaller boundaries than is permitted by the messaging system.
- Without using the Printing Manager's segmentation manager directly,
- the smallest segment you can create consists of the code to override
- a single message. If you are overriding workhorse messages such as
- RenderPage, you may want to divide up the work among many functions
- distributed across several segments. Here's how...
-
- The Printing Manager segment scheme involves the construction of a
- single 32-bit dispatch selector, which contains all the information
- necessary for the dispatcher to find a single routine. It contains the
- segment's resource ID, and the offset within the segment which contains
- the start of the routine. The GXPRINTINGDISPATCH macro will construct the
- dispatch selector for you, as well as the code to do the dispatch.
-
- Usually, it is convenient to start your segment with a long aligned jump table,
- beginning after the 4 byte header required by the Printing Manager. The
- macro assumes this is the case and takes a 1-based routine selector from
- which it conmstructs the offset.
-
- For example, if your code is in resource 'pdvr' (print driver), ID=2
- at offset=12 (third routine in segment), you would declare your
- routine as follows:
-
- OSErr MyRenderingRoutine (long param1, Ptr param2)
- = GXPRINTINGDISPATCH(2, 3);
-
- Remember, ALL segment dispatches must return OSErr. If your routine
- does not generate errors, you must still declare it to return OSErr
- and have the routine itself return noErr.
-
- An alternative way to call across segments is to call the GXPrintingDispatch
- function directly. You must construct the 32-bit selector yourself and pass
- it as the first parameter. This is usually not preferable since you don't get
- type-checking unless you declare a prototype as shown above, and your code
- isn't as easy to read.
-
- So given the above prototype, there are two ways to call the function:
-
- anErr = MyRenderingRoutine(p1, p2); // Free type checking!
-
- or:
-
- #define kMyRenderRoutineSelector 0x0002000C
- anErr = GXPrintingDispatch(kMyRenderRoutineSelector, p1, p2); // No type-checking!
-
-
- Both have the same effect.
- */
- #if CALL_NOT_IN_CARBON
- EXTERN_API_C( gxJob )
- GXGetJob (void) FOURWORDINLINE(0x203C, 0x0001, 0x0001, 0xABFE);
- EXTERN_API_C( short )
- GXGetMessageHandlerResFile (void) FOURWORDINLINE(0x203C, 0x0001, 0x0002, 0xABFE);
- EXTERN_API_C( Boolean )
- GXSpoolingAborted (void) FOURWORDINLINE(0x203C, 0x0001, 0x0003, 0xABFE);
- EXTERN_API_C( OSErr )
- GXJobIdle (void) FOURWORDINLINE(0x203C, 0x0001, 0x0004, 0xABFE);
- EXTERN_API_C( OSErr )
- GXReportStatus (long statusID,
- unsigned long statusIndex) FOURWORDINLINE(0x203C, 0x0001, 0x0005, 0xABFE);
- EXTERN_API_C( OSErr )
- GXAlertTheUser (gxStatusRecord * statusRec) FOURWORDINLINE(0x203C, 0x0001, 0x0006, 0xABFE);
- EXTERN_API_C( OSErr )
- GXSetupDialogPanel (gxPanelSetupRecord * panelRec) FOURWORDINLINE(0x203C, 0x0001, 0x0007, 0xABFE);
- EXTERN_API_C( OSErr )
- GXCountTrays (gxTrayIndex * numTrays) FOURWORDINLINE(0x203C, 0x0001, 0x0008, 0xABFE);
- EXTERN_API_C( OSErr )
- GXGetTrayName (gxTrayIndex trayNumber,
- Str31 trayName) FOURWORDINLINE(0x203C, 0x0001, 0x0009, 0xABFE);
- EXTERN_API_C( OSErr )
- GXSetTrayPaperType (gxTrayIndex whichTray,
- gxPaperType aPapertype) FOURWORDINLINE(0x203C, 0x0001, 0x000A, 0xABFE);
- EXTERN_API_C( OSErr )
- GXGetTrayPaperType (gxTrayIndex whichTray,
- gxPaperType aPapertype) FOURWORDINLINE(0x203C, 0x0001, 0x000B, 0xABFE);
- EXTERN_API_C( OSErr )
- GXGetTrayMapping (gxTrayMapping * trayMapping) FOURWORDINLINE(0x203C, 0x0001, 0x000C, 0xABFE);
- EXTERN_API_C( void )
- GXCleanupStartJob (void) FOURWORDINLINE(0x203C, 0x0001, 0x000D, 0xABFE);
- EXTERN_API_C( void )
- GXCleanupStartPage (void) FOURWORDINLINE(0x203C, 0x0001, 0x000E, 0xABFE);
- EXTERN_API_C( void )
- GXCleanupOpenConnection (void) FOURWORDINLINE(0x203C, 0x0001, 0x000F, 0xABFE);
- EXTERN_API_C( void )
- GXCleanupStartSendPage (void) FOURWORDINLINE(0x203C, 0x0001, 0x0010, 0xABFE);
- /* ------------------------------------------------------------------------------
- Constants and types for Universal Printing Messages
- -------------------------------------------------------------------------------- */
- /* Options for gxCreateSpoolFile message */
- #endif /* CALL_NOT_IN_CARBON */
- enum {
- gxNoCreateOptions = 0x00000000, /* Just create the file */
- gxInhibitAlias = 0x00000001, /* Do not create an alias in the PMD folder */
- gxInhibitUniqueName = 0x00000002, /* Do not append to the filename to make it unique */
- gxResolveBitmapAlias = 0x00000004 /* Resolve bitmap aliases and duplicate data in file */
- };
- /* Options for gxCloseSpoolFile message */
- enum {
- gxNoCloseOptions = 0x00000000, /* Just close the file */
- gxDeleteOnClose = 0x00000001, /* Delete the file rather than closing it */
- gxUpdateJobData = 0x00000002, /* Write current job information into file prior to closing */
- gxMakeRemoteFile = 0x00000004 /* Mark job as a remote file */
- };
- /* Options for gxCreateImageFile message */
- enum {
- gxNoImageFile = 0x00000000, /* Don't create image file */
- gxMakeImageFile = 0x00000001, /* Create an image file */
- gxEachPlane = 0x00000002, /* Only save up planes before rewinding */
- gxEachPage = 0x00000004, /* Save up entire pages before rewinding */
- gxEntireFile = gxEachPlane + gxEachPage /* Save up the entire file before rewinding */
- };
- /* Options for gxBufferData message */
- enum {
- gxNoBufferOptions = 0x00000000,
- gxMakeBufferHex = 0x00000001,
- gxDontSplitBuffer = 0x00000002
- };
- /* Structure for gxDumpBuffer and gxFreeBuffer messages */
- struct gxPrintingBuffer {
- long size; /* Size of buffer in bytes */
- long userData; /* Client assigned id for the buffer */
- char data[1]; /* Array of size bytes */
- };
- typedef struct gxPrintingBuffer gxPrintingBuffer;
- /* Structure for gxRenderPage message */
- struct gxPageInfoRecord {
- long docPageNum; /* Number of page being printed */
- long copyNum; /* Copy number being printed */
- Boolean formatChanged; /* True if format changed from last page */
- Boolean pageChanged; /* True if page contents changed from last page */
- long internalUse; /* Private */
- };
- typedef struct gxPageInfoRecord gxPageInfoRecord;
- /* ------------------------------------------------------------------------------
-
- Universal Printing Messages
-
- -------------------------------------------------------------------------------- */
- typedef CALLBACK_API_C( OSErr , GXJobIdleProcPtr )(void );
- typedef STACK_UPP_TYPE(GXJobIdleProcPtr) GXJobIdleUPP;
- #if OPAQUE_UPP_TYPES
- #if CALL_NOT_IN_CARBON
- EXTERN_API(GXJobIdleUPP)
- NewGXJobIdleUPP (GXJobIdleProcPtr userRoutine);
- EXTERN_API(void)
- DisposeGXJobIdleUPP (GXJobIdleUPP userUPP);
- EXTERN_API(OSErr)
- InvokeGXJobIdleUPP (GXJobIdleUPP userUPP);
- #endif /* CALL_NOT_IN_CARBON */
- #else
- enum { uppGXJobIdleProcInfo = 0x00000021 }; /* 2_bytes Func() */
- #define NewGXJobIdleUPP(userRoutine) (GXJobIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobIdleProcInfo, GetCurrentArchitecture())
- #define DisposeGXJobIdleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define InvokeGXJobIdleUPP(userUPP) (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXJobIdleProcInfo)
- #endif
- /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
- #define NewGXJobIdleProc(userRoutine) NewGXJobIdleUPP(userRoutine)
- #define CallGXJobIdleProc(userRoutine) InvokeGXJobIdleUPP(userRoutine)
- #define Send_GXJobIdle() MacSendMessage(0x00000002)
- #define Forward_GXJobIdle() ForwardThisMessage((void *) (0))
- typedef CALLBACK_API_C( OSErr , GXJobStatusProcPtr )(gxStatusRecord *pStatus);
- typedef STACK_UPP_TYPE(GXJobStatusProcPtr) GXJobStatusUPP;
- #if OPAQUE_UPP_TYPES
- #if CALL_NOT_IN_CARBON
- EXTERN_API(GXJobStatusUPP)
- NewGXJobStatusUPP (GXJobStatusProcPtr userRoutine);
- EXTERN_API(void)
- DisposeGXJobStatusUPP (GXJobStatusUPP userUPP);
- EXTERN_API(OSErr)
- InvokeGXJobStatusUPP (gxStatusRecord * pStatus,
- GXJobStatusUPP userUPP);
- #endif /* CALL_NOT_IN_CARBON */
- #else
- enum { uppGXJobStatusProcInfo = 0x000000E1 }; /* 2_bytes Func(4_bytes) */
- #define NewGXJobStatusUPP(userRoutine) (GXJobStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobStatusProcInfo, GetCurrentArchitecture())
- #define DisposeGXJobStatusUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define InvokeGXJobStatusUPP(pStatus, userUPP) (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXJobStatusProcInfo, (pStatus))
- #endif
- /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */