/* pcxLib.H */ /* Copyright (c) Genus Microprogramming, Inc. 1988-91 All Rights Reserved. */ /**************************************************************************** Function declarations for the PCX Programmer's Toolkit, for C. Microsoft C version 6.0 Programmer: Chris Howard 03/02/88 Daniel Sie 10/15/91 *****************************************************************************/ /* PCX Version number */ #define pcxHARD 5 /* Version = 3.0 w/palette */ /* Supported GX display types */ #define pcxMINDISP 0 /* Don't use gxMAXDISP, since */ #define pcxMAXDISP 26 /* it may not supported */ /* Printer Ports */ #define pcxLPT1 0 /* Printer port 1 */ #define pcxLPT2 1 /* Printer port 2 */ #define pcxLPT3 2 /* Printer port 3 */ /* Printer Types */ #define pcxMINPRINT 0 /* Minimum printer type */ #define pcxLASER 0 /* HP LaserJet */ #define pcxDOTMAT 1 /* Dot Matrix */ #define pcxMAXPRINT 1 /* Maximum printer type */ /* Printer Modes */ #define pcxDRAFT 0 /* Draft mode */ #define pcxQUALITY 1 /* Quality */ /* Printer Scales */ #define pcxSCALE100 0 /* 100% */ #define pcxSCALE75 1 /* 75% */ #define pcxSCALE50 2 /* 50% */ #define pcxSCALE25 3 /* 25% */ #define pcxSCALE200 4 /* 200% */ /* Printer Flags */ #define pcxNORESET 0 /* No reset before printing */ #define pcxRESET 1 /* Reset before printing */ #define pcxNOEJECT 0 /* No eject after printing */ #define pcxEJECT 1 /* Eject page after printing */ /* Error Codes */ #define pcxSUCCESS 0 /* Successful */ #define pcxERR_NOTPCX -3000 /* Not a valid pcx buffer/file */ #define pcxERR_BADPRINT -3001 /* Not a valid printer type */ #define pcxERR_BADPORT -3002 /* Not a valid printer port */ #define pcxERR_PRINTER -3003 /* Printer time-out error */ #define pcxERR_NOTBW -3004 /* Not a black/white image */ /* PCX File Header */ typedef struct pcxheader { char manuf; /* Always =10 for Paintbrush */ char hard; /* Version information */ char encod; /* Run-length encoding (=1) */ char bitpx; /* Bits per pixel */ unsigned x1; /* Picture dimensions (incl) */ unsigned y1; unsigned x2; unsigned y2; unsigned hres; /* Display horiz resolution */ unsigned vres; /* Display vert resolution */ char clrma[48]; /* Pallete */ char vmode; /* (ignored) */ char nplanes; /* Number of planes (ver 2.5=0)*/ unsigned bplin; /* Bytes per line */ unsigned palinfo; /* Palette Info (1=col, 2=gray)*/ unsigned shres; /* Scanner resolution */ unsigned svres; /* */ char xtra[54]; /* Extra space (filler) */ } PCXHEADER; typedef PCXHEADER *PCXHEADERPTR; /* Functions */ #ifdef __cplusplus extern "C" { #endif extern int far pascal pcxBufferDisplay (char far *,int,int,int,int); extern int far pascal pcxBufferFile (char far *,int,char far *); extern int far pascal pcxBufferPrint (char far *,int,int,int); extern int far pascal pcxBufferScale (char far *,int,GXHEADER far *); extern int far pascal pcxBufferVirtual (char far *,int,GXHEADER far *,int,int); extern int far pascal pcxDecodePalette (int,char far *,char far *); extern int far pascal pcxDecodeScanline (char far *,unsigned,char far *,unsigned,unsigned far *,unsigned far *); extern long far pascal pcxDisplayBuffer (char far *,int,int,int,int,int,int); extern int far pascal pcxDisplayFile (char far *,int,int,int,int,int); extern int far pascal pcxDisplayPrint (int, int); extern int far pascal pcxEncodePalette (int,char far *,char far *); extern int far pascal pcxEncodeScanline (char far *,unsigned,char far *); extern int far pascal pcxFileBuffer (char far *,char far *,int); extern int far pascal pcxFileDisplay (char far *,int,int,int); extern int far pascal pcxFileImage (int,char far *,GXHEADER far *,int); extern int far pascal pcxFilePrint (char far *,int,int); extern int far pascal pcxFileScale (char far *,GXHEADER far *); extern int far pascal pcxFileVirtual (char far *,GXHEADER far *,int,int); extern int far pascal pcxFreeImage (GXHEADER far *); extern int far pascal pcxGetBufferHeader (char far *,PCXHEADER far *); extern int far pascal pcxGetBufferPalette (int,char far *,int,char far *); extern int far pascal pcxGetBufferType (char far *); extern int far pascal pcxGetFileHeader (char far *,PCXHEADER far *); extern int far pascal pcxGetFilePalette (int,char far *,char far *); extern int far pascal pcxGetFileType (char far *); extern int far pascal pcxGetLibHeader (GXLIB far *,char far *,PCXHEADER far *); extern int far pascal pcxGetLibPalette (int,GXLIB far *,char far *,char far *); extern int far pascal pcxGetLibType (GXLIB far *,char far *); extern int far pascal pcxGetVersion (int far *,int far *); extern int far pascal pcxLibBuffer (GXLIB far *,char far *,char far *,int); extern int far pascal pcxLibDisplay (GXLIB far *,char far *,int,int,int); extern int far pascal pcxLibImage (int,GXLIB far *,char far *,GXHEADER far *,int); extern int far pascal pcxLibPrint (GXLIB far *,char far *,int,int); extern int far pascal pcxLibScale (GXLIB far *,char far *,GXHEADER far *); extern int far pascal pcxLibVirtual (GXLIB far *,char far *,GXHEADER far *,int,int); extern int far pascal pcxSetBufferHeader (char far *,PCXHEADER far *); extern int far pascal pcxSetBufferPalette (int,char far *,int,char far *); extern int far pascal pcxSetFileHeader (char far *,PCXHEADER far *); extern int far pascal pcxSetFilePalette (int,char far *,char far *); extern int far pascal pcxSetPrinter (int,int,int,int,int,int); extern int far pascal pcxVerifyBuffer (char far *); extern int far pascal pcxVerifyFile (char far *); extern int far pascal pcxVerifyLib (GXLIB far *,char far *); extern long far pascal pcxVirtualBuffer (GXHEADER far *,int,int,int,int,char far *,int); extern int far pascal pcxVirtualFile (GXHEADER far *,int,int,int,int,char far *); extern int far pascal pcxVirtualPrint (GXHEADER far *, int, int); #ifdef __cplusplus } #endif