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