]> git.ipfire.org Git - thirdparty/cups.git/blame - cups/raster.h
Use IPP printer-state-reasons localizations instead of the old English strings.
[thirdparty/cups.git] / cups / raster.h
CommitLineData
ef416fc2 1/*
6e5a57e8 2 * Raster file definitions for CUPS.
ef416fc2 3 *
3e679a29 4 * Copyright 2007-2016 by Apple Inc.
6e5a57e8 5 * Copyright 1997-2006 by Easy Software Products.
ef416fc2 6 *
6e5a57e8 7 * This file is part of the CUPS Imaging library.
ef416fc2 8 *
e3101897 9 * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
ef416fc2 10 */
11
12#ifndef _CUPS_RASTER_H_
13# define _CUPS_RASTER_H_
14
15/*
16 * Include necessary headers...
17 */
18
aaf19ab0 19# include "cups.h"
aaf19ab0 20
ef416fc2 21
22# ifdef __cplusplus
23extern "C" {
24# endif /* __cplusplus */
25
26/*
27 * Every non-PostScript printer driver that supports raster images
28 * should use the application/vnd.cups-raster image file format.
29 * Since both the PostScript RIP (pstoraster, based on GNU/GPL
30 * Ghostscript) and Image RIP (imagetoraster, located in the filter
31 * directory) use it, using this format saves you a lot of work.
32 * Also, the PostScript RIP passes any printer options that are in
33 * a PS file to your driver this way as well...
34 */
35
36/*
37 * Constants...
38 */
39
ed486911 40# define CUPS_RASTER_SYNC 0x52615333 /* RaS3 */
41# define CUPS_RASTER_REVSYNC 0x33536152 /* 3SaR */
ef416fc2 42
43# define CUPS_RASTER_SYNCv1 0x52615374 /* RaSt */
44# define CUPS_RASTER_REVSYNCv1 0x74536152 /* tSaR */
45
ed486911 46# define CUPS_RASTER_SYNCv2 0x52615332 /* RaS2 */
47# define CUPS_RASTER_REVSYNCv2 0x32536152 /* 2SaR */
48
05fa7028
MS
49# define CUPS_RASTER_SYNCapple 0x554E4952 /* UNIR */
50# define CUPS_RASTER_REVSYNCapple 0x52494E55 /* RINU */
51
c8fef167
MS
52# define CUPS_RASTER_SYNC_PWG CUPS_RASTER_SYNCv2
53
ef416fc2 54/*
55 * The following definition can be used to determine if the
56 * colorimetric colorspaces (CIEXYZ, CIELAB, and ICCn) are
57 * defined...
58 */
59
60# define CUPS_RASTER_HAVE_COLORIMETRIC 1
61
07ed0e9a
MS
62/*
63 * The following definition can be used to determine if the
64 * device colorspaces (DEVICEn) are defined...
65 */
66
67# define CUPS_RASTER_HAVE_DEVICE 1
68
69/*
70 * The following definition can be used to determine if PWG Raster is supported.
71 */
72
73# define CUPS_RASTER_HAVE_PWGRASTER 1
74
05fa7028
MS
75/*
76 * The following definition can be used to determine if Apple Raster is
77 * supported (beta).
78 */
79
80# define CUPS_RASTER_HAVE_APPLERASTER 1
81
3e679a29
MS
82/*
83 * The following PWG 5102.4 definitions specify indices into the
84 * cupsInteger[] array in the raster header.
85 */
86
87# define CUPS_RASTER_PWG_TotalPageCount 0
88# define CUPS_RASTER_PWG_CrossFeedTransform 1
89# define CUPS_RASTER_PWG_FeedTransform 2
90# define CUPS_RASTER_PWG_ImageBoxLeft 3
91# define CUPS_RASTER_PWG_ImageBoxTop 4
92# define CUPS_RASTER_PWG_ImageBoxRight 5
93# define CUPS_RASTER_PWG_ImageBoxBottom 6
94# define CUPS_RASTER_PWG_AlternatePrimary 7
95# define CUPS_RASTER_PWG_PrintQuality 8
96# define CUPS_RASTER_PWG_VendorIdentifier 14
97# define CUPS_RASTER_PWG_VendorLength 15
98
99
100
ef416fc2 101
102/*
103 * Types...
104 */
105
ef416fc2 106typedef enum cups_adv_e /**** AdvanceMedia attribute values ****/
107{
108 CUPS_ADVANCE_NONE = 0, /* Never advance the roll */
109 CUPS_ADVANCE_FILE = 1, /* Advance the roll after this file */
110 CUPS_ADVANCE_JOB = 2, /* Advance the roll after this job */
111 CUPS_ADVANCE_SET = 3, /* Advance the roll after this set */
112 CUPS_ADVANCE_PAGE = 4 /* Advance the roll after this page */
113} cups_adv_t;
114
b86bc4cf 115typedef enum cups_bool_e /**** Boolean type ****/
ef416fc2 116{
b86bc4cf 117 CUPS_FALSE = 0, /* Logical false */
118 CUPS_TRUE = 1 /* Logical true */
119} cups_bool_t;
ef416fc2 120
121typedef enum cups_cspace_e /**** cupsColorSpace attribute values ****/
122{
c7017ecc
MS
123 CUPS_CSPACE_W = 0, /* Luminance (DeviceGray, gamma 2.2 by default) */
124 CUPS_CSPACE_RGB = 1, /* Red, green, blue (DeviceRGB, sRGB by default) */
125 CUPS_CSPACE_RGBA = 2, /* Red, green, blue, alpha (DeviceRGB, sRGB by default) */
126 CUPS_CSPACE_K = 3, /* Black (DeviceK) */
127 CUPS_CSPACE_CMY = 4, /* Cyan, magenta, yellow (DeviceCMY) */
128 CUPS_CSPACE_YMC = 5, /* Yellow, magenta, cyan @deprecated@ */
129 CUPS_CSPACE_CMYK = 6, /* Cyan, magenta, yellow, black (DeviceCMYK) */
130 CUPS_CSPACE_YMCK = 7, /* Yellow, magenta, cyan, black @deprecated@ */
131 CUPS_CSPACE_KCMY = 8, /* Black, cyan, magenta, yellow @deprecated@ */
132 CUPS_CSPACE_KCMYcm = 9, /* Black, cyan, magenta, yellow, light-cyan, light-magenta @deprecated@ */
133 CUPS_CSPACE_GMCK = 10, /* Gold, magenta, yellow, black @deprecated@ */
134 CUPS_CSPACE_GMCS = 11, /* Gold, magenta, yellow, silver @deprecated@ */
135 CUPS_CSPACE_WHITE = 12, /* White ink (as black) @deprecated@ */
136 CUPS_CSPACE_GOLD = 13, /* Gold foil @deprecated@ */
137 CUPS_CSPACE_SILVER = 14, /* Silver foil @deprecated@ */
ef416fc2 138
8072030b
MS
139 CUPS_CSPACE_CIEXYZ = 15, /* CIE XYZ @since CUPS 1.1.19/macOS 10.3@ */
140 CUPS_CSPACE_CIELab = 16, /* CIE Lab @since CUPS 1.1.19/macOS 10.3@ */
141 CUPS_CSPACE_RGBW = 17, /* Red, green, blue, white (DeviceRGB, sRGB by default) @since CUPS 1.2/macOS 10.5@ */
c7017ecc
MS
142 CUPS_CSPACE_SW = 18, /* Luminance (gamma 2.2) @since CUPS 1.4.5@ */
143 CUPS_CSPACE_SRGB = 19, /* Red, green, blue (sRGB) @since CUPS 1.4.5@ */
144 CUPS_CSPACE_ADOBERGB = 20, /* Red, green, blue (Adobe RGB) @since CUPS 1.4.5@ */
ef416fc2 145
8072030b
MS
146 CUPS_CSPACE_ICC1 = 32, /* ICC-based, 1 color @since CUPS 1.1.19/macOS 10.3@ */
147 CUPS_CSPACE_ICC2 = 33, /* ICC-based, 2 colors @since CUPS 1.1.19/macOS 10.3@ */
148 CUPS_CSPACE_ICC3 = 34, /* ICC-based, 3 colors @since CUPS 1.1.19/macOS 10.3@ */
149 CUPS_CSPACE_ICC4 = 35, /* ICC-based, 4 colors @since CUPS 1.1.19/macOS 10.3@ */
150 CUPS_CSPACE_ICC5 = 36, /* ICC-based, 5 colors @since CUPS 1.1.19/macOS 10.3@ */
151 CUPS_CSPACE_ICC6 = 37, /* ICC-based, 6 colors @since CUPS 1.1.19/macOS 10.3@ */
152 CUPS_CSPACE_ICC7 = 38, /* ICC-based, 7 colors @since CUPS 1.1.19/macOS 10.3@ */
153 CUPS_CSPACE_ICC8 = 39, /* ICC-based, 8 colors @since CUPS 1.1.19/macOS 10.3@ */
154 CUPS_CSPACE_ICC9 = 40, /* ICC-based, 9 colors @since CUPS 1.1.19/macOS 10.3@ */
155 CUPS_CSPACE_ICCA = 41, /* ICC-based, 10 colors @since CUPS 1.1.19/macOS 10.3@ */
156 CUPS_CSPACE_ICCB = 42, /* ICC-based, 11 colors @since CUPS 1.1.19/macOS 10.3@ */
157 CUPS_CSPACE_ICCC = 43, /* ICC-based, 12 colors @since CUPS 1.1.19/macOS 10.3@ */
158 CUPS_CSPACE_ICCD = 44, /* ICC-based, 13 colors @since CUPS 1.1.19/macOS 10.3@ */
159 CUPS_CSPACE_ICCE = 45, /* ICC-based, 14 colors @since CUPS 1.1.19/macOS 10.3@ */
160 CUPS_CSPACE_ICCF = 46, /* ICC-based, 15 colors @since CUPS 1.1.19/macOS 10.3@ */
c7017ecc
MS
161
162 CUPS_CSPACE_DEVICE1 = 48, /* DeviceN, 1 color @since CUPS 1.4.5@ */
163 CUPS_CSPACE_DEVICE2 = 49, /* DeviceN, 2 colors @since CUPS 1.4.5@ */
164 CUPS_CSPACE_DEVICE3 = 50, /* DeviceN, 3 colors @since CUPS 1.4.5@ */
165 CUPS_CSPACE_DEVICE4 = 51, /* DeviceN, 4 colors @since CUPS 1.4.5@ */
166 CUPS_CSPACE_DEVICE5 = 52, /* DeviceN, 5 colors @since CUPS 1.4.5@ */
167 CUPS_CSPACE_DEVICE6 = 53, /* DeviceN, 6 colors @since CUPS 1.4.5@ */
168 CUPS_CSPACE_DEVICE7 = 54, /* DeviceN, 7 colors @since CUPS 1.4.5@ */
169 CUPS_CSPACE_DEVICE8 = 55, /* DeviceN, 8 colors @since CUPS 1.4.5@ */
170 CUPS_CSPACE_DEVICE9 = 56, /* DeviceN, 9 colors @since CUPS 1.4.5@ */
171 CUPS_CSPACE_DEVICEA = 57, /* DeviceN, 10 colors @since CUPS 1.4.5@ */
172 CUPS_CSPACE_DEVICEB = 58, /* DeviceN, 11 colors @since CUPS 1.4.5@ */
173 CUPS_CSPACE_DEVICEC = 59, /* DeviceN, 12 colors @since CUPS 1.4.5@ */
174 CUPS_CSPACE_DEVICED = 60, /* DeviceN, 13 colors @since CUPS 1.4.5@ */
175 CUPS_CSPACE_DEVICEE = 61, /* DeviceN, 14 colors @since CUPS 1.4.5@ */
176 CUPS_CSPACE_DEVICEF = 62 /* DeviceN, 15 colors @since CUPS 1.4.5@ */
ef416fc2 177} cups_cspace_t;
178
b86bc4cf 179typedef enum cups_cut_e /**** CutMedia attribute values ****/
180{
181 CUPS_CUT_NONE = 0, /* Never cut the roll */
182 CUPS_CUT_FILE = 1, /* Cut the roll after this file */
183 CUPS_CUT_JOB = 2, /* Cut the roll after this job */
184 CUPS_CUT_SET = 3, /* Cut the roll after this set */
185 CUPS_CUT_PAGE = 4 /* Cut the roll after this page */
186} cups_cut_t;
187
188typedef enum cups_edge_e /**** LeadingEdge attribute values ****/
189{
190 CUPS_EDGE_TOP = 0, /* Leading edge is the top of the page */
191 CUPS_EDGE_RIGHT = 1, /* Leading edge is the right of the page */
192 CUPS_EDGE_BOTTOM = 2, /* Leading edge is the bottom of the page */
193 CUPS_EDGE_LEFT = 3 /* Leading edge is the left of the page */
194} cups_edge_t;
195
196typedef enum cups_jog_e /**** Jog attribute values ****/
197{
198 CUPS_JOG_NONE = 0, /* Never move pages */
199 CUPS_JOG_FILE = 1, /* Move pages after this file */
200 CUPS_JOG_JOB = 2, /* Move pages after this job */
201 CUPS_JOG_SET = 3 /* Move pages after this set */
202} cups_jog_t;
203
5a738aea 204enum cups_mode_e /**** cupsRasterOpen modes ****/
b86bc4cf 205{
206 CUPS_RASTER_READ = 0, /* Open stream for reading */
f7deaa1a 207 CUPS_RASTER_WRITE = 1, /* Open stream for writing */
8072030b 208 CUPS_RASTER_WRITE_COMPRESSED = 2, /* Open stream for compressed writing @since CUPS 1.3/macOS 10.5@ */
05fa7028
MS
209 CUPS_RASTER_WRITE_PWG = 3, /* Open stream for compressed writing in PWG Raster mode @since CUPS 1.5/macOS 10.7@ */
210 CUPS_RASTER_WRITE_APPLE = 4 /* Open stream for compressed writing in AppleRaster mode (beta) @private@ */
5a738aea
MS
211};
212
213typedef enum cups_mode_e cups_mode_t; /**** cupsRasterOpen modes ****/
b86bc4cf 214
215typedef enum cups_order_e /**** cupsColorOrder attribute values ****/
216{
217 CUPS_ORDER_CHUNKED = 0, /* CMYK CMYK CMYK ... */
218 CUPS_ORDER_BANDED = 1, /* CCC MMM YYY KKK ... */
219 CUPS_ORDER_PLANAR = 2 /* CCC ... MMM ... YYY ... KKK ... */
220} cups_order_t;
221
222typedef enum cups_orient_e /**** Orientation attribute values ****/
223{
224 CUPS_ORIENT_0 = 0, /* Don't rotate the page */
225 CUPS_ORIENT_90 = 1, /* Rotate the page counter-clockwise */
226 CUPS_ORIENT_180 = 2, /* Turn the page upside down */
227 CUPS_ORIENT_270 = 3 /* Rotate the page clockwise */
228} cups_orient_t;
229
ef416fc2 230
231/*
232 * The page header structure contains the standard PostScript page device
233 * dictionary, along with some CUPS-specific parameters that are provided
234 * by the RIPs...
235 *
236 * The API supports a "version 1" (from CUPS 1.0 and 1.1) and a "version 2"
237 * (from CUPS 1.2 and higher) page header, for binary compatibility.
238 */
239
db0bd74a 240typedef struct cups_page_header_s /**** Version 1 page header @deprecated@ ****/
ef416fc2 241{
242 /**** Standard Page Device Dictionary String Values ****/
243 char MediaClass[64]; /* MediaClass string */
244 char MediaColor[64]; /* MediaColor string */
245 char MediaType[64]; /* MediaType string */
246 char OutputType[64]; /* OutputType string */
247
248 /**** Standard Page Device Dictionary Integer Values ****/
249 unsigned AdvanceDistance; /* AdvanceDistance value in points */
db0bd74a 250 cups_adv_t AdvanceMedia; /* AdvanceMedia value (@link cups_adv_t@) */
ef416fc2 251 cups_bool_t Collate; /* Collated copies value */
db0bd74a 252 cups_cut_t CutMedia; /* CutMedia value (@link cups_cut_t@) */
ef416fc2 253 cups_bool_t Duplex; /* Duplexed (double-sided) value */
254 unsigned HWResolution[2]; /* Resolution in dots-per-inch */
db0bd74a 255 unsigned ImagingBoundingBox[4]; /* Pixel region that is painted (points, left, bottom, right, top) */
ef416fc2 256 cups_bool_t InsertSheet; /* InsertSheet value */
db0bd74a
MS
257 cups_jog_t Jog; /* Jog value (@link cups_jog_t@) */
258 cups_edge_t LeadingEdge; /* LeadingEdge value (@link cups_edge_t@) */
ef416fc2 259 unsigned Margins[2]; /* Lower-lefthand margins in points */
260 cups_bool_t ManualFeed; /* ManualFeed value */
261 unsigned MediaPosition; /* MediaPosition value */
262 unsigned MediaWeight; /* MediaWeight value in grams/m^2 */
263 cups_bool_t MirrorPrint; /* MirrorPrint value */
264 cups_bool_t NegativePrint; /* NegativePrint value */
265 unsigned NumCopies; /* Number of copies to produce */
db0bd74a 266 cups_orient_t Orientation; /* Orientation value (@link cups_orient_t@) */
ef416fc2 267 cups_bool_t OutputFaceUp; /* OutputFaceUp value */
268 unsigned PageSize[2]; /* Width and length of page in points */
269 cups_bool_t Separations; /* Separations value */
270 cups_bool_t TraySwitch; /* TraySwitch value */
271 cups_bool_t Tumble; /* Tumble value */
272
273 /**** CUPS Page Device Dictionary Values ****/
274 unsigned cupsWidth; /* Width of page image in pixels */
275 unsigned cupsHeight; /* Height of page image in pixels */
276 unsigned cupsMediaType; /* Media type code */
277 unsigned cupsBitsPerColor; /* Number of bits for each color */
278 unsigned cupsBitsPerPixel; /* Number of bits for each pixel */
279 unsigned cupsBytesPerLine; /* Number of bytes per line */
280 cups_order_t cupsColorOrder; /* Order of colors */
281 cups_cspace_t cupsColorSpace; /* True colorspace */
282 unsigned cupsCompression; /* Device compression to use */
283 unsigned cupsRowCount; /* Rows per band */
284 unsigned cupsRowFeed; /* Feed between bands */
285 unsigned cupsRowStep; /* Spacing between lines */
286} cups_page_header_t;
287
288/**** New in CUPS 1.2 ****/
8072030b 289typedef struct cups_page_header2_s /**** Version 2 page header @since CUPS 1.2/macOS 10.5@ ****/
ef416fc2 290{
291 /**** Standard Page Device Dictionary String Values ****/
292 char MediaClass[64]; /* MediaClass string */
293 char MediaColor[64]; /* MediaColor string */
294 char MediaType[64]; /* MediaType string */
295 char OutputType[64]; /* OutputType string */
296
297 /**** Standard Page Device Dictionary Integer Values ****/
298 unsigned AdvanceDistance; /* AdvanceDistance value in points */
db0bd74a 299 cups_adv_t AdvanceMedia; /* AdvanceMedia value (@link cups_adv_t@) */
ef416fc2 300 cups_bool_t Collate; /* Collated copies value */
db0bd74a 301 cups_cut_t CutMedia; /* CutMedia value (@link cups_cut_t@) */
ef416fc2 302 cups_bool_t Duplex; /* Duplexed (double-sided) value */
303 unsigned HWResolution[2]; /* Resolution in dots-per-inch */
db0bd74a 304 unsigned ImagingBoundingBox[4]; /* Pixel region that is painted (points, left, bottom, right, top) */
ef416fc2 305 cups_bool_t InsertSheet; /* InsertSheet value */
db0bd74a
MS
306 cups_jog_t Jog; /* Jog value (@link cups_jog_t@) */
307 cups_edge_t LeadingEdge; /* LeadingEdge value (@link cups_edge_t@) */
ef416fc2 308 unsigned Margins[2]; /* Lower-lefthand margins in points */
309 cups_bool_t ManualFeed; /* ManualFeed value */
310 unsigned MediaPosition; /* MediaPosition value */
311 unsigned MediaWeight; /* MediaWeight value in grams/m^2 */
312 cups_bool_t MirrorPrint; /* MirrorPrint value */
313 cups_bool_t NegativePrint; /* NegativePrint value */
314 unsigned NumCopies; /* Number of copies to produce */
db0bd74a 315 cups_orient_t Orientation; /* Orientation value (@link cups_orient_t@) */
ef416fc2 316 cups_bool_t OutputFaceUp; /* OutputFaceUp value */
317 unsigned PageSize[2]; /* Width and length of page in points */
318 cups_bool_t Separations; /* Separations value */
319 cups_bool_t TraySwitch; /* TraySwitch value */
320 cups_bool_t Tumble; /* Tumble value */
321
322 /**** CUPS Page Device Dictionary Values ****/
323 unsigned cupsWidth; /* Width of page image in pixels */
324 unsigned cupsHeight; /* Height of page image in pixels */
325 unsigned cupsMediaType; /* Media type code */
326 unsigned cupsBitsPerColor; /* Number of bits for each color */
327 unsigned cupsBitsPerPixel; /* Number of bits for each pixel */
328 unsigned cupsBytesPerLine; /* Number of bytes per line */
329 cups_order_t cupsColorOrder; /* Order of colors */
330 cups_cspace_t cupsColorSpace; /* True colorspace */
331 unsigned cupsCompression; /* Device compression to use */
332 unsigned cupsRowCount; /* Rows per band */
333 unsigned cupsRowFeed; /* Feed between bands */
334 unsigned cupsRowStep; /* Spacing between lines */
335
336 /**** Version 2 Dictionary Values ****/
8072030b 337 unsigned cupsNumColors; /* Number of color compoents @since CUPS 1.2/macOS 10.5@ */
923edb68 338 float cupsBorderlessScalingFactor;
8072030b 339 /* Scaling that was applied to page data @since CUPS 1.2/macOS 10.5@ */
923edb68 340 float cupsPageSize[2]; /* Floating point PageSize (scaling *
8072030b 341 * factor not applied) @since CUPS 1.2/macOS 10.5@ */
db0bd74a
MS
342 float cupsImagingBBox[4]; /* Floating point ImagingBoundingBox
343 * (scaling factor not applied, left,
8072030b
MS
344 * bottom, right, top) @since CUPS 1.2/macOS 10.5@ */
345 unsigned cupsInteger[16]; /* User-defined integer values @since CUPS 1.2/macOS 10.5@ */
346 float cupsReal[16]; /* User-defined floating-point values @since CUPS 1.2/macOS 10.5@ */
347 char cupsString[16][64]; /* User-defined string values @since CUPS 1.2/macOS 10.5@ */
348 char cupsMarkerType[64]; /* Ink/toner type @since CUPS 1.2/macOS 10.5@ */
349 char cupsRenderingIntent[64];/* Color rendering intent @since CUPS 1.2/macOS 10.5@ */
350 char cupsPageSizeName[64]; /* PageSize name @since CUPS 1.2/macOS 10.5@ */
ef416fc2 351} cups_page_header2_t;
352
f301802f 353typedef struct _cups_raster_s cups_raster_t;
354 /**** Raster stream data ****/
ef416fc2 355
a74454a7 356typedef int (*cups_interpret_cb_t)(cups_page_header2_t *header, int preferred_bits);
5a738aea
MS
357 /**** cupsRasterInterpretPPD callback function
358 *
359 * This function is called by
360 * @link cupsRasterInterpretPPD@ to
361 * validate (and update, as needed)
db0bd74a
MS
362 * the page header attributes. The
363 * "preferred_bits" argument provides
364 * the value of the
365 * @code cupsPreferredBitsPerColor@
366 * key from the PostScript page device
367 * dictionary and is 0 if undefined.
5a738aea 368 ****/
a74454a7 369
c8fef167
MS
370/**** New in CUPS 1.5 ****/
371typedef ssize_t (*cups_raster_iocb_t)(void *ctx, unsigned char *buffer, size_t length);
372 /**** cupsRasterOpenIO callback function
373 *
374 * This function is specified when
375 * creating a raster stream with
376 * @link cupsRasterOpenIO@ and handles
377 * generic reading and writing of raster
378 * data. It must return -1 on error or
379 * the number of bytes specified by
380 * "length" on success.
381 ****/
382
ef416fc2 383
384/*
385 * Prototypes...
386 */
387
388extern void cupsRasterClose(cups_raster_t *r);
389extern cups_raster_t *cupsRasterOpen(int fd, cups_mode_t mode);
390extern unsigned cupsRasterReadHeader(cups_raster_t *r,
a469f8a5 391 cups_page_header_t *h) _CUPS_DEPRECATED_MSG("Use cupsRasterReadHeader2 instead.");
ef416fc2 392extern unsigned cupsRasterReadPixels(cups_raster_t *r,
393 unsigned char *p, unsigned len);
394extern unsigned cupsRasterWriteHeader(cups_raster_t *r,
a469f8a5 395 cups_page_header_t *h) _CUPS_DEPRECATED_MSG("Use cupsRasterWriteHeader2 instead.");
ef416fc2 396extern unsigned cupsRasterWritePixels(cups_raster_t *r,
397 unsigned char *p, unsigned len);
398
399/**** New in CUPS 1.2 ****/
ef416fc2 400extern unsigned cupsRasterReadHeader2(cups_raster_t *r,
2fb76298 401 cups_page_header2_t *h) _CUPS_API_1_2;
ef416fc2 402extern unsigned cupsRasterWriteHeader2(cups_raster_t *r,
2fb76298 403 cups_page_header2_t *h) _CUPS_API_1_2;
ef416fc2 404
f7deaa1a 405/**** New in CUPS 1.3 ****/
2fb76298 406extern const char *cupsRasterErrorString(void) _CUPS_API_1_3;
f7deaa1a 407
c8fef167
MS
408/**** New in CUPS 1.5 ****/
409extern cups_raster_t *cupsRasterOpenIO(cups_raster_iocb_t iocb, void *ctx,
410 cups_mode_t mode);
411
b2e6c325 412/**** New in CUPS 2.2/macOS 10.12 ****/
6e5a57e8
MS
413extern int cupsRasterInitPWGHeader(cups_page_header2_t *h, pwg_media_t *media, const char *type, int xdpi, int ydpi, const char *sides, const char *sheet_back) _CUPS_API_2_2;
414
ef416fc2 415# ifdef __cplusplus
416}
417# endif /* __cplusplus */
418
419#endif /* !_CUPS_RASTER_H_ */