1 /* Copyright (C) EPSON SOFTWARE DEVELOPMENT LABORATORY 1999, 2000
2                             Maintenance by EPSON KOWA
3 
4    Ghostscript printer driver for EPSON ESC/Page-Color
5 
6    This software is distributed in the hope that it will be useful, but
7    WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
8    to anyone for the consequences of using it or for whether it serves any
9    particular purpose or works at all, unless he says so in writing.  Refer
10    to the GNU General Public License for full details.
11 
12    Everyone is granted permission to copy, modify and redistribute
13    this software, but only under the conditions described in the GNU
14    General Public License.  A copy of this license is supposed to have been
15    given to you along with this software so you can know your rights and
16    responsibilities.  It should be in a file named COPYING.  Among other
17    things, the copyright notice and this notice must be preserved on all
18    copies.
19  */
20 
21 /*$Id: gdevescv.h,v 1.1 2004/05/17 05:25:19 ishii Exp $ */
22 /* Common header file for ESC/Page-Color driver */
23 
24 #define TRUE		1
25 #define FALSE		0
26 
27 #define	GS		(0x1d)
28 #define	ESC_GS		"\035"
29 #define	ESC_FF		"\014"
30 #define	ESC_CR		"\015"
31 #define	ESC_LF		"\012"
32 #define	ESC_BS		"\010"
33 
34 #define	POINT					72
35 #define	MMETER_PER_INCH				25.4
36 
37 #define	ESCPAGE_DEFAULT_WIDTH			(4840)
38 #define	ESCPAGE_DEFAULT_HEIGHT			(6896)
39 
40 #if 0
41 #define	ESCPAGE_DEFAULT_WIDTH			(4720 + 5. / (MMETER_PER_INCH / POINT))
42 #define	ESCPAGE_DEFAULT_HEIGHT			(6772 + 5. / (MMETER_PER_INCH / POINT))
43 
44 #define	ESCPAGE_DEFAULT_WIDTH			(4960 - 5. / (MMETER_PER_INCH / POINT))
45 #define	ESCPAGE_DEFAULT_HEIGHT			(7016 - 5. / (MMETER_PER_INCH / POINT))
46 #endif
47 
48 #define	ESCPAGE_LEFT_MARGIN_DEFAULT		5. / (MMETER_PER_INCH / POINT)
49 #define	ESCPAGE_BOTTOM_MARGIN_DEFAULT		5. / (MMETER_PER_INCH / POINT)
50 #define	ESCPAGE_RIGHT_MARGIN_DEFAULT		5. / (MMETER_PER_INCH / POINT)
51 #define	ESCPAGE_TOP_MARGIN_DEFAULT		5. / (MMETER_PER_INCH / POINT)
52 
53 struct node {
54     long		byte;
55     char		*buf;
56     struct node		*next;
57 };
58 
59 
60 #define		BUFCHECK(x)		\
61 	if (strlen(obuf) > x) {		\
62 	    (void)fprintf(stderr, "overflow %d : LINE %d\n", strlen(obuf), __LINE__); \
63 	}
64 
65 
66 
67 #define ESCPAGE_OPTION_MANUALFEED		"ManualFeed"		/* �ѻ�ȥ쥤 */
68 #define ESCPAGE_OPTION_CASSETFEED		"Casset"		/* ���ȥ쥤 */
69 #define ESCPAGE_OPTION_FACEUP			"FaceUp"		/* �ӻ�ȥ쥤 */
70 #define ESCPAGE_OPTION_DUPLEX			"Duplex"		/* ξ�̰��� */
71 #define ESCPAGE_OPTION_DUPLEX_TUMBLE		"Tumble"		/* �Ȥ����� */
72 #define ESCPAGE_OPTION_MEDIATYPE		"MediaType"		/* ��� */
73 #define	ESCPAGE_OPTION_RIT			"RITOff"		/* RIT */
74 #define	ESCPAGE_OPTION_LANDSCAPE		"Landscape"		/* LANDSCAPE */
75 #define ESCPAGE_OPTION_TONERDENSITY		"TonerDensity"		/* �ȥʡ�ǻ�� */
76 #define ESCPAGE_OPTION_TONERSAVING		"TonerSaving"		/* �ȥʡ������� */
77 #define ESCPAGE_OPTION_COLLATE			"Collate"		/* �������� */
78 
79 #define ESCPAGE_TUMBLE_DEFAULT			FALSE			/* Long age */
80 #define ESCPAGE_RIT_DEFAULT			FALSE
81 #define ESCPAGE_FACEUP_DEFAULT			FALSE
82 #define ESCPAGE_FACEUP_DEFAULT			FALSE
83 
84 #define ESCPAGE_MEDIATYPE_DEFAULT		0			/* NORMAL */
85 #define ESCPAGE_MEDIACHAR_MAX			32
86 
87 #define ESCPAGE_MANUALFEED_DEFAULT		FALSE
88 #define ESCPAGE_CASSETFEED_DEFAULT		0
89 
90 #define	ESCPAGE_DPI_MIN				60
91 #define	ESCPAGE_DPI_MAX				600
92 #define	ESCPAGE_DPI_SUPERFINE			1200
93 
94 #define ESCPAGE_A3_HEIGHT			1190
95 #define ESCPAGE_A3_WIDTH			842
96 #define ESCPAGE_POSTCARD_HEIGHT			419
97 #define ESCPAGE_POSTCARD_WIDTH			284
98 #define ESCPAGE_LETTER_HEIGHT			792
99 #define ESCPAGE_LETTER_WIDTH			612
100 #define ESCPAGE_LEDGER_HEIGHT			1224
101 #define ESCPAGE_LEDGER_WIDTH			ESCPAGE_LETTER_HEIGHT
102 
103 #define ESCPAGE_HEIGHT_MAX			ESCPAGE_A3_HEIGHT
104 #define ESCPAGE_WIDTH_MAX			ESCPAGE_A3_WIDTH
105 #define ESCPAGE_HEIGHT_MIN			ESCPAGE_POSTCARD_HEIGHT
106 #define ESCPAGE_WIDTH_MIN			ESCPAGE_POSTCARD_WIDTH
107 
108 #define EP_COMPRESS5				(5 << 16)
109 #define EP_COMPRESS20				(20 << 16)
110 #define EP_COMPRESS30				(30 << 16)
111 
112 #define RES1200					ESCPAGE_DPI_SUPERFINE
113 #define RES600					ESCPAGE_DPI_MAX
114 #define JPN					TRUE
115 #define ENG					FALSE
116