Annotation of ntddk/src/print/pscript/ppd.h, revision 1.1

1.1     ! root        1: //--------------------------------------------------------------------------
        !             2: //
        !             3: // Module Name:  PPD.H
        !             4: //
        !             5: // Brief Description:  This module contains the PSCRIPT driver's structures
        !             6: // and declarations for Printer Description routines.
        !             7: //
        !             8: // Author:  Kent Settle (kentse)
        !             9: // Created: 22-Mar-1991
        !            10: //
        !            11: // Copyright (c) 1991 Microsoft Corporation
        !            12: //
        !            13: //--------------------------------------------------------------------------
        !            14: 
        !            15: #define TK_EOF                  -1
        !            16: #define TK_UNDEFINED            0
        !            17: #define PRODUCT                 1
        !            18: #define NICKNAME                2
        !            19: #define COLORDEVICE             3
        !            20: #define FILESYSTEM              4
        !            21: #define DEFAULTRESOLUTION       5
        !            22: #define DEFAULTTRANSFER         6
        !            23: #define TRANSFER                8
        !            24: #define DEFAULTPAGESIZE         9
        !            25: #define PAGESIZE                10
        !            26: #define PAGEREGION              11
        !            27: #define DEFAULTIMAGEABLEAREA    12
        !            28: #define IMAGEABLEAREA           13
        !            29: #define DEFAULTMANUALFEED       14
        !            30: #define MANUALFEED              15
        !            31: #define DEFAULTFONT             16
        !            32: #define DEVICE_FONT             17
        !            33: #define INPUTSLOT               18
        !            34: #define PAPERDIMENSION          19
        !            35: #define DEFAULTINPUTSLOT        20
        !            36: #define ENDOFFILE               21
        !            37: #define SCREENFREQ              22
        !            38: #define SCREENANGLE             23
        !            39: #define PRTVM                   24
        !            40: #define SETRESOLUTION           25
        !            41: #define VARIABLEPAPER           26
        !            42: #define OUTPUTBIN               27
        !            43: #define DEFAULTOUTPUTBIN        28
        !            44: #define PROTOCOLS               29
        !            45: #define DUPLEX                  30
        !            46: #define COLLATE                 31
        !            47: #define LANGUAGELEVEL           32
        !            48: #define RESOLUTION              33
        !            49: 
        !            50: 
        !            51: #define NORMALIZED              1
        !            52: #define OPTION_TRUE             2
        !            53: #define OPTION_FALSE            3
        !            54: #define NORM_INVERSE            4
        !            55: #define DUPLEX_TUMBLE           5
        !            56: #define DUPLEX_NO_TUMBLE        6
        !            57: #define OPTION_NONE             8
        !            58: 
        !            59: #define INIT_NTPD       4096
        !            60: #define NTPD_VERSION    0x0100
        !            61: #define DEF_RESOLUTION  300
        !            62: #define MAX_PPD_STRING  512
        !            63: #define MAX_RESOLUTIONS 12
        !            64: #define MAX_PAPERSIZES  45
        !            65: #define MAX_BINS        32
        !            66: #define MAX_FONTS       256
        !            67: #define MAX_FILENAME    80
        !            68: #define MAX_SLOT_NAME   64
        !            69: 
        !            70: // NTPD flag definitions.
        !            71: 
        !            72: #define COLOR_DEVICE      0x0001
        !            73: #define VARIABLE_PAPER    0x0002
        !            74: #define MANUALFEED_ON     0x0004
        !            75: #define ACP_PROTOCOL      0x0008
        !            76: #define PJL_PROTOCOL      0x0010
        !            77: #define BCP_PROTOCOL      0x0020
        !            78: #define TBCP_PROTOCOL     0x0040
        !            79: #define TBCP_PJL_PROTOCOL 0x0080
        !            80: #define PJL_TBCP_PROTOCOL 0x0100
        !            81: #define SIC_PROTOCOL      0x0200
        !            82: #define SIC_TBCP_PROTOCOL 0x0400
        !            83: #define TBCP_SIC_PROTOCOL 0x0800
        !            84: #define PS_HALFTONE       0x1000
        !            85: #define NO_ENDOFFILE      0x2000
        !            86: 
        !            87: // NTPD Input Slots.
        !            88: 
        !            89: #define SLOT_ONLYONE            0
        !            90: #define SLOT_MANUAL             1
        !            91: 
        !            92: #define SLOT_FIRST              SLOT_ONLYONE
        !            93: #define SLOT_LAST               SLOT_MANUAL
        !            94: #define NUMINPUTSLOTS           SLOT_LAST + 1
        !            95: 
        !            96: #define SLOTS_BASE  2000
        !            97: 
        !            98: // NTPD Output Bins.
        !            99: 
        !           100: #define BIN_ONLYONE             0
        !           101: #define BIN_UPPER               1
        !           102: #define BIN_LOWER               2
        !           103: #define BIN_MIDDLE              3
        !           104: 
        !           105: #define BIN_FIRST               BIN_ONLYONE
        !           106: #define BIN_LAST                BIN_MIDDLE
        !           107: 
        !           108: typedef ULONG   LOFFSET;        // long offset.
        !           109: 
        !           110: typedef struct
        !           111: {
        !           112:     USHORT  usIndex;
        !           113:     CHAR    szString[MAX_PPD_STRING];
        !           114: } STRINGINDEX;
        !           115: 
        !           116: typedef struct
        !           117: {
        !           118:     CHAR    szName[MAX_PPD_STRING];
        !           119:     CHAR    szInvocation[MAX_PPD_STRING];
        !           120: } STRINGPAIR;
        !           121: 
        !           122: typedef struct
        !           123: {
        !           124:     DWORD   iValue;
        !           125:     LOFFSET loInvocation;
        !           126: } PSRESOLUTION;
        !           127: 
        !           128: typedef struct
        !           129: {
        !           130:     LOFFSET     loFormName;     // offset to form name string.
        !           131:     LOFFSET     loSizeInvo;     // offset to pagesize invocation string.
        !           132:     LOFFSET     loRegionInvo;   // offset to pageregion invocation string.
        !           133:     RECTL       imagearea;      // imageable area rectangle in USER units.
        !           134:     SIZEL       sizlPaper;      // size of the paper in USER units.
        !           135: } PSFORM;
        !           136: 
        !           137: typedef struct
        !           138: {
        !           139:     LOFFSET     loBinName;      // offset to output bin name string.
        !           140:     LOFFSET     loBinInvo;      // offset to output bin invocation string.
        !           141: } PSOUTPUTBIN;
        !           142: 
        !           143: typedef struct
        !           144: {
        !           145:     LOFFSET     loSlotName;     // offset to input slot name string.
        !           146:     LOFFSET     loSlotInvo;     // offset to input slot invocation string.
        !           147: } PSINPUTSLOT;
        !           148: 
        !           149: 
        !           150: typedef struct
        !           151: {
        !           152:     CHAR    szForm[MAX_PPD_STRING];
        !           153:     RECTL   rect;
        !           154: } IMAGEAREA;
        !           155: 
        !           156: typedef struct
        !           157: {
        !           158:     CHAR    szForm[MAX_PPD_STRING];
        !           159:     SIZEL   sizl;
        !           160: } PAPERDIM;
        !           161: 
        !           162: // structure to build the more compact NTPD from.
        !           163: 
        !           164: typedef struct
        !           165: {
        !           166:     DWORD           cbPrinterName;
        !           167:     CHAR            szPrinterName[MAX_PPD_STRING];
        !           168:     STRINGINDEX     siResolutions[MAX_RESOLUTIONS];
        !           169:     DWORD           cbTransferNorm;
        !           170:     CHAR            szTransferNorm[MAX_PPD_STRING * 2];
        !           171:     DWORD           cbInvTransferNorm;
        !           172:     CHAR            szInvTransferNorm[MAX_PPD_STRING * 2];
        !           173:     CHAR            szDefaultForm[MAX_PPD_STRING];
        !           174:     STRINGPAIR      FormEntry[MAX_PAPERSIZES];
        !           175:     STRINGPAIR      PageRegion[MAX_PAPERSIZES];
        !           176:     DWORD           cImageableAreas;
        !           177:     IMAGEAREA       ImageableArea[MAX_PAPERSIZES];
        !           178:     DWORD           cPaperDimensions;
        !           179:     PAPERDIM        PaperDimension[MAX_PAPERSIZES];
        !           180:     CHAR            szDefaultOutputBin[MAX_PPD_STRING];
        !           181:     STRINGPAIR      siOutputBin[MAX_BINS];
        !           182:     CHAR            szDefaultInputSlot[MAX_PPD_STRING];
        !           183:     STRINGPAIR      siInputSlot[MAX_BINS];
        !           184:     DWORD           cbManualTRUE;
        !           185:     DWORD           cbManualFALSE;
        !           186:     CHAR            szManualTRUE[MAX_PPD_STRING];
        !           187:     CHAR            szManualFALSE[MAX_PPD_STRING];
        !           188:     DWORD           cbDuplexNone;
        !           189:     CHAR            szDuplexNone[MAX_PPD_STRING];
        !           190:     DWORD           cbDuplexTumble;
        !           191:     CHAR            szDuplexTumble[MAX_PPD_STRING];
        !           192:     DWORD           cbDuplexNoTumble;
        !           193:     CHAR            szDuplexNoTumble[MAX_PPD_STRING];
        !           194:     DWORD           cbCollateOn;
        !           195:     CHAR            szCollateOn[MAX_PPD_STRING];
        !           196:     DWORD           cbCollateOff;
        !           197:     CHAR            szCollateOff[MAX_PPD_STRING];
        !           198:     BYTE            bFonts[MAX_FONTS];
        !           199: } TMP_NTPD, *PTMP_NTPD;
        !           200: 
        !           201: typedef struct
        !           202: {
        !           203:     char   *szStr;
        !           204:     int     iValue;
        !           205: } TABLE_ENTRY;
        !           206: 
        !           207: typedef struct
        !           208: {
        !           209:     PWSTR   pwstrTTFont;
        !           210:     PWSTR   pwstrDevFont;
        !           211: } TT_FONT_MAPPING;
        !           212: 
        !           213: // NTPD - the NT Printer Descriptor structure.  this is the structure
        !           214: // into which PPD files are compiled.  NOTE - cPSForms gives the
        !           215: // count of supported paper sizes for the printer.  it is used as
        !           216: // the count for PageSize, PageRegion ImageableArea and PaperDimension.
        !           217: // loDefaultForm defines the default PageSize, PageRegion, ImageableArea
        !           218: // and PaperDimension.
        !           219: //
        !           220: // NOTE - each LOFFSET is a byte offset from the beginning of this structure.
        !           221: 
        !           222: typedef struct
        !           223: {
        !           224:     DWORD       cjThis;                 // byte length including data.
        !           225:     DWORD       ulVersion;
        !           226:     FLONG       flFlags;
        !           227:     LOFFSET     lowszPrinterName;       // offset to UNICODE printer name.
        !           228:     DWORD       cbFreeVM;               // free VM in KB.
        !           229:     DWORD       LangLevel;              // PostScript Language Level.
        !           230:     USHORT      iDefResolution;
        !           231:     USHORT      cResolutions;           // count of resolutions supported.
        !           232:     LOFFSET     loResolution;           // offset to PSRESOLUTION structs.
        !           233:     USHORT      iScreenFreq;            // frequency * 10.
        !           234:     USHORT      iScreenAngle;           // angle * 10.
        !           235:     LOFFSET     loszTransferNorm;       // offset to transfer norm. string.
        !           236:     LOFFSET     loszInvTransferNorm;    // offset to inv transfer norm. string.
        !           237:     DWORD       cPSForms;               // count of forms.
        !           238:     DWORD       cPageRegions;           // count of pageregions.
        !           239:     LOFFSET     loPSFORMArray;          // offset to array of PSFORM structs.
        !           240:     LOFFSET     loDefaultForm;          // offset to default form name.
        !           241:     DWORD       cOutputBins;            // count of output bins.
        !           242:     LOFFSET     loPSOutputBins;         // offset to PSOUTPUTBIN structs.
        !           243:     LOFFSET     loDefaultBin;           // offset to default output bin name.
        !           244:     DWORD       cInputSlots;            // count of input slots.
        !           245:     LOFFSET     loPSInputSlots;         // offset to PSINPUTSLOT structs.
        !           246:     LOFFSET     loDefaultSlot;          // offset to default input slot name.
        !           247:     LOFFSET     loszManualFeedTRUE;     // offset to manfeedtrue string.
        !           248:     LOFFSET     loszManualFeedFALSE;    // offset to manfeedfalse string.
        !           249:     LOFFSET     loszDuplexNone;         // offset to duplex none string.
        !           250:     LOFFSET     loszDuplexTumble;       // offset to duplex tumble string.
        !           251:     LOFFSET     loszDuplexNoTumble;     // offset to duplex no tumble string.
        !           252:     LOFFSET     loszCollateOn;          // offset to collate on string.
        !           253:     LOFFSET     loszCollateOff;         // offset to collate off string.
        !           254:     USHORT      cFonts;                 // count of fonts supported.
        !           255:     USHORT      usDefaultFont;          // index into FontTable.
        !           256:     LOFFSET     loFonts;                // offset to fonts list.
        !           257: } NTPD, *PNTPD;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.