xref: /plan9/sys/src/cmd/gs/src/gdevbjc.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 1995, 1997 Aladdin Enterprises.  All rights reserved.
2 
3   This software is provided AS-IS with no warranty, either express or
4   implied.
5 
6   This software is distributed under license and may not be copied,
7   modified or distributed except as expressly authorized under the terms
8   of the license contained in the file LICENSE in this distribution.
9 
10   For more information about licensing, please refer to
11   http://www.ghostscript.com/licensing/. For information on
12   commercial licensing, go to http://www.artifex.com/licensing/ or
13   contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14   San Rafael, CA  94903, U.S.A., +1(415)492-9861.
15 */
16 
17 /* $Id: gdevbjc.h,v 1.5 2002/10/07 08:28:56 ghostgum Exp $*/
18 
19 #ifndef gdevbjc_INCLUDED
20 #  define gdevbjc_INCLUDED
21 
22 /*
23  * Definitions for Canon BJC printers and the associated drivers.
24  *
25  * Copyright (C) Yves Arrouye <yves.arrouye@usa.net>, 1995, 1996.
26  *
27  */
28 
29 /*
30  * Please do read the definitions here and change the defaults if needed.
31  *
32  * Values that can be changed are all called BJC_DEFAULT_* for generic
33  * values and BJC600_DEFAULT_* or BJC800_DEFAULT_* for specific values.
34  *
35  */
36 
37 #ifndef _GDEV_BJC_H
38 #define _GDEV_CDJ_H
39 
40 /*
41  * Drivers names. I don't expect you to change them!
42  *
43  */
44 
45 #define BJC_BJC600		"bjc600"
46 #define BJC_BJC800		"bjc800"
47 
48 #define BJC_BJC600_VERSION	2.1700
49 #define BJC_BJC600_VERSIONSTR	"2.17.00 5/23/96 Yves Arrouye"
50 
51 #define BJC_BJC800_VERSION	2.1700
52 #define BJC_BJC800_VERSIONSTR	"2.17.00 5/23/96 Yves Arrouye"
53 
54 /*
55  * Hardware limits. May be adjusted eventually.
56  *
57  */
58 
59 #define BJC_PRINT_LIMIT		(3. / 25.4) 		/* In inches. */
60 #define BJC_A3_PRINT_LIMIT	(8. / 25.4)             /* In inches. */
61 
62 #define BJC_HARD_LOWER_LIMIT	(7. / 25.4)		/* In inches. */
63 #define BJC_USED_LOWER_LIMIT	(9.54 / 25.4)		/* In inches. */
64 #define BJC_RECD_LOWER_LIMIT	(12.7 / 25.4)		/* In inches. */
65 
66 #ifdef USE_RECOMMENDED_MARGINS
67 #define BJC_LOWER_LIMIT		BJC_RECD_LOWER_LIMIT
68 #undef BJC_DEFAULT_CENTEREDAREA
69 #define BJC_DEFAULT_CENTEREDAREA
70 #else
71 #ifdef USE_TIGHT_MARGINS
72 #define BJC_LOWER_LIMIT		BJC_HARD_LOWER_LIMIT	/* In inches. */
73 #else
74 #define BJC_LOWER_LIMIT		BJC_USED_LOWER_LIMIT	/* In inches. */
75 #endif
76 #endif
77 
78 #ifndef BJC600_MEDIAWEIGHT_THICKLIMIT
79 #define BJC600_MEDIAWEIGHT_THICKLIMIT	105		/* In g/m2. */
80 #endif
81 #ifndef BJC800_MEDIAWEIGHT_THICKLIMIT
82 #define BJC800_MEDIAWEIGHT_THICKLIMIT	BJC600_MEDIAWEIGHT_THICKLIMIT
83 #endif
84 
85 #define BJC_HEAD_ROWS 64	/* Number of heads. Do not change! */
86 
87 /*
88  * Margins resulting from the limits specified above.
89  *
90  * The margins are Left, Bottom, Right, Top and are expressed in inches.
91  * You should not change them, better change the limits above.
92  *
93  */
94 
95 #define BJC_MARGINS_LETTER \
96     (float)(6.5 / 25.4), (float)BJC_LOWER_LIMIT, \
97     (float)(6.5 / 25.4), (float)BJC_PRINT_LIMIT
98 #define BJC_MARGINS_A4 \
99     (float)(3.4 / 25.4), (float)BJC_LOWER_LIMIT, \
100     (float)(3.4 / 25.4), (float)BJC_PRINT_LIMIT
101 #define BJC_MARGINS_A3 \
102     (float)(4.0 / 25.4), (float)BJC_LOWER_LIMIT, \
103     (float)(4.0 / 25.4), (float)BJC_A3_PRINT_LIMIT
104 
105 /*
106  * Drivers options names.
107  *
108  */
109 
110 #define BJC_DEVINFO_VERSION		"Version"
111 #define BJC_DEVINFO_VERSIONSTRING	"VersionString"
112 
113 #define BJC_DEVINFO_OUTPUTFACEUP	"OutputFaceUp"
114 
115 #define BJC_OPTION_MANUALFEED		"ManualFeed"
116 #define BJC_OPTION_DITHERINGTYPE	"DitheringType"
117 #define BJC_OPTION_MEDIATYPE		"MediaType"
118 #define BJC_OPTION_MEDIAWEIGHT		"MediaWeight"
119 #define BJC_OPTION_PRINTQUALITY		"PrintQuality"
120 #define BJC_OPTION_COLORCOMPONENTS	"ColorComponents"
121 #define BJC_OPTION_PRINTCOLORS		"PrintColors"
122 #define BJC_OPTION_MONOCHROMEPRINT	"MonochromePrint"
123 
124 /*
125  * Definitions of parameters (options) values.
126  *
127  */
128 
129 #define BJC_MEDIA_PLAINPAPER		0
130 #define BJC_MEDIA_COATEDPAPER		1
131 #define BJC_MEDIA_TRANSPARENCYFILM	2
132 #define BJC_MEDIA_BACKPRINTFILM		3	/* Unused */
133 #define BJC_MEDIA_ENVELOPE		8
134 #define BJC_MEDIA_CARD			9
135 #define BJC_MEDIA_OTHER			15
136 
137 #define BJC_DITHER_NONE			0
138 #define BJC_DITHER_FS			1
139 
140 #define BJC_QUALITY_NORMAL		0
141 #define BJC_QUALITY_HIGH		1
142 #define BJC_QUALITY_DRAFT		2
143 #define BJC_QUALITY_LOW			3
144 
145 #define BJC_COLOR_ALLBLACK		0
146 #define BJC_COLOR_CYAN			1
147 #define BJC_COLOR_MAGENTA		2
148 #define BJC_COLOR_YELLOW		4
149 #define BJC_COLOR_BLACK			8
150 
151 #define BJC_COLOR_CMY	(BJC_COLOR_CYAN | BJC_COLOR_MAGENTA | BJC_COLOR_YELLOW)
152 #define BJC_COLOR_CMYK	(BJC_COLOR_CMY | BJC_COLOR_BLACK)
153 
154 /* Some compilers complain if this is a floating point value.... */
155 #define BJC_RESOLUTION_BASE		90
156 
157 #define BJC_RESOLUTION_LOW		(1 * BJC_RESOLUTION_BASE)
158 #define BJC_RESOLUTION_MEDIUM		(2 * BJC_RESOLUTION_BASE)
159 #define BJC_RESOLUTION_NORMAL		(4 * BJC_RESOLUTION_BASE)
160 
161 /*
162  * Default values for parameters (long).
163  *
164  * Generic values are first given, and driver-specific values are by default
165  * those generic values.
166  *
167  */
168 
169 #ifndef BJC_DEFAULT_MEDIATYPE
170 #define BJC_DEFAULT_MEDIATYPE		BJC_MEDIA_PLAINPAPER
171 #endif
172 #ifndef BJC_DEFAULT_PRINTQUALITY
173 #define BJC_DEFAULT_PRINTQUALITY	BJC_QUALITY_NORMAL
174 #endif
175 
176 #ifndef BJC_DEFAULT_DITHERINGTYPE
177 #define BJC_DEFAULT_DITHERINGTYPE	BJC_DITHER_FS
178 #endif
179 
180 #ifndef BJC_DEFAULT_MANUALFEED
181 #define BJC_DEFAULT_MANUALFEED		false
182 #endif
183 #ifndef BJC_DEFAULT_MONOCHROMEPRINT
184 #define BJC_DEFAULT_MONOCHROMEPRINT	false
185 #endif
186 
187 #ifndef BJC_DEFAULT_RESOLUTION
188 #define BJC_DEFAULT_RESOLUTION		BJC_RESOLUTION_NORMAL
189 #endif
190 
191 /* If you change the bits per pixel, change the color components. For
192    bpp = 1 color components = 1, bpp = 8 color components = { 1, 4},
193    bpp = { 16, 24, 32 } color components = 4, comps = { 3 }, bpp = { 24 }. */
194 
195 #ifndef BJC_DEFAULT_BITSPERPIXEL
196 #define BJC_DEFAULT_BITSPERPIXEL	24
197 #endif
198 #ifndef BJC_DEFAULT_COLORCOMPONENTS
199 #define BJC_DEFAULT_COLORCOMPONENTS	4
200 #endif
201 
202 /* You should not have to change these defaults */
203 
204 #ifndef BJC_DEFAULT_PRINTCOLORS
205 #define BJC_DEFAULT_PRINTCOLORS		BJC_COLOR_CMYK
206 #endif
207 #ifndef BJC_DEFAULT_MONOCHROMEPRINT
208 #define BJC_DEFAULT_MONOCHROMEPRINT	false
209 #endif
210 #ifndef BJC_DEFAULT_SETMEDIAWEIGHT
211 #define BJC_DEFAULT_SETMEDIAWEIGHT	0
212 #endif
213 #ifndef BJC_DEFAULT_MEDIAWEIGHT
214 #define BJC_DEFAULT_MEDIAWEIGHT		80
215 #endif
216 
217 /*
218  * Default values for the specific BJC drivers.
219  *
220  */
221 
222 #ifndef BJC600_DEFAULT_MEDIATYPE
223 #define BJC600_DEFAULT_MEDIATYPE        BJC_DEFAULT_MEDIATYPE
224 #endif
225 #ifndef BJC600_DEFAULT_PRINTQUALITY
226 #define BJC600_DEFAULT_PRINTQUALITY	BJC_DEFAULT_PRINTQUALITY
227 #endif
228 #ifndef BJC600_DEFAULT_DITHERINGTYPE
229 #define BJC600_DEFAULT_DITHERINGTYPE	BJC_DEFAULT_DITHERINGTYPE
230 #endif
231 #ifndef BJC600_DEFAULT_MANUALFEED
232 #define BJC600_DEFAULT_MANUALFEED	BJC_DEFAULT_MANUALFEED
233 #endif
234 #ifndef BJC600_DEFAULT_MONOCHROMEPRINT
235 #define BJC600_DEFAULT_MONOCHROMEPRINT	BJC_DEFAULT_MONOCHROMEPRINT
236 #endif
237 #ifndef BJC600_DEFAULT_RESOLUTION
238 #define BJC600_DEFAULT_RESOLUTION	BJC_DEFAULT_RESOLUTION
239 #endif
240 #ifndef BJC600_DEFAULT_BITSPERPIXEL
241 #define BJC600_DEFAULT_BITSPERPIXEL	BJC_DEFAULT_BITSPERPIXEL
242 #endif
243 #ifndef BJC600_DEFAULT_COLORCOMPONENTS
244 #define BJC600_DEFAULT_COLORCOMPONENTS	BJC_DEFAULT_COLORCOMPONENTS
245 #endif
246 #ifndef BJC600_DEFAULT_PRINTCOLORS
247 #define BJC600_DEFAULT_PRINTCOLORS	BJC_DEFAULT_PRINTCOLORS
248 #endif
249 #ifndef BJC600_DEFAULT_SETMEDIAWEIGHT
250 #define BJC600_DEFAULT_SETMEDIAWEIGHT	BJC_DEFAULT_SETMEDIAWEIGHT
251 #endif
252 #ifndef BJC600_DEFAULT_MEDIAWEIGHT
253 #define BJC600_DEFAULT_MEDIAWEIGHT	BJC_DEFAULT_MEDIAWEIGHT
254 #endif
255 
256 #ifndef BJC800_DEFAULT_MEDIATYPE
257 #define BJC800_DEFAULT_MEDIATYPE        BJC_DEFAULT_MEDIATYPE
258 #endif
259 #ifndef BJC800_DEFAULT_PRINTQUALITY
260 #define BJC800_DEFAULT_PRINTQUALITY	BJC_DEFAULT_PRINTQUALITY
261 #endif
262 #ifndef BJC800_DEFAULT_DITHERINGTYPE
263 #define BJC800_DEFAULT_DITHERINGTYPE	BJC_DEFAULT_DITHERINGTYPE
264 #endif
265 #ifndef BJC800_DEFAULT_MANUALFEED
266 #define BJC800_DEFAULT_MANUALFEED	BJC_DEFAULT_MANUALFEED
267 #endif
268 #ifndef BJC800_DEFAULT_RESOLUTION
269 #define BJC800_DEFAULT_RESOLUTION	BJC_DEFAULT_RESOLUTION
270 #endif
271 #ifndef BJC800_DEFAULT_BITSPERPIXEL
272 #define BJC800_DEFAULT_BITSPERPIXEL	BJC_DEFAULT_BITSPERPIXEL
273 #endif
274 #ifndef BJC800_DEFAULT_COLORCOMPONENTS
275 #define BJC800_DEFAULT_COLORCOMPONENTS	BJC_DEFAULT_COLORCOMPONENTS
276 #endif
277 #ifndef BJC800_DEFAULT_PRINTCOLORS
278 #define BJC800_DEFAULT_PRINTCOLORS	BJC_DEFAULT_PRINTCOLORS
279 #endif
280 #ifndef BJC800_DEFAULT_SETMEDIAWEIGHT
281 #define BJC800_DEFAULT_SETMEDIAWEIGHT	BJC_DEFAULT_SETMEDIAWEIGHT
282 #endif
283 #ifndef BJC800_DEFAULT_MEDIAWEIGHT
284 #define BJC800_DEFAULT_MEDIAWEIGHT	BJC_DEFAULT_MEDIAWEIGHT
285 #endif
286 
287 #endif /* _GDEVBJC_H */
288 
289 #endif				/* gdevbjc_INCLUDED */
290