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