home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2002 December
/
PCWorld_2002-12_cd.bin
/
Software
/
Topware
/
fprint
/
fpdk400.exe
/
include
/
Fpdefs.h
< prev
Wrap
C/C++ Source or Header
|
2000-09-20
|
9KB
|
272 lines
//
// fpdefs.h
//
// Copyright (c) 1999-2000 FinePrint Software
// All Rights Reserved.
//
#ifndef inc_fpdefs
#define inc_fpdefs
// layout types (1-up, 2-up, etc.)
enum eLayoutType {
eLayoutNil = -1, // sentinel value
eLayoutBypass, // passthrough to destination printer
eLayout1, // 1-up
eLayout2, // 2-up
eLayout4, // 4-up
eLayout8, // 8-up
eLayoutBooklet, // booklet
eLayoutMax, // sentinel value
};
// border types
enum eBorderType {
eBordersNil = -1, // sentinel value
eBordersOff, // off
eBordersOn, // on
eBordersSmart, // smart
eBordersMax, // sentinel value
};
// margin types
enum eMarginType {
eMarginNil = -1, // sentinel value
eMarginNone, // none
eMarginSmall, // small
eMarginMedium, // medium
eMarginLarge, // large
eMarginOrig, // original
eMarginMax, // sentinel value
};
// gutter types
enum eGutterType {
eGutterNil = -1, // sentinel value
eGutterNone, // none
eGutterLong, // gutter on long side of sheet
eGutterShort, // gutter on short side of sheet
eGutterMax, // sentinel value
};
// dest printer duplex support
enum eDuplexSupportType {
eDuplexSuppNil = -1, // sentinel value
eDuplexSuppUnknown, // unknown (NOT USED)
eDuplexSuppFaceUp, // manual, face up (NOT USED)
eDuplexSuppFaceDown, // manual, face down (NOT USED)
eDuplexSuppHardware, // hardware duplex
eDuplexSuppManual, // manual duplex
eDuplexSuppMax, // sentinel value
};
// dest printer hardware duplex corrections
#define dupcorrLandscape 0x00000001 // landscape duplex correction
#define dupcorrPortrait 0x00000002 // portrait duplex correction
// dest printer manual duplex type
#define pmdFlipShort 0x00000001 // requires a short side flip to
// print duplex
#define pmdRotate 0x00000002 // requires a 180 degree rotation
// for short side duplex
// dest printer duplex settings
enum eDuplexType {
eDuplexNil = -1, // sentinel value
eDuplexNone, // 1-sided printing
eDuplexLong, // 2-sided, bind on long side
eDuplexShort, // 2-sided, bind on short side
eDuplexDflt, // current printer setting
eDuplexMax, // sentinel value
};
// dest printer orientation
#define DMORIENT_AUTOMATIC 3 // automatic orientation based on N-up and
// source document orientation
// when to display the UI dialog
enum eShowDlgType {
ShowDlg_Nil = -1, // sentinel value
ShowDlg_Early, // show UI before spooling
ShowDlg_Late, // show UI after spooling
ShowDlg_Never, // do not show UI
ShowDlg_Max, // sentinel value
};
// different ways to draw colored text
enum eColTextType {
eColTextNil = -1, // sentinel value
eColTextNormal, // draw normally
eColTextPath, // draw as a filled path
eColTextBlack, // convert to black and draw normally
eColTextMax, // sentinel value
};
// stationery items
enum eStatItem {
esiNil = -1, // sentinel value
esiHeader, // header
esiFooter, // footer
esiWatermark, // watermark
esiApplyToEachPage, // apply to each page (NOT YET IMPLEMENTED)
esiMax, // sentinel value
};
// stationery item attributes
enum eStatItemAttr {
esiaNil = -1, // sentinel value
esiaText, // text of item (LPTSTR)
esiaFont, // font of item (LOGFONT)
esiaColor, // text color of item (COLORREF)
esiaMax, // sentinel value
};
// layout items
enum eLayoutItem {
eliNil = -1, // sentinel value
eliLayout, // N-up
eliBorders, // borders
eliOrder, // page ordering (4-up and 8-up only)
eliStationery, // stationery
eliForm, // form
eliDestPrinter, // destination printer
eliMargins, // margins
eliDuplex, // double-sided
eliCopies, // number of copies
eliSeparateJobs, // job separation (NOT YET IMPLEMENTED)
eliGutter, // gutter (NOT YET IMPLEMENTED)
eliEnableRTL, // enable RTL support (NOT YET IMPLEMENTED)
eliRTL, // RTL page ordering (NOT YET IMPLEMENTED)
eliAlignText, // text column alignment (NOT YET IMPLEMENTED)
eliSkipBitmaps, // skip bitmap output (NOT YET IMPLEMENTED)
eliMax, // sentinel value
};
// dest printer page rotation
enum ePageRotation {
eprNil = -1, // sentinel value
eprEntire, // rotate entire page
eprBanded, // rotate page in bands
eprNone, // do not rotate
eprMax, // sentinel value
};
// job separation
enum eJobSeparation {
ejsNil = -1, // sentinel value
ejsNone, // no separation
ejsSide, // each job on new side
ejsSheet, // each job on new sheet
ejsMax, // sentinel value
};
// dest printer text capabilities
#define ptcRotateNormal 0x00000001 // rotated colored text works
// normally
#define ptcRotateCorrection 0x00000002 // rotated colored text works
// with color correction
#define ptcRotateConvert 0x00000004 // rotated colored text works
// when converted to black
#define ptcAll 0xffffffff // everything works correctly
// special return values from the FinePrint UI
#define IDDEFER 0xaaaa // Defer button was pressed
#define IDDEFERALL 0xaaab // Defer All button was pressed
// registry key names for dest printer settings
#define stDestCollate TEXT ("Collate")
#define stDestColoredText TEXT ("ColoredText")
#define stDestDuplex TEXT ("Duplex")
#define stDestDuplexCorrection TEXT ("DuplexCorrection")
#define stDestDuplexSupport TEXT ("DuplexSupport")
#define stDestDuplexType TEXT ("DuplexType")
#define stDestExtraMargin TEXT ("AddMargin")
#define stDestManualDuplex TEXT ("ManualDuplex")
#define stDestOrientation TEXT ("Orientation")
#define stDestPageRotation TEXT ("PageRotation")
#define stDestPdfFontCorr TEXT ("EmbFontGraphics")
#define stDestReverse TEXT ("Reverse")
#define stDestTextCaps TEXT ("TextCaps")
// old names, left in for compatibility
#define stDestLandDupCorr TEXT ("DuplexCorrection")
// FinePrint error codes
enum FpError {
eFpeNil = -1, // sentinel value
eFpeOK, // no error
eFpeNotImplemented, // functionality is not implemented
eFpeBadParam, // invalid parameter
eFpeNoMem, // out of memory
eFpeBadVersion, // incompatible FinePrint version
eFpeNotFound, // item was not found
eFpeNoDispatcher, // could not locate the dispatcher
eFpeDispatcherErr, // an error occurred in the dispatcher
eFpeNoUi, // could not locate the UI
eFpeUiErr, // an error occurred in the UI
eFpeTimeout, // a timeout expired
eFpePrinter, // error on the dest printer
eFpeIo, // file I/O error
eFpeMax, // sentinel value
};
// structure passed to StartDoc/EndDoc callback functions
struct FpDocCallbackA {
DWORD idJob; // print job ID
DWORD dwShowDlg; // dialog mode (eShowDlgType)
char szFinePrinter[260]; // FinePrinter name
char szJobName[260]; // print job name
char szFpFile[260]; // FP file name
};
struct FpDocCallbackW {
DWORD idJob; // print job ID
DWORD dwShowDlg; // dialog mode (eShowDlgType)
WCHAR szFinePrinter[260]; // FinePrinter name
WCHAR szJobName[260]; // print job name
WCHAR szFpFile[260]; // FP file name
};
// StartDoc/EndDoc callback entry points
typedef DWORD (WINAPI *FpDocCallbackProcA) (FpDocCallbackA *pDoc);
typedef DWORD (WINAPI *FpDocCallbackProcW) (FpDocCallbackW *pDoc);
// old names for compatibility
typedef FpDocCallbackProcA CallbackProcA;
typedef FpDocCallbackProcW CallbackProcW;
typedef FpDocCallbackA FpJobCallbackA;
typedef FpDocCallbackW FpJobCallbackW;
// PageCount structure
struct PageCount {
DWORD cDocPages; // number of source document pages
DWORD cPaperSides; // number of sides of paper
DWORD cPaperSheets; // number of sheets of paper
};
// structure passed to PrePrint/OnPrint callback functions
struct FpPrintCallbackA {
PageCount pc; // number of pages printed
char szFinePrinter[260]; // FinePrinter name
};
struct FpPrintCallbackW {
PageCount pc; // number of pages printed
WCHAR szFinePrinter[260]; // FinePrinter name
};
// PrePrint/OnPrint callback entry points
typedef DWORD (WINAPI *FpPrintCallbackProcA) (FpPrintCallbackA *pPrint);
typedef DWORD (WINAPI *FpPrintCallbackProcW) (FpPrintCallbackW *pPrint);
#ifdef UNICODE
#define FpDocCallback FpDocCallbackW
#define FpDocCallbackProc FpDocCallbackProcW
#define FpPrintCallback FpPrintCallbackW
#define FpPrintCallbackProc FpPrintCallbackProcW
#else
#define FpDocCallback FpDocCallbackA
#define FpDocCallbackProc FpDocCallbackProcA
#define FpPrintCallback FpPrintCallbackA
#define FpPrintCallbackProc FpPrintCallbackProcA
#endif
#endif