
Author:

    02-Dec-1993 Thu 09:56:07 created  -by-  Daniel Chou (danielc)


[Environment:]

    GDI Device Driver - Plotter.


[Notes:]


Revision History:


--*/


#ifndef _PLOTUI_
#define _PLOTUI_

//
// For compilers that don't support nameless unions
//

#ifndef DUMMYUNIONNAME
#ifdef NONAMELESSUNION
#define DUMMYUNIONNAME      u
#define DUMMYUNIONNAME2     u2
#define DUMMYUNIONNAME3     u3
#else
#define DUMMYUNIONNAME
#define DUMMYUNIONNAME2
#define DUMMYUNIONNAME3
#endif
#endif


//
// PrinterINFO data structure which used by following calls to map a hPrinter
// to this data structrue by follwoing funciton
//
//  1. DrvDeviceCapabilities()
//  2. DrvDocumentProperties()
//  3. AdvanceDocumentProperties()
//  4. PrinterProperties()
//

#define PIF_UPDATE_PERMISSION       0x01
#define PIF_DOCPROP                 0x02

typedef struct _PRINTERINFO {
    HANDLE          hPrinter;       // Handle to the printer belong to here
    POPTITEM        pOptItem;
    LPWSTR          pHelpFile;      // pointer to the help file
    PFORM_INFO_1    pFI1Base;       // intalled form
    PPLOTGPC        pPlotGPC;       // loaded/updated Plotter GPC data
    WORD            cOptItem;
    BYTE            Flags;
    BYTE            IdxPenSet;      // plotter pen data set
    DWORD           dmErrBits;      // ErrorBits for DM_
    PLOTDEVMODE     PlotDM;         // Validated PLOTDEVMODE
    PAPERINFO       CurPaper;       // Current loaded form on the device
    PPDATA          PPData;         // Printer Prop Data
    HANDLE          hCPSUI;         // handle to the common ui pages
    PCOMPROPSHEETUI pCPSUI;         // pointer to COMPROPSHEETUI
    PPLOTDEVMODE    pPlotDMIn;      // input devmode
    PPLOTDEVMODE    pPlotDMOut;     // output devmode
    DWORD           ExtraData;      // starting of extra data
    } PRINTERINFO, *PPRINTERINFO;

#define PI_PADJHTINFO(pPI)      (PDEVHTINFO)&((pPI)->ExtraData)
#define PI_PDEVHTADJDATA(pPI)   (PDEVHTADJDATA)(PI_PADJHTINFO(pPI) + 1)
#define PI_PPENDATA(pPI)        (PPENDATA)&((pPI)-