2
* Raster file definitions for the Common UNIX Printing System (CUPS).
4
* Copyright 1997-2006 by Easy Software Products.
6
* This file is part of the CUPS Imaging library.
8
* These coded instructions, statements, and computer programs are the
9
* property of Easy Software Products and are protected by Federal
10
* copyright law. Distribution and use rights are outlined in the file
11
* "LICENSE.txt" which should have been included with this file. If this
12
* file is missing or damaged please contact Easy Software Products
15
* Attn: CUPS Licensing Information
16
* Easy Software Products
17
* 44141 Airport View Drive, Suite 204
18
* Hollywood, Maryland 20636 USA
20
* Voice: (301) 373-9600
21
* EMail: cups-info@cups.org
22
* WWW: http://www.cups.org
24
* This code and any derivative of it may be used and distributed
25
* freely under the terms of the GNU General Public License when
26
* used with GNU/GPL Ghostscript or its derivatives. Use of the
27
* code (or any derivative of it) with software other than GNU/GPL
28
* GhostScript (or its derivatives) is governed by the CUPS license
31
* This file is subject to the Apple OS-Developed Software exception.
34
#ifndef _CUPS_RASTER_H_
35
# define _CUPS_RASTER_H_
41
# define CUPS_RASTER_SYNC 0x52615333 /* RaS3 */
42
# define CUPS_RASTER_REVSYNC 0x33536152 /* 3SaR */
44
# define CUPS_RASTER_SYNCv1 0x52615374 /* RaSt */
45
# define CUPS_RASTER_REVSYNCv1 0x74536152 /* tSaR */
47
# define CUPS_RASTER_SYNCv2 0x52615332 /* RaS2 */
48
# define CUPS_RASTER_REVSYNCv2 0x32536152 /* 2SaR */
55
typedef enum cups_bool_e /**** Boolean type ****/
57
CUPS_FALSE = 0, /* Logical false */
58
CUPS_TRUE = 1 /* Logical true */
61
typedef enum cups_jog_e /**** Jog attribute values ****/
63
CUPS_JOG_NONE = 0, /* Never move pages */
64
CUPS_JOG_FILE = 1, /* Move pages after this file */
65
CUPS_JOG_JOB = 2, /* Move pages after this job */
66
CUPS_JOG_SET = 3 /* Move pages after this set */
69
typedef enum cups_orient_e /**** Orientation attribute values ****/
71
CUPS_ORIENT_0 = 0, /* Don't rotate the page */
72
CUPS_ORIENT_90 = 1, /* Rotate the page counter-clockwise */
73
CUPS_ORIENT_180 = 2, /* Turn the page upside down */
74
CUPS_ORIENT_270 = 3 /* Rotate the page clockwise */
77
typedef enum cups_cut_e /**** CutMedia attribute values ****/
79
CUPS_CUT_NONE = 0, /* Never cut the roll */
80
CUPS_CUT_FILE = 1, /* Cut the roll after this file */
81
CUPS_CUT_JOB = 2, /* Cut the roll after this job */
82
CUPS_CUT_SET = 3, /* Cut the roll after this set */
83
CUPS_CUT_PAGE = 4 /* Cut the roll after this page */
86
typedef enum cups_adv_e /**** AdvanceMedia attribute values ****/
88
CUPS_ADVANCE_NONE = 0, /* Never advance the roll */
89
CUPS_ADVANCE_FILE = 1, /* Advance the roll after this file */
90
CUPS_ADVANCE_JOB = 2, /* Advance the roll after this job */
91
CUPS_ADVANCE_SET = 3, /* Advance the roll after this set */
92
CUPS_ADVANCE_PAGE = 4 /* Advance the roll after this page */
95
typedef enum cups_edge_e /**** LeadingEdge attribute values ****/
97
CUPS_EDGE_TOP = 0, /* Leading edge is the top of the page */
98
CUPS_EDGE_RIGHT = 1, /* Leading edge is the right of the page */
99
CUPS_EDGE_BOTTOM = 2, /* Leading edge is the bottom of the page */
100
CUPS_EDGE_LEFT = 3 /* Leading edge is the left of the page */
103
typedef enum cups_order_e /**** cupsColorOrder attribute values ****/
105
CUPS_ORDER_CHUNKED = 0, /* CMYK CMYK CMYK ... */
106
CUPS_ORDER_BANDED = 1, /* CCC MMM YYY KKK ... */
107
CUPS_ORDER_PLANAR = 2 /* CCC ... MMM ... YYY ... KKK ... */
110
typedef enum cups_cspace_e /**** cupsColorSpace attribute values ****/
112
CUPS_CSPACE_W = 0, /* Luminance */
113
CUPS_CSPACE_RGB = 1, /* Red, green, blue */
114
CUPS_CSPACE_RGBA = 2, /* Red, green, blue, alpha */
115
CUPS_CSPACE_K = 3, /* Black */
116
CUPS_CSPACE_CMY = 4, /* Cyan, magenta, yellow */
117
CUPS_CSPACE_YMC = 5, /* Yellow, magenta, cyan */
118
CUPS_CSPACE_CMYK = 6, /* Cyan, magenta, yellow, black */
119
CUPS_CSPACE_YMCK = 7, /* Yellow, magenta, cyan, black */
120
CUPS_CSPACE_KCMY = 8, /* Black, cyan, magenta, yellow */
121
CUPS_CSPACE_KCMYcm = 9, /* Black, cyan, magenta, yellow, *
122
* light-cyan, light-magenta */
123
CUPS_CSPACE_GMCK = 10, /* Gold, magenta, yellow, black */
124
CUPS_CSPACE_GMCS = 11, /* Gold, magenta, yellow, silver */
125
CUPS_CSPACE_WHITE = 12, /* White ink (as black) */
126
CUPS_CSPACE_GOLD = 13, /* Gold foil */
127
CUPS_CSPACE_SILVER = 14, /* Silver foil */
129
CUPS_CSPACE_CIEXYZ = 15, /* CIE XYZ @since CUPS 1.1.19@ */
130
CUPS_CSPACE_CIELab = 16, /* CIE Lab @since CUPS 1.1.19@ */
131
CUPS_CSPACE_RGBW = 17, /* Red, green, blue, white @since CUPS 1.2@ */
133
CUPS_CSPACE_ICC1 = 32, /* ICC-based, 1 color @since CUPS 1.1.19@ */
134
CUPS_CSPACE_ICC2 = 33, /* ICC-based, 2 colors @since CUPS 1.1.19@ */
135
CUPS_CSPACE_ICC3 = 34, /* ICC-based, 3 colors @since CUPS 1.1.19@ */
136
CUPS_CSPACE_ICC4 = 35, /* ICC-based, 4 colors @since CUPS 1.1.19@ */
137
CUPS_CSPACE_ICC5 = 36, /* ICC-based, 5 colors @since CUPS 1.1.19@ */
138
CUPS_CSPACE_ICC6 = 37, /* ICC-based, 6 colors @since CUPS 1.1.19@ */
139
CUPS_CSPACE_ICC7 = 38, /* ICC-based, 7 colors @since CUPS 1.1.19@ */
140
CUPS_CSPACE_ICC8 = 39, /* ICC-based, 8 colors @since CUPS 1.1.19@ */
141
CUPS_CSPACE_ICC9 = 40, /* ICC-based, 9 colors @since CUPS 1.1.19@ */
142
CUPS_CSPACE_ICCA = 41, /* ICC-based, 10 colors @since CUPS 1.1.19@ */
143
CUPS_CSPACE_ICCB = 42, /* ICC-based, 11 colors @since CUPS 1.1.19@ */
144
CUPS_CSPACE_ICCC = 43, /* ICC-based, 12 colors @since CUPS 1.1.19@ */
145
CUPS_CSPACE_ICCD = 44, /* ICC-based, 13 colors @since CUPS 1.1.19@ */
146
CUPS_CSPACE_ICCE = 45, /* ICC-based, 14 colors @since CUPS 1.1.19@ */
147
CUPS_CSPACE_ICCF = 46 /* ICC-based, 15 colors @since CUPS 1.1.19@ */
152
* The page header structure contains the standard PostScript page device
153
* dictionary, along with some CUPS-specific parameters that are provided
156
* The API supports a "version 1" (from CUPS 1.0 and 1.1) and a "version 2"
157
* (from CUPS 1.2 and higher) page header, for binary compatibility.
160
typedef struct cups_page_header_s /**** Version 1 Page Header ****/
162
/**** Standard Page Device Dictionary String Values ****/
163
char MediaClass[64]; /* MediaClass string */
164
char MediaColor[64]; /* MediaColor string */
165
char MediaType[64]; /* MediaType string */
166
char OutputType[64]; /* OutputType string */
168
/**** Standard Page Device Dictionary Integer Values ****/
169
unsigned AdvanceDistance; /* AdvanceDistance value in points */
170
cups_adv_t AdvanceMedia; /* AdvanceMedia value (see above) */
171
cups_bool_t Collate; /* Collated copies value */
172
cups_cut_t CutMedia; /* CutMedia value (see above) */
173
cups_bool_t Duplex; /* Duplexed (double-sided) value */
174
unsigned HWResolution[2]; /* Resolution in dots-per-inch */
175
unsigned ImagingBoundingBox[4]; /* Pixel region that is painted (points) */
176
cups_bool_t InsertSheet; /* InsertSheet value */
177
cups_jog_t Jog; /* Jog value (see above) */
178
cups_edge_t LeadingEdge; /* LeadingEdge value (see above) */
179
unsigned Margins[2]; /* Lower-lefthand margins in points */
180
cups_bool_t ManualFeed; /* ManualFeed value */
181
unsigned MediaPosition; /* MediaPosition value */
182
unsigned MediaWeight; /* MediaWeight value in grams/m^2 */
183
cups_bool_t MirrorPrint; /* MirrorPrint value */
184
cups_bool_t NegativePrint; /* NegativePrint value */
185
unsigned NumCopies; /* Number of copies to produce */
186
cups_orient_t Orientation; /* Orientation value (see above) */
187
cups_bool_t OutputFaceUp; /* OutputFaceUp value */
188
unsigned PageSize[2]; /* Width and length of page in points */
189
cups_bool_t Separations; /* Separations value */
190
cups_bool_t TraySwitch; /* TraySwitch value */
191
cups_bool_t Tumble; /* Tumble value */
193
/**** CUPS Page Device Dictionary Values ****/
194
unsigned cupsWidth; /* Width of page image in pixels */
195
unsigned cupsHeight; /* Height of page image in pixels */
196
unsigned cupsMediaType; /* Media type code */
197
unsigned cupsBitsPerColor; /* Number of bits for each color */
198
unsigned cupsBitsPerPixel; /* Number of bits for each pixel */
199
unsigned cupsBytesPerLine; /* Number of bytes per line */
200
cups_order_t cupsColorOrder; /* Order of colors */
201
cups_cspace_t cupsColorSpace; /* True colorspace */
202
unsigned cupsCompression; /* Device compression to use */
203
unsigned cupsRowCount; /* Rows per band */
204
unsigned cupsRowFeed; /* Feed between bands */
205
unsigned cupsRowStep; /* Spacing between lines */
206
} cups_page_header_t;
208
typedef struct cups_page_header2_s /**** Version 2 Page Header @since CUPS 1.2@ ****/
210
/**** Version 2 Dictionary Values ****/
211
unsigned cupsNumColors; /* Number of colors */
212
float cupsBorderlessScalingFactor;
213
/* Scaling that was applied to page data */
214
float cupsPageSize[2]; /* Floating point PageSize (scaling *
215
* factor not applied) */
216
float cupsImagingBBox[4]; /* Floating point ImagingBoundingBox *
217
* (scaling factor not applied) */
218
unsigned cupsInteger[16]; /* User-defined integer values */
219
float cupsReal[16]; /* User-defined floating-point values */
220
char cupsString[16][64]; /* User-defined string values */
221
char cupsMarkerType[64]; /* Ink/toner type */
222
char cupsRenderingIntent[64];/* Color rendering intent */
223
char cupsPageSizeName[64]; /* PageSize name */
224
} cups_page_header2_t;
226
#endif /* !_CUPS_RASTER_H_ */