source/CommonDefines.h

/*
    copyright © 1992-1994 Apple Computer Inc.  All rights reserved.
    
    CommonDefines.h
    This file defines values used by more than one .r or .h file.
    
    Modification history
 
     8/26/94        dmh             Sync'd with the shipping 1.0.1 GX driver.
    12/20/93        dmh             Sync'd with the shipping 1.0b3 GX driver.
     7/23/92        TED             New file today
    
*/
 
 
 
// driver info
#define DriverName      "IW-Half-Dither"
#define DriverType      'pdvr'
#define DriverCreator   'Dipy'
 
// code segment info
#define DriverSegType   DriverType
#define NewSegID        0
#define OldSegID        1
 
// resource IDs for STR#s
#define kFormatModeFontsID              gxPrintingDriverBaseID      // List of "native" mode fonts supported
#define kFormatModeStylesID             (gxPrintingDriverBaseID + 1)    //  List of "well" known styles that are supported
#define kOldQualityID                   (gxPrintingDriverBaseID + 2)
#define kNewQualityID                   (gxPrintingDriverBaseID + 3)
#define kBoldStyle                      1                           //  Index into kFormatModeStylesID 'STR#' of the bold style string
#define kUnderlineStyle                 2                           //  Index into kFormatModeStylesID 'STR#' of the underline style string
#define kBestString                     1
#define kRoughString                    2
 
 
// status information
#define kDriverStatus       gxPrintingDriverBaseID  // stat resource ID
#define kSendingData        1                       // item number for sending data
#define kCheckOnline        2                       // item number for printer offline
 
// options, placed into the job collection
#define kSuperRes           0x1             // highest res possible (160X144, 80X72)
 
 
#define kSeperationPanelID -27640
#define kDitherPanelID -27639
 
#define kCMYKRenderCollectionType 'Dipy'
#define kCMYKRenderCollectionID   0
 
 
// do the following only if we aren't running in Rez
 
#ifndef REZ
    
    #define nrequire(assertion, exception)          \
                if (assertion)                      \
                {                                   \
                    goto exception;                 \
                }
    
    #define require(assertion, exception)           \
                if (assertion)                      \
                    ;                               \
                else                                \
                {                                   \
                    goto exception;                 \
                }
    
    
    
    
    #define kNoPackagingOptions 0
    #define kDoSmallLineFeeds   0x1
    
    // own own global storage
    typedef struct
        {
        long    leftMargin;         // margin at left edge of page
        long    lineFeeds;          // accumulated lines feeds
        long    packagingOptions;   // controls packaging and escape generation
        ResType commType;           // type of communications
        Handle  draftTable;         // table for driving draft output, nil when not loaded
        Boolean isImageWriterII;    // is this an ImageWriter II?
        Boolean idleQuery;          // is it time to query during idles?
        OSErr   idleError;          // error to return from the next idle
        long    idleTimeout;        // timeout on idles for the query
        Boolean timeoutPending;     // timeout is pending
        } SpecGlobals, *SpecGlobalsPtr, **SpecGlobalsHdl;
        
 
#endif