Annotation of ntddk/src/print/pscrptui/pscrptui.h, revision 1.1.1.1

1.1       root        1: /* ---File: pscrptui.h -----------------------------------------------------
                      2:  *
                      3:  *      Description:
                      4:  *              NT PostScript Printer Driver user interface common definitions,
                      5:  *              resource ids, typedefs, external declarations, function prototypes,
                      6:  *              etc.
                      7:  *
                      8:  *              This document contains confidential/proprietary information.
                      9:  *              Copyright (c) 1991 Microsoft Corporation, All Rights Reserved.
                     10:  *
                     11:  * Revision History:
                     12:  *       [00]   27-Jun-91       stevecat        created
                     13:  *
                     14:  * ---------------------------------------------------------------------- */
                     15: 
                     16: #define LONG2POINT(l, pt)        (pt.y = (int) HIWORD(l),  pt.x = (int) LOWORD(l))
                     17: 
                     18: /* exported from initdll.c  */
                     19: extern HMODULE hModule;
                     20: 
                     21: /* from libproto.h */
                     22: void  WinSetError( LPSTR );
                     23: void  DbgPrint( char *, ... );
                     24: 
                     25: // macro to convert from postscript user coordinates (1/72 inch) to
                     26: // the forms database coordinates (.001 mm).
                     27: 
                     28: #define USERTO001MM(a) ((a * 25400) / 72)
                     29: 
                     30: #ifdef DBG
                     31: void  DbgPrint( char *, ... );
                     32: void  DbgBreakPoint( void );
                     33: #endif
                     34: 
                     35: #define MAX_FULLNAME    128
                     36: #define MAX_FONTNAME    128
                     37: 
                     38: /*--------------------------------------------------------------------*\
                     39: *  The PFB file format is a sequence of segments, each of which has a  *
                     40: *  header part and a data part. The header format, defined in the      *
                     41: *  struct PFBHEADER below, consists of a one byte sanity check number   *
                     42: *  (128) then a one byte segment type and finally a four byte length   *
                     43: *  field for the data following data. The length field is stored in    *
                     44: *  the file with the least significant byte first.                     *
                     45: *                                                                      *
                     46: *  The segment types are:                                              *
                     47: *  1.) The data is a sequence of ASCII characters.                     *
                     48: *  2.) The data is a sequence of binary characters to be converted     *
                     49: *      to a sequence of pairs of hexadecimal digits.                   *
                     50: *  3.) The last segment in the file. This segment has no length or     *
                     51: *      data fields.                                                    *
                     52: *                                                                      *
                     53: *  The segment types are defined explicitly rather than as an          *
                     54: *  enumerated type because the values for each type are defined by the *
                     55: *  file format rather than the compiler manipulating them.             *
                     56: \*--------------------------------------------------------------------*/
                     57: 
                     58: #define CHECK_BYTE      128         // first byte of file segment
                     59: #define ASCII_TYPE      1           // segment type identifier
                     60: #define BINARY_TYPE     2
                     61: #define EOF_TYPE        3
                     62: 
                     63: // PFBHEADER - Adobe defined .PFB file header.  NOTE: the length is
                     64: // a ULONG, but due to alignment problems, it will be accessed as
                     65: // a couple of USHORTS.
                     66: 
                     67: typedef struct         // Adobe-defined .PFB file segment header
                     68: {
                     69:   BYTE   jCheck;        // segment ID.
                     70:   BYTE   jType;         // segment type.
                     71:   USHORT uslolength;    // lo word of length.
                     72:   USHORT ushilength;    // hi word of length.
                     73: } PFBHEADER;
                     74: 
                     75: typedef PFBHEADER FAR *PPFBHEADER;
                     76: 
                     77: #define BinaryToHex(c) (BYTE)((c) < 10 ? '0' + (c): 'a' + (c) - 10)
                     78: 
                     79: PNTPD MapPrinter(HANDLE);
                     80: 
                     81: typedef struct _ENUMDATA
                     82: {
                     83:     HWND    hwnd;
                     84:     HDC     hdc;
                     85: } ENUMDATA, *PENUMDATA;
                     86: 
                     87: typedef struct _DOCDETAILS
                     88: {
                     89:     HANDLE      hPrinter;
                     90:     FLONG       flDialogFlags;
                     91:     PWSTR       pDeviceName;
                     92:     PNTPD       pntpd;
                     93:     PSDEVMODE  *pDMOutput;
                     94:     PSDEVMODE  *pDMInput;
                     95:     PSDEVMODE   DMBuffer;
                     96:     PSDEVMODE   DMOriginal;
                     97:     HANDLE      hIconPortrait;
                     98:     HANDLE      hIconLandscape;
                     99:     HANDLE      hIconPDuplexNone;
                    100:     HANDLE      hIconLDuplexNone;
                    101:     HANDLE      hIconPDuplexTumble;
                    102:     HANDLE      hIconLDuplexTumble;
                    103:     HANDLE      hIconPDuplexNoTumble;
                    104:     HANDLE      hIconLDuplexNoTumble;
                    105:     HANDLE      hIconCollateOn;
                    106:     HANDLE      hIconCollateOff;
                    107:     COLORADJUSTMENT coloradj;
                    108: } DOCDETAILS, *PDOCDETAILS;
                    109: 
                    110: typedef struct
                    111: {
                    112:     HANDLE      hPrinter;
                    113:     DWORD       iFreeMemory;
                    114:     PNTPD       pntpd;
                    115:     PLONG       psetforms;
                    116:     BOOL        bHostHalftoning;
                    117:     BOOL        bPermission;
                    118: } PRINTDATA;
                    119: 
                    120: #define MANUAL_FEED_INDEX   100
                    121: 
                    122: #define STRING_BASE 1000
                    123: 
                    124: #define IDS_MEMWARN                     0
                    125: #define IDS_PRINT_PROP                  2
                    126: #define IDS_CAUTION                     3
                    127: #define IDS_DEFAULT_FONT_DIR           4
                    128: #define IDS_NO_INSTALLED               5
                    129: #define IDS_ALL_PFB_FILES              8
                    130: #define IDS_PFB_NOT_FOUND              10
                    131: #define IDS_PATH_NOT_FOUND             11
                    132: #define IDS_FULLNAME                   12
                    133: #define IDS_FONTNAME                   13
                    134: #define IDS_AFM_NOT_FOUND              14
                    135: #define IDS_ALL_AFM_FILES              15
                    136: #define IDS_ALL_PFM_FILES              16
                    137: #define IDS_MORE_AFMS_NEEDED           17
                    138: #define IDS_COLOR_ON_BW                 20
                    139: #define IDS_INVALID_DRIVER_EXTRA_SIZE   21
                    140: #define IDS_INVALID_DUPLEX              22
                    141: #define IDS_INVALID_COLOR               23
                    142: #define IDS_INVALID_RESOLUTION          24
                    143: #define IDS_INVALID_NUMBER_OF_COPIES    25
                    144: #define IDS_INVALID_SCALE               26
                    145: #define IDS_INVALID_ORIENTATION         27
                    146: #define IDS_INVALID_VERSION             28
                    147: #define IDS_INVALID_DEVMODE_SIZE        29
                    148: #define IDS_INVALID_FORM                30
                    149: #define IDS_DOWNLOAD_SOFTFONT           31
                    150: #define IDS_NUMBER_TT_FONTS             32
                    151: #define IDS_FREEMEM                     33
                    152: #define IDS_FORMS                       34
                    153: #define IDS_HALFTONE                    35
                    154: #define IDS_PSCRIPT_VERSION             36
                    155: #define IDS_MODEL_STRING                37
                    156: #define IDS_ERROR                       38
                    157: #define IDS_NO_HELP                     39
                    158: #define IDS_PERMISSION                  40
                    159: #define IDS_FONT_SUBST_TABLE            41
                    160: #define IDS_FONT_SUBST_SIZE             42
                    161: #define IDS_TRAY_FORM_TABLE             43
                    162: #define IDS_TRAY_FORM_SIZE              44
                    163: #define IDS_NETWORK_GONE                45
                    164: 
                    165: #define MYFONT          200    /* PFM file */
                    166: 
                    167: #define ICOPORTRAIT                 301
                    168: #define ICOLANDSCAPE                302
                    169: #define ICO_P_NONE                  303
                    170: #define ICO_L_NONE                  304
                    171: #define ICO_P_HORIZ                 305
                    172: #define ICO_L_HORIZ                 306
                    173: #define ICO_P_VERT                  307
                    174: #define ICO_L_VERT                  308
                    175: #define ICO_COLLATE                 309
                    176: #define ICO_NO_COLLATE              310
                    177: #define ICO_PRINTER                 311
                    178: 
                    179: // flag used for marking form as valid for current printer.
                    180: 
                    181: #define PSCRIPT_VALID_FORM      0x80000000
                    182: 
                    183: /*
                    184:  *   Halftoning UI calls.
                    185:  */
                    186: 
                    187: void  vShowHTUI( HWND, HANDLE );
                    188: BOOL  bSaveHTData( HANDLE, BOOL );

unix.superglobalmegacorp.com

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