1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
/***********************************************************************
*
* Copyright (c) 2005 Seiko Epson Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* File Name: escpr_def.h
*
***********************************************************************/
#ifndef __EPSON_ESCPR_DEF_H__
#define __EPSON_ESCPR_DEF_H__
#include "escpr_osdep.h"
/*=======================================================================================*/
/* typedef */
/*=======================================================================================*/
typedef ESCPR_BYTE4 (* ESCPR_FPSPOOLFUNC)(void* hParam,
const ESCPR_UBYTE1* pBuf, ESCPR_UBYTE4 cbBuf);
typedef ESCPR_BYTE4 ESCPR_ERR_CODE;
typedef enum _ESCPR_ENDIAN {
ESCPR_ENDIAN_NOT_TESTED = 0,
ESCPR_ENDIAN_BIG,
ESCPR_ENDIAN_LITTLE
} ESCPR_ENDIAN;
/*=======================================================================================*/
/* struct */
/*=======================================================================================*/
typedef struct tagESCPR_RECT{
ESCPR_BYTE4 left;
ESCPR_BYTE4 top;
ESCPR_BYTE4 right;
ESCPR_BYTE4 bottom;
}ESCPR_RECT;
typedef struct tagESCPR_BANDBMP{
ESCPR_UBYTE4 WidthBytes; /* number of bytes in each scan line */
ESCPR_UBYTE1* Bits; /* pointer to the the bit values for the bitmap */
}ESCPR_BANDBMP;
typedef struct tagESCPR_OPT{
ESCPR_BYTE4 nPrnID; /* Printer ID */
ESCPR_FPSPOOLFUNC fpspoolfunc; /* pointer to spool function */
}ESCPR_OPT;
/*----- Set Print Quality -----*/
typedef struct tagESCPR_PRINT_QUALITY{
ESCPR_UBYTE1 MediaTypeID;
ESCPR_UBYTE1 PrintQuality;
ESCPR_UBYTE1 ColorMono;
ESCPR_BYTE1 Brightness;
ESCPR_BYTE1 Contrast;
ESCPR_BYTE1 Saturation;
ESCPR_UBYTE1 ColorPlane;
ESCPR_UBYTE2 PaletteSize;
ESCPR_UBYTE1* PaletteData;
}ESCPR_PRINT_QUALITY;
/*----- Set Print Job -----*/
typedef struct tagESCPR_PRINT_JOB{
ESCPR_UBYTE4 PaperWidth;
ESCPR_UBYTE4 PaperLength;
ESCPR_BYTE2 TopMargin;
ESCPR_BYTE2 LeftMargin;
ESCPR_UBYTE4 PrintableAreaWidth;
ESCPR_UBYTE4 PrintableAreaLength;
ESCPR_UBYTE1 InResolution;
ESCPR_UBYTE1 PrintDirection;
}ESCPR_PRINT_JOB;
typedef enum tagESCPR_STATUS{
ESCPR_STATUS_NOT_INITIALIZED,
ESCPR_STATUS_INITIALIZED
}ESCPR_STATUS;
typedef struct {
ESCPR_FPSPOOLFUNC gfpSendData; /* A function pointer for send data function */
} ESCPR_GLOBALFUNC;
/*=======================================================================================*/
/* define */
/*=======================================================================================*/
/*=======================================================================================*/
/* Media Information of Control Command "MI" */
/*=======================================================================================*/
/* Media Types */
#define ESCPR_MTID_PLAIN 0
#define ESCPR_MTID_360INKJET 1
#define ESCPR_MTID_IRON 2
#define ESCPR_MTID_PHOTOINKJET 3
#define ESCPR_MTID_PHOTOADSHEET 4
#define ESCPR_MTID_MATTE 5
#define ESCPR_MTID_PHOTO 6
#define ESCPR_MTID_PHOTOFILM 7
#define ESCPR_MTID_MINIPHOTO 8
#define ESCPR_MTID_OHP 9
#define ESCPR_MTID_BACKLIGHT 10
#define ESCPR_MTID_PGPHOTO 11
#define ESCPR_MTID_PSPHOTO 12
#define ESCPR_MTID_PLPHOTO 13
#define ESCPR_MTID_MCGLOSSY 14
#define ESCPR_MTID_ARCHMATTE 15
#define ESCPR_MTID_WATERCOLOR 16
#define ESCPR_MTID_PROGLOSS 17
#define ESCPR_MTID_MATTEBOARD 18
#define ESCPR_MTID_PHOTOGLOSS 19
#define ESCPR_MTID_SEMIPROOF 20
#define ESCPR_MTID_SUPERFINE2 21
#define ESCPR_MTID_DSMATTE 22
#define ESCPR_MTID_CLPHOTO 23
#define ESCPR_MTID_ECOPHOTO 24
#define ESCPR_MTID_VELVETFINEART 25
#define ESCPR_MTID_PROOFSEMI 26
#define ESCPR_MTID_HAGAKIRECL 27
#define ESCPR_MTID_HAGAKIINKJET 28
#define ESCPR_MTID_PHOTOINKJET2 29
#define ESCPR_MTID_DURABRITE 30
#define ESCPR_MTID_MATTEMEISHI 31
#define ESCPR_MTID_HAGAKIATENA 32
#define ESCPR_MTID_PHOTOALBUM 33
#define ESCPR_MTID_PHOTOSTAND 34
#define ESCPR_MTID_RCB 35
#define ESCPR_MTID_PGPHOTOEG 36
#define ESCPR_MTID_ENVELOPE 37
#define ESCPR_MTID_PLATINA 38
#define ESCPR_MTID_ULTRASMOOTH 39
#define ESCPR_MTID_CDDVD 91
#define ESCPR_MTID_CDDVDHIGH 92
#define ESCPR_MTID_CLEANING 99
/*=======================================================================================*/
/* Definition of Parameter for Print Quality */
/*=======================================================================================*/
/* PrintQuality */
#define ESCPR_PQ_DRAFT 0 /* Draft */
#define ESCPR_PQ_NORMAL 1 /* Normal */
#define ESCPR_PQ_HIGH 2 /* High */
/* ColorMono */
#define ESCPR_CM_COLOR 0 /* Color */
#define ESCPR_CM_MONOCHROME 1 /* Monochrome */
/* Brightness */
#define ESCPR_BRIGHT_DEF 0 /* Default */
/* Contrast */
#define ESCPR_CONT_DEF 0 /* Default */
/* Saturation */
#define ESCPR_SATU_DEF 0 /* Default */
/* ColorPlane */
#define ESCPR_CP_FULLCOLOR 0 /* Full Color */
#define ESCPR_CP_256COLOR 1 /* 256 Color */
/*=======================================================================================*/
/* Definition of Parameter for Print Job */
/*=======================================================================================*/
/* InResolution */
#define ESCPR_IR_3636 0 /* 360 x 360 dpi */
#define ESCPR_IR_7272 1 /* 720 x 720 dpi */
#define ESCPR_IR_3030 2 /* 300 x 300 dpi */
#define ESCPR_IR_6060 3 /* 600 x 600 dpi */
/* PrintDirection */
#define ESCPR_PD_BIDIREC 0 /* Bi-direction */
#define ESCPR_PD_UNIDIREC 1 /* Uni-direction */
/*=======================================================================================*/
/* Definition of Send Data */
/*=======================================================================================*/
/* CompMode */
#define ESCPR_COMP_NO 0 /* Non compression */
#define ESCPR_COMP_DONE 1 /* Runlength compression */
/*=======================================================================================*/
/* Definition of End Page */
/*=======================================================================================*/
#define ESCPR_END_PAGE 0 /* There is no next page */
#define ESCPR_NEXT_PAGE 1 /* There is a next page */
/*=======================================================================================*/
/* Definition of Error Code */
/*=======================================================================================*/
#define ESCPR_ERR_NOERROR 0 /* terminated normally */
#define ESCPR_ERR_NOT_SUPPORT -1 /* parameter aren't be supported. */
#define ESCPR_ERR_DON_T_PROCESS -2 /* on don't process this situation. */
#define ESCPR_ERR_CAN_T_FREE_HANDLE -3 /* can't free handle. */
#define ESCPR_ERR_CAN_T_ALLOC_MEMORY -4 /* can't allocate needed memory. */
#define ESCPR_ERR_HAPPEN_PROBLEM -10 /* happened any error. */
#define ESCPR_ERR_NOINBMP -20 /* doesn't get an input bitmap. */
#define ESCPR_ERR_NOATBMP -21 /* doesn't get an attribute bitmap. */
#define ESCPR_ERR_CAN_T_LOAD_DLL -30 /* can't load DLL */
#define ESCPR_ERR_SPOOL_IO -40 /* error with spooling i/o function */
#endif
|