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