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