1
/*****************************************************************************\
2
CommonDefinitions.h : common header
4
Copyright (c) 1996 - 2009, Hewlett-Packard Co.
7
Redistribution and use in source and binary forms, with or without
8
modification, are permitted provided that the following conditions
10
1. Redistributions of source code must retain the above copyright
11
notice, this list of conditions and the following disclaimer.
12
2. Redistributions in binary form must reproduce the above copyright
13
notice, this list of conditions and the following disclaimer in the
14
documentation and/or other materials provided with the distribution.
15
3. Neither the name of Hewlett-Packard nor the names of its
16
contributors may be used to endorse or promote products derived
17
from this software without specific prior written permission.
19
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
20
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
22
NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24
TO, PATENT INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
25
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
Author: Naga Samrat Chowdary Narla,
31
\*****************************************************************************/
33
#ifndef COMMON_DEFINITIONS_H
34
#define COMMON_DEFINITIONS_H
39
//#include <machine/types.h>
42
#include <cups/cups.h>
43
#include <cups/raster.h>
51
#include <sys/timeb.h>
59
#define SAVE_PCL_FILE 2
60
#define SAVE_INPUT_RASTERS 4
61
#define SEND_TO_PRINTER_ALSO 8
63
#define MAX_COLORTYPE 2
64
#define NUMBER_PLANES 3
68
#define _STRINGIZE(x) #x
69
#define STRINGIZE(x) _STRINGIZE(x)
71
#define dbglog(args...) {syslog(LOG_ERR, __FILE__ " " STRINGIZE(__LINE__) ": " args); \
72
fprintf(stderr, __FILE__ " " STRINGIZE(__LINE__) ": " args);}
75
typedef unsigned char BYTE;
78
#define ABS(x) ( ((x)<0) ? -(x) : (x) )
82
#define MIN(a,b) (((a)>=(b))?(b):(a))
86
#define MAX(a,b) (((a)<=(b))?(b):(a))
89
#ifdef APDK_LITTLE_ENDIAN
90
#define GetRed(x) (((x >> 16) & 0x0FF))
91
#define GetGreen(x) (((x >> 8) & 0x0FF))
92
#define GetBlue(x) ((x & 0x0FF))
94
#define GetRed(x) (((x >> 24) & 0x0FF))
95
#define GetGreen(x) (((x >> 16) & 0x0FF))
96
#define GetBlue(x) (((x >> 8) & 0x0FF))
107
#define HIBYTE(sVar) (BYTE) ((sVar & 0xFF00) >> 8)
108
#define LOBYTE(sVar) (BYTE) ((sVar & 0x00FF))
110
#define LOWORD(l) ((unsigned short) (l))
114
#define HIWORD(l) ((unsigned short) (((uint32_t) (l) >> 16) & 0xFFFF))
117
#define PCL_BUFFER_SIZE 10000
119
typedef unsigned short UInt16;
120
typedef unsigned long UInt32;
121
typedef unsigned char UChar;
122
typedef unsigned int Int16;
125
typedef struct RASTERDATA
127
int rastersize[MAX_COLORTYPE];
128
BYTE *rasterdata[MAX_COLORTYPE];
131
const int MAXCOLORDEPTH = 3;
133
const int MAXCOLORPLANES = 6; // current max anticipated, 6 for 690 photopen
135
const int MAXCOLORROWS = 2; // multiple of high-to-low for mixed-resolution cases
137
enum HALFTONING_ALGORITHM
144
* values of DRIVER_ERROR
145
* Values < 0 are warnings
151
// general or system errors
152
NO_ERROR = 0x00, //!< everything okay
153
JOB_CANCELED = 0x01, //!< CANCEL chosen by user
154
SYSTEM_ERROR = 0x02, //!< something bad that should not have happened
155
ALLOCMEM_ERROR = 0x03, //!< failed to allocate memory
156
NO_PRINTER_SELECTED = 0x04, //!< indicates improper calling sequence or unidi
157
INDEX_OUT_OF_RANGE = 0x05, //!< what it says
158
ILLEGAL_RESOLUTION = 0x06, //!< tried to set resolution at unacceptable value
159
NULL_POINTER = 0x07, //!< supplied ptr was null
160
MISSING_PENS = 0x08, //!< one or more printhead/pen missing
163
// (items either absent from current build, or just bad index from client code)
164
UNSUPPORTED_PRINTER = 0x10, //!< selected printer-type unsupported in build
165
UNSUPPORTED_PEN = 0x11, //!< selected pen-type unsupported
166
GRAPHICS_UNSUPPORTED = 0x13, //!< no graphics allowed in current build
167
ILLEGAL_COORDS = 0x15, //!< bad (x,y) passed to TextOut
168
BAD_INPUT_WIDTH = 0x18, //!< inputwidth is 0 and
169
OUTPUTWIDTH_EXCEEDS_PAGEWIDTH = 0x19, //!< inputwidth exceeds printable width
170
UNSUPPORTED_PRINTMODE = 0x19, //!< requested printmode not available
173
IO_ERROR = 0x20, //!< I/O error communicating with printer
174
BAD_DEVICE_ID = 0x21, //!< bad or garbled device id from printer
175
CONTINUE_FROM_BLOCK = 0x22, //!< continue from blocked state for printers with no buttons
178
PLUGIN_LIBRARY_MISSING = 0x30, //!< a required plugin (dynamic) library is missing
181
// convention is that values < 0 can be ignored (at user's peril)
182
WARN_MODE_MISMATCH = -1, //!< printmode selection incompatible with pen, tray, etc.
183
WARN_DUPLEX = -2, //!< duplexer installed; our driver can't use it
184
WARN_LOW_INK_BOTH_PENS= -3, //!< sensor says pens below threshold
185
WARN_LOW_INK_BLACK = -4, //!< sensor says black pen below threshold
186
WARN_LOW_INK_COLOR = -5, //!< sensor says color pen below threshold
188
WARN_LOW_INK_PHOTO = -10, //!< sensor says photo pen below threshold
189
WARN_LOW_INK_GREY = -11, //!< sensor says grey pen below threshold
190
WARN_LOW_INK_BLACK_PHOTO = -12, //!< sensor says black and photo pens below threshold
191
WARN_LOW_INK_COLOR_PHOTO = -13, //!< sensor says color and photo pens below threshold
192
WARN_LOW_INK_GREY_PHOTO = -14, //!< sensor says grey and photo pens below threshold
193
WARN_LOW_INK_COLOR_GREY = -15, //!< sensor says color and grey pens below threshold
194
WARN_LOW_INK_COLOR_GREY_PHOTO = -16, //!< sensor says color, photo, and grey pens below threshold
195
WARN_LOW_INK_COLOR_BLACK_PHOTO = -17, //!< sensor says color, photo, and black pens below threshold
196
WARN_LOW_INK_CYAN = -18, //!< sensor says cyan ink below threshold
197
WARN_LOW_INK_MAGENTA = -19, //!< sensor says magenta ink below threshold
198
WARN_LOW_INK_YELLOW = -20, //!< sensor says yellow ink below threshold
199
WARN_LOW_INK_MULTIPLE_PENS = - 21, //!< sensor says more than one pen below threshold
200
WARN_ILLEGAL_PAPERSIZE = -8, //!< papersize illegal for given hardware
201
ILLEGAL_PAPERSIZE = -8,
202
WARN_INVALID_MEDIA_SOURCE = -9, //!< media source tray is invalid
204
eCreate_Thread_Error = 128 //! Thread error creating the error....
205
} DRIVER_ERROR; //DRIVER_ERROR
220
// used to encourage consistent ordering of color planes
227
#define kWhite 0x00FFFFFE
238
* ZJStream related definitions
241
typedef uint32_t DWORD;
242
typedef unsigned short WORD;
262
/* 0x00*/ ZJI_PAGECOUNT,
263
/* 0x01*/ ZJI_DMCOLLATE,
264
/* 0x02*/ ZJI_DMDUPLEX,
266
/* 0x03*/ ZJI_DMPAPER,
267
/* 0x04*/ ZJI_DMCOPIES,
268
/* 0x05*/ ZJI_DMDEFAULTSOURCE,
269
/* 0x06*/ ZJI_DMMEDIATYPE,
271
/* 0x08*/ ZJI_RESOLUTION_X,
272
/* 0x09*/ ZJI_RESOLUTION_Y,
273
/* 0x0A */ ZJI_OFFSET_X,
274
/* 0x0B */ ZJI_OFFSET_Y,
275
/* 0x0C */ ZJI_RASTER_X,
276
/* 0x0D */ ZJI_RASTER_Y,
278
/* 0x0E */ ZJI_COLLATE,
279
/* 0x0F */ ZJI_QUANTITY,
281
/* 0x10 */ ZJI_VIDEO_BPP,
282
/* 0x11 */ ZJI_VIDEO_X,
283
/* 0x12 */ ZJI_VIDEO_Y,
284
/* 0x13 */ ZJI_INTERLACE,
285
/* 0x14 */ ZJI_PLANE,
286
/* 0x15 */ ZJI_PALETTE,
289
/* 0x17 */ ZJI_TONER_SAVE,
291
/* 0x18 */ ZJI_MEDIA_SIZE_X,
292
/* 0x19 */ ZJI_MEDIA_SIZE_Y,
293
/* 0x1A */ ZJI_MEDIA_SIZE_UNITS,
295
/* 0x1B */ ZJI_CHROMATIC,
297
/* 0x63 */ ZJI_PAD = 99,
299
/* 0x64 */ ZJI_PROMPT,
301
/* 0x65 */ ZJI_BITMAP_TYPE,
302
/* 0x66 */ ZJI_ENCODING_DATA,
303
/* 0x67 */ ZJI_END_PLANE,
305
/* 0x68 */ ZJI_BITMAP_PIXELS,
306
/* 0x69 */ ZJI_BITMAP_LINES,
307
/* 0x6A */ ZJI_BITMAP_BPP,
308
/* 0x6B */ ZJI_BITMAP_STRIDE,
330
// very frequently used fragments made into macros for readability
331
#define CERRCHECK if (constructor_error != NO_ERROR) {dbglog("CERRCHECK fired\n"); return;}
332
#define ERRCHECK if (err != NO_ERROR) {dbglog("ERRCHECK fired\n"); return err;}
333
#define NEWCHECK(x) if (x==NULL) return ALLOCMEM_ERROR;
334
#define CNEWCHECK(x) if (x==NULL) { constructor_error=ALLOCMEM_ERROR; return; }
336
#define CUSTOM_MEDIA_SIZE 101
340
COLORTYPE_COLOR, // 0
341
COLORTYPE_BLACK, // 1
345
typedef struct ColorMap_s
349
unsigned char *ulMap3;
357
COMPRESS_MODE_AUTO = 10,
358
COMPRESS_MODE_JPEG = 11,
359
COMPRESS_MODE_LJ = 12,
360
COMPRESS_MODE_GRAFIT = 16
365
COMPRESSOR_JPEG_QUICKCONNECT,
366
COMPRESSOR_JPEG_JETREADY,
370
const int QTABLE_SIZE = 64;
371
// jpeglib.h declares these as UINT16, which is defined as unsigned short in jmorecfg.h
372
typedef struct QTableInfo_s
374
DWORD qtable0[QTABLE_SIZE];
375
DWORD qtable1[QTABLE_SIZE];
376
DWORD qtable2[QTABLE_SIZE];
377
unsigned int qFactor;
380
typedef struct PrintMode_s
383
// The resolutions can be different for different planes
384
unsigned int ResolutionX[MAXCOLORPLANES];
385
unsigned int ResolutionY[MAXCOLORPLANES];
387
unsigned int ColorDepth[MAXCOLORPLANES];
388
unsigned int dyeCount; // number of inks in the pen(s)
390
HALFTONING_ALGORITHM eHT;
394
unsigned int BaseResX,BaseResY;
397
const unsigned char* BlackFEDTable;
398
const unsigned char* ColorFEDTable;
403
const char *printer_platform_name;
404
PrintMode *print_modes;
408
typedef struct QualityAttributes_s
413
unsigned int horizontal_resolution;
414
unsigned int vertical_resolution;
415
unsigned int actual_vertical_resolution;
416
char print_mode_name[32];
419
typedef struct MediaAttributes_s
425
int printable_height;
426
int printable_start_x;
427
int printable_start_y;
428
int horizontal_overspray;
429
int vertical_overspray;
434
typedef struct JobAttributes_s
438
DUPLEXMODE e_duplex_mode;
439
int print_borderless;
442
QualityAttributes quality_attributes;
443
MediaAttributes media_attributes;
450
char domain_name[32];
452
char driver_version[32];
453
char driver_name[128];
454
char printer_name[160];
455
char job_start_time[32];
457
char printer_platform[32];
458
char printer_language[32];
459
int integer_values[16];
460
int printer_platform_version;
463
#endif // COMMON_DEFINITIONS_H
1
/*****************************************************************************\
2
CommonDefinitions.h : common header
4
Copyright (c) 1996 - 2009, Hewlett-Packard Co.
7
Redistribution and use in source and binary forms, with or without
8
modification, are permitted provided that the following conditions
10
1. Redistributions of source code must retain the above copyright
11
notice, this list of conditions and the following disclaimer.
12
2. Redistributions in binary form must reproduce the above copyright
13
notice, this list of conditions and the following disclaimer in the
14
documentation and/or other materials provided with the distribution.
15
3. Neither the name of Hewlett-Packard nor the names of its
16
contributors may be used to endorse or promote products derived
17
from this software without specific prior written permission.
19
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
20
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
22
NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24
TO, PATENT INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
25
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
Author: Naga Samrat Chowdary Narla,
31
\*****************************************************************************/
33
#ifndef COMMON_DEFINITIONS_H
34
#define COMMON_DEFINITIONS_H
39
//#include <machine/types.h>
42
#include <cups/cups.h>
43
#include <cups/raster.h>
51
#include <sys/timeb.h>
59
#define SAVE_PCL_FILE 2
60
#define SAVE_INPUT_RASTERS 4
61
#define SEND_TO_PRINTER_ALSO 8
63
#define MAX_COLORTYPE 2
64
#define NUMBER_PLANES 3
68
#define _STRINGIZE(x) #x
69
#define STRINGIZE(x) _STRINGIZE(x)
71
#define dbglog(args...) {syslog(LOG_ERR, __FILE__ " " STRINGIZE(__LINE__) ": " args); \
72
fprintf(stderr, __FILE__ " " STRINGIZE(__LINE__) ": " args);}
75
typedef unsigned char BYTE;
78
#define ABS(x) ( ((x)<0) ? -(x) : (x) )
82
#define MIN(a,b) (((a)>=(b))?(b):(a))
86
#define MAX(a,b) (((a)<=(b))?(b):(a))
89
#ifdef APDK_LITTLE_ENDIAN
90
#define GetRed(x) (((x >> 16) & 0x0FF))
91
#define GetGreen(x) (((x >> 8) & 0x0FF))
92
#define GetBlue(x) ((x & 0x0FF))
94
#define GetRed(x) (((x >> 24) & 0x0FF))
95
#define GetGreen(x) (((x >> 16) & 0x0FF))
96
#define GetBlue(x) (((x >> 8) & 0x0FF))
107
#define HIBYTE(sVar) (BYTE) ((sVar & 0xFF00) >> 8)
108
#define LOBYTE(sVar) (BYTE) ((sVar & 0x00FF))
110
#define LOWORD(l) ((unsigned short) (l))
114
#define HIWORD(l) ((unsigned short) (((uint32_t) (l) >> 16) & 0xFFFF))
117
#define PCL_BUFFER_SIZE 10000
119
typedef unsigned short UInt16;
120
typedef unsigned long UInt32;
121
typedef unsigned char UChar;
122
typedef unsigned int Int16;
125
typedef struct RASTERDATA
127
int rastersize[MAX_COLORTYPE];
128
BYTE *rasterdata[MAX_COLORTYPE];
131
const int MAXCOLORDEPTH = 3;
133
const int MAXCOLORPLANES = 6; // current max anticipated, 6 for 690 photopen
135
const int MAXCOLORROWS = 2; // multiple of high-to-low for mixed-resolution cases
137
enum HALFTONING_ALGORITHM
144
* values of DRIVER_ERROR
145
* Values < 0 are warnings
151
// general or system errors
152
NO_ERROR = 0x00, //!< everything okay
153
JOB_CANCELED = 0x01, //!< CANCEL chosen by user
154
SYSTEM_ERROR = 0x02, //!< something bad that should not have happened
155
ALLOCMEM_ERROR = 0x03, //!< failed to allocate memory
156
NO_PRINTER_SELECTED = 0x04, //!< indicates improper calling sequence or unidi
157
INDEX_OUT_OF_RANGE = 0x05, //!< what it says
158
ILLEGAL_RESOLUTION = 0x06, //!< tried to set resolution at unacceptable value
159
NULL_POINTER = 0x07, //!< supplied ptr was null
160
MISSING_PENS = 0x08, //!< one or more printhead/pen missing
163
// (items either absent from current build, or just bad index from client code)
164
UNSUPPORTED_PRINTER = 0x10, //!< selected printer-type unsupported in build
165
UNSUPPORTED_PEN = 0x11, //!< selected pen-type unsupported
166
GRAPHICS_UNSUPPORTED = 0x13, //!< no graphics allowed in current build
167
ILLEGAL_COORDS = 0x15, //!< bad (x,y) passed to TextOut
168
BAD_INPUT_WIDTH = 0x18, //!< inputwidth is 0 and
169
OUTPUTWIDTH_EXCEEDS_PAGEWIDTH = 0x19, //!< inputwidth exceeds printable width
170
UNSUPPORTED_PRINTMODE = 0x19, //!< requested printmode not available
173
IO_ERROR = 0x20, //!< I/O error communicating with printer
174
BAD_DEVICE_ID = 0x21, //!< bad or garbled device id from printer
175
CONTINUE_FROM_BLOCK = 0x22, //!< continue from blocked state for printers with no buttons
178
PLUGIN_LIBRARY_MISSING = 0x30, //!< a required plugin (dynamic) library is missing
181
// convention is that values < 0 can be ignored (at user's peril)
182
WARN_MODE_MISMATCH = -1, //!< printmode selection incompatible with pen, tray, etc.
183
WARN_DUPLEX = -2, //!< duplexer installed; our driver can't use it
184
WARN_LOW_INK_BOTH_PENS= -3, //!< sensor says pens below threshold
185
WARN_LOW_INK_BLACK = -4, //!< sensor says black pen below threshold
186
WARN_LOW_INK_COLOR = -5, //!< sensor says color pen below threshold
188
WARN_LOW_INK_PHOTO = -10, //!< sensor says photo pen below threshold
189
WARN_LOW_INK_GREY = -11, //!< sensor says grey pen below threshold
190
WARN_LOW_INK_BLACK_PHOTO = -12, //!< sensor says black and photo pens below threshold
191
WARN_LOW_INK_COLOR_PHOTO = -13, //!< sensor says color and photo pens below threshold
192
WARN_LOW_INK_GREY_PHOTO = -14, //!< sensor says grey and photo pens below threshold
193
WARN_LOW_INK_COLOR_GREY = -15, //!< sensor says color and grey pens below threshold
194
WARN_LOW_INK_COLOR_GREY_PHOTO = -16, //!< sensor says color, photo, and grey pens below threshold
195
WARN_LOW_INK_COLOR_BLACK_PHOTO = -17, //!< sensor says color, photo, and black pens below threshold
196
WARN_LOW_INK_CYAN = -18, //!< sensor says cyan ink below threshold
197
WARN_LOW_INK_MAGENTA = -19, //!< sensor says magenta ink below threshold
198
WARN_LOW_INK_YELLOW = -20, //!< sensor says yellow ink below threshold
199
WARN_LOW_INK_MULTIPLE_PENS = - 21, //!< sensor says more than one pen below threshold
200
WARN_ILLEGAL_PAPERSIZE = -8, //!< papersize illegal for given hardware
201
ILLEGAL_PAPERSIZE = -8,
202
WARN_INVALID_MEDIA_SOURCE = -9, //!< media source tray is invalid
204
eCreate_Thread_Error = 128 //! Thread error creating the error....
205
} DRIVER_ERROR; //DRIVER_ERROR
220
// used to encourage consistent ordering of color planes
227
#define kWhite 0x00FFFFFE
238
* ZJStream related definitions
241
typedef uint32_t DWORD;
242
typedef unsigned short WORD;
262
/* 0x00*/ ZJI_PAGECOUNT,
263
/* 0x01*/ ZJI_DMCOLLATE,
264
/* 0x02*/ ZJI_DMDUPLEX,
266
/* 0x03*/ ZJI_DMPAPER,
267
/* 0x04*/ ZJI_DMCOPIES,
268
/* 0x05*/ ZJI_DMDEFAULTSOURCE,
269
/* 0x06*/ ZJI_DMMEDIATYPE,
271
/* 0x08*/ ZJI_RESOLUTION_X,
272
/* 0x09*/ ZJI_RESOLUTION_Y,
273
/* 0x0A */ ZJI_OFFSET_X,
274
/* 0x0B */ ZJI_OFFSET_Y,
275
/* 0x0C */ ZJI_RASTER_X,
276
/* 0x0D */ ZJI_RASTER_Y,
278
/* 0x0E */ ZJI_COLLATE,
279
/* 0x0F */ ZJI_QUANTITY,
281
/* 0x10 */ ZJI_VIDEO_BPP,
282
/* 0x11 */ ZJI_VIDEO_X,
283
/* 0x12 */ ZJI_VIDEO_Y,
284
/* 0x13 */ ZJI_INTERLACE,
285
/* 0x14 */ ZJI_PLANE,
286
/* 0x15 */ ZJI_PALETTE,
289
/* 0x17 */ ZJI_TONER_SAVE,
291
/* 0x18 */ ZJI_MEDIA_SIZE_X,
292
/* 0x19 */ ZJI_MEDIA_SIZE_Y,
293
/* 0x1A */ ZJI_MEDIA_SIZE_UNITS,
295
/* 0x1B */ ZJI_CHROMATIC,
297
/* 0x63 */ ZJI_PAD = 99,
299
/* 0x64 */ ZJI_PROMPT,
301
/* 0x65 */ ZJI_BITMAP_TYPE,
302
/* 0x66 */ ZJI_ENCODING_DATA,
303
/* 0x67 */ ZJI_END_PLANE,
305
/* 0x68 */ ZJI_BITMAP_PIXELS,
306
/* 0x69 */ ZJI_BITMAP_LINES,
307
/* 0x6A */ ZJI_BITMAP_BPP,
308
/* 0x6B */ ZJI_BITMAP_STRIDE,
330
// very frequently used fragments made into macros for readability
331
#define CERRCHECK if (constructor_error != NO_ERROR) {dbglog("CERRCHECK fired\n"); return;}
332
#define ERRCHECK if (err != NO_ERROR) {dbglog("ERRCHECK fired\n"); return err;}
333
#define NEWCHECK(x) if (x==NULL) return ALLOCMEM_ERROR;
334
#define CNEWCHECK(x) if (x==NULL) { constructor_error=ALLOCMEM_ERROR; return; }
336
#define CUSTOM_MEDIA_SIZE 101
338
#define EVENT_PRINT_FAILED_MISSING_PLUGIN 502
341
COLORTYPE_COLOR, // 0
342
COLORTYPE_BLACK, // 1
346
typedef struct ColorMap_s
350
unsigned char *ulMap3;
358
COMPRESS_MODE_AUTO = 10,
359
COMPRESS_MODE_JPEG = 11,
360
COMPRESS_MODE_LJ = 12,
361
COMPRESS_MODE_GRAFIT = 16
366
COMPRESSOR_JPEG_QUICKCONNECT,
367
COMPRESSOR_JPEG_JETREADY,
371
const int QTABLE_SIZE = 64;
372
// jpeglib.h declares these as UINT16, which is defined as unsigned short in jmorecfg.h
373
typedef struct QTableInfo_s
375
DWORD qtable0[QTABLE_SIZE];
376
DWORD qtable1[QTABLE_SIZE];
377
DWORD qtable2[QTABLE_SIZE];
378
unsigned int qFactor;
381
typedef struct PrintMode_s
384
// The resolutions can be different for different planes
385
unsigned int ResolutionX[MAXCOLORPLANES];
386
unsigned int ResolutionY[MAXCOLORPLANES];
388
unsigned int ColorDepth[MAXCOLORPLANES];
389
unsigned int dyeCount; // number of inks in the pen(s)
391
HALFTONING_ALGORITHM eHT;
395
unsigned int BaseResX,BaseResY;
398
const unsigned char* BlackFEDTable;
399
const unsigned char* ColorFEDTable;
404
const char *printer_platform_name;
405
PrintMode *print_modes;
409
typedef struct QualityAttributes_s
414
unsigned int horizontal_resolution;
415
unsigned int vertical_resolution;
416
unsigned int actual_vertical_resolution;
417
char print_mode_name[32];
420
typedef struct MediaAttributes_s
426
int printable_height;
427
int printable_start_x;
428
int printable_start_y;
429
int horizontal_overspray;
430
int vertical_overspray;
435
typedef struct JobAttributes_s
439
DUPLEXMODE e_duplex_mode;
440
int print_borderless;
443
QualityAttributes quality_attributes;
444
MediaAttributes media_attributes;
451
char domain_name[32];
453
char driver_version[32];
454
char driver_name[128];
455
char printer_name[160];
456
char job_start_time[32];
458
char printer_platform[32];
459
char printer_language[32];
460
int integer_values[16];
461
int printer_platform_version;
462
int pre_process_raster;
465
#endif // COMMON_DEFINITIONS_H