]>
Commit | Line | Data |
---|---|---|
abacc52b | 1 | <!doctype html> |
ef416fc2 | 2 | <html> |
3 | <!-- SECTION: Programming --> | |
abacc52b MS |
4 | <head> |
5 | <title>PPD API (DEPRECATED)</title> | |
6 | <meta name="keywords" content="Programming"> | |
7 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
8 | <meta name="creator" content="Mini-XML v2.11"> | |
9 | <meta name="author" content="Unknown"> | |
10 | <meta name="copyright" content="Unknown"> | |
798d6e29 | 11 | <meta name="version" content="0.0"> |
abacc52b | 12 | <style type="text/css"><!-- |
5a738aea MS |
13 | BODY { |
14 | font-family: lucida grande, geneva, helvetica, arial, sans-serif; | |
15 | } | |
16 | ||
17 | H1, H2, H3, H4, H5, H6, P, TD, TH { | |
18 | font-family: lucida grande, geneva, helvetica, arial, sans-serif; | |
19 | } | |
20 | ||
21 | KBD { | |
22 | font-family: monaco, courier, monospace; | |
23 | font-weight: bold; | |
24 | } | |
25 | ||
26 | PRE { | |
27 | font-family: monaco, courier, monospace; | |
28 | } | |
29 | ||
30 | PRE.command { | |
10d09e33 | 31 | border: dotted thin #7f7f7f; |
5a738aea | 32 | margin-left: 36pt; |
10d09e33 | 33 | padding: 10px; |
5a738aea MS |
34 | } |
35 | ||
f11a948a MS |
36 | P.compact { |
37 | margin: 0; | |
38 | } | |
39 | ||
e4572d57 MS |
40 | P.example { |
41 | font-style: italic; | |
42 | margin-left: 36pt; | |
43 | } | |
ca6b43fc | 44 | |
240214ef MS |
45 | DL.man DD { |
46 | margin-left: 5em; | |
47 | } | |
48 | ||
49 | DL.man DT { | |
50 | margin-left: 0; | |
51 | } | |
52 | ||
53 | PRE.man { | |
54 | margin: 0; | |
55 | } | |
56 | ||
5a738aea MS |
57 | PRE.example { |
58 | background: #eeeeee; | |
59 | border: dotted thin #999999; | |
60 | margin-left: 36pt; | |
178cb736 | 61 | padding: 10pt; |
5a738aea MS |
62 | } |
63 | ||
64 | PRE.command EM, PRE.example EM { | |
65 | font-family: lucida grande, geneva, helvetica, arial, sans-serif; | |
66 | } | |
67 | ||
68 | P.command { | |
69 | font-family: monaco, courier, monospace; | |
70 | margin-left: 36pt; | |
71 | } | |
72 | ||
73 | P.formula { | |
74 | font-style: italic; | |
75 | margin-left: 36pt; | |
76 | } | |
77 | ||
78 | BLOCKQUOTE { | |
178cb736 | 79 | background: #eeeeee; |
5a738aea MS |
80 | border: solid thin #999999; |
81 | padding: 10pt; | |
82 | } | |
83 | ||
e4572d57 MS |
84 | A IMG { |
85 | border: none; | |
86 | } | |
87 | ||
88 | A:link:hover IMG { | |
89 | background: #f0f0f0; | |
90 | border-radius: 10px; | |
91 | -moz-border-radius: 10px; | |
92 | } | |
93 | ||
5a738aea | 94 | A:link, A:visited { |
ca6b43fc | 95 | font-weight: inherit; |
5a738aea | 96 | text-decoration: none; |
5a738aea MS |
97 | } |
98 | ||
99 | A:link:hover, A:visited:hover, A:active { | |
100 | text-decoration: underline; | |
5a738aea MS |
101 | } |
102 | ||
103 | SUB, SUP { | |
104 | font-size: 50%; | |
105 | } | |
106 | ||
e4572d57 MS |
107 | TR.data, TD.data, TR.data TD { |
108 | margin-top: 10pt; | |
109 | padding: 5pt; | |
110 | border-bottom: solid 1pt #999999; | |
111 | } | |
112 | ||
113 | TR.data TH { | |
114 | border-bottom: solid 1pt #999999; | |
115 | padding-top: 10pt; | |
116 | padding-left: 5pt; | |
117 | text-align: left; | |
118 | } | |
119 | ||
5a738aea MS |
120 | DIV.table TABLE { |
121 | border: solid thin #999999; | |
122 | border-collapse: collapse; | |
123 | border-spacing: 0; | |
124 | margin-left: auto; | |
125 | margin-right: auto; | |
126 | } | |
127 | ||
128 | DIV.table CAPTION { | |
129 | caption-side: top; | |
130 | font-size: 120%; | |
131 | font-style: italic; | |
132 | font-weight: bold; | |
133 | margin-left: auto; | |
134 | margin-right: auto; | |
135 | } | |
136 | ||
137 | DIV.table TABLE TD { | |
138 | border: solid thin #cccccc; | |
139 | padding-top: 5pt; | |
140 | } | |
141 | ||
142 | DIV.table TABLE TH { | |
143 | background: #cccccc; | |
144 | border: none; | |
145 | border-bottom: solid thin #999999; | |
146 | } | |
147 | ||
148 | DIV.figure TABLE { | |
149 | margin-left: auto; | |
150 | margin-right: auto; | |
151 | } | |
152 | ||
153 | DIV.figure CAPTION { | |
154 | caption-side: bottom; | |
155 | font-size: 120%; | |
156 | font-style: italic; | |
157 | font-weight: bold; | |
158 | margin-left: auto; | |
159 | margin-right: auto; | |
160 | } | |
161 | ||
162 | TH.label { | |
5a738aea MS |
163 | text-align: right; |
164 | vertical-align: top; | |
165 | } | |
166 | ||
e4572d57 MS |
167 | TH.sublabel { |
168 | text-align: right; | |
169 | font-weight: normal; | |
170 | } | |
171 | ||
5a738aea MS |
172 | HR { |
173 | border: solid thin; | |
174 | } | |
175 | ||
176 | SPAN.info { | |
e4572d57 MS |
177 | background: black; |
178 | border: thin solid black; | |
179 | color: white; | |
5a738aea MS |
180 | font-size: 80%; |
181 | font-style: italic; | |
182 | font-weight: bold; | |
183 | white-space: nowrap; | |
184 | } | |
185 | ||
186 | H2 SPAN.info, H3 SPAN.info, H4 SPAN.info { | |
187 | float: right; | |
188 | font-size: 100%; | |
189 | } | |
190 | ||
178cb736 MS |
191 | H1.title { |
192 | } | |
193 | ||
5a738aea MS |
194 | H2.title, H3.title { |
195 | border-bottom: solid 2pt #000000; | |
196 | } | |
197 | ||
e4572d57 MS |
198 | DIV.indent, TABLE.indent { |
199 | margin-top: 2em; | |
200 | margin-left: auto; | |
201 | margin-right: auto; | |
202 | width: 90%; | |
203 | } | |
204 | ||
205 | TABLE.indent { | |
206 | border-collapse: collapse; | |
207 | } | |
208 | ||
209 | TABLE.indent TD, TABLE.indent TH { | |
210 | padding: 0; | |
211 | } | |
212 | ||
213 | TABLE.list { | |
214 | border-collapse: collapse; | |
215 | margin-left: auto; | |
216 | margin-right: auto; | |
217 | width: 90%; | |
218 | } | |
219 | ||
220 | TABLE.list TH { | |
221 | background: white; | |
222 | border-bottom: solid thin #cccccc; | |
223 | color: #444444; | |
224 | padding-top: 10pt; | |
225 | padding-left: 5pt; | |
226 | text-align: left; | |
227 | vertical-align: bottom; | |
228 | white-space: nowrap; | |
229 | } | |
230 | ||
231 | TABLE.list TH A { | |
232 | color: #4444cc; | |
233 | } | |
234 | ||
235 | TABLE.list TD { | |
236 | border-bottom: solid thin #eeeeee; | |
237 | padding-top: 5pt; | |
238 | padding-left: 5pt; | |
239 | } | |
240 | ||
241 | TABLE.list TR:nth-child(even) { | |
242 | background: #f8f8f8; | |
243 | } | |
244 | ||
245 | TABLE.list TR:nth-child(odd) { | |
246 | background: #f4f4f4; | |
247 | } | |
248 | ||
5a738aea MS |
249 | DT { |
250 | margin-left: 36pt; | |
251 | margin-top: 12pt; | |
252 | } | |
253 | ||
254 | DD { | |
255 | margin-left: 54pt; | |
256 | } | |
257 | ||
258 | DL.category DT { | |
259 | font-weight: bold; | |
260 | } | |
261 | ||
262 | P.summary { | |
263 | margin-left: 36pt; | |
264 | font-family: monaco, courier, monospace; | |
265 | } | |
266 | ||
5a738aea MS |
267 | DIV.summary TABLE { |
268 | border: solid thin #999999; | |
269 | border-collapse: collapse; | |
270 | border-spacing: 0; | |
271 | margin: 10px; | |
272 | } | |
273 | ||
274 | DIV.summary TABLE TD, DIV.summary TABLE TH { | |
275 | border: solid thin #999999; | |
276 | padding: 5px; | |
277 | text-align: left; | |
278 | vertical-align: top; | |
279 | } | |
280 | ||
281 | DIV.summary TABLE THEAD TH { | |
282 | background: #eeeeee; | |
283 | } | |
284 | ||
285 | /* API documentation styles... */ | |
286 | div.body h1 { | |
287 | margin: 0; | |
288 | } | |
289 | div.body h2 { | |
290 | margin-top: 1.5em; | |
291 | } | |
292 | div.body h3, div.body h4, div.body h5 { | |
293 | margin-bottom: 0.5em; | |
294 | margin-top: 1.5em; | |
295 | } | |
296 | .class, .enumeration, .function, .struct, .typedef, .union { | |
297 | border-bottom: solid thin #999999; | |
298 | margin-bottom: 0; | |
299 | margin-top: 2em; | |
300 | } | |
301 | .description { | |
302 | margin-top: 0.5em; | |
303 | } | |
304 | code, p.code, pre, ul.code li { | |
305 | font-family: monaco, courier, monospace; | |
306 | font-size: 90%; | |
307 | } | |
308 | ul.code, ul.contents, ul.subcontents { | |
309 | list-style-type: none; | |
310 | margin: 0; | |
311 | padding-left: 0; | |
312 | } | |
313 | ul.code li { | |
314 | margin: 0; | |
315 | } | |
316 | ul.contents > li { | |
317 | margin-top: 1em; | |
318 | } | |
319 | ul.contents li ul.code, ul.contents li ul.subcontents { | |
320 | padding-left: 2em; | |
321 | } | |
322 | div.body dl { | |
323 | margin-left: 0; | |
324 | margin-top: 0; | |
325 | } | |
326 | div.body dt { | |
327 | font-style: italic; | |
328 | margin-left: 0; | |
329 | margin-top: 0; | |
330 | } | |
331 | div.body dd { | |
332 | margin-bottom: 0.5em; | |
333 | } | |
334 | ||
335 | /* This is just for the HTML files generated with the framedhelp target */ | |
336 | div.contents { | |
337 | background: #e8e8e8; | |
338 | border: solid thin black; | |
339 | padding: 10px; | |
340 | } | |
341 | div.contents h1 { | |
342 | font-size: 110%; | |
343 | } | |
344 | div.contents h2 { | |
345 | font-size: 100%; | |
346 | } | |
347 | div.contents ul.contents { | |
348 | font-size: 80%; | |
349 | } | |
ac884b6a MS |
350 | div.contents ul.subcontents li { |
351 | margin-left: 1em; | |
352 | text-indent: -1em; | |
353 | } | |
5a738aea | 354 | --></style> |
abacc52b MS |
355 | </head> |
356 | <body> | |
ef416fc2 | 357 | <!-- |
321d8d57 | 358 | PPD API header for CUPS. |
5a738aea | 359 | |
f3c17241 | 360 | Copyright 2008-2012 by Apple Inc. |
5a738aea MS |
361 | |
362 | These coded instructions, statements, and computer programs are the | |
363 | property of Apple Inc. and are protected by Federal copyright | |
364 | law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
365 | which should have been included with this file. If this file is | |
366 | file is missing or damaged, see the license at "http://www.cups.org/". | |
367 | --> | |
368 | ||
a2326b5b MS |
369 | <h1 class='title'>PPD API (DEPRECATED)</h1> |
370 | ||
8072030b | 371 | <blockquote>The PPD API is deprecated starting in CUPS 1.6/macOS 10.8. Please use the new Job Ticket APIs in the <a href="api-cups.html">CUPS API</a> documentation. These functions will be removed in a future release of CUPS.</blockquote> |
178cb736 | 372 | |
5a738aea MS |
373 | <div class='summary'><table summary='General Information'> |
374 | <thead> | |
375 | <tr> | |
376 | <th>Header</th> | |
377 | <th>cups/ppd.h</th> | |
378 | </tr> | |
379 | </thead> | |
380 | <tbody> | |
381 | <tr> | |
382 | <th>Library</th> | |
383 | <td>-lcups</td> | |
384 | </tr> | |
385 | <tr> | |
386 | <th>See Also</th> | |
387 | <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br> | |
388 | Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br> | |
79e1d494 | 389 | Specifications: <a href='spec-ppd.html' target='_top'>CUPS PPD Extensions</a></td> |
5a738aea MS |
390 | </tr> |
391 | </tbody> | |
392 | </table></div> | |
abacc52b MS |
393 | <div class="contents"> |
394 | <h2 class="title">Contents</h2> | |
395 | <ul class="contents"> | |
396 | <li><a href="#OVERVIEW">Overview</a><ul class="subcontents"> | |
397 | <li><a href="#LOADING">Loading a PPD File</a></li> | |
398 | <li><a href="#OPTIONS_AND_GROUPS">Options and Groups</a></li> | |
399 | <li><a href="#CONSTRAINTS">Constraints</a></li> | |
400 | <li><a href="#PAGE_SIZES">Page Sizes</a></li> | |
401 | <li><a href="#ATTRIBUTES">Attributes</a></li> | |
402 | </ul></li> | |
403 | <li><a href="#FUNCTIONS">Functions</a><ul class="subcontents"> | |
404 | <li><a href="#cupsGetConflicts">cupsGetConflicts</a></li> | |
405 | <li><a href="#cupsGetPPD">cupsGetPPD</a></li> | |
406 | <li><a href="#cupsGetPPD2">cupsGetPPD2</a></li> | |
407 | <li><a href="#cupsGetPPD3">cupsGetPPD3</a></li> | |
408 | <li><a href="#cupsGetServerPPD">cupsGetServerPPD</a></li> | |
409 | <li><a href="#cupsMarkOptions">cupsMarkOptions</a></li> | |
410 | <li><a href="#cupsResolveConflicts">cupsResolveConflicts</a></li> | |
411 | <li><a href="#ppdCollect">ppdCollect</a></li> | |
412 | <li><a href="#ppdCollect2">ppdCollect2</a></li> | |
413 | <li><a href="#ppdConflicts">ppdConflicts</a></li> | |
414 | <li><a href="#ppdEmit">ppdEmit</a></li> | |
415 | <li><a href="#ppdEmitAfterOrder">ppdEmitAfterOrder</a></li> | |
416 | <li><a href="#ppdEmitFd">ppdEmitFd</a></li> | |
417 | <li><a href="#ppdEmitJCL">ppdEmitJCL</a></li> | |
418 | <li><a href="#ppdEmitJCLEnd">ppdEmitJCLEnd</a></li> | |
419 | <li><a href="#ppdEmitString">ppdEmitString</a></li> | |
420 | <li><a href="#ppdFindAttr">ppdFindAttr</a></li> | |
421 | <li><a href="#ppdFindChoice">ppdFindChoice</a></li> | |
422 | <li><a href="#ppdFindCustomOption">ppdFindCustomOption</a></li> | |
423 | <li><a href="#ppdFindCustomParam">ppdFindCustomParam</a></li> | |
424 | <li><a href="#ppdFindMarkedChoice">ppdFindMarkedChoice</a></li> | |
425 | <li><a href="#ppdFindNextAttr">ppdFindNextAttr</a></li> | |
426 | <li><a href="#ppdFindOption">ppdFindOption</a></li> | |
427 | <li><a href="#ppdFirstCustomParam">ppdFirstCustomParam</a></li> | |
428 | <li><a href="#ppdFirstOption">ppdFirstOption</a></li> | |
429 | <li><a href="#ppdInstallableConflict">ppdInstallableConflict</a></li> | |
430 | <li><a href="#ppdIsMarked">ppdIsMarked</a></li> | |
431 | <li><a href="#ppdLocalize">ppdLocalize</a></li> | |
432 | <li><a href="#ppdLocalizeAttr">ppdLocalizeAttr</a></li> | |
433 | <li><a href="#ppdLocalizeIPPReason">ppdLocalizeIPPReason</a></li> | |
434 | <li><a href="#ppdLocalizeMarkerName">ppdLocalizeMarkerName</a></li> | |
435 | <li><a href="#ppdMarkDefaults">ppdMarkDefaults</a></li> | |
436 | <li><a href="#ppdMarkOption">ppdMarkOption</a></li> | |
437 | <li><a href="#ppdNextCustomParam">ppdNextCustomParam</a></li> | |
438 | <li><a href="#ppdNextOption">ppdNextOption</a></li> | |
439 | <li><a href="#ppdPageLength">ppdPageLength</a></li> | |
440 | <li><a href="#ppdPageSize">ppdPageSize</a></li> | |
441 | <li><a href="#ppdPageSizeLimits">ppdPageSizeLimits</a></li> | |
442 | <li><a href="#ppdPageWidth">ppdPageWidth</a></li> | |
443 | </ul></li> | |
444 | <li><a href="#TYPES">Data Types</a><ul class="subcontents"> | |
445 | <li><a href="#ppd_attr_t">ppd_attr_t</a></li> | |
446 | <li><a href="#ppd_choice_t">ppd_choice_t</a></li> | |
447 | <li><a href="#ppd_conform_t">ppd_conform_t</a></li> | |
448 | <li><a href="#ppd_const_t">ppd_const_t</a></li> | |
449 | <li><a href="#ppd_coption_t">ppd_coption_t</a></li> | |
450 | <li><a href="#ppd_cparam_t">ppd_cparam_t</a></li> | |
451 | <li><a href="#ppd_cplimit_t">ppd_cplimit_t</a></li> | |
452 | <li><a href="#ppd_cptype_t">ppd_cptype_t</a></li> | |
453 | <li><a href="#ppd_cpvalue_t">ppd_cpvalue_t</a></li> | |
454 | <li><a href="#ppd_cs_t">ppd_cs_t</a></li> | |
455 | <li><a href="#ppd_emul_t">ppd_emul_t</a></li> | |
456 | <li><a href="#ppd_file_t">ppd_file_t</a></li> | |
457 | <li><a href="#ppd_group_t">ppd_group_t</a></li> | |
458 | <li><a href="#ppd_option_t">ppd_option_t</a></li> | |
459 | <li><a href="#ppd_profile_t">ppd_profile_t</a></li> | |
460 | <li><a href="#ppd_section_t">ppd_section_t</a></li> | |
461 | <li><a href="#ppd_size_t">ppd_size_t</a></li> | |
462 | <li><a href="#ppd_status_t">ppd_status_t</a></li> | |
463 | <li><a href="#ppd_ui_t">ppd_ui_t</a></li> | |
464 | </ul></li> | |
465 | <li><a href="#STRUCTURES">Structures</a><ul class="subcontents"> | |
466 | <li><a href="#ppd_attr_s">ppd_attr_s</a></li> | |
467 | <li><a href="#ppd_choice_s">ppd_choice_s</a></li> | |
468 | <li><a href="#ppd_const_s">ppd_const_s</a></li> | |
469 | <li><a href="#ppd_coption_s">ppd_coption_s</a></li> | |
470 | <li><a href="#ppd_cparam_s">ppd_cparam_s</a></li> | |
471 | <li><a href="#ppd_emul_s">ppd_emul_s</a></li> | |
472 | <li><a href="#ppd_file_s">ppd_file_s</a></li> | |
473 | <li><a href="#ppd_group_s">ppd_group_s</a></li> | |
474 | <li><a href="#ppd_option_s">ppd_option_s</a></li> | |
475 | <li><a href="#ppd_profile_s">ppd_profile_s</a></li> | |
476 | <li><a href="#ppd_size_s">ppd_size_s</a></li> | |
477 | </ul></li> | |
478 | <li><a href="#UNIONS">Unions</a><ul class="subcontents"> | |
479 | <li><a href="#ppd_cplimit_u">ppd_cplimit_u</a></li> | |
480 | <li><a href="#ppd_cpvalue_u">ppd_cpvalue_u</a></li> | |
481 | </ul></li> | |
482 | <li><a href="#ENUMERATIONS">Enumerations</a><ul class="subcontents"> | |
483 | <li><a href="#ppd_conform_e">ppd_conform_e</a></li> | |
484 | <li><a href="#ppd_cs_e">ppd_cs_e</a></li> | |
485 | <li><a href="#ppd_section_e">ppd_section_e</a></li> | |
486 | <li><a href="#ppd_status_e">ppd_status_e</a></li> | |
487 | <li><a href="#ppd_ui_e">ppd_ui_e</a></li> | |
488 | </ul></li> | |
489 | </ul> | |
490 | </div> | |
491 | <div class="body"> | |
5a738aea | 492 | <!-- |
eac3a0a0 | 493 | PPD API introduction for CUPS. |
ef416fc2 | 494 | |
f3c17241 | 495 | Copyright 2007-2012 by Apple Inc. |
bc44d920 | 496 | Copyright 1997-2006 by Easy Software Products, all rights reserved. |
ef416fc2 | 497 | |
498 | These coded instructions, statements, and computer programs are the | |
bc44d920 | 499 | property of Apple Inc. and are protected by Federal copyright |
500 | law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
501 | which should have been included with this file. If this file is | |
502 | file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 503 | --> |
504 | ||
5a738aea | 505 | <h2 class='title'><a name='OVERVIEW'>Overview</a></h2> |
ef416fc2 | 506 | |
8072030b | 507 | <blockquote>The PPD API is deprecated starting in CUPS 1.6/macOS 10.8. Please use the new Job Ticket APIs in the <a href="api-cups.html">CUPS API</a> documentation. These functions will be removed in a future release of CUPS.</blockquote> |
a2326b5b | 508 | |
5a738aea MS |
509 | <p>The CUPS PPD API provides read-only access the data in PostScript Printer |
510 | Description ("PPD") files which are used for all printers with a driver. With | |
79e1d494 MS |
511 | it you can obtain the data necessary to display printer options to users, mark |
512 | option choices and check for conflicting choices, and output marked choices in | |
513 | PostScript output. The <a href="#ppd_file_t"><code>ppd_file_t</code></a> | |
514 | structure contains all of the information in a PPD file.</p> | |
515 | ||
516 | <blockquote><b>Note:</b> | |
517 | ||
518 | <p>The CUPS PPD API uses the terms "option" and "choice" instead of the Adobe | |
519 | terms "MainKeyword" and "OptionKeyword" to refer to specific printer options and | |
520 | features. CUPS also treats option ("MainKeyword") and choice ("OptionKeyword") | |
521 | values as case-insensitive strings, so option "InputSlot" and choice "Upper" | |
522 | are equivalent to "inputslot" and "upper", respectively.</p> | |
523 | </blockquote> | |
ef416fc2 | 524 | |
5a738aea | 525 | <h3><a name="LOADING">Loading a PPD File</a></h3> |
ef416fc2 | 526 | |
5a738aea MS |
527 | <p>The <a href="#ppdOpenFile"><code>ppdOpenFile</code></a> function "opens" a |
528 | PPD file and loads it into memory. For example, the following code opens the | |
529 | current printer's PPD file in a CUPS filter:</p> | |
ef416fc2 | 530 | |
5a738aea MS |
531 | <pre class="example"> |
532 | #include <cups/ppd.h> | |
ef416fc2 | 533 | |
5a738aea | 534 | <a href="#ppd_file_t">ppd_file_t</a> *ppd = <a href="#ppdOpenFile">ppdOpenFile</a>(getenv("PPD")); |
ef416fc2 | 535 | </pre> |
536 | ||
5a738aea MS |
537 | <p>The return value is a pointer to a new |
538 | <a href="#ppd_file_t"><code>ppd_file_t</code></a> structure or <code>NULL</code> | |
539 | if the PPD file does not exist or cannot be loaded. The | |
540 | <a href="#ppdClose"><code>ppdClose</code></a> function frees the memory used | |
541 | by the structure:</p> | |
542 | ||
543 | <pre class="example"> | |
544 | #include <cups/ppd.h> | |
545 | ||
546 | <a href="#ppd_file_t">ppd_file_t</a> *ppd; | |
547 | ||
548 | <a href="#ppdClose">ppdClose</a>(ppd); | |
549 | </pre> | |
550 | ||
79e1d494 MS |
551 | <p>Once closed, pointers to the <a href="#ppd_file_t"><code>ppd_file_t</code></a> |
552 | structure and any data in it will no longer be valid.</p> | |
553 | ||
5a738aea MS |
554 | <h3><a name="OPTIONS_AND_GROUPS">Options and Groups</a></h3> |
555 | ||
556 | <p>PPD files support multiple options, which are stored in arrays of | |
557 | <a href="#ppd_option_t"><code>ppd_option_t</code></a> and | |
558 | <a href="#ppd_choice_t"><code>ppd_choice_t</code></a> structures.</p> | |
559 | ||
560 | <p>Each option in turn is associated with a group stored in a | |
561 | <a href="#ppd_group_t"><code>ppd_group_t</code></a> structure. Groups can be | |
562 | specified in the PPD file; if an option is not associated with a group | |
563 | then it is put in an automatically-generated "General" group. Groups can also | |
564 | have sub-groups, however CUPS currently ignores sub-groups because of past | |
565 | abuses of this functionality.</p> | |
566 | ||
79e1d494 | 567 | <p>Option choices are selected by marking them using one of three functions. The |
5a738aea MS |
568 | first is <a href="#ppdMarkDefaults"><code>ppdMarkDefaults</code></a> which |
569 | selects all of the default options in the PPD file:</p> | |
570 | ||
571 | <pre class="example"> | |
572 | #include <cups/ppd.h> | |
573 | ||
574 | <a href="#ppd_file_t">ppd_file_t</a> *ppd; | |
575 | ||
576 | <a href="#ppdMarkDefaults">ppdMarkDefaults</a>(ppd); | |
577 | </pre> | |
578 | ||
579 | <p>The second is <a href="#ppdMarkOption"><code>ppdMarkOption</code></a> | |
580 | which selects a single option choice in the PPD file. For example, the following | |
79e1d494 | 581 | code selects the upper paper tray:</p> |
5a738aea MS |
582 | |
583 | <pre class="example"> | |
584 | #include <cups/ppd.h> | |
585 | ||
586 | <a href="#ppd_file_t">ppd_file_t</a> *ppd; | |
587 | ||
79e1d494 | 588 | <a href="#ppdMarkOption">ppdMarkOption</a>(ppd, "InputSlot", "Upper"); |
5a738aea MS |
589 | </pre> |
590 | ||
591 | <p>The last function is | |
592 | <a href="#cupsMarkOptions"><code>cupsMarkOptions</code></a> which selects | |
593 | multiple option choices in the PPD file from an array of CUPS options, mapping | |
594 | IPP attributes like "media" and "sides" to their corresponding PPD options. You | |
595 | typically use this function in a print filter with | |
596 | <code>cupsParseOptions</code> and | |
597 | <a href="#ppdMarkDefaults"><code>ppdMarkDefaults</code></a> to select all of | |
598 | the option choices needed for the job, for example:</p> | |
599 | ||
600 | <pre class="example"> | |
601 | #include <cups/ppd.h> | |
602 | ||
603 | <a href="#ppd_file_t">ppd_file_t</a> *ppd = <a href="#ppdOpenFile">ppdOpenFile</a>(getenv("PPD")); | |
604 | cups_option_t *options = NULL; | |
605 | int num_options = cupsParseOptions(argv[5], 0, &options); | |
606 | ||
607 | <a href="#ppdMarkDefaults">ppdMarkDefaults</a>(ppd); | |
608 | <a href="#cupsMarkOptions">cupsMarkOptions</a>(ppd, num_options, options); | |
79e1d494 | 609 | cupsFreeOptions(num_options, options); |
5a738aea MS |
610 | </pre> |
611 | ||
612 | <h3><a name="CONSTRAINTS">Constraints</a></h3> | |
613 | ||
614 | <p>PPD files support specification of conflict conditions, called | |
615 | constraints, between different options. Constraints are stored in an array of | |
616 | <a href="#ppd_const_t"><code>ppd_const_t</code></a> structures which specify | |
617 | the options and choices that conflict with each other. The | |
618 | <a href="#ppdConflicts"><code>ppdConflicts</code></a> function tells you | |
79e1d494 MS |
619 | how many of the selected options are incompatible. Since constraints are |
620 | normally specified in pairs, the returned value is typically an even number.</p> | |
5a738aea MS |
621 | |
622 | <h3><a name="PAGE_SIZES">Page Sizes</a></h3> | |
623 | ||
624 | <p>Page sizes are special options which have physical dimensions and margins | |
625 | associated with them. The size information is stored in | |
626 | <a href="#ppd_size_t"><code>ppd_size_t</code></a> structures and is available | |
627 | by looking up the named size with the | |
628 | <a href="#ppdPageSize"><code>ppdPageSize</code></a> function. The page size and | |
629 | margins are returned in units called points; there are 72 points per inch. If | |
630 | you pass <code>NULL</code> for the size, the currently selected size is | |
631 | returned:</p> | |
632 | ||
633 | <pre class="example"> | |
634 | #include <cups/ppd.h> | |
635 | ||
636 | <a href="#ppd_file_t">ppd_file_t</a> *ppd; | |
637 | <a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, NULL); | |
638 | </pre> | |
639 | ||
640 | <p>Besides the standard page sizes listed in a PPD file, some printers | |
641 | support variable or custom page sizes. Custom page sizes are supported if the | |
642 | <code>variables_sizes</code> member of the | |
643 | <a href="#ppd_file_t"><code>ppd_file_t</code></a> structure is non-zero. | |
644 | The <code>custom_min</code>, <code>custom_max</code>, and | |
645 | <code>custom_margins</code> members of the | |
646 | <a href="#ppd_file_t"><code>ppd_file_t</code></a> structure define the limits | |
647 | of the printable area. To get the resulting media size, use a page size string | |
648 | of the form "Custom.<I>width</I>x<I>length</I>", where "width" and "length" are | |
649 | in points. Custom page size names can also be specified in inches | |
650 | ("Custom.<i>width</i>x<i>height</i>in"), centimeters | |
651 | ("Custom.<i>width</i>x<i>height</i>cm"), or millimeters | |
652 | ("Custom.<i>width</i>x<i>height</i>mm"):</p> | |
653 | ||
654 | <pre class="example"> | |
655 | #include <cups/ppd.h> | |
656 | ||
657 | <a href="#ppd_file_t">ppd_file_t</a> *ppd; | |
658 | ||
659 | /* Get an 576x720 point custom page size */ | |
660 | <a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.576x720"); | |
661 | ||
662 | /* Get an 8x10 inch custom page size */ | |
663 | <a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.8x10in"); | |
664 | ||
665 | /* Get a 100x200 millimeter custom page size */ | |
666 | <a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.100x200mm"); | |
667 | ||
668 | /* Get a 12.7x34.5 centimeter custom page size */ | |
669 | <a href="#ppd_size_t">ppd_size_t</a> *size = <a href="#ppdPageSize">ppdPageSize</a>(ppd, "Custom.12.7x34.5cm"); | |
670 | </pre> | |
671 | ||
79e1d494 MS |
672 | <p>If the PPD does not support variable page sizes, the |
673 | <a href="#ppdPageSize"><code>ppdPageSize</code></a> function will return | |
674 | <code>NULL</code>.</p> | |
675 | ||
5a738aea MS |
676 | <h3><a name="ATTRIBUTES">Attributes</a></h3> |
677 | ||
678 | <p>Every PPD file is composed of one or more attributes. Most of these | |
679 | attributes are used to define groups, options, choices, and page sizes, | |
79e1d494 MS |
680 | however several informational attributes may be present which you can access |
681 | in your program or filter. Attributes normally look like one of the following | |
682 | examples in a PPD file:</p> | |
5a738aea MS |
683 | |
684 | <pre class="example"> | |
685 | *name: "value" | |
686 | *name spec: "value" | |
687 | *name spec/text: "value" | |
688 | </pre> | |
689 | ||
690 | <p>The <a href="#ppdFindAttr"><code>ppdFindAttr</code></a> and | |
691 | <a href="#ppdFindNextAttr"><code>ppdFindNextAttr</code></a> functions find the | |
692 | first and next instances, respectively, of the named attribute with the given | |
693 | "spec" string and return a <a href="#ppd_attr_t"><code>ppd_attr_t</code></a> | |
694 | structure. If you provide a NULL specifier string, all attributes with the | |
695 | given name will be returned. For example, the following code lists all of the | |
696 | <code>Product</code> attributes in a PPD file:</p> | |
697 | ||
698 | <pre class="example"> | |
699 | #include <cups/ppd.h> | |
700 | ||
701 | <a href="#ppd_file_t">ppd_file_t</a> *ppd; | |
702 | <a href="#ppd_attr_t">ppd_attr_t</a> *attr; | |
703 | ||
704 | for (attr = <a href="#ppdFindAttr">ppdFindAttr</a>(ppd, "Product", NULL); | |
705 | attr != NULL; | |
706 | attr = <a href="#ppdFindNextAttr">ppdFindNextAttr</a>(ppd, "Product", NULL)) | |
707 | puts(attr->value); | |
708 | </pre> | |
abacc52b MS |
709 | <h2 class="title"><a id="FUNCTIONS">Functions</a></h2> |
710 | <h3 class="function"><span class="info"> CUPS 1.4/macOS 10.6 </span><a id="cupsGetConflicts">cupsGetConflicts</a></h3> | |
711 | <p class="description">Get a list of conflicting options in a marked PPD.</p> | |
d2354e63 | 712 | <p class="code"> |
798d6e29 MS |
713 | int cupsGetConflicts (<br> |
714 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
715 |     const char *option,<br> | |
716 |     const char *choice,<br> | |
717 |     cups_option_t **options<br> | |
d2354e63 MS |
718 | );</p> |
719 | <h4 class="parameters">Parameters</h4> | |
720 | <dl> | |
721 | <dt>ppd</dt> | |
abacc52b | 722 | <dd class="description">PPD file</dd> |
d2354e63 | 723 | <dt>option</dt> |
abacc52b | 724 | <dd class="description">Option to test</dd> |
d2354e63 | 725 | <dt>choice</dt> |
abacc52b | 726 | <dd class="description">Choice to test</dd> |
d2354e63 | 727 | <dt>options</dt> |
abacc52b | 728 | <dd class="description">Conflicting options</dd> |
d2354e63 MS |
729 | </dl> |
730 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 731 | <p class="description">Number of conflicting options</p> |
d2354e63 | 732 | <h4 class="discussion">Discussion</h4> |
abacc52b | 733 | <p class="discussion">This function gets a list of options that would conflict if "option" and |
d2354e63 MS |
734 | "choice" were marked in the PPD. You would typically call this function |
735 | after marking the currently selected options in the PPD in order to | |
736 | determine whether a new option selection would cause a conflict.<br> | |
737 | <br> | |
738 | The number of conflicting options are returned with "options" pointing to | |
739 | the conflicting options. The returned option array must be freed using | |
740 | <a href="#cupsFreeOptions"><code>cupsFreeOptions</code></a>. | |
741 | ||
6e5a57e8 | 742 | </p> |
abacc52b MS |
743 | <h3 class="function"><a id="cupsGetPPD">cupsGetPPD</a></h3> |
744 | <p class="description">Get the PPD file for a printer on the default server.</p> | |
6e5a57e8 | 745 | <p class="code"> |
798d6e29 MS |
746 | const char *cupsGetPPD (<br> |
747 |     const char *name<br> | |
6e5a57e8 MS |
748 | );</p> |
749 | <h4 class="parameters">Parameters</h4> | |
750 | <dl> | |
751 | <dt>name</dt> | |
abacc52b | 752 | <dd class="description">Destination name</dd> |
6e5a57e8 MS |
753 | </dl> |
754 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 755 | <p class="description">Filename for PPD file</p> |
6e5a57e8 | 756 | <h4 class="discussion">Discussion</h4> |
abacc52b | 757 | <p class="discussion">For classes, <code>cupsGetPPD</code> returns the PPD file for the first printer |
6e5a57e8 MS |
758 | in the class.<br> |
759 | <br> | |
760 | The returned filename is stored in a static buffer and is overwritten with | |
761 | each call to <code>cupsGetPPD</code> or <a href="#cupsGetPPD2"><code>cupsGetPPD2</code></a>. The caller "owns" the | |
762 | file that is created and must <code>unlink</code> the returned filename.</p> | |
abacc52b MS |
763 | <h3 class="function"><span class="info"> CUPS 1.1.21/macOS 10.4 </span><a id="cupsGetPPD2">cupsGetPPD2</a></h3> |
764 | <p class="description">Get the PPD file for a printer from the specified server.</p> | |
6e5a57e8 | 765 | <p class="code"> |
798d6e29 MS |
766 | const char *cupsGetPPD2 (<br> |
767 |     http_t *http,<br> | |
768 |     const char *name<br> | |
6e5a57e8 MS |
769 | );</p> |
770 | <h4 class="parameters">Parameters</h4> | |
771 | <dl> | |
772 | <dt>http</dt> | |
abacc52b | 773 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
6e5a57e8 | 774 | <dt>name</dt> |
abacc52b | 775 | <dd class="description">Destination name</dd> |
6e5a57e8 MS |
776 | </dl> |
777 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 778 | <p class="description">Filename for PPD file</p> |
6e5a57e8 | 779 | <h4 class="discussion">Discussion</h4> |
abacc52b | 780 | <p class="discussion">For classes, <code>cupsGetPPD2</code> returns the PPD file for the first printer |
6e5a57e8 MS |
781 | in the class.<br> |
782 | <br> | |
783 | The returned filename is stored in a static buffer and is overwritten with | |
784 | each call to <a href="#cupsGetPPD"><code>cupsGetPPD</code></a> or <code>cupsGetPPD2</code>. The caller "owns" the | |
785 | file that is created and must <code>unlink</code> the returned filename. | |
786 | ||
787 | </p> | |
abacc52b MS |
788 | <h3 class="function"><span class="info"> CUPS 1.4/macOS 10.6 </span><a id="cupsGetPPD3">cupsGetPPD3</a></h3> |
789 | <p class="description">Get the PPD file for a printer on the specified | |
6e5a57e8 MS |
790 | server if it has changed.</p> |
791 | <p class="code"> | |
798d6e29 MS |
792 | http_status_t cupsGetPPD3 (<br> |
793 |     http_t *http,<br> | |
794 |     const char *name,<br> | |
795 |     time_t *modtime,<br> | |
796 |     char *buffer,<br> | |
797 |     size_t bufsize<br> | |
6e5a57e8 MS |
798 | );</p> |
799 | <h4 class="parameters">Parameters</h4> | |
800 | <dl> | |
801 | <dt>http</dt> | |
abacc52b | 802 | <dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd> |
6e5a57e8 | 803 | <dt>name</dt> |
abacc52b | 804 | <dd class="description">Destination name</dd> |
6e5a57e8 | 805 | <dt>modtime</dt> |
abacc52b | 806 | <dd class="description">Modification time</dd> |
6e5a57e8 | 807 | <dt>buffer</dt> |
abacc52b | 808 | <dd class="description">Filename buffer</dd> |
6e5a57e8 | 809 | <dt>bufsize</dt> |
abacc52b | 810 | <dd class="description">Size of filename buffer</dd> |
6e5a57e8 MS |
811 | </dl> |
812 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 813 | <p class="description">HTTP status</p> |
6e5a57e8 | 814 | <h4 class="discussion">Discussion</h4> |
abacc52b | 815 | <p class="discussion">The "modtime" parameter contains the modification time of any |
6e5a57e8 MS |
816 | locally-cached content and is updated with the time from the PPD file on |
817 | the server.<br> | |
818 | <br> | |
819 | The "buffer" parameter contains the local PPD filename. If it contains | |
820 | the empty string, a new temporary file is created, otherwise the existing | |
821 | file will be overwritten as needed. The caller "owns" the file that is | |
822 | created and must <code>unlink</code> the returned filename.<br> | |
823 | <br> | |
824 | On success, <code>HTTP_STATUS_OK</code> is returned for a new PPD file and | |
825 | <code>HTTP_STATUS_NOT_MODIFIED</code> if the existing PPD file is up-to-date. Any other | |
826 | status is an error.<br> | |
827 | <br> | |
828 | For classes, <code>cupsGetPPD3</code> returns the PPD file for the first printer | |
829 | in the class. | |
830 | ||
831 | </p> | |
abacc52b MS |
832 | <h3 class="function"><span class="info"> CUPS 1.3/macOS 10.5 </span><a id="cupsGetServerPPD">cupsGetServerPPD</a></h3> |
833 | <p class="description">Get an available PPD file from the server.</p> | |
6e5a57e8 | 834 | <p class="code"> |
798d6e29 MS |
835 | char *cupsGetServerPPD (<br> |
836 |     http_t *http,<br> | |
837 |     const char *name<br> | |
6e5a57e8 MS |
838 | );</p> |
839 | <h4 class="parameters">Parameters</h4> | |
840 | <dl> | |
841 | <dt>http</dt> | |
abacc52b | 842 | <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd> |
6e5a57e8 | 843 | <dt>name</dt> |
abacc52b | 844 | <dd class="description">Name of PPD file ("ppd-name")</dd> |
6e5a57e8 MS |
845 | </dl> |
846 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 847 | <p class="description">Name of PPD file or <code>NULL</code> on error</p> |
6e5a57e8 | 848 | <h4 class="discussion">Discussion</h4> |
abacc52b | 849 | <p class="discussion">This function returns the named PPD file from the server. The |
6e5a57e8 MS |
850 | list of available PPDs is provided by the IPP <code>CUPS_GET_PPDS</code> |
851 | operation.<br> | |
852 | <br> | |
853 | You must remove (unlink) the PPD file when you are finished with | |
854 | it. The PPD filename is stored in a static location that will be | |
855 | overwritten on the next call to <a href="#cupsGetPPD"><code>cupsGetPPD</code></a>, <a href="#cupsGetPPD2"><code>cupsGetPPD2</code></a>, | |
856 | or <a href="#cupsGetServerPPD"><code>cupsGetServerPPD</code></a>. | |
857 | ||
d2354e63 | 858 | </p> |
abacc52b MS |
859 | <h3 class="function"><a id="cupsMarkOptions">cupsMarkOptions</a></h3> |
860 | <p class="description">Mark command-line options in a PPD file.</p> | |
5a738aea | 861 | <p class="code"> |
798d6e29 MS |
862 | int cupsMarkOptions (<br> |
863 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
864 |     int num_options,<br> | |
865 |     cups_option_t *options<br> | |
5a738aea MS |
866 | );</p> |
867 | <h4 class="parameters">Parameters</h4> | |
868 | <dl> | |
869 | <dt>ppd</dt> | |
abacc52b | 870 | <dd class="description">PPD file</dd> |
5a738aea | 871 | <dt>num_options</dt> |
abacc52b | 872 | <dd class="description">Number of options</dd> |
5a738aea | 873 | <dt>options</dt> |
abacc52b | 874 | <dd class="description">Options</dd> |
5a738aea MS |
875 | </dl> |
876 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 877 | <p class="description">1 if conflicts exist, 0 otherwise</p> |
5a738aea | 878 | <h4 class="discussion">Discussion</h4> |
abacc52b | 879 | <p class="discussion">This function maps the IPP "finishings", "media", "mirror", |
82f97232 MS |
880 | "multiple-document-handling", "output-bin", "print-color-mode", |
881 | "print-quality", "printer-resolution", and "sides" attributes to their | |
882 | corresponding PPD options and choices.</p> | |
abacc52b MS |
883 | <h3 class="function"><span class="info"> CUPS 1.4/macOS 10.6 </span><a id="cupsResolveConflicts">cupsResolveConflicts</a></h3> |
884 | <p class="description">Resolve conflicts in a marked PPD.</p> | |
66ab9486 | 885 | <p class="code"> |
798d6e29 MS |
886 | int cupsResolveConflicts (<br> |
887 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
888 |     const char *option,<br> | |
889 |     const char *choice,<br> | |
890 |     int *num_options,<br> | |
891 |     cups_option_t **options<br> | |
66ab9486 MS |
892 | );</p> |
893 | <h4 class="parameters">Parameters</h4> | |
894 | <dl> | |
895 | <dt>ppd</dt> | |
abacc52b | 896 | <dd class="description">PPD file</dd> |
66ab9486 | 897 | <dt>option</dt> |
abacc52b | 898 | <dd class="description">Newly selected option or <code>NULL</code> for none</dd> |
66ab9486 | 899 | <dt>choice</dt> |
abacc52b | 900 | <dd class="description">Newly selected choice or <code>NULL</code> for none</dd> |
66ab9486 | 901 | <dt>num_options</dt> |
abacc52b | 902 | <dd class="description">Number of additional selected options</dd> |
66ab9486 | 903 | <dt>options</dt> |
abacc52b | 904 | <dd class="description">Additional selected options</dd> |
66ab9486 MS |
905 | </dl> |
906 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 907 | <p class="description">1 on success, 0 on failure</p> |
66ab9486 | 908 | <h4 class="discussion">Discussion</h4> |
abacc52b | 909 | <p class="discussion">This function attempts to resolve any conflicts in a marked PPD, returning |
06d4e77b MS |
910 | a list of option changes that are required to resolve them. On input, |
911 | "num_options" and "options" contain any pending option changes that have | |
912 | not yet been marked, while "option" and "choice" contain the most recent | |
66ab9486 MS |
913 | selection which may or may not be in "num_options" or "options".<br> |
914 | <br> | |
915 | On successful return, "num_options" and "options" are updated to contain | |
916 | "option" and "choice" along with any changes required to resolve conflicts | |
06d4e77b MS |
917 | specified in the PPD file and 1 is returned.<br> |
918 | <br> | |
919 | If option conflicts cannot be resolved, "num_options" and "options" are not | |
920 | changed and 0 is returned.<br> | |
921 | <br> | |
922 | When resolving conflicts, <code>cupsResolveConflicts</code> does not consider | |
923 | changes to the current page size (<code>media</code>, <code>PageSize</code>, and | |
924 | <code>PageRegion</code>) or to the most recent option specified in "option". | |
925 | Thus, if the only way to resolve a conflict is to change the page size | |
926 | or the option the user most recently changed, <code>cupsResolveConflicts</code> | |
927 | will return 0 to indicate it was unable to resolve the conflicts.<br> | |
928 | <br> | |
929 | The <code>cupsResolveConflicts</code> function uses one of two sources of option | |
930 | constraint information. The preferred constraint information is defined by | |
66ab9486 | 931 | <code>cupsUIConstraints</code> and <code>cupsUIResolver</code> attributes - in this |
06d4e77b | 932 | case, the PPD file provides constraint resolution actions.<br> |
66ab9486 | 933 | <br> |
06d4e77b | 934 | The backup constraint information is defined by the |
66ab9486 | 935 | <code>UIConstraints</code> and <code>NonUIConstraints</code> attributes. These |
06d4e77b MS |
936 | constraints are resolved algorithmically by first selecting the default |
937 | choice for the conflicting option, then iterating over all possible choices | |
938 | until a non-conflicting option choice is found. | |
66ab9486 MS |
939 | |
940 | </p> | |
abacc52b MS |
941 | <h3 class="function"><a id="ppdCollect">ppdCollect</a></h3> |
942 | <p class="description">Collect all marked options that reside in the specified | |
5a738aea MS |
943 | section.</p> |
944 | <p class="code"> | |
798d6e29 MS |
945 | int ppdCollect (<br> |
946 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
947 |     <a href="#ppd_section_t">ppd_section_t</a> section,<br> | |
948 |     <a href="#ppd_choice_t">ppd_choice_t</a> ***choices<br> | |
5a738aea MS |
949 | );</p> |
950 | <h4 class="parameters">Parameters</h4> | |
951 | <dl> | |
952 | <dt>ppd</dt> | |
abacc52b | 953 | <dd class="description">PPD file data</dd> |
5a738aea | 954 | <dt>section</dt> |
abacc52b | 955 | <dd class="description">Section to collect</dd> |
5a738aea | 956 | <dt>choices</dt> |
abacc52b | 957 | <dd class="description">Pointers to choices</dd> |
5a738aea MS |
958 | </dl> |
959 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 960 | <p class="description">Number of options marked</p> |
5a738aea | 961 | <h4 class="discussion">Discussion</h4> |
abacc52b | 962 | <p class="discussion">The choices array should be freed using <code>free</code> when you are |
5a738aea | 963 | finished with it.</p> |
abacc52b MS |
964 | <h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppdCollect2">ppdCollect2</a></h3> |
965 | <p class="description">Collect all marked options that reside in the | |
5a738aea MS |
966 | specified section and minimum order.</p> |
967 | <p class="code"> | |
798d6e29 MS |
968 | int ppdCollect2 (<br> |
969 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
970 |     <a href="#ppd_section_t">ppd_section_t</a> section,<br> | |
971 |     float min_order,<br> | |
972 |     <a href="#ppd_choice_t">ppd_choice_t</a> ***choices<br> | |
5a738aea MS |
973 | );</p> |
974 | <h4 class="parameters">Parameters</h4> | |
975 | <dl> | |
976 | <dt>ppd</dt> | |
abacc52b | 977 | <dd class="description">PPD file data</dd> |
5a738aea | 978 | <dt>section</dt> |
abacc52b | 979 | <dd class="description">Section to collect</dd> |
5a738aea | 980 | <dt>min_order</dt> |
abacc52b | 981 | <dd class="description">Minimum OrderDependency value</dd> |
5a738aea | 982 | <dt>choices</dt> |
abacc52b | 983 | <dd class="description">Pointers to choices</dd> |
5a738aea MS |
984 | </dl> |
985 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 986 | <p class="description">Number of options marked</p> |
5a738aea | 987 | <h4 class="discussion">Discussion</h4> |
abacc52b | 988 | <p class="discussion">The choices array should be freed using <code>free</code> when you are |
5a738aea MS |
989 | finished with it. |
990 | ||
991 | </p> | |
abacc52b MS |
992 | <h3 class="function"><a id="ppdConflicts">ppdConflicts</a></h3> |
993 | <p class="description">Check to see if there are any conflicts among the | |
5a738aea MS |
994 | marked option choices.</p> |
995 | <p class="code"> | |
798d6e29 MS |
996 | int ppdConflicts (<br> |
997 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd<br> | |
5a738aea MS |
998 | );</p> |
999 | <h4 class="parameters">Parameters</h4> | |
1000 | <dl> | |
1001 | <dt>ppd</dt> | |
abacc52b | 1002 | <dd class="description">PPD to check</dd> |
5a738aea MS |
1003 | </dl> |
1004 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 1005 | <p class="description">Number of conflicts found</p> |
5a738aea | 1006 | <h4 class="discussion">Discussion</h4> |
abacc52b MS |
1007 | <p class="discussion">The returned value is the same as returned by <a href="#ppdMarkOption"><code>ppdMarkOption</code></a>.</p> |
1008 | <h3 class="function"><a id="ppdEmit">ppdEmit</a></h3> | |
1009 | <p class="description">Emit code for marked options to a file.</p> | |
5a738aea | 1010 | <p class="code"> |
798d6e29 MS |
1011 | int ppdEmit (<br> |
1012 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1013 |     FILE *fp,<br> | |
1014 |     <a href="#ppd_section_t">ppd_section_t</a> section<br> | |
5a738aea MS |
1015 | );</p> |
1016 | <h4 class="parameters">Parameters</h4> | |
1017 | <dl> | |
1018 | <dt>ppd</dt> | |
abacc52b | 1019 | <dd class="description">PPD file record</dd> |
5a738aea | 1020 | <dt>fp</dt> |
abacc52b | 1021 | <dd class="description">File to write to</dd> |
5a738aea | 1022 | <dt>section</dt> |
abacc52b | 1023 | <dd class="description">Section to write</dd> |
5a738aea MS |
1024 | </dl> |
1025 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1026 | <p class="description">0 on success, -1 on failure</p> |
1027 | <h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppdEmitAfterOrder">ppdEmitAfterOrder</a></h3> | |
1028 | <p class="description">Emit a subset of the code for marked options to a file.</p> | |
5a738aea | 1029 | <p class="code"> |
798d6e29 MS |
1030 | int ppdEmitAfterOrder (<br> |
1031 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1032 |     FILE *fp,<br> | |
1033 |     <a href="#ppd_section_t">ppd_section_t</a> section,<br> | |
1034 |     int limit,<br> | |
1035 |     float min_order<br> | |
5a738aea MS |
1036 | );</p> |
1037 | <h4 class="parameters">Parameters</h4> | |
1038 | <dl> | |
1039 | <dt>ppd</dt> | |
abacc52b | 1040 | <dd class="description">PPD file record</dd> |
5a738aea | 1041 | <dt>fp</dt> |
abacc52b | 1042 | <dd class="description">File to write to</dd> |
5a738aea | 1043 | <dt>section</dt> |
abacc52b | 1044 | <dd class="description">Section to write</dd> |
5a738aea | 1045 | <dt>limit</dt> |
abacc52b | 1046 | <dd class="description">Non-zero to use min_order</dd> |
5a738aea | 1047 | <dt>min_order</dt> |
abacc52b | 1048 | <dd class="description">Lowest OrderDependency</dd> |
5a738aea MS |
1049 | </dl> |
1050 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 1051 | <p class="description">0 on success, -1 on failure</p> |
5a738aea | 1052 | <h4 class="discussion">Discussion</h4> |
abacc52b | 1053 | <p class="discussion">When "limit" is non-zero, this function only emits options whose |
5a738aea MS |
1054 | OrderDependency value is greater than or equal to "min_order".<br> |
1055 | <br> | |
1056 | When "limit" is zero, this function is identical to ppdEmit(). | |
1057 | ||
1058 | </p> | |
abacc52b MS |
1059 | <h3 class="function"><a id="ppdEmitFd">ppdEmitFd</a></h3> |
1060 | <p class="description">Emit code for marked options to a file.</p> | |
5a738aea | 1061 | <p class="code"> |
798d6e29 MS |
1062 | int ppdEmitFd (<br> |
1063 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1064 |     int fd,<br> | |
1065 |     <a href="#ppd_section_t">ppd_section_t</a> section<br> | |
5a738aea MS |
1066 | );</p> |
1067 | <h4 class="parameters">Parameters</h4> | |
1068 | <dl> | |
1069 | <dt>ppd</dt> | |
abacc52b | 1070 | <dd class="description">PPD file record</dd> |
5a738aea | 1071 | <dt>fd</dt> |
abacc52b | 1072 | <dd class="description">File to write to</dd> |
5a738aea | 1073 | <dt>section</dt> |
abacc52b | 1074 | <dd class="description">Section to write</dd> |
5a738aea MS |
1075 | </dl> |
1076 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1077 | <p class="description">0 on success, -1 on failure</p> |
1078 | <h3 class="function"><a id="ppdEmitJCL">ppdEmitJCL</a></h3> | |
1079 | <p class="description">Emit code for JCL options to a file.</p> | |
5a738aea | 1080 | <p class="code"> |
798d6e29 MS |
1081 | int ppdEmitJCL (<br> |
1082 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1083 |     FILE *fp,<br> | |
1084 |     int job_id,<br> | |
1085 |     const char *user,<br> | |
1086 |     const char *title<br> | |
5a738aea MS |
1087 | );</p> |
1088 | <h4 class="parameters">Parameters</h4> | |
1089 | <dl> | |
1090 | <dt>ppd</dt> | |
abacc52b | 1091 | <dd class="description">PPD file record</dd> |
5a738aea | 1092 | <dt>fp</dt> |
abacc52b | 1093 | <dd class="description">File to write to</dd> |
5a738aea | 1094 | <dt>job_id</dt> |
abacc52b | 1095 | <dd class="description">Job ID</dd> |
5a738aea | 1096 | <dt>user</dt> |
abacc52b | 1097 | <dd class="description">Username</dd> |
5a738aea | 1098 | <dt>title</dt> |
abacc52b | 1099 | <dd class="description">Title</dd> |
5a738aea MS |
1100 | </dl> |
1101 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1102 | <p class="description">0 on success, -1 on failure</p> |
1103 | <h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppdEmitJCLEnd">ppdEmitJCLEnd</a></h3> | |
1104 | <p class="description">Emit JCLEnd code to a file.</p> | |
5a738aea | 1105 | <p class="code"> |
798d6e29 MS |
1106 | int ppdEmitJCLEnd (<br> |
1107 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1108 |     FILE *fp<br> | |
5a738aea MS |
1109 | );</p> |
1110 | <h4 class="parameters">Parameters</h4> | |
1111 | <dl> | |
1112 | <dt>ppd</dt> | |
abacc52b | 1113 | <dd class="description">PPD file record</dd> |
5a738aea | 1114 | <dt>fp</dt> |
abacc52b | 1115 | <dd class="description">File to write to</dd> |
5a738aea MS |
1116 | </dl> |
1117 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1118 | <p class="description">0 on success, -1 on failure</p> |
1119 | <h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppdEmitString">ppdEmitString</a></h3> | |
1120 | <p class="description">Get a string containing the code for marked options.</p> | |
5a738aea | 1121 | <p class="code"> |
798d6e29 MS |
1122 | char *ppdEmitString (<br> |
1123 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1124 |     <a href="#ppd_section_t">ppd_section_t</a> section,<br> | |
1125 |     float min_order<br> | |
5a738aea MS |
1126 | );</p> |
1127 | <h4 class="parameters">Parameters</h4> | |
1128 | <dl> | |
1129 | <dt>ppd</dt> | |
abacc52b | 1130 | <dd class="description">PPD file record</dd> |
5a738aea | 1131 | <dt>section</dt> |
abacc52b | 1132 | <dd class="description">Section to write</dd> |
5a738aea | 1133 | <dt>min_order</dt> |
abacc52b | 1134 | <dd class="description">Lowest OrderDependency</dd> |
5a738aea MS |
1135 | </dl> |
1136 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 1137 | <p class="description">String containing option code or <code>NULL</code> if there is no option code</p> |
5a738aea | 1138 | <h4 class="discussion">Discussion</h4> |
abacc52b | 1139 | <p class="discussion">When "min_order" is greater than zero, this function only includes options |
80ca4592 | 1140 | whose OrderDependency value is greater than or equal to "min_order". |
1141 | Otherwise, all options in the specified section are included in the | |
5a738aea MS |
1142 | returned string.<br> |
1143 | <br> | |
1144 | The return string is allocated on the heap and should be freed using | |
1145 | <code>free</code> when you are done with it. | |
1146 | ||
1147 | </p> | |
abacc52b MS |
1148 | <h3 class="function"><span class="info"> CUPS 1.1.19/macOS 10.3 </span><a id="ppdFindAttr">ppdFindAttr</a></h3> |
1149 | <p class="description">Find the first matching attribute.</p> | |
5a738aea | 1150 | <p class="code"> |
798d6e29 MS |
1151 | <a href="#ppd_attr_t">ppd_attr_t</a> *ppdFindAttr (<br> |
1152 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1153 |     const char *name,<br> | |
1154 |     const char *spec<br> | |
5a738aea MS |
1155 | );</p> |
1156 | <h4 class="parameters">Parameters</h4> | |
1157 | <dl> | |
1158 | <dt>ppd</dt> | |
abacc52b | 1159 | <dd class="description">PPD file data</dd> |
5a738aea | 1160 | <dt>name</dt> |
abacc52b | 1161 | <dd class="description">Attribute name</dd> |
5a738aea | 1162 | <dt>spec</dt> |
abacc52b | 1163 | <dd class="description">Specifier string or <code>NULL</code></dd> |
5a738aea MS |
1164 | </dl> |
1165 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1166 | <p class="description">Attribute or <code>NULL</code> if not found</p> |
1167 | <h3 class="function"><a id="ppdFindChoice">ppdFindChoice</a></h3> | |
1168 | <p class="description">Return a pointer to an option choice.</p> | |
5a738aea | 1169 | <p class="code"> |
798d6e29 MS |
1170 | <a href="#ppd_choice_t">ppd_choice_t</a> *ppdFindChoice (<br> |
1171 |     <a href="#ppd_option_t">ppd_option_t</a> *o,<br> | |
1172 |     const char *choice<br> | |
5a738aea MS |
1173 | );</p> |
1174 | <h4 class="parameters">Parameters</h4> | |
1175 | <dl> | |
1176 | <dt>o</dt> | |
abacc52b | 1177 | <dd class="description">Pointer to option</dd> |
5a738aea | 1178 | <dt>choice</dt> |
abacc52b | 1179 | <dd class="description">Name of choice</dd> |
5a738aea MS |
1180 | </dl> |
1181 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1182 | <p class="description">Choice pointer or <code>NULL</code></p> |
1183 | <h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppdFindCustomOption">ppdFindCustomOption</a></h3> | |
1184 | <p class="description">Find a custom option.</p> | |
5a738aea | 1185 | <p class="code"> |
798d6e29 MS |
1186 | <a href="#ppd_coption_t">ppd_coption_t</a> *ppdFindCustomOption (<br> |
1187 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1188 |     const char *keyword<br> | |
5a738aea MS |
1189 | );</p> |
1190 | <h4 class="parameters">Parameters</h4> | |
1191 | <dl> | |
1192 | <dt>ppd</dt> | |
abacc52b | 1193 | <dd class="description">PPD file</dd> |
5a738aea | 1194 | <dt>keyword</dt> |
abacc52b | 1195 | <dd class="description">Custom option name</dd> |
5a738aea MS |
1196 | </dl> |
1197 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1198 | <p class="description">Custom option or NULL</p> |
1199 | <h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppdFindCustomParam">ppdFindCustomParam</a></h3> | |
1200 | <p class="description">Find a parameter for a custom option.</p> | |
5a738aea | 1201 | <p class="code"> |
798d6e29 MS |
1202 | <a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdFindCustomParam (<br> |
1203 |     <a href="#ppd_coption_t">ppd_coption_t</a> *opt,<br> | |
1204 |     const char *name<br> | |
5a738aea MS |
1205 | );</p> |
1206 | <h4 class="parameters">Parameters</h4> | |
1207 | <dl> | |
1208 | <dt>opt</dt> | |
abacc52b | 1209 | <dd class="description">Custom option</dd> |
5a738aea | 1210 | <dt>name</dt> |
abacc52b | 1211 | <dd class="description">Parameter name</dd> |
5a738aea MS |
1212 | </dl> |
1213 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1214 | <p class="description">Custom parameter or NULL</p> |
1215 | <h3 class="function"><a id="ppdFindMarkedChoice">ppdFindMarkedChoice</a></h3> | |
1216 | <p class="description">Return the marked choice for the specified option.</p> | |
5a738aea | 1217 | <p class="code"> |
798d6e29 MS |
1218 | <a href="#ppd_choice_t">ppd_choice_t</a> *ppdFindMarkedChoice (<br> |
1219 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1220 |     const char *option<br> | |
5a738aea MS |
1221 | );</p> |
1222 | <h4 class="parameters">Parameters</h4> | |
1223 | <dl> | |
1224 | <dt>ppd</dt> | |
abacc52b | 1225 | <dd class="description">PPD file</dd> |
5a738aea | 1226 | <dt>option</dt> |
abacc52b | 1227 | <dd class="description">Keyword/option name</dd> |
5a738aea MS |
1228 | </dl> |
1229 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1230 | <p class="description">Pointer to choice or <code>NULL</code></p> |
1231 | <h3 class="function"><span class="info"> CUPS 1.1.19/macOS 10.3 </span><a id="ppdFindNextAttr">ppdFindNextAttr</a></h3> | |
1232 | <p class="description">Find the next matching attribute.</p> | |
5a738aea | 1233 | <p class="code"> |
798d6e29 MS |
1234 | <a href="#ppd_attr_t">ppd_attr_t</a> *ppdFindNextAttr (<br> |
1235 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1236 |     const char *name,<br> | |
1237 |     const char *spec<br> | |
5a738aea MS |
1238 | );</p> |
1239 | <h4 class="parameters">Parameters</h4> | |
1240 | <dl> | |
1241 | <dt>ppd</dt> | |
abacc52b | 1242 | <dd class="description">PPD file data</dd> |
5a738aea | 1243 | <dt>name</dt> |
abacc52b | 1244 | <dd class="description">Attribute name</dd> |
5a738aea | 1245 | <dt>spec</dt> |
abacc52b | 1246 | <dd class="description">Specifier string or <code>NULL</code></dd> |
5a738aea MS |
1247 | </dl> |
1248 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1249 | <p class="description">Attribute or <code>NULL</code> if not found</p> |
1250 | <h3 class="function"><a id="ppdFindOption">ppdFindOption</a></h3> | |
1251 | <p class="description">Return a pointer to the specified option.</p> | |
5a738aea | 1252 | <p class="code"> |
798d6e29 MS |
1253 | <a href="#ppd_option_t">ppd_option_t</a> *ppdFindOption (<br> |
1254 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1255 |     const char *option<br> | |
5a738aea MS |
1256 | );</p> |
1257 | <h4 class="parameters">Parameters</h4> | |
1258 | <dl> | |
1259 | <dt>ppd</dt> | |
abacc52b | 1260 | <dd class="description">PPD file data</dd> |
5a738aea | 1261 | <dt>option</dt> |
abacc52b | 1262 | <dd class="description">Option/Keyword name</dd> |
5a738aea MS |
1263 | </dl> |
1264 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1265 | <p class="description">Pointer to option or <code>NULL</code></p> |
1266 | <h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppdFirstCustomParam">ppdFirstCustomParam</a></h3> | |
1267 | <p class="description">Return the first parameter for a custom option.</p> | |
5a738aea | 1268 | <p class="code"> |
798d6e29 MS |
1269 | <a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdFirstCustomParam (<br> |
1270 |     <a href="#ppd_coption_t">ppd_coption_t</a> *opt<br> | |
5a738aea MS |
1271 | );</p> |
1272 | <h4 class="parameters">Parameters</h4> | |
1273 | <dl> | |
1274 | <dt>opt</dt> | |
abacc52b | 1275 | <dd class="description">Custom option</dd> |
5a738aea MS |
1276 | </dl> |
1277 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1278 | <p class="description">Custom parameter or NULL</p> |
1279 | <h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppdFirstOption">ppdFirstOption</a></h3> | |
1280 | <p class="description">Return the first option in the PPD file.</p> | |
5a738aea | 1281 | <p class="code"> |
798d6e29 MS |
1282 | <a href="#ppd_option_t">ppd_option_t</a> *ppdFirstOption (<br> |
1283 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd<br> | |
5a738aea MS |
1284 | );</p> |
1285 | <h4 class="parameters">Parameters</h4> | |
1286 | <dl> | |
1287 | <dt>ppd</dt> | |
abacc52b | 1288 | <dd class="description">PPD file</dd> |
5a738aea MS |
1289 | </dl> |
1290 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 1291 | <p class="description">First option or <code>NULL</code></p> |
5a738aea | 1292 | <h4 class="discussion">Discussion</h4> |
abacc52b | 1293 | <p class="discussion">Options are returned from all groups in ascending alphanumeric order. |
5a738aea | 1294 | |
66ab9486 | 1295 | </p> |
abacc52b MS |
1296 | <h3 class="function"><span class="info"> CUPS 1.4/macOS 10.6 </span><a id="ppdInstallableConflict">ppdInstallableConflict</a></h3> |
1297 | <p class="description">Test whether an option choice conflicts with | |
66ab9486 MS |
1298 | an installable option.</p> |
1299 | <p class="code"> | |
798d6e29 MS |
1300 | int ppdInstallableConflict (<br> |
1301 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1302 |     const char *option,<br> | |
1303 |     const char *choice<br> | |
66ab9486 MS |
1304 | );</p> |
1305 | <h4 class="parameters">Parameters</h4> | |
1306 | <dl> | |
1307 | <dt>ppd</dt> | |
abacc52b | 1308 | <dd class="description">PPD file</dd> |
66ab9486 | 1309 | <dt>option</dt> |
abacc52b | 1310 | <dd class="description">Option</dd> |
66ab9486 | 1311 | <dt>choice</dt> |
abacc52b | 1312 | <dd class="description">Choice</dd> |
66ab9486 MS |
1313 | </dl> |
1314 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 1315 | <p class="description">1 if conflicting, 0 if not conflicting</p> |
66ab9486 | 1316 | <h4 class="discussion">Discussion</h4> |
abacc52b | 1317 | <p class="discussion">This function tests whether a particular option choice is available based |
66ab9486 MS |
1318 | on constraints against options in the "InstallableOptions" group. |
1319 | ||
5a738aea | 1320 | </p> |
abacc52b MS |
1321 | <h3 class="function"><a id="ppdIsMarked">ppdIsMarked</a></h3> |
1322 | <p class="description">Check to see if an option is marked.</p> | |
5a738aea | 1323 | <p class="code"> |
798d6e29 MS |
1324 | int ppdIsMarked (<br> |
1325 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1326 |     const char *option,<br> | |
1327 |     const char *choice<br> | |
5a738aea MS |
1328 | );</p> |
1329 | <h4 class="parameters">Parameters</h4> | |
1330 | <dl> | |
1331 | <dt>ppd</dt> | |
abacc52b | 1332 | <dd class="description">PPD file data</dd> |
5a738aea | 1333 | <dt>option</dt> |
abacc52b | 1334 | <dd class="description">Option/Keyword name</dd> |
5a738aea | 1335 | <dt>choice</dt> |
abacc52b | 1336 | <dd class="description">Choice name</dd> |
5a738aea MS |
1337 | </dl> |
1338 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1339 | <p class="description">Non-zero if option is marked</p> |
1340 | <h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppdLocalize">ppdLocalize</a></h3> | |
1341 | <p class="description">Localize the PPD file to the current locale.</p> | |
5a738aea | 1342 | <p class="code"> |
798d6e29 MS |
1343 | int ppdLocalize (<br> |
1344 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd<br> | |
5a738aea MS |
1345 | );</p> |
1346 | <h4 class="parameters">Parameters</h4> | |
1347 | <dl> | |
1348 | <dt>ppd</dt> | |
abacc52b | 1349 | <dd class="description">PPD file</dd> |
5a738aea MS |
1350 | </dl> |
1351 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 1352 | <p class="description">0 on success, -1 on error</p> |
5a738aea | 1353 | <h4 class="discussion">Discussion</h4> |
abacc52b | 1354 | <p class="discussion">All groups, options, and choices are localized, as are ICC profile |
bc44d920 | 1355 | descriptions, printer presets, and custom option parameters. Each |
1356 | localized string uses the UTF-8 character encoding. | |
1357 | ||
5a738aea | 1358 | </p> |
abacc52b MS |
1359 | <h3 class="function"><a id="ppdLocalizeAttr">ppdLocalizeAttr</a></h3> |
1360 | <p class="description">Localize an attribute.</p> | |
75bd9771 | 1361 | <p class="code"> |
798d6e29 MS |
1362 | <a href="#ppd_attr_t">ppd_attr_t</a> *ppdLocalizeAttr (<br> |
1363 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1364 |     const char *keyword,<br> | |
1365 |     const char *spec<br> | |
75bd9771 MS |
1366 | );</p> |
1367 | <h4 class="parameters">Parameters</h4> | |
1368 | <dl> | |
1369 | <dt>ppd</dt> | |
abacc52b | 1370 | <dd class="description">PPD file</dd> |
75bd9771 | 1371 | <dt>keyword</dt> |
abacc52b | 1372 | <dd class="description">Main keyword</dd> |
75bd9771 | 1373 | <dt>spec</dt> |
abacc52b | 1374 | <dd class="description">Option keyword or <code>NULL</code> for none</dd> |
75bd9771 MS |
1375 | </dl> |
1376 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 1377 | <p class="description">Localized attribute or <code>NULL</code> if none exists</p> |
75bd9771 | 1378 | <h4 class="discussion">Discussion</h4> |
abacc52b | 1379 | <p class="discussion">This function uses the current locale to find the localized attribute for |
75bd9771 MS |
1380 | the given main and option keywords. If no localized version of the |
1381 | attribute exists for the current locale, the unlocalized version is returned.</p> | |
abacc52b MS |
1382 | <h3 class="function"><span class="info"> CUPS 1.3/macOS 10.5 </span><a id="ppdLocalizeIPPReason">ppdLocalizeIPPReason</a></h3> |
1383 | <p class="description">Get the localized version of a cupsIPPReason | |
5a738aea MS |
1384 | attribute.</p> |
1385 | <p class="code"> | |
798d6e29 MS |
1386 | const char *ppdLocalizeIPPReason (<br> |
1387 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1388 |     const char *reason,<br> | |
1389 |     const char *scheme,<br> | |
1390 |     char *buffer,<br> | |
1391 |     size_t bufsize<br> | |
5a738aea MS |
1392 | );</p> |
1393 | <h4 class="parameters">Parameters</h4> | |
1394 | <dl> | |
1395 | <dt>ppd</dt> | |
abacc52b | 1396 | <dd class="description">PPD file</dd> |
5a738aea | 1397 | <dt>reason</dt> |
abacc52b | 1398 | <dd class="description">IPP reason keyword to look up</dd> |
5a738aea | 1399 | <dt>scheme</dt> |
abacc52b | 1400 | <dd class="description">URI scheme or NULL for text</dd> |
5a738aea | 1401 | <dt>buffer</dt> |
abacc52b | 1402 | <dd class="description">Value buffer</dd> |
5a738aea | 1403 | <dt>bufsize</dt> |
abacc52b | 1404 | <dd class="description">Size of value buffer</dd> |
5a738aea MS |
1405 | </dl> |
1406 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 1407 | <p class="description">Value or NULL if not found</p> |
5a738aea | 1408 | <h4 class="discussion">Discussion</h4> |
abacc52b | 1409 | <p class="discussion">This function uses the current locale to find the corresponding reason |
bc44d920 | 1410 | text or URI from the attribute value. If "scheme" is NULL or "text", |
1411 | the returned value contains human-readable (UTF-8) text from the translation | |
5a738aea MS |
1412 | string or attribute value. Otherwise the corresponding URI is returned.<br> |
1413 | <br> | |
1414 | If no value of the requested scheme can be found, NULL is returned. | |
1415 | ||
1416 | </p> | |
abacc52b MS |
1417 | <h3 class="function"><span class="info"> CUPS 1.4/macOS 10.6 </span><a id="ppdLocalizeMarkerName">ppdLocalizeMarkerName</a></h3> |
1418 | <p class="description">Get the localized version of a marker-names | |
5a738aea MS |
1419 | attribute value.</p> |
1420 | <p class="code"> | |
798d6e29 MS |
1421 | const char *ppdLocalizeMarkerName (<br> |
1422 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1423 |     const char *name<br> | |
5a738aea MS |
1424 | );</p> |
1425 | <h4 class="parameters">Parameters</h4> | |
1426 | <dl> | |
1427 | <dt>ppd</dt> | |
abacc52b | 1428 | <dd class="description">PPD file</dd> |
5a738aea | 1429 | <dt>name</dt> |
abacc52b | 1430 | <dd class="description">Marker name to look up</dd> |
5a738aea MS |
1431 | </dl> |
1432 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 1433 | <p class="description">Value or <code>NULL</code> if not found</p> |
5a738aea | 1434 | <h4 class="discussion">Discussion</h4> |
abacc52b | 1435 | <p class="discussion">This function uses the current locale to find the corresponding name |
5a738aea MS |
1436 | text from the attribute value. If no localized text for the requested |
1437 | name can be found, <code>NULL</code> is returned. | |
1438 | ||
1439 | </p> | |
abacc52b | 1440 | <h3 class="function"><a id="ppdMarkDefaults">ppdMarkDefaults</a></h3> |
53af7f21 | 1441 | <p class="description">Choice pointer</p> |
5a738aea | 1442 | <p class="code"> |
798d6e29 MS |
1443 | void ppdMarkDefaults (<br> |
1444 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd<br> | |
5a738aea MS |
1445 | );</p> |
1446 | <h4 class="parameters">Parameters</h4> | |
1447 | <dl> | |
1448 | <dt>ppd</dt> | |
abacc52b | 1449 | <dd class="description">PPD file record</dd> |
5a738aea | 1450 | </dl> |
53af7f21 MS |
1451 | <h4 class="returnvalue">Return Value</h4> |
1452 | <p class="description">Mark all default options in the PPD file.</p> | |
abacc52b MS |
1453 | <h3 class="function"><a id="ppdMarkOption">ppdMarkOption</a></h3> |
1454 | <p class="description">Mark an option in a PPD file and return the number of | |
66ab9486 | 1455 | conflicts.</p> |
5a738aea | 1456 | <p class="code"> |
798d6e29 MS |
1457 | int ppdMarkOption (<br> |
1458 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1459 |     const char *option,<br> | |
1460 |     const char *choice<br> | |
5a738aea MS |
1461 | );</p> |
1462 | <h4 class="parameters">Parameters</h4> | |
1463 | <dl> | |
1464 | <dt>ppd</dt> | |
abacc52b | 1465 | <dd class="description">PPD file record</dd> |
5a738aea | 1466 | <dt>option</dt> |
abacc52b | 1467 | <dd class="description">Keyword</dd> |
5a738aea | 1468 | <dt>choice</dt> |
abacc52b | 1469 | <dd class="description">Option name</dd> |
5a738aea MS |
1470 | </dl> |
1471 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1472 | <p class="description">Number of conflicts</p> |
1473 | <h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppdNextCustomParam">ppdNextCustomParam</a></h3> | |
1474 | <p class="description">Return the next parameter for a custom option.</p> | |
5a738aea | 1475 | <p class="code"> |
798d6e29 MS |
1476 | <a href="#ppd_cparam_t">ppd_cparam_t</a> *ppdNextCustomParam (<br> |
1477 |     <a href="#ppd_coption_t">ppd_coption_t</a> *opt<br> | |
5a738aea MS |
1478 | );</p> |
1479 | <h4 class="parameters">Parameters</h4> | |
1480 | <dl> | |
1481 | <dt>opt</dt> | |
abacc52b | 1482 | <dd class="description">Custom option</dd> |
5a738aea MS |
1483 | </dl> |
1484 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1485 | <p class="description">Custom parameter or NULL</p> |
1486 | <h3 class="function"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppdNextOption">ppdNextOption</a></h3> | |
1487 | <p class="description">Return the next option in the PPD file.</p> | |
5a738aea | 1488 | <p class="code"> |
798d6e29 MS |
1489 | <a href="#ppd_option_t">ppd_option_t</a> *ppdNextOption (<br> |
1490 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd<br> | |
5a738aea MS |
1491 | );</p> |
1492 | <h4 class="parameters">Parameters</h4> | |
1493 | <dl> | |
1494 | <dt>ppd</dt> | |
abacc52b | 1495 | <dd class="description">PPD file</dd> |
5a738aea MS |
1496 | </dl> |
1497 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 1498 | <p class="description">Next option or <code>NULL</code></p> |
5a738aea | 1499 | <h4 class="discussion">Discussion</h4> |
abacc52b | 1500 | <p class="discussion">Options are returned from all groups in ascending alphanumeric order. |
5a738aea MS |
1501 | |
1502 | </p> | |
abacc52b MS |
1503 | <h3 class="function"><a id="ppdPageLength">ppdPageLength</a></h3> |
1504 | <p class="description">Get the page length for the given size.</p> | |
5a738aea | 1505 | <p class="code"> |
798d6e29 MS |
1506 | float ppdPageLength (<br> |
1507 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1508 |     const char *name<br> | |
5a738aea MS |
1509 | );</p> |
1510 | <h4 class="parameters">Parameters</h4> | |
1511 | <dl> | |
1512 | <dt>ppd</dt> | |
abacc52b | 1513 | <dd class="description">PPD file</dd> |
5a738aea | 1514 | <dt>name</dt> |
abacc52b | 1515 | <dd class="description">Size name</dd> |
5a738aea MS |
1516 | </dl> |
1517 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1518 | <p class="description">Length of page in points or 0.0</p> |
1519 | <h3 class="function"><a id="ppdPageSize">ppdPageSize</a></h3> | |
1520 | <p class="description">Get the page size record for the named size.</p> | |
5a738aea | 1521 | <p class="code"> |
798d6e29 MS |
1522 | <a href="#ppd_size_t">ppd_size_t</a> *ppdPageSize (<br> |
1523 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1524 |     const char *name<br> | |
5a738aea MS |
1525 | );</p> |
1526 | <h4 class="parameters">Parameters</h4> | |
1527 | <dl> | |
1528 | <dt>ppd</dt> | |
abacc52b | 1529 | <dd class="description">PPD file record</dd> |
5a738aea | 1530 | <dt>name</dt> |
abacc52b | 1531 | <dd class="description">Size name</dd> |
5a738aea MS |
1532 | </dl> |
1533 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1534 | <p class="description">Size record for page or NULL</p> |
1535 | <h3 class="function"><span class="info"> CUPS 1.4/macOS 10.6 </span><a id="ppdPageSizeLimits">ppdPageSizeLimits</a></h3> | |
1536 | <p class="description">Return the custom page size limits.</p> | |
005dd1eb | 1537 | <p class="code"> |
798d6e29 MS |
1538 | int ppdPageSizeLimits (<br> |
1539 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1540 |     <a href="#ppd_size_t">ppd_size_t</a> *minimum,<br> | |
1541 |     <a href="#ppd_size_t">ppd_size_t</a> *maximum<br> | |
005dd1eb MS |
1542 | );</p> |
1543 | <h4 class="parameters">Parameters</h4> | |
1544 | <dl> | |
1545 | <dt>ppd</dt> | |
abacc52b | 1546 | <dd class="description">PPD file record</dd> |
005dd1eb | 1547 | <dt>minimum</dt> |
abacc52b | 1548 | <dd class="description">Minimum custom size</dd> |
005dd1eb | 1549 | <dt>maximum</dt> |
abacc52b | 1550 | <dd class="description">Maximum custom size</dd> |
005dd1eb MS |
1551 | </dl> |
1552 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b | 1553 | <p class="description">1 if custom sizes are supported, 0 otherwise</p> |
005dd1eb | 1554 | <h4 class="discussion">Discussion</h4> |
abacc52b | 1555 | <p class="discussion">This function returns the minimum and maximum custom page sizes and printable |
005dd1eb MS |
1556 | areas based on the currently-marked (selected) options.<br> |
1557 | <br> | |
1558 | If the specified PPD file does not support custom page sizes, both | |
1559 | "minimum" and "maximum" are filled with zeroes. | |
1560 | ||
1561 | </p> | |
abacc52b MS |
1562 | <h3 class="function"><a id="ppdPageWidth">ppdPageWidth</a></h3> |
1563 | <p class="description">Get the page width for the given size.</p> | |
5a738aea | 1564 | <p class="code"> |
798d6e29 MS |
1565 | float ppdPageWidth (<br> |
1566 |     <a href="#ppd_file_t">ppd_file_t</a> *ppd,<br> | |
1567 |     const char *name<br> | |
5a738aea MS |
1568 | );</p> |
1569 | <h4 class="parameters">Parameters</h4> | |
1570 | <dl> | |
1571 | <dt>ppd</dt> | |
abacc52b | 1572 | <dd class="description">PPD file record</dd> |
5a738aea | 1573 | <dt>name</dt> |
abacc52b | 1574 | <dd class="description">Size name</dd> |
5a738aea MS |
1575 | </dl> |
1576 | <h4 class="returnvalue">Return Value</h4> | |
abacc52b MS |
1577 | <p class="description">Width of page in points or 0.0</p> |
1578 | <h2 class="title"><a id="TYPES">Data Types</a></h2> | |
1579 | <h3 class="typedef"><a id="ppd_attr_t"><span class="info"> CUPS 1.1.19/macOS 10.3 </span>ppd_attr_t</a></h3> | |
1580 | <p class="description">PPD Attribute Structure </p> | |
1581 | <p class="code"> | |
5a738aea MS |
1582 | typedef struct <a href="#ppd_attr_s">ppd_attr_s</a> ppd_attr_t; |
1583 | </p> | |
abacc52b MS |
1584 | <h3 class="typedef"><a id="ppd_choice_t">ppd_choice_t</a></h3> |
1585 | <p class="description">Option choices</p> | |
1586 | <p class="code"> | |
5a738aea MS |
1587 | typedef struct <a href="#ppd_choice_s">ppd_choice_s</a> ppd_choice_t; |
1588 | </p> | |
abacc52b MS |
1589 | <h3 class="typedef"><a id="ppd_conform_t"><span class="info"> CUPS 1.1.19/macOS 10.3 </span>ppd_conform_t</a></h3> |
1590 | <p class="description">Conformance Levels </p> | |
1591 | <p class="code"> | |
5a738aea MS |
1592 | typedef enum <a href="#ppd_conform_e">ppd_conform_e</a> ppd_conform_t; |
1593 | </p> | |
abacc52b MS |
1594 | <h3 class="typedef"><a id="ppd_const_t">ppd_const_t</a></h3> |
1595 | <p class="description">Constraints</p> | |
1596 | <p class="code"> | |
5a738aea MS |
1597 | typedef struct <a href="#ppd_const_s">ppd_const_s</a> ppd_const_t; |
1598 | </p> | |
abacc52b MS |
1599 | <h3 class="typedef"><a id="ppd_coption_t"><span class="info"> CUPS 1.2/macOS 10.5 </span>ppd_coption_t</a></h3> |
1600 | <p class="description">Custom Option </p> | |
1601 | <p class="code"> | |
5a738aea MS |
1602 | typedef struct <a href="#ppd_coption_s">ppd_coption_s</a> ppd_coption_t; |
1603 | </p> | |
abacc52b MS |
1604 | <h3 class="typedef"><a id="ppd_cparam_t"><span class="info"> CUPS 1.2/macOS 10.5 </span>ppd_cparam_t</a></h3> |
1605 | <p class="description">Custom Parameter </p> | |
1606 | <p class="code"> | |
5a738aea MS |
1607 | typedef struct <a href="#ppd_cparam_s">ppd_cparam_s</a> ppd_cparam_t; |
1608 | </p> | |
abacc52b MS |
1609 | <h3 class="typedef"><a id="ppd_cplimit_t"><span class="info"> CUPS 1.2/macOS 10.5 </span>ppd_cplimit_t</a></h3> |
1610 | <p class="description">Custom Parameter Limit </p> | |
1611 | <p class="code"> | |
5a738aea MS |
1612 | typedef union <a href="#ppd_cplimit_u">ppd_cplimit_u</a> ppd_cplimit_t; |
1613 | </p> | |
abacc52b MS |
1614 | <h3 class="typedef"><a id="ppd_cptype_t"><span class="info"> CUPS 1.2/macOS 10.5 </span>ppd_cptype_t</a></h3> |
1615 | <p class="description">Custom Parameter Type </p> | |
1616 | <p class="code"> | |
82f97232 | 1617 | typedef enum ppd_cptype_e ppd_cptype_t; |
5a738aea | 1618 | </p> |
abacc52b MS |
1619 | <h3 class="typedef"><a id="ppd_cpvalue_t"><span class="info"> CUPS 1.2/macOS 10.5 </span>ppd_cpvalue_t</a></h3> |
1620 | <p class="description">Custom Parameter Value </p> | |
1621 | <p class="code"> | |
5a738aea MS |
1622 | typedef union <a href="#ppd_cpvalue_u">ppd_cpvalue_u</a> ppd_cpvalue_t; |
1623 | </p> | |
abacc52b MS |
1624 | <h3 class="typedef"><a id="ppd_cs_t">ppd_cs_t</a></h3> |
1625 | <p class="description">Colorspaces</p> | |
1626 | <p class="code"> | |
79e1d494 MS |
1627 | typedef enum <a href="#ppd_cs_e">ppd_cs_e</a> ppd_cs_t; |
1628 | </p> | |
abacc52b MS |
1629 | <h3 class="typedef"><a id="ppd_emul_t">ppd_emul_t</a></h3> |
1630 | <p class="description">Emulators</p> | |
1631 | <p class="code"> | |
5a738aea MS |
1632 | typedef struct <a href="#ppd_emul_s">ppd_emul_s</a> ppd_emul_t; |
1633 | </p> | |
abacc52b MS |
1634 | <h3 class="typedef"><a id="ppd_file_t">ppd_file_t</a></h3> |
1635 | <p class="description">PPD File</p> | |
1636 | <p class="code"> | |
5a738aea MS |
1637 | typedef struct <a href="#ppd_file_s">ppd_file_s</a> ppd_file_t; |
1638 | </p> | |
abacc52b MS |
1639 | <h3 class="typedef"><a id="ppd_group_t">ppd_group_t</a></h3> |
1640 | <p class="description">Groups</p> | |
1641 | <p class="code"> | |
5a738aea MS |
1642 | typedef struct <a href="#ppd_group_s">ppd_group_s</a> ppd_group_t; |
1643 | </p> | |
abacc52b MS |
1644 | <h3 class="typedef"><a id="ppd_option_t">ppd_option_t</a></h3> |
1645 | <p class="description">Options</p> | |
1646 | <p class="code"> | |
5a738aea MS |
1647 | typedef struct <a href="#ppd_option_s">ppd_option_s</a> ppd_option_t; |
1648 | </p> | |
abacc52b MS |
1649 | <h3 class="typedef"><a id="ppd_profile_t">ppd_profile_t</a></h3> |
1650 | <p class="description">sRGB Color Profiles</p> | |
1651 | <p class="code"> | |
5a738aea MS |
1652 | typedef struct <a href="#ppd_profile_s">ppd_profile_s</a> ppd_profile_t; |
1653 | </p> | |
abacc52b MS |
1654 | <h3 class="typedef"><a id="ppd_section_t">ppd_section_t</a></h3> |
1655 | <p class="description">Order dependency sections</p> | |
1656 | <p class="code"> | |
5a738aea MS |
1657 | typedef enum <a href="#ppd_section_e">ppd_section_e</a> ppd_section_t; |
1658 | </p> | |
abacc52b MS |
1659 | <h3 class="typedef"><a id="ppd_size_t">ppd_size_t</a></h3> |
1660 | <p class="description">Page Sizes</p> | |
1661 | <p class="code"> | |
5a738aea MS |
1662 | typedef struct <a href="#ppd_size_s">ppd_size_s</a> ppd_size_t; |
1663 | </p> | |
abacc52b MS |
1664 | <h3 class="typedef"><a id="ppd_status_t"><span class="info"> CUPS 1.1.19/macOS 10.3 </span>ppd_status_t</a></h3> |
1665 | <p class="description">Status Codes </p> | |
1666 | <p class="code"> | |
79e1d494 MS |
1667 | typedef enum <a href="#ppd_status_e">ppd_status_e</a> ppd_status_t; |
1668 | </p> | |
abacc52b MS |
1669 | <h3 class="typedef"><a id="ppd_ui_t">ppd_ui_t</a></h3> |
1670 | <p class="description">UI Types</p> | |
1671 | <p class="code"> | |
5a738aea MS |
1672 | typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t; |
1673 | </p> | |
abacc52b MS |
1674 | <h2 class="title"><a id="STRUCTURES">Structures</a></h2> |
1675 | <h3 class="struct"><span class="info"> CUPS 1.1.19/macOS 10.3 </span><a id="ppd_attr_s">ppd_attr_s</a></h3> | |
1676 | <p class="description">PPD Attribute Structure </p> | |
798d6e29 MS |
1677 | <p class="code">struct ppd_attr_s {<br> |
1678 |     char name[PPD_MAX_NAME];<br> | |
1679 |     char spec[PPD_MAX_NAME];<br> | |
1680 |     char text[PPD_MAX_TEXT];<br> | |
1681 |     char *value;<br> | |
5a738aea MS |
1682 | };</p> |
1683 | <h4 class="members">Members</h4> | |
1684 | <dl> | |
1685 | <dt>name[PPD_MAX_NAME] </dt> | |
abacc52b | 1686 | <dd class="description">Name of attribute (cupsXYZ)</dd> |
5a738aea | 1687 | <dt>spec[PPD_MAX_NAME] </dt> |
abacc52b | 1688 | <dd class="description">Specifier string, if any</dd> |
5a738aea | 1689 | <dt>text[PPD_MAX_TEXT] </dt> |
abacc52b | 1690 | <dd class="description">Human-readable text, if any</dd> |
5a738aea | 1691 | <dt>value </dt> |
abacc52b | 1692 | <dd class="description">Value string</dd> |
5a738aea | 1693 | </dl> |
abacc52b MS |
1694 | <h3 class="struct"><a id="ppd_choice_s">ppd_choice_s</a></h3> |
1695 | <p class="description">Option choices</p> | |
798d6e29 MS |
1696 | <p class="code">struct ppd_choice_s {<br> |
1697 |     char choice[PPD_MAX_NAME];<br> | |
1698 |     char *code;<br> | |
1699 |     char marked;<br> | |
1700 |     <a href="#ppd_option_t">ppd_option_t</a> *option;<br> | |
1701 |     char text[PPD_MAX_TEXT];<br> | |
5a738aea MS |
1702 | };</p> |
1703 | <h4 class="members">Members</h4> | |
1704 | <dl> | |
1705 | <dt>choice[PPD_MAX_NAME] </dt> | |
abacc52b | 1706 | <dd class="description">Computer-readable option name</dd> |
5a738aea | 1707 | <dt>code </dt> |
abacc52b | 1708 | <dd class="description">Code to send for this option</dd> |
5a738aea | 1709 | <dt>marked </dt> |
abacc52b | 1710 | <dd class="description">0 if not selected, 1 otherwise</dd> |
5a738aea | 1711 | <dt>option </dt> |
abacc52b | 1712 | <dd class="description">Pointer to parent option structure</dd> |
5a738aea | 1713 | <dt>text[PPD_MAX_TEXT] </dt> |
abacc52b | 1714 | <dd class="description">Human-readable option name</dd> |
5a738aea | 1715 | </dl> |
abacc52b MS |
1716 | <h3 class="struct"><a id="ppd_const_s">ppd_const_s</a></h3> |
1717 | <p class="description">Constraints</p> | |
798d6e29 MS |
1718 | <p class="code">struct ppd_const_s {<br> |
1719 |     char choice1[PPD_MAX_NAME];<br> | |
1720 |     char choice2[PPD_MAX_NAME];<br> | |
1721 |     char option1[PPD_MAX_NAME];<br> | |
1722 |     char option2[PPD_MAX_NAME];<br> | |
5a738aea MS |
1723 | };</p> |
1724 | <h4 class="members">Members</h4> | |
1725 | <dl> | |
1726 | <dt>choice1[PPD_MAX_NAME] </dt> | |
abacc52b | 1727 | <dd class="description">First option/choice (blank for all)</dd> |
5a738aea | 1728 | <dt>choice2[PPD_MAX_NAME] </dt> |
abacc52b | 1729 | <dd class="description">Second option/choice (blank for all)</dd> |
5a738aea | 1730 | <dt>option1[PPD_MAX_NAME] </dt> |
abacc52b | 1731 | <dd class="description">First keyword</dd> |
5a738aea | 1732 | <dt>option2[PPD_MAX_NAME] </dt> |
abacc52b | 1733 | <dd class="description">Second keyword</dd> |
5a738aea | 1734 | </dl> |
abacc52b MS |
1735 | <h3 class="struct"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppd_coption_s">ppd_coption_s</a></h3> |
1736 | <p class="description">Custom Option </p> | |
798d6e29 MS |
1737 | <p class="code">struct ppd_coption_s {<br> |
1738 |     char keyword[PPD_MAX_NAME];<br> | |
1739 |     int marked;<br> | |
1740 |     <a href="#ppd_option_t">ppd_option_t</a> *option;<br> | |
1741 |     cups_array_t *params;<br> | |
5a738aea MS |
1742 | };</p> |
1743 | <h4 class="members">Members</h4> | |
1744 | <dl> | |
1745 | <dt>keyword[PPD_MAX_NAME] </dt> | |
abacc52b | 1746 | <dd class="description">Name of option that is being extended...</dd> |
5a738aea | 1747 | <dt>marked </dt> |
abacc52b | 1748 | <dd class="description">Extended option is marked</dd> |
5a738aea | 1749 | <dt>option </dt> |
abacc52b | 1750 | <dd class="description">Option that is being extended...</dd> |
5a738aea | 1751 | <dt>params </dt> |
abacc52b | 1752 | <dd class="description">Parameters</dd> |
5a738aea | 1753 | </dl> |
abacc52b MS |
1754 | <h3 class="struct"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppd_cparam_s">ppd_cparam_s</a></h3> |
1755 | <p class="description">Custom Parameter </p> | |
798d6e29 MS |
1756 | <p class="code">struct ppd_cparam_s {<br> |
1757 |     <a href="#ppd_cpvalue_t">ppd_cpvalue_t</a> current;<br> | |
1758 |     <a href="#ppd_cplimit_t">ppd_cplimit_t</a> minimum, maximum;<br> | |
1759 |     char name[PPD_MAX_NAME];<br> | |
1760 |     int order;<br> | |
1761 |     char text[PPD_MAX_TEXT];<br> | |
1762 |     <a href="#ppd_cptype_t">ppd_cptype_t</a> type;<br> | |
5a738aea MS |
1763 | };</p> |
1764 | <h4 class="members">Members</h4> | |
1765 | <dl> | |
1766 | <dt>current </dt> | |
abacc52b | 1767 | <dd class="description">Current value</dd> |
5a738aea | 1768 | <dt>maximum </dt> |
abacc52b | 1769 | <dd class="description">Maximum value</dd> |
5a738aea | 1770 | <dt>name[PPD_MAX_NAME] </dt> |
abacc52b | 1771 | <dd class="description">Parameter name</dd> |
5a738aea | 1772 | <dt>order </dt> |
abacc52b | 1773 | <dd class="description">Order (0 to N)</dd> |
5a738aea | 1774 | <dt>text[PPD_MAX_TEXT] </dt> |
abacc52b | 1775 | <dd class="description">Human-readable text</dd> |
5a738aea | 1776 | <dt>type </dt> |
abacc52b | 1777 | <dd class="description">Parameter type</dd> |
5a738aea | 1778 | </dl> |
abacc52b MS |
1779 | <h3 class="struct"><a id="ppd_emul_s">ppd_emul_s</a></h3> |
1780 | <p class="description">Emulators</p> | |
798d6e29 MS |
1781 | <p class="code">struct ppd_emul_s {<br> |
1782 |     char name[PPD_MAX_NAME];<br> | |
1783 |     char *start;<br> | |
1784 |     char *stop;<br> | |
5a738aea MS |
1785 | };</p> |
1786 | <h4 class="members">Members</h4> | |
1787 | <dl> | |
1788 | <dt>name[PPD_MAX_NAME] </dt> | |
abacc52b | 1789 | <dd class="description">Emulator name</dd> |
5a738aea | 1790 | <dt>start </dt> |
abacc52b | 1791 | <dd class="description">Code to switch to this emulation</dd> |
5a738aea | 1792 | <dt>stop </dt> |
abacc52b | 1793 | <dd class="description">Code to stop this emulation</dd> |
5a738aea | 1794 | </dl> |
abacc52b MS |
1795 | <h3 class="struct"><a id="ppd_file_s">ppd_file_s</a></h3> |
1796 | <p class="description">PPD File</p> | |
798d6e29 MS |
1797 | <p class="code">struct ppd_file_s {<br> |
1798 |     int accurate_screens;<br> | |
1799 |     int color_device;<br> | |
1800 |     <a href="#ppd_cs_t">ppd_cs_t</a> colorspace;<br> | |
1801 |     <a href="#ppd_const_t">ppd_const_t</a> *consts;<br> | |
1802 |     int contone_only;<br> | |
1803 |     float custom_margins[4];<br> | |
1804 |     float custom_max[2];<br> | |
1805 |     float custom_min[2];<br> | |
1806 |     <a href="#ppd_emul_t">ppd_emul_t</a> *emulations;<br> | |
1807 |     char **filters;<br> | |
1808 |     int flip_duplex;<br> | |
1809 |     char **fonts;<br> | |
1810 |     <a href="#ppd_group_t">ppd_group_t</a> *groups;<br> | |
1811 |     char *jcl_begin;<br> | |
1812 |     char *jcl_end;<br> | |
1813 |     char *jcl_ps;<br> | |
1814 |     int landscape;<br> | |
1815 |     char *lang_encoding;<br> | |
1816 |     char *lang_version;<br> | |
1817 |     int language_level;<br> | |
1818 |     int manual_copies;<br> | |
1819 |     char *manufacturer;<br> | |
1820 |     int model_number;<br> | |
1821 |     char *modelname;<br> | |
1822 |     char *nickname;<br> | |
1823 |     int num_consts;<br> | |
1824 |     int num_emulations;<br> | |
1825 |     int num_filters;<br> | |
1826 |     int num_fonts;<br> | |
1827 |     int num_groups;<br> | |
1828 |     int num_profiles;<br> | |
1829 |     int num_sizes;<br> | |
1830 |     char *patches;<br> | |
1831 |     char *pcfilename;<br> | |
1832 |     char *product;<br> | |
1833 |     <a href="#ppd_profile_t">ppd_profile_t</a> *profiles;<br> | |
1834 |     char *protocols;<br> | |
1835 |     char *shortnickname;<br> | |
1836 |     <a href="#ppd_size_t">ppd_size_t</a> *sizes;<br> | |
1837 |     int throughput;<br> | |
1838 |     char *ttrasterizer;<br> | |
1839 |     int variable_sizes;<br> | |
5a738aea MS |
1840 | };</p> |
1841 | <h4 class="members">Members</h4> | |
1842 | <dl> | |
1843 | <dt>accurate_screens </dt> | |
abacc52b | 1844 | <dd class="description">1 = supports accurate screens, 0 = not</dd> |
5a738aea | 1845 | <dt>color_device </dt> |
abacc52b | 1846 | <dd class="description">1 = color device, 0 = grayscale</dd> |
5a738aea | 1847 | <dt>colorspace </dt> |
abacc52b | 1848 | <dd class="description">Default colorspace</dd> |
5a738aea | 1849 | <dt>consts </dt> |
abacc52b | 1850 | <dd class="description">UI/Non-UI constraints</dd> |
5a738aea | 1851 | <dt>contone_only </dt> |
abacc52b | 1852 | <dd class="description">1 = continuous tone only, 0 = not</dd> |
5a738aea | 1853 | <dt>custom_margins[4] </dt> |
abacc52b | 1854 | <dd class="description">Margins around page</dd> |
5a738aea | 1855 | <dt>custom_max[2] </dt> |
abacc52b | 1856 | <dd class="description">Maximum variable page size</dd> |
5a738aea | 1857 | <dt>custom_min[2] </dt> |
abacc52b | 1858 | <dd class="description">Minimum variable page size</dd> |
5a738aea | 1859 | <dt>emulations </dt> |
abacc52b | 1860 | <dd class="description">Emulations and the code to invoke them</dd> |
5a738aea | 1861 | <dt>filters </dt> |
abacc52b MS |
1862 | <dd class="description">Filter strings...</dd> |
1863 | <dt>flip_duplex <span class="info"> DEPRECATED </span></dt> | |
1864 | <dd class="description">1 = Flip page for back sides </dd> | |
5a738aea | 1865 | <dt>fonts </dt> |
abacc52b | 1866 | <dd class="description">Pre-loaded fonts</dd> |
5a738aea | 1867 | <dt>groups </dt> |
abacc52b | 1868 | <dd class="description">UI groups</dd> |
5a738aea | 1869 | <dt>jcl_begin </dt> |
abacc52b | 1870 | <dd class="description">Start JCL commands</dd> |
5a738aea | 1871 | <dt>jcl_end </dt> |
abacc52b | 1872 | <dd class="description">End JCL commands</dd> |
5a738aea | 1873 | <dt>jcl_ps </dt> |
abacc52b | 1874 | <dd class="description">Enter PostScript interpreter</dd> |
5a738aea | 1875 | <dt>landscape </dt> |
abacc52b | 1876 | <dd class="description">-90 or 90</dd> |
5a738aea | 1877 | <dt>lang_encoding </dt> |
abacc52b | 1878 | <dd class="description">Language encoding</dd> |
5a738aea | 1879 | <dt>lang_version </dt> |
abacc52b | 1880 | <dd class="description">Language version (English, Spanish, etc.)</dd> |
5a738aea | 1881 | <dt>language_level </dt> |
abacc52b | 1882 | <dd class="description">Language level of device</dd> |
5a738aea | 1883 | <dt>manual_copies </dt> |
abacc52b | 1884 | <dd class="description">1 = Copies done manually, 0 = hardware</dd> |
5a738aea | 1885 | <dt>manufacturer </dt> |
abacc52b | 1886 | <dd class="description">Manufacturer name</dd> |
5a738aea | 1887 | <dt>model_number </dt> |
abacc52b | 1888 | <dd class="description">Device-specific model number</dd> |
5a738aea | 1889 | <dt>modelname </dt> |
abacc52b | 1890 | <dd class="description">Model name (general)</dd> |
5a738aea | 1891 | <dt>nickname </dt> |
abacc52b | 1892 | <dd class="description">Nickname (specific)</dd> |
5a738aea | 1893 | <dt>num_consts </dt> |
abacc52b | 1894 | <dd class="description">Number of UI/Non-UI constraints</dd> |
5a738aea | 1895 | <dt>num_emulations </dt> |
abacc52b | 1896 | <dd class="description">Number of emulations supported</dd> |
5a738aea | 1897 | <dt>num_filters </dt> |
abacc52b | 1898 | <dd class="description">Number of filters</dd> |
5a738aea | 1899 | <dt>num_fonts </dt> |
abacc52b | 1900 | <dd class="description">Number of pre-loaded fonts</dd> |
5a738aea | 1901 | <dt>num_groups </dt> |
abacc52b MS |
1902 | <dd class="description">Number of UI groups</dd> |
1903 | <dt>num_profiles <span class="info"> DEPRECATED </span></dt> | |
1904 | <dd class="description">Number of sRGB color profiles </dd> | |
5a738aea | 1905 | <dt>num_sizes </dt> |
abacc52b | 1906 | <dd class="description">Number of page sizes</dd> |
5a738aea | 1907 | <dt>patches </dt> |
abacc52b MS |
1908 | <dd class="description">Patch commands to be sent to printer</dd> |
1909 | <dt>pcfilename <span class="info"> CUPS 1.1.19/macOS 10.3 </span></dt> | |
1910 | <dd class="description">PCFileName string </dd> | |
5a738aea | 1911 | <dt>product </dt> |
abacc52b MS |
1912 | <dd class="description">Product name (from PS RIP/interpreter)</dd> |
1913 | <dt>profiles <span class="info"> DEPRECATED </span></dt> | |
1914 | <dd class="description">sRGB color profiles </dd> | |
1915 | <dt>protocols <span class="info"> CUPS 1.1.19/macOS 10.3 </span></dt> | |
1916 | <dd class="description">Protocols (BCP, TBCP) string </dd> | |
5a738aea | 1917 | <dt>shortnickname </dt> |
abacc52b | 1918 | <dd class="description">Short version of nickname</dd> |
5a738aea | 1919 | <dt>sizes </dt> |
abacc52b | 1920 | <dd class="description">Page sizes</dd> |
5a738aea | 1921 | <dt>throughput </dt> |
abacc52b | 1922 | <dd class="description">Pages per minute</dd> |
5a738aea | 1923 | <dt>ttrasterizer </dt> |
abacc52b | 1924 | <dd class="description">Truetype rasterizer</dd> |
5a738aea | 1925 | <dt>variable_sizes </dt> |
abacc52b | 1926 | <dd class="description">1 = supports variable sizes, 0 = doesn't</dd> |
5a738aea | 1927 | </dl> |
abacc52b MS |
1928 | <h3 class="struct"><a id="ppd_group_s">ppd_group_s</a></h3> |
1929 | <p class="description">Groups</p> | |
798d6e29 MS |
1930 | <p class="code">struct ppd_group_s {<br> |
1931 |     char text[PPD_MAX_TEXT - PPD_MAX_NAME];<br> | |
1932 |     char name[PPD_MAX_NAME];<br> | |
1933 |     int num_options;<br> | |
1934 |     int num_subgroups;<br> | |
1935 |     <a href="#ppd_option_t">ppd_option_t</a> *options;<br> | |
1936 |     struct <a href="#ppd_group_s">ppd_group_s</a> *subgroups;<br> | |
5a738aea MS |
1937 | };</p> |
1938 | <h4 class="members">Members</h4> | |
1939 | <dl> | |
1940 | <dt>PPD_MAX_NAME] </dt> | |
abacc52b MS |
1941 | <dd class="description">Human-readable group name</dd> |
1942 | <dt>name[PPD_MAX_NAME] <span class="info"> CUPS 1.1.18/macOS 10.3 </span></dt> | |
1943 | <dd class="description">Group name </dd> | |
5a738aea | 1944 | <dt>num_options </dt> |
abacc52b | 1945 | <dd class="description">Number of options</dd> |
5a738aea | 1946 | <dt>num_subgroups </dt> |
abacc52b | 1947 | <dd class="description">Number of sub-groups</dd> |
5a738aea | 1948 | <dt>options </dt> |
abacc52b | 1949 | <dd class="description">Options</dd> |
5a738aea | 1950 | <dt>subgroups </dt> |
abacc52b | 1951 | <dd class="description">Sub-groups (max depth = 1)</dd> |
5a738aea | 1952 | </dl> |
abacc52b MS |
1953 | <h3 class="struct"><a id="ppd_option_s">ppd_option_s</a></h3> |
1954 | <p class="description">Options</p> | |
798d6e29 MS |
1955 | <p class="code">struct ppd_option_s {<br> |
1956 |     <a href="#ppd_choice_t">ppd_choice_t</a> *choices;<br> | |
1957 |     char conflicted;<br> | |
1958 |     char defchoice[PPD_MAX_NAME];<br> | |
1959 |     char keyword[PPD_MAX_NAME];<br> | |
1960 |     int num_choices;<br> | |
1961 |     float order;<br> | |
1962 |     <a href="#ppd_section_t">ppd_section_t</a> section;<br> | |
1963 |     char text[PPD_MAX_TEXT];<br> | |
1964 |     <a href="#ppd_ui_t">ppd_ui_t</a> ui;<br> | |
5a738aea MS |
1965 | };</p> |
1966 | <h4 class="members">Members</h4> | |
1967 | <dl> | |
1968 | <dt>choices </dt> | |
abacc52b | 1969 | <dd class="description">Option choices</dd> |
5a738aea | 1970 | <dt>conflicted </dt> |
abacc52b | 1971 | <dd class="description">0 if no conflicts exist, 1 otherwise</dd> |
5a738aea | 1972 | <dt>defchoice[PPD_MAX_NAME] </dt> |
abacc52b | 1973 | <dd class="description">Default option choice</dd> |
5a738aea | 1974 | <dt>keyword[PPD_MAX_NAME] </dt> |
abacc52b | 1975 | <dd class="description">Option keyword name ("PageSize", etc.)</dd> |
5a738aea | 1976 | <dt>num_choices </dt> |
abacc52b | 1977 | <dd class="description">Number of option choices</dd> |
5a738aea | 1978 | <dt>order </dt> |
abacc52b | 1979 | <dd class="description">Order number</dd> |
5a738aea | 1980 | <dt>section </dt> |
abacc52b | 1981 | <dd class="description">Section for command</dd> |
5a738aea | 1982 | <dt>text[PPD_MAX_TEXT] </dt> |
abacc52b | 1983 | <dd class="description">Human-readable text</dd> |
5a738aea | 1984 | <dt>ui </dt> |
abacc52b | 1985 | <dd class="description">Type of UI option</dd> |
5a738aea | 1986 | </dl> |
abacc52b MS |
1987 | <h3 class="struct"><a id="ppd_profile_s">ppd_profile_s</a></h3> |
1988 | <p class="description">sRGB Color Profiles</p> | |
798d6e29 MS |
1989 | <p class="code">struct ppd_profile_s {<br> |
1990 |     float density;<br> | |
1991 |     float gamma;<br> | |
1992 |     float matrix[3][3];<br> | |
1993 |     char media_type[PPD_MAX_NAME];<br> | |
1994 |     char resolution[PPD_MAX_NAME];<br> | |
5a738aea MS |
1995 | };</p> |
1996 | <h4 class="members">Members</h4> | |
1997 | <dl> | |
1998 | <dt>density </dt> | |
abacc52b | 1999 | <dd class="description">Ink density to use</dd> |
5a738aea | 2000 | <dt>gamma </dt> |
abacc52b | 2001 | <dd class="description">Gamma correction to use</dd> |
5a738aea | 2002 | <dt>matrix[3][3] </dt> |
abacc52b | 2003 | <dd class="description">Transform matrix</dd> |
5a738aea | 2004 | <dt>media_type[PPD_MAX_NAME] </dt> |
abacc52b | 2005 | <dd class="description">Media type or "-"</dd> |
5a738aea | 2006 | <dt>resolution[PPD_MAX_NAME] </dt> |
abacc52b | 2007 | <dd class="description">Resolution or "-"</dd> |
5a738aea | 2008 | </dl> |
abacc52b MS |
2009 | <h3 class="struct"><a id="ppd_size_s">ppd_size_s</a></h3> |
2010 | <p class="description">Page Sizes</p> | |
798d6e29 MS |
2011 | <p class="code">struct ppd_size_s {<br> |
2012 |     float bottom;<br> | |
2013 |     float left;<br> | |
2014 |     float length;<br> | |
2015 |     int marked;<br> | |
2016 |     char name[PPD_MAX_NAME];<br> | |
2017 |     float right;<br> | |
2018 |     float top;<br> | |
2019 |     float width;<br> | |
5a738aea MS |
2020 | };</p> |
2021 | <h4 class="members">Members</h4> | |
2022 | <dl> | |
2023 | <dt>bottom </dt> | |
abacc52b | 2024 | <dd class="description">Bottom printable margin in points</dd> |
5a738aea | 2025 | <dt>left </dt> |
abacc52b | 2026 | <dd class="description">Left printable margin in points</dd> |
5a738aea | 2027 | <dt>length </dt> |
abacc52b | 2028 | <dd class="description">Length of media in points</dd> |
5a738aea | 2029 | <dt>marked </dt> |
abacc52b | 2030 | <dd class="description">Page size selected?</dd> |
5a738aea | 2031 | <dt>name[PPD_MAX_NAME] </dt> |
abacc52b | 2032 | <dd class="description">Media size option</dd> |
5a738aea | 2033 | <dt>right </dt> |
abacc52b | 2034 | <dd class="description">Right printable margin in points</dd> |
5a738aea | 2035 | <dt>top </dt> |
abacc52b | 2036 | <dd class="description">Top printable margin in points</dd> |
5a738aea | 2037 | <dt>width </dt> |
abacc52b | 2038 | <dd class="description">Width of media in points</dd> |
5a738aea | 2039 | </dl> |
abacc52b MS |
2040 | <h2 class="title"><a id="UNIONS">Unions</a></h2> |
2041 | <h3 class="union"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppd_cplimit_u">ppd_cplimit_u</a></h3> | |
2042 | <p class="description">Custom Parameter Limit </p> | |
798d6e29 MS |
2043 | <p class="code">union ppd_cplimit_u {<br> |
2044 |     float custom_curve;<br> | |
2045 |     int custom_int;<br> | |
2046 |     float custom_invcurve;<br> | |
2047 |     int custom_passcode;<br> | |
2048 |     int custom_password;<br> | |
2049 |     float custom_points;<br> | |
2050 |     float custom_real;<br> | |
2051 |     int custom_string;<br> | |
5a738aea MS |
2052 | };</p> |
2053 | <h4 class="members">Members</h4> | |
2054 | <dl> | |
2055 | <dt>custom_curve </dt> | |
abacc52b | 2056 | <dd class="description">Gamma value</dd> |
5a738aea | 2057 | <dt>custom_int </dt> |
abacc52b | 2058 | <dd class="description">Integer value</dd> |
5a738aea | 2059 | <dt>custom_invcurve </dt> |
abacc52b | 2060 | <dd class="description">Gamma value</dd> |
5a738aea | 2061 | <dt>custom_passcode </dt> |
abacc52b | 2062 | <dd class="description">Passcode length</dd> |
5a738aea | 2063 | <dt>custom_password </dt> |
abacc52b | 2064 | <dd class="description">Password length</dd> |
5a738aea | 2065 | <dt>custom_points </dt> |
abacc52b | 2066 | <dd class="description">Measurement value</dd> |
5a738aea | 2067 | <dt>custom_real </dt> |
abacc52b | 2068 | <dd class="description">Real value</dd> |
5a738aea | 2069 | <dt>custom_string </dt> |
abacc52b | 2070 | <dd class="description">String length</dd> |
5a738aea | 2071 | </dl> |
abacc52b MS |
2072 | <h3 class="union"><span class="info"> CUPS 1.2/macOS 10.5 </span><a id="ppd_cpvalue_u">ppd_cpvalue_u</a></h3> |
2073 | <p class="description">Custom Parameter Value </p> | |
798d6e29 MS |
2074 | <p class="code">union ppd_cpvalue_u {<br> |
2075 |     float custom_curve;<br> | |
2076 |     int custom_int;<br> | |
2077 |     float custom_invcurve;<br> | |
2078 |     char *custom_passcode;<br> | |
2079 |     char *custom_password;<br> | |
2080 |     float custom_points;<br> | |
2081 |     float custom_real;<br> | |
2082 |     char *custom_string;<br> | |
5a738aea MS |
2083 | };</p> |
2084 | <h4 class="members">Members</h4> | |
2085 | <dl> | |
2086 | <dt>custom_curve </dt> | |
abacc52b | 2087 | <dd class="description">Gamma value</dd> |
5a738aea | 2088 | <dt>custom_int </dt> |
abacc52b | 2089 | <dd class="description">Integer value</dd> |
5a738aea | 2090 | <dt>custom_invcurve </dt> |
abacc52b | 2091 | <dd class="description">Gamma value</dd> |
5a738aea | 2092 | <dt>custom_passcode </dt> |
abacc52b | 2093 | <dd class="description">Passcode value</dd> |
5a738aea | 2094 | <dt>custom_password </dt> |
abacc52b | 2095 | <dd class="description">Password value</dd> |
5a738aea | 2096 | <dt>custom_points </dt> |
abacc52b | 2097 | <dd class="description">Measurement value</dd> |
5a738aea | 2098 | <dt>custom_real </dt> |
abacc52b | 2099 | <dd class="description">Real value</dd> |
5a738aea | 2100 | <dt>custom_string </dt> |
abacc52b | 2101 | <dd class="description">String value</dd> |
5a738aea | 2102 | </dl> |
abacc52b MS |
2103 | <h2 class="title"><a id="ENUMERATIONS">Constants</a></h2> |
2104 | <h3 class="enumeration"><a id="ppd_conform_e"><span class="info"> CUPS 1.1.19/macOS 10.3 </span>ppd_conform_e</a></h3> | |
2105 | <p class="description">Conformance Levels </p> | |
2106 | <h4 class="constants">Constants</h4> | |
2107 | <dl> | |
2108 | <dt>PPD_CONFORM_RELAXED </dt> | |
2109 | <dd class="description">Relax whitespace and control char</dd> | |
2110 | <dt>PPD_CONFORM_STRICT </dt> | |
2111 | <dd class="description">Require strict conformance</dd> | |
5a738aea | 2112 | </dl> |
abacc52b MS |
2113 | <h3 class="enumeration"><a id="ppd_cs_e">ppd_cs_e</a></h3> |
2114 | <p class="description">Colorspaces</p> | |
2115 | <h4 class="constants">Constants</h4> | |
2116 | <dl> | |
2117 | <dt>PPD_CS_CMY </dt> | |
2118 | <dd class="description">CMY colorspace</dd> | |
2119 | <dt>PPD_CS_CMYK </dt> | |
2120 | <dd class="description">CMYK colorspace</dd> | |
2121 | <dt>PPD_CS_GRAY </dt> | |
2122 | <dd class="description">Grayscale colorspace</dd> | |
2123 | <dt>PPD_CS_N </dt> | |
2124 | <dd class="description">DeviceN colorspace</dd> | |
2125 | <dt>PPD_CS_RGB </dt> | |
2126 | <dd class="description">RGB colorspace</dd> | |
2127 | <dt>PPD_CS_RGBK </dt> | |
2128 | <dd class="description">RGBK (K = gray) colorspace</dd> | |
5a738aea | 2129 | </dl> |
abacc52b MS |
2130 | <h3 class="enumeration"><a id="ppd_section_e">ppd_section_e</a></h3> |
2131 | <p class="description">Order dependency sections</p> | |
2132 | <h4 class="constants">Constants</h4> | |
2133 | <dl> | |
2134 | <dt>PPD_ORDER_ANY </dt> | |
2135 | <dd class="description">Option code can be anywhere in the file</dd> | |
2136 | <dt>PPD_ORDER_DOCUMENT </dt> | |
2137 | <dd class="description">... must be in the DocumentSetup section</dd> | |
2138 | <dt>PPD_ORDER_EXIT </dt> | |
2139 | <dd class="description">... must be sent prior to the document</dd> | |
2140 | <dt>PPD_ORDER_JCL </dt> | |
2141 | <dd class="description">... must be sent as a JCL command</dd> | |
2142 | <dt>PPD_ORDER_PAGE </dt> | |
2143 | <dd class="description">... must be in the PageSetup section</dd> | |
2144 | <dt>PPD_ORDER_PROLOG </dt> | |
2145 | <dd class="description">... must be in the Prolog section</dd> | |
5a738aea | 2146 | </dl> |
abacc52b MS |
2147 | <h3 class="enumeration"><a id="ppd_status_e"><span class="info"> CUPS 1.1.19/macOS 10.3 </span>ppd_status_e</a></h3> |
2148 | <p class="description">Status Codes </p> | |
2149 | <h4 class="constants">Constants</h4> | |
2150 | <dl> | |
2151 | <dt>PPD_ALLOC_ERROR </dt> | |
2152 | <dd class="description">Memory allocation error</dd> | |
2153 | <dt>PPD_BAD_CUSTOM_PARAM </dt> | |
2154 | <dd class="description">Bad custom parameter</dd> | |
2155 | <dt>PPD_BAD_OPEN_GROUP </dt> | |
2156 | <dd class="description">Bad OpenGroup</dd> | |
2157 | <dt>PPD_BAD_OPEN_UI </dt> | |
2158 | <dd class="description">Bad OpenUI/JCLOpenUI</dd> | |
2159 | <dt>PPD_BAD_ORDER_DEPENDENCY </dt> | |
2160 | <dd class="description">Bad OrderDependency</dd> | |
2161 | <dt>PPD_BAD_UI_CONSTRAINTS </dt> | |
2162 | <dd class="description">Bad UIConstraints</dd> | |
2163 | <dt>PPD_BAD_VALUE </dt> | |
2164 | <dd class="description">Bad value string</dd> | |
2165 | <dt>PPD_FILE_OPEN_ERROR </dt> | |
2166 | <dd class="description">Unable to open PPD file</dd> | |
2167 | <dt>PPD_ILLEGAL_CHARACTER </dt> | |
2168 | <dd class="description">Illegal control character</dd> | |
2169 | <dt>PPD_ILLEGAL_MAIN_KEYWORD </dt> | |
2170 | <dd class="description">Illegal main keyword string</dd> | |
2171 | <dt>PPD_ILLEGAL_OPTION_KEYWORD </dt> | |
2172 | <dd class="description">Illegal option keyword string</dd> | |
2173 | <dt>PPD_ILLEGAL_TRANSLATION </dt> | |
2174 | <dd class="description">Illegal translation string</dd> | |
2175 | <dt>PPD_ILLEGAL_WHITESPACE </dt> | |
2176 | <dd class="description">Illegal whitespace character</dd> | |
2177 | <dt>PPD_INTERNAL_ERROR </dt> | |
2178 | <dd class="description">Internal error</dd> | |
2179 | <dt>PPD_LINE_TOO_LONG </dt> | |
2180 | <dd class="description">Line longer than 255 chars</dd> | |
2181 | <dt>PPD_MISSING_ASTERISK </dt> | |
2182 | <dd class="description">Missing asterisk in column 0</dd> | |
2183 | <dt>PPD_MISSING_CLOSE_GROUP </dt> | |
2184 | <dd class="description">Missing CloseGroup</dd> | |
2185 | <dt>PPD_MISSING_OPTION_KEYWORD </dt> | |
2186 | <dd class="description">Missing option keyword</dd> | |
2187 | <dt>PPD_MISSING_PPDADOBE4 </dt> | |
2188 | <dd class="description">Missing PPD-Adobe-4.x header</dd> | |
2189 | <dt>PPD_MISSING_VALUE </dt> | |
2190 | <dd class="description">Missing value string</dd> | |
2191 | <dt>PPD_NESTED_OPEN_GROUP </dt> | |
2192 | <dd class="description">OpenGroup without a CloseGroup first</dd> | |
2193 | <dt>PPD_NESTED_OPEN_UI </dt> | |
2194 | <dd class="description">OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first</dd> | |
2195 | <dt>PPD_NULL_FILE </dt> | |
2196 | <dd class="description">NULL PPD file pointer</dd> | |
2197 | <dt>PPD_OK </dt> | |
2198 | <dd class="description">OK</dd> | |
5a738aea | 2199 | </dl> |
abacc52b MS |
2200 | <h3 class="enumeration"><a id="ppd_ui_e">ppd_ui_e</a></h3> |
2201 | <p class="description">UI Types</p> | |
2202 | <h4 class="constants">Constants</h4> | |
2203 | <dl> | |
2204 | <dt>PPD_UI_BOOLEAN </dt> | |
2205 | <dd class="description">True or False option</dd> | |
2206 | <dt>PPD_UI_PICKMANY </dt> | |
2207 | <dd class="description">Pick zero or more from a list</dd> | |
2208 | <dt>PPD_UI_PICKONE </dt> | |
2209 | <dd class="description">Pick one from a list</dd> | |
5a738aea | 2210 | </dl> |
abacc52b MS |
2211 | </div> |
2212 | </body> | |
ef416fc2 | 2213 | </html> |