]>
Commit | Line | Data |
---|---|---|
d668cc74 | 1 | /* |
b2e10895 | 2 | * "$Id$" |
d668cc74 | 3 | * |
64dd1836 | 4 | * PostScript Printer Description definitions for CUPS. |
d668cc74 | 5 | * |
f91e4743 | 6 | * Copyright 2007-2011 by Apple Inc. |
6482819f | 7 | * Copyright 1997-2007 by Easy Software Products, all rights reserved. |
d668cc74 | 8 | * |
3a193f5e | 9 | * These coded instructions, statements, and computer programs are the |
4e8d321f | 10 | * property of Apple Inc. and are protected by Federal copyright |
11 | * law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
12 | * which should have been included with this file. If this file is | |
13 | * file is missing or damaged, see the license at "http://www.cups.org/". | |
d668cc74 | 14 | * |
2b85e375 | 15 | * PostScript is a trademark of Adobe Systems, Inc. |
b87e43e9 | 16 | * |
17 | * This code and any derivative of it may be used and distributed | |
18 | * freely under the terms of the GNU General Public License when | |
19 | * used with GNU Ghostscript or its derivatives. Use of the code | |
20 | * (or any derivative of it) with software other than GNU | |
21 | * GhostScript (or its derivatives) is governed by the CUPS license | |
22 | * agreement. | |
dab1a4d8 | 23 | * |
24 | * This file is subject to the Apple OS-Developed Software exception. | |
d668cc74 | 25 | */ |
26 | ||
3a193f5e | 27 | #ifndef _CUPS_PPD_H_ |
28 | # define _CUPS_PPD_H_ | |
2b85e375 | 29 | |
30 | /* | |
31 | * Include necessary headers... | |
32 | */ | |
33 | ||
34 | # include <stdio.h> | |
c14eaf92 | 35 | # include "cups.h" |
ff6a82d3 | 36 | # include "array.h" |
d7606401 | 37 | # include "file.h" |
2b85e375 | 38 | |
39 | ||
40 | /* | |
41 | * C++ magic... | |
42 | */ | |
43 | ||
44 | # ifdef __cplusplus | |
45 | extern "C" { | |
46 | # endif /* __cplusplus */ | |
47 | ||
48 | ||
49 | /* | |
3a193f5e | 50 | * PPD version... |
2b85e375 | 51 | */ |
52 | ||
ff6a82d3 | 53 | # define PPD_VERSION 4.3 /* Kept in sync with Adobe version number */ |
2b85e375 | 54 | |
55 | ||
d2e58bfa | 56 | /* |
57 | * PPD size limits (defined in Adobe spec) | |
58 | */ | |
59 | ||
ff6a82d3 | 60 | # define PPD_MAX_NAME 41 /* Maximum size of name + 1 for nul */ |
61 | # define PPD_MAX_TEXT 81 /* Maximum size of text + 1 for nul */ | |
62 | # define PPD_MAX_LINE 256 /* Maximum size of line + 1 for nul */ | |
d2e58bfa | 63 | |
64 | ||
2b85e375 | 65 | /* |
66 | * Types and structures... | |
67 | */ | |
68 | ||
ff6a82d3 | 69 | typedef enum ppd_ui_e /**** UI Types ****/ |
2b85e375 | 70 | { |
ff6a82d3 | 71 | PPD_UI_BOOLEAN, /* True or False option */ |
72 | PPD_UI_PICKONE, /* Pick one from a list */ | |
73 | PPD_UI_PICKMANY /* Pick zero or more from a list */ | |
2b85e375 | 74 | } ppd_ui_t; |
75 | ||
ff6a82d3 | 76 | typedef enum ppd_section_e /**** Order dependency sections ****/ |
2b85e375 | 77 | { |
ff6a82d3 | 78 | PPD_ORDER_ANY, /* Option code can be anywhere in the file */ |
79 | PPD_ORDER_DOCUMENT, /* ... must be in the DocumentSetup section */ | |
80 | PPD_ORDER_EXIT, /* ... must be sent prior to the document */ | |
81 | PPD_ORDER_JCL, /* ... must be sent as a JCL command */ | |
82 | PPD_ORDER_PAGE, /* ... must be in the PageSetup section */ | |
83 | PPD_ORDER_PROLOG /* ... must be in the Prolog section */ | |
2b85e375 | 84 | } ppd_section_t; |
85 | ||
ff6a82d3 | 86 | typedef enum ppd_cs_e /**** Colorspaces ****/ |
2b85e375 | 87 | { |
ff6a82d3 | 88 | PPD_CS_CMYK = -4, /* CMYK colorspace */ |
89 | PPD_CS_CMY, /* CMY colorspace */ | |
90 | PPD_CS_GRAY = 1, /* Grayscale colorspace */ | |
91 | PPD_CS_RGB = 3, /* RGB colorspace */ | |
92 | PPD_CS_RGBK, /* RGBK (K = gray) colorspace */ | |
93 | PPD_CS_N /* DeviceN colorspace */ | |
2b85e375 | 94 | } ppd_cs_t; |
95 | ||
373b3e5f | 96 | typedef enum ppd_status_e /**** Status Codes @since CUPS 1.1.19/Mac OS X 10.3@ ****/ |
79f448f9 | 97 | { |
ff6a82d3 | 98 | PPD_OK = 0, /* OK */ |
99 | PPD_FILE_OPEN_ERROR, /* Unable to open PPD file */ | |
100 | PPD_NULL_FILE, /* NULL PPD file pointer */ | |
101 | PPD_ALLOC_ERROR, /* Memory allocation error */ | |
102 | PPD_MISSING_PPDADOBE4, /* Missing PPD-Adobe-4.x header */ | |
103 | PPD_MISSING_VALUE, /* Missing value string */ | |
104 | PPD_INTERNAL_ERROR, /* Internal error */ | |
105 | PPD_BAD_OPEN_GROUP, /* Bad OpenGroup */ | |
106 | PPD_NESTED_OPEN_GROUP, /* OpenGroup without a CloseGroup first */ | |
107 | PPD_BAD_OPEN_UI, /* Bad OpenUI/JCLOpenUI */ | |
108 | PPD_NESTED_OPEN_UI, /* OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first */ | |
109 | PPD_BAD_ORDER_DEPENDENCY, /* Bad OrderDependency */ | |
110 | PPD_BAD_UI_CONSTRAINTS, /* Bad UIConstraints */ | |
111 | PPD_MISSING_ASTERISK, /* Missing asterisk in column 0 */ | |
112 | PPD_LINE_TOO_LONG, /* Line longer than 255 chars */ | |
113 | PPD_ILLEGAL_CHARACTER, /* Illegal control character */ | |
114 | PPD_ILLEGAL_MAIN_KEYWORD, /* Illegal main keyword string */ | |
115 | PPD_ILLEGAL_OPTION_KEYWORD, /* Illegal option keyword string */ | |
116 | PPD_ILLEGAL_TRANSLATION, /* Illegal translation string */ | |
117 | PPD_ILLEGAL_WHITESPACE, /* Illegal whitespace character */ | |
b45cde5d | 118 | PPD_BAD_CUSTOM_PARAM, /* Bad custom parameter */ |
119 | PPD_MISSING_OPTION_KEYWORD, /* Missing option keyword */ | |
120 | PPD_BAD_VALUE, /* Bad value string */ | |
f91e4743 | 121 | PPD_MISSING_CLOSE_GROUP, /* Missing CloseGroup */ |
b45cde5d | 122 | PPD_MAX_STATUS /* @private@ */ |
79f448f9 | 123 | } ppd_status_t; |
124 | ||
373b3e5f | 125 | enum ppd_conform_e /**** Conformance Levels @since CUPS 1.1.19/Mac OS X 10.3@ ****/ |
49de8bd2 | 126 | { |
ff6a82d3 | 127 | PPD_CONFORM_RELAXED, /* Relax whitespace and control char */ |
128 | PPD_CONFORM_STRICT /* Require strict conformance */ | |
8f6753d3 | 129 | }; |
130 | ||
131 | typedef enum ppd_conform_e ppd_conform_t; | |
373b3e5f | 132 | /**** Conformance Levels @since CUPS 1.1.19/Mac OS X 10.3@ ****/ |
49de8bd2 | 133 | |
373b3e5f | 134 | typedef struct ppd_attr_s /**** PPD Attribute Structure @since CUPS 1.1.19/Mac OS X 10.3@ ****/ |
57147a00 | 135 | { |
ff6a82d3 | 136 | char name[PPD_MAX_NAME]; /* Name of attribute (cupsXYZ) */ |
137 | char spec[PPD_MAX_NAME]; /* Specifier string, if any */ | |
138 | char text[PPD_MAX_TEXT]; /* Human-readable text, if any */ | |
139 | char *value; /* Value string */ | |
57147a00 | 140 | } ppd_attr_t; |
141 | ||
ff6a82d3 | 142 | typedef struct ppd_option_s ppd_option_t; |
143 | /**** Options ****/ | |
c9f7f5da | 144 | |
ff6a82d3 | 145 | typedef struct ppd_choice_s /**** Option choices ****/ |
2b85e375 | 146 | { |
ff6a82d3 | 147 | char marked; /* 0 if not selected, 1 otherwise */ |
148 | char choice[PPD_MAX_NAME]; /* Computer-readable option name */ | |
149 | char text[PPD_MAX_TEXT]; /* Human-readable option name */ | |
150 | char *code; /* Code to send for this option */ | |
151 | ppd_option_t *option; /* Pointer to parent option structure */ | |
2b85e375 | 152 | } ppd_choice_t; |
153 | ||
ff6a82d3 | 154 | struct ppd_option_s /**** Options ****/ |
2b85e375 | 155 | { |
ff6a82d3 | 156 | char conflicted; /* 0 if no conflicts exist, 1 otherwise */ |
157 | char keyword[PPD_MAX_NAME]; /* Option keyword name ("PageSize", etc.) */ | |
158 | char defchoice[PPD_MAX_NAME];/* Default option choice */ | |
159 | char text[PPD_MAX_TEXT]; /* Human-readable text */ | |
160 | ppd_ui_t ui; /* Type of UI option */ | |
161 | ppd_section_t section; /* Section for command */ | |
162 | float order; /* Order number */ | |
163 | int num_choices; /* Number of option choices */ | |
164 | ppd_choice_t *choices; /* Option choices */ | |
c9f7f5da | 165 | }; |
2b85e375 | 166 | |
ff6a82d3 | 167 | typedef struct ppd_group_s /**** Groups ****/ |
2b85e375 | 168 | { |
57147a00 | 169 | /**** Group text strings are limited to 39 chars + nul in order to |
f103f1dc | 170 | **** preserve binary compatibility and allow applications to get |
171 | **** the group's keyword name. | |
57147a00 | 172 | ****/ |
c9f7f5da | 173 | char text[PPD_MAX_TEXT - PPD_MAX_NAME]; |
ff6a82d3 | 174 | /* Human-readable group name */ |
373b3e5f | 175 | char name[PPD_MAX_NAME]; /* Group name @since CUPS 1.1.18/Mac OS X 10.3@ */ |
ff6a82d3 | 176 | int num_options; /* Number of options */ |
177 | ppd_option_t *options; /* Options */ | |
178 | int num_subgroups; /* Number of sub-groups */ | |
179 | struct ppd_group_s *subgroups; /* Sub-groups (max depth = 1) */ | |
2b85e375 | 180 | } ppd_group_t; |
181 | ||
8f6753d3 | 182 | typedef struct ppd_const_s /**** Constraints ****/ |
2b85e375 | 183 | { |
ff6a82d3 | 184 | char option1[PPD_MAX_NAME]; /* First keyword */ |
185 | char choice1[PPD_MAX_NAME]; /* First option/choice (blank for all) */ | |
186 | char option2[PPD_MAX_NAME]; /* Second keyword */ | |
187 | char choice2[PPD_MAX_NAME]; /* Second option/choice (blank for all) */ | |
2b85e375 | 188 | } ppd_const_t; |
189 | ||
ff6a82d3 | 190 | typedef struct ppd_size_s /**** Page Sizes ****/ |
2b85e375 | 191 | { |
ff6a82d3 | 192 | int marked; /* Page size selected? */ |
193 | char name[PPD_MAX_NAME]; /* Media size option */ | |
194 | float width; /* Width of media in points */ | |
195 | float length; /* Length of media in points */ | |
196 | float left; /* Left printable margin in points */ | |
197 | float bottom; /* Bottom printable margin in points */ | |
198 | float right; /* Right printable margin in points */ | |
199 | float top; /* Top printable margin in points */ | |
2b85e375 | 200 | } ppd_size_t; |
201 | ||
ff6a82d3 | 202 | typedef struct ppd_emul_s /**** Emulators ****/ |
2b85e375 | 203 | { |
ff6a82d3 | 204 | char name[PPD_MAX_NAME]; /* Emulator name */ |
205 | char *start; /* Code to switch to this emulation */ | |
206 | char *stop; /* Code to stop this emulation */ | |
2b85e375 | 207 | } ppd_emul_t; |
208 | ||
ff6a82d3 | 209 | typedef struct ppd_profile_s /**** sRGB Color Profiles ****/ |
b87e43e9 | 210 | { |
c9f7f5da | 211 | char resolution[PPD_MAX_NAME]; |
ff6a82d3 | 212 | /* Resolution or "-" */ |
c9f7f5da | 213 | char media_type[PPD_MAX_NAME]; |
ff6a82d3 | 214 | /* Media type or "-" */ |
215 | float density; /* Ink density to use */ | |
216 | float gamma; /* Gamma correction to use */ | |
217 | float matrix[3][3]; /* Transform matrix */ | |
b87e43e9 | 218 | } ppd_profile_t; |
219 | ||
cb8cf1cf | 220 | /**** New in CUPS 1.2/Mac OS X 10.5 ****/ |
373b3e5f | 221 | typedef enum ppd_cptype_e /**** Custom Parameter Type @since CUPS 1.2/Mac OS X 10.5@ ****/ |
ab94f399 | 222 | { |
ff6a82d3 | 223 | PPD_CUSTOM_CURVE, /* Curve value for f(x) = x^value */ |
224 | PPD_CUSTOM_INT, /* Integer number value */ | |
225 | PPD_CUSTOM_INVCURVE, /* Curve value for f(x) = x^(1/value) */ | |
226 | PPD_CUSTOM_PASSCODE, /* String of (hidden) numbers */ | |
227 | PPD_CUSTOM_PASSWORD, /* String of (hidden) characters */ | |
228 | PPD_CUSTOM_POINTS, /* Measurement value in points */ | |
229 | PPD_CUSTOM_REAL, /* Real number value */ | |
230 | PPD_CUSTOM_STRING /* String of characters */ | |
231 | } ppd_cptype_t; | |
232 | ||
373b3e5f | 233 | typedef union ppd_cplimit_u /**** Custom Parameter Limit @since CUPS 1.2/Mac OS X 10.5@ ****/ |
51890df6 | 234 | { |
235 | float custom_curve; /* Gamma value */ | |
236 | int custom_int; /* Integer value */ | |
237 | float custom_invcurve; /* Gamma value */ | |
238 | int custom_passcode; /* Passcode length */ | |
239 | int custom_password; /* Password length */ | |
240 | float custom_points; /* Measurement value */ | |
241 | float custom_real; /* Real value */ | |
242 | int custom_string; /* String length */ | |
243 | } ppd_cplimit_t; | |
244 | ||
373b3e5f | 245 | typedef union ppd_cpvalue_u /**** Custom Parameter Value @since CUPS 1.2/Mac OS X 10.5@ ****/ |
ab94f399 | 246 | { |
ff6a82d3 | 247 | float custom_curve; /* Gamma value */ |
248 | int custom_int; /* Integer value */ | |
249 | float custom_invcurve; /* Gamma value */ | |
250 | char *custom_passcode; /* Passcode value */ | |
251 | char *custom_password; /* Password value */ | |
252 | float custom_points; /* Measurement value */ | |
253 | float custom_real; /* Real value */ | |
254 | char *custom_string; /* String value */ | |
255 | } ppd_cpvalue_t; | |
256 | ||
373b3e5f | 257 | typedef struct ppd_cparam_s /**** Custom Parameter @since CUPS 1.2/Mac OS X 10.5@ ****/ |
ab94f399 | 258 | { |
ff6a82d3 | 259 | char name[PPD_MAX_NAME]; /* Parameter name */ |
260 | char text[PPD_MAX_TEXT]; /* Human-readable text */ | |
261 | int order; /* Order (0 to N) */ | |
262 | ppd_cptype_t type; /* Parameter type */ | |
51890df6 | 263 | ppd_cplimit_t minimum, /* Minimum value */ |
264 | maximum; /* Maximum value */ | |
265 | ppd_cpvalue_t current; /* Current value */ | |
ff6a82d3 | 266 | } ppd_cparam_t; |
267 | ||
373b3e5f | 268 | typedef struct ppd_coption_s /**** Custom Option @since CUPS 1.2/Mac OS X 10.5@ ****/ |
ab94f399 | 269 | { |
ff6a82d3 | 270 | char keyword[PPD_MAX_NAME]; /* Name of option that is being extended... */ |
271 | ppd_option_t *option; /* Option that is being extended... */ | |
272 | int marked; /* Extended option is marked */ | |
273 | cups_array_t *params; /* Parameters */ | |
274 | } ppd_coption_t; | |
275 | ||
8211508e | 276 | typedef struct _ppd_cache_s _ppd_cache_t; |
a1a2e89a | 277 | /**** PPD cache and mapping data @since CUPS 1.5/Mac OS X 10.7@ @private@ ****/ |
8211508e | 278 | |
ff6a82d3 | 279 | typedef struct ppd_file_s /**** PPD File ****/ |
2b85e375 | 280 | { |
ff6a82d3 | 281 | int language_level; /* Language level of device */ |
282 | int color_device; /* 1 = color device, 0 = grayscale */ | |
283 | int variable_sizes; /* 1 = supports variable sizes, 0 = doesn't */ | |
284 | int accurate_screens; /* 1 = supports accurate screens, 0 = not */ | |
285 | int contone_only; /* 1 = continuous tone only, 0 = not */ | |
286 | int landscape; /* -90 or 90 */ | |
287 | int model_number; /* Device-specific model number */ | |
288 | int manual_copies; /* 1 = Copies done manually, 0 = hardware */ | |
289 | int throughput; /* Pages per minute */ | |
290 | ppd_cs_t colorspace; /* Default colorspace */ | |
291 | char *patches; /* Patch commands to be sent to printer */ | |
292 | int num_emulations; /* Number of emulations supported */ | |
293 | ppd_emul_t *emulations; /* Emulations and the code to invoke them */ | |
294 | char *jcl_begin; /* Start JCL commands */ | |
295 | char *jcl_ps; /* Enter PostScript interpreter */ | |
296 | char *jcl_end; /* End JCL commands */ | |
297 | char *lang_encoding; /* Language encoding */ | |
298 | char *lang_version; /* Language version (English, Spanish, etc.) */ | |
299 | char *modelname; /* Model name (general) */ | |
300 | char *ttrasterizer; /* Truetype rasterizer */ | |
301 | char *manufacturer; /* Manufacturer name */ | |
302 | char *product; /* Product name (from PS RIP/interpreter) */ | |
303 | char *nickname; /* Nickname (specific) */ | |
304 | char *shortnickname; /* Short version of nickname */ | |
305 | int num_groups; /* Number of UI groups */ | |
306 | ppd_group_t *groups; /* UI groups */ | |
307 | int num_sizes; /* Number of page sizes */ | |
308 | ppd_size_t *sizes; /* Page sizes */ | |
309 | float custom_min[2]; /* Minimum variable page size */ | |
310 | float custom_max[2]; /* Maximum variable page size */ | |
311 | float custom_margins[4]; /* Margins around page */ | |
312 | int num_consts; /* Number of UI/Non-UI constraints */ | |
313 | ppd_const_t *consts; /* UI/Non-UI constraints */ | |
314 | int num_fonts; /* Number of pre-loaded fonts */ | |
315 | char **fonts; /* Pre-loaded fonts */ | |
d3392537 | 316 | int num_profiles; /* Number of sRGB color profiles @deprecated@ */ |
317 | ppd_profile_t *profiles; /* sRGB color profiles @deprecated@ */ | |
ff6a82d3 | 318 | int num_filters; /* Number of filters */ |
319 | char **filters; /* Filter strings... */ | |
57147a00 | 320 | |
f103f1dc | 321 | /**** New in CUPS 1.1 ****/ |
2d1d3177 | 322 | int flip_duplex; /* 1 = Flip page for back sides @deprecated@ */ |
57147a00 | 323 | |
f103f1dc | 324 | /**** New in CUPS 1.1.19 ****/ |
373b3e5f | 325 | char *protocols; /* Protocols (BCP, TBCP) string @since CUPS 1.1.19/Mac OS X 10.3@ */ |
326 | char *pcfilename; /* PCFileName string @since CUPS 1.1.19/Mac OS X 10.3@ */ | |
327 | int num_attrs; /* Number of attributes @since CUPS 1.1.19/Mac OS X 10.3@ @private@ */ | |
328 | int cur_attr; /* Current attribute @since CUPS 1.1.19/Mac OS X 10.3@ @private@ */ | |
329 | ppd_attr_t **attrs; /* Attributes @since CUPS 1.1.19/Mac OS X 10.3@ @private@ */ | |
b2e10895 | 330 | |
cb8cf1cf | 331 | /**** New in CUPS 1.2/Mac OS X 10.5 ****/ |
373b3e5f | 332 | cups_array_t *sorted_attrs; /* Attribute lookup array @since CUPS 1.2/Mac OS X 10.5@ @private@ */ |
333 | cups_array_t *options; /* Option lookup array @since CUPS 1.2/Mac OS X 10.5@ @private@ */ | |
334 | cups_array_t *coptions; /* Custom options array @since CUPS 1.2/Mac OS X 10.5@ @private@ */ | |
6482819f | 335 | |
cb8cf1cf | 336 | /**** New in CUPS 1.3/Mac OS X 10.5 ****/ |
373b3e5f | 337 | cups_array_t *marked; /* Marked choices @since CUPS 1.3/Mac OS X 10.5@ @private@ */ |
d3392537 | 338 | |
cb8cf1cf | 339 | /**** New in CUPS 1.4/Mac OS X 10.6 ****/ |
abc7086c | 340 | cups_array_t *cups_uiconstraints; /* cupsUIConstraints @since CUPS 1.4/Mac OS X 10.6@ @private@ */ |
64dd1836 | 341 | |
342 | /**** New in CUPS 1.5 ****/ | |
a1a2e89a | 343 | _ppd_cache_t *cache; /* PPD cache and mapping data @since CUPS 1.5/Mac OS X 10.7@ @private@ */ |
2b85e375 | 344 | } ppd_file_t; |
345 | ||
346 | ||
d668cc74 | 347 | /* |
3a193f5e | 348 | * Prototypes... |
d668cc74 | 349 | */ |
350 | ||
c14eaf92 | 351 | extern int cupsMarkOptions(ppd_file_t *ppd, int num_options, |
352 | cups_option_t *options); | |
2b85e375 | 353 | extern void ppdClose(ppd_file_t *ppd); |
cbcf8057 | 354 | extern int ppdCollect(ppd_file_t *ppd, ppd_section_t section, |
355 | ppd_choice_t ***choices); | |
3a193f5e | 356 | extern int ppdConflicts(ppd_file_t *ppd); |
2b85e375 | 357 | extern int ppdEmit(ppd_file_t *ppd, FILE *fp, |
358 | ppd_section_t section); | |
359 | extern int ppdEmitFd(ppd_file_t *ppd, int fd, | |
360 | ppd_section_t section); | |
ee6a18b5 | 361 | extern int ppdEmitJCL(ppd_file_t *ppd, FILE *fp, int job_id, |
362 | const char *user, const char *title); | |
57147a00 | 363 | extern ppd_choice_t *ppdFindChoice(ppd_option_t *o, const char *option); |
364 | extern ppd_choice_t *ppdFindMarkedChoice(ppd_file_t *ppd, const char *keyword); | |
365 | extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword); | |
063e1ac7 | 366 | extern int ppdIsMarked(ppd_file_t *ppd, const char *keyword, |
367 | const char *option); | |
3a193f5e | 368 | extern void ppdMarkDefaults(ppd_file_t *ppd); |
063e1ac7 | 369 | extern int ppdMarkOption(ppd_file_t *ppd, const char *keyword, |
370 | const char *option); | |
3a193f5e | 371 | extern ppd_file_t *ppdOpen(FILE *fp); |
372 | extern ppd_file_t *ppdOpenFd(int fd); | |
063e1ac7 | 373 | extern ppd_file_t *ppdOpenFile(const char *filename); |
374 | extern float ppdPageLength(ppd_file_t *ppd, const char *name); | |
375 | extern ppd_size_t *ppdPageSize(ppd_file_t *ppd, const char *name); | |
376 | extern float ppdPageWidth(ppd_file_t *ppd, const char *name); | |
2b85e375 | 377 | |
f103f1dc | 378 | /**** New in CUPS 1.1.19 ****/ |
ff137eb1 | 379 | extern const char *ppdErrorString(ppd_status_t status) _CUPS_API_1_1_19; |
1b98ab76 | 380 | extern ppd_attr_t *ppdFindAttr(ppd_file_t *ppd, const char *name, |
ff137eb1 | 381 | const char *spec) _CUPS_API_1_1_19; |
1b98ab76 | 382 | extern ppd_attr_t *ppdFindNextAttr(ppd_file_t *ppd, const char *name, |
ff137eb1 | 383 | const char *spec) _CUPS_API_1_1_19; |
384 | extern ppd_status_t ppdLastError(int *line) _CUPS_API_1_1_19; | |
b2e10895 | 385 | |
386 | /**** New in CUPS 1.1.20 ****/ | |
ff137eb1 | 387 | extern void ppdSetConformance(ppd_conform_t c) _CUPS_API_1_1_20; |
b2e10895 | 388 | |
389 | /**** New in CUPS 1.2 ****/ | |
c50b38cf | 390 | extern int ppdCollect2(ppd_file_t *ppd, ppd_section_t section, |
ff137eb1 | 391 | float min_order, ppd_choice_t ***choices) _CUPS_API_1_2; |
c50b38cf | 392 | extern int ppdEmitAfterOrder(ppd_file_t *ppd, FILE *fp, |
393 | ppd_section_t section, int limit, | |
ff137eb1 | 394 | float min_order) _CUPS_API_1_2; |
395 | extern int ppdEmitJCLEnd(ppd_file_t *ppd, FILE *fp) _CUPS_API_1_2; | |
94ffdf17 | 396 | extern char *ppdEmitString(ppd_file_t *ppd, ppd_section_t section, |
ff137eb1 | 397 | float min_order) _CUPS_API_1_2; |
ff6a82d3 | 398 | extern ppd_coption_t *ppdFindCustomOption(ppd_file_t *ppd, |
ff137eb1 | 399 | const char *keyword) _CUPS_API_1_2; |
ff6a82d3 | 400 | extern ppd_cparam_t *ppdFindCustomParam(ppd_coption_t *opt, |
ff137eb1 | 401 | const char *name) _CUPS_API_1_2; |
402 | extern ppd_cparam_t *ppdFirstCustomParam(ppd_coption_t *opt) _CUPS_API_1_2; | |
403 | extern ppd_option_t *ppdFirstOption(ppd_file_t *ppd) _CUPS_API_1_2; | |
404 | extern ppd_cparam_t *ppdNextCustomParam(ppd_coption_t *opt) _CUPS_API_1_2; | |
405 | extern ppd_option_t *ppdNextOption(ppd_file_t *ppd) _CUPS_API_1_2; | |
406 | extern int ppdLocalize(ppd_file_t *ppd) _CUPS_API_1_2; | |
407 | extern ppd_file_t *ppdOpen2(cups_file_t *fp) _CUPS_API_1_2; | |
57147a00 | 408 | |
c14eaf92 | 409 | /**** New in CUPS 1.3/Mac OS X 10.5 ****/ |
1053c6bf | 410 | extern const char *ppdLocalizeIPPReason(ppd_file_t *ppd, |
411 | const char *reason, | |
412 | const char *scheme, | |
89fa13e0 | 413 | char *buffer, |
414 | size_t bufsize) _CUPS_API_1_3; | |
415 | ||
c14eaf92 | 416 | /**** New in CUPS 1.4/Mac OS X 10.6 ****/ |
417 | extern int cupsGetConflicts(ppd_file_t *ppd, const char *option, | |
418 | const char *choice, | |
419 | cups_option_t **options) | |
420 | _CUPS_API_1_4; | |
421 | extern int cupsResolveConflicts(ppd_file_t *ppd, const char *option, | |
422 | const char *choice, | |
423 | int *num_options, | |
424 | cups_option_t **options) | |
425 | _CUPS_API_1_4; | |
d3392537 | 426 | extern int ppdInstallableConflict(ppd_file_t *ppd, |
427 | const char *option, | |
c14eaf92 | 428 | const char *choice) |
429 | _CUPS_API_1_4; | |
8f189c6c | 430 | extern ppd_attr_t *ppdLocalizeAttr(ppd_file_t *ppd, const char *keyword, |
c14eaf92 | 431 | const char *spec) _CUPS_API_1_4; |
89fa13e0 | 432 | extern const char *ppdLocalizeMarkerName(ppd_file_t *ppd, |
433 | const char *name) _CUPS_API_1_4; | |
2c4bed11 | 434 | extern int ppdPageSizeLimits(ppd_file_t *ppd, |
435 | ppd_size_t *minimum, | |
436 | ppd_size_t *maximum) _CUPS_API_1_4; | |
1053c6bf | 437 | |
57147a00 | 438 | |
2b85e375 | 439 | /* |
440 | * C++ magic... | |
441 | */ | |
d668cc74 | 442 | |
2b85e375 | 443 | # ifdef __cplusplus |
444 | } | |
445 | # endif /* __cplusplus */ | |
3a193f5e | 446 | #endif /* !_CUPS_PPD_H_ */ |
d668cc74 | 447 | |
448 | /* | |
b2e10895 | 449 | * End of "$Id$". |
d668cc74 | 450 | */ |