]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/api-ppdc.html
Move CGI, PPD compiler, and MIME heades to the private headers directory.
[thirdparty/cups.git] / doc / help / api-ppdc.html
CommitLineData
f11a948a
MS
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<!-- SECTION: Programming -->
4<head>
0268488e
MS
5 <title>PPD Compiler API </title>
6 <meta name="keywords" content="Programming">
7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
dd3fdd2c 8 <meta name="creator" content="Mini-XML v2.7">
f11a948a
MS
9<style type="text/css"><!--
10BODY {
11 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
12}
13
14H1, H2, H3, H4, H5, H6, P, TD, TH {
15 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
16}
17
18KBD {
19 font-family: monaco, courier, monospace;
20 font-weight: bold;
21}
22
23PRE {
24 font-family: monaco, courier, monospace;
25}
26
27PRE.command {
10d09e33 28 border: dotted thin #7f7f7f;
f11a948a 29 margin-left: 36pt;
10d09e33 30 padding: 10px;
f11a948a
MS
31}
32
33P.compact {
34 margin: 0;
35}
36
37P.example {
38 font-style: italic;
39 margin-left: 36pt;
40}
ca6b43fc 41
240214ef
MS
42DL.man DD {
43 margin-left: 5em;
44}
45
46DL.man DT {
47 margin-left: 0;
48}
49
50PRE.man {
51 margin: 0;
52}
53
f11a948a
MS
54PRE.example {
55 background: #eeeeee;
56 border: dotted thin #999999;
57 margin-left: 36pt;
178cb736 58 padding: 10pt;
f11a948a
MS
59}
60
61PRE.command EM, PRE.example EM {
62 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
63}
64
65P.command {
66 font-family: monaco, courier, monospace;
67 margin-left: 36pt;
68}
69
70P.formula {
71 font-style: italic;
72 margin-left: 36pt;
73}
74
75BLOCKQUOTE {
178cb736 76 background: #eeeeee;
f11a948a
MS
77 border: solid thin #999999;
78 padding: 10pt;
79}
80
81A IMG {
82 border: none;
83}
84
85A:link:hover IMG {
86 background: #f0f0f0;
87 border-radius: 10px;
88 -moz-border-radius: 10px;
89}
90
91A:link, A:visited {
ca6b43fc 92 font-weight: inherit;
f11a948a
MS
93 text-decoration: none;
94}
95
96A:link:hover, A:visited:hover, A:active {
97 text-decoration: underline;
98}
99
100SUB, SUP {
101 font-size: 50%;
102}
103
104TR.data, TD.data, TR.data TD {
105 margin-top: 10pt;
106 padding: 5pt;
107 border-bottom: solid 1pt #999999;
108}
109
110TR.data TH {
111 border-bottom: solid 1pt #999999;
112 padding-top: 10pt;
113 padding-left: 5pt;
114 text-align: left;
115}
116
117DIV.table TABLE {
118 border: solid thin #999999;
119 border-collapse: collapse;
120 border-spacing: 0;
121 margin-left: auto;
122 margin-right: auto;
123}
124
125DIV.table CAPTION {
126 caption-side: top;
127 font-size: 120%;
128 font-style: italic;
129 font-weight: bold;
130 margin-left: auto;
131 margin-right: auto;
132}
133
134DIV.table TABLE TD {
135 border: solid thin #cccccc;
136 padding-top: 5pt;
137}
138
139DIV.table TABLE TH {
140 background: #cccccc;
141 border: none;
142 border-bottom: solid thin #999999;
143}
144
145DIV.figure TABLE {
146 margin-left: auto;
147 margin-right: auto;
148}
149
150DIV.figure CAPTION {
151 caption-side: bottom;
152 font-size: 120%;
153 font-style: italic;
154 font-weight: bold;
155 margin-left: auto;
156 margin-right: auto;
157}
158
159TH.label {
160 text-align: right;
161 vertical-align: top;
162}
163
164TH.sublabel {
165 text-align: right;
166 font-weight: normal;
167}
168
169HR {
170 border: solid thin;
171}
172
173SPAN.info {
174 background: black;
175 border: thin solid black;
176 color: white;
177 font-size: 80%;
178 font-style: italic;
179 font-weight: bold;
180 white-space: nowrap;
181}
182
183H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
184 float: right;
185 font-size: 100%;
186}
187
178cb736
MS
188H1.title {
189}
190
f11a948a
MS
191H2.title, H3.title {
192 border-bottom: solid 2pt #000000;
193}
194
195DIV.indent, TABLE.indent {
196 margin-top: 2em;
197 margin-left: auto;
198 margin-right: auto;
199 width: 90%;
200}
201
202TABLE.indent {
203 border-collapse: collapse;
204}
205
206TABLE.indent TD, TABLE.indent TH {
207 padding: 0;
208}
209
210TABLE.list {
211 border-collapse: collapse;
212 margin-left: auto;
213 margin-right: auto;
214 width: 90%;
215}
216
217TABLE.list TH {
218 background: white;
219 border-bottom: solid thin #cccccc;
220 color: #444444;
221 padding-top: 10pt;
222 padding-left: 5pt;
223 text-align: left;
224 vertical-align: bottom;
225 white-space: nowrap;
226}
227
228TABLE.list TH A {
229 color: #4444cc;
230}
231
232TABLE.list TD {
233 border-bottom: solid thin #eeeeee;
234 padding-top: 5pt;
235 padding-left: 5pt;
236}
237
238TABLE.list TR:nth-child(even) {
239 background: #f8f8f8;
240}
241
242TABLE.list TR:nth-child(odd) {
243 background: #f4f4f4;
244}
245
246DT {
247 margin-left: 36pt;
248 margin-top: 12pt;
249}
250
251DD {
252 margin-left: 54pt;
253}
254
255DL.category DT {
256 font-weight: bold;
257}
258
259P.summary {
260 margin-left: 36pt;
261 font-family: monaco, courier, monospace;
262}
263
264DIV.summary TABLE {
265 border: solid thin #999999;
266 border-collapse: collapse;
267 border-spacing: 0;
268 margin: 10px;
269}
270
271DIV.summary TABLE TD, DIV.summary TABLE TH {
272 border: solid thin #999999;
273 padding: 5px;
274 text-align: left;
275 vertical-align: top;
276}
277
278DIV.summary TABLE THEAD TH {
279 background: #eeeeee;
280}
281
282/* API documentation styles... */
283div.body h1 {
284 margin: 0;
285}
286div.body h2 {
287 margin-top: 1.5em;
288}
289div.body h3, div.body h4, div.body h5 {
290 margin-bottom: 0.5em;
291 margin-top: 1.5em;
292}
293.class, .enumeration, .function, .struct, .typedef, .union {
294 border-bottom: solid thin #999999;
295 margin-bottom: 0;
296 margin-top: 2em;
297}
298.description {
299 margin-top: 0.5em;
300}
301code, p.code, pre, ul.code li {
302 font-family: monaco, courier, monospace;
303 font-size: 90%;
304}
305ul.code, ul.contents, ul.subcontents {
306 list-style-type: none;
307 margin: 0;
308 padding-left: 0;
309}
310ul.code li {
311 margin: 0;
312}
313ul.contents > li {
314 margin-top: 1em;
315}
316ul.contents li ul.code, ul.contents li ul.subcontents {
317 padding-left: 2em;
318}
319div.body dl {
320 margin-left: 0;
321 margin-top: 0;
322}
323div.body dt {
324 font-style: italic;
325 margin-left: 0;
326 margin-top: 0;
327}
328div.body dd {
329 margin-bottom: 0.5em;
330}
331
332/* This is just for the HTML files generated with the framedhelp target */
333div.contents {
334 background: #e8e8e8;
335 border: solid thin black;
336 padding: 10px;
337}
338div.contents h1 {
339 font-size: 110%;
340}
341div.contents h2 {
342 font-size: 100%;
343}
344div.contents ul.contents {
345 font-size: 80%;
346}
347div.contents ul.subcontents li {
348 margin-left: 1em;
349 text-indent: -1em;
350}
351--></style>
352</head>
353<body>
354<div class='body'>
178cb736 355<!--
178cb736
MS
356 PPD Compiler API header for CUPS.
357
358 Copyright 2009 by Apple Inc.
359
360 These coded instructions, statements, and computer programs are the
361 property of Apple Inc. and are protected by Federal copyright
362 law. Distribution and use rights are outlined in the file "LICENSE.txt"
363 which should have been included with this file. If this file is
364 file is missing or damaged, see the license at "http://www.cups.org/".
365-->
366
367<h1 class='title'>PPD Compiler API</h1>
368
369<div class='summary'><table summary='General Information'>
370<thead>
371<tr>
372 <th>Header</th>
373 <th>cups/ppdc.h</th>
374</tr>
375</thead>
376<tbody>
377<tr>
378 <th>Library</th>
379 <td>-lcupsppdc</td>
380</tr>
381<tr>
382 <th>See Also</th>
383 <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
384</tr>
385</tbody>
386</table></div>
f11a948a
MS
387<h2 class="title">Contents</h2>
388<ul class="contents">
178cb736 389<li><a href="#OVERVIEW">Overview</a></li>
f11a948a 390<li><a href="#CLASSES">Classes</a><ul class="code">
0268488e
MS
391 <li><a href="#ppdcArray" title="// Shared Array">ppdcArray</a></li>
392 <li><a href="#ppdcAttr" title="// Attribute">ppdcAttr</a></li>
393 <li><a href="#ppdcCatalog" title="// Translation catalog">ppdcCatalog</a></li>
394 <li><a href="#ppdcChoice" title="// Option Choice">ppdcChoice</a></li>
395 <li><a href="#ppdcConstraint" title="// Constraint">ppdcConstraint</a></li>
396 <li><a href="#ppdcDriver" title="// Printer Driver Data">ppdcDriver</a></li>
397 <li><a href="#ppdcFile" title="// File">ppdcFile</a></li>
398 <li><a href="#ppdcFilter" title="// Filter Program">ppdcFilter</a></li>
399 <li><a href="#ppdcFont" title="// Shared Font">ppdcFont</a></li>
400 <li><a href="#ppdcGroup" title="// Group of Options">ppdcGroup</a></li>
401 <li><a href="#ppdcInteger" title="// Shared integer">ppdcInteger</a></li>
402 <li><a href="#ppdcMediaSize" title="// Media Size">ppdcMediaSize</a></li>
403 <li><a href="#ppdcMessage" title="// Translation message">ppdcMessage</a></li>
404 <li><a href="#ppdcOption" title="// Option">ppdcOption</a></li>
405 <li><a href="#ppdcProfile" title="// Color Profile">ppdcProfile</a></li>
406 <li><a href="#ppdcShared" title="// Shared Data Value">ppdcShared</a></li>
407 <li><a href="#ppdcSource" title="// Source File">ppdcSource</a></li>
408 <li><a href="#ppdcString" title="// Shared String">ppdcString</a></li>
409 <li><a href="#ppdcVariable" title="// Variable Definition">ppdcVariable</a></li>
f11a948a
MS
410</ul></li>
411<li><a href="#TYPES">Data Types</a><ul class="code">
412 <li><a href="#ppdc_cs_t" title="">ppdc_cs_t</a></li>
413</ul></li>
414<li><a href="#VARIABLES">Variables</a><ul class="code">
415 <li><a href="#ppdcSource" title="// Printer Driver Data">ppdcSource</a></li>
416</ul></li>
417<li><a href="#ENUMERATIONS">Constants</a><ul class="code">
418 <li><a href="#ppdcCondFlags" title="// Condition flags">ppdcCondFlags</a></li>
419 <li><a href="#ppdcDrvType" title="// Driver type">ppdcDrvType</a></li>
420 <li><a href="#ppdcFontStatus" title="// Load status of font">ppdcFontStatus</a></li>
421 <li><a href="#ppdcLineEnding" title="// Line endings">ppdcLineEnding</a></li>
422 <li><a href="#ppdcOptSection" title="// Option section">ppdcOptSection</a></li>
423 <li><a href="#ppdcOptType" title="// Option type">ppdcOptType</a></li>
424</ul></li>
0268488e 425</ul>
178cb736 426<!--
178cb736
MS
427 PPD Compiler API introduction for CUPS.
428
429 Copyright 2009 by Apple Inc.
430
431 These coded instructions, statements, and computer programs are the
432 property of Apple Inc. and are protected by Federal copyright
433 law. Distribution and use rights are outlined in the file "LICENSE.txt"
434 which should have been included with this file. If this file is
435 file is missing or damaged, see the license at "http://www.cups.org/".
436-->
437
438<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
439
440<p>The PPD Compiler API provides access to CUPS driver information files and
441methods for generating and importing PPD files.</p>
f11a948a
MS
442<h2 class="title"><a name="CLASSES">Classes</a></h2>
443<h3 class="class"><a name="ppdcArray">ppdcArray</a></h3>
444<p class="description">// Shared Array</p>
445<p class="code">class ppdcArray : public ppdcShared {<br>
446&nbsp;&nbsp;public:<br>
447&nbsp;&nbsp;&nbsp;&nbsp;int count, alloc, current;<br>
448&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcShared">ppdcShared</a> **data;<br>
449};</p>
450<h4 class="members">Members</h4>
451<dl>
452<dt>current </dt>
453<dd class="description">Current element</dd>
454<dt>data </dt>
455<dd class="description">Elements</dd>
456</dl>
457<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4>
458<p class="description"></p>
459<p class="code">
460void PPDC_NAME (<br>
461&nbsp;&nbsp;&nbsp;&nbsp;void add(<a href="#ppdcShared">ppdcShared</a> *d<br>
462);</p>
463<h5 class="parameters">Parameters</h5>
464<dl>
465<dt>d</dt>
466</dl>
467<h4 class="method"><a name="add">add</a></h4>
468<p class="description"></p>
469<p class="code">
470void add (<br>
471&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcShared">ppdcShared</a> *d<br>
472);</p>
473<h5 class="parameters">Parameters</h5>
474<dl>
475<dt>d</dt>
476</dl>
477<h4 class="method"><a name="first">first</a></h4>
478<p class="description">Return the first element in the array.</p>
479<p class="code">
480<a href="#ppdcShared">ppdcShared</a> *first (void);</p>
481<h5 class="returnvalue">Return Value</h5>
482<p class="description"></p>
483<h4 class="method"><a name="next">next</a></h4>
484<p class="description">Return the next element in the array.</p>
485<p class="code">
486<a href="#ppdcShared">ppdcShared</a> *next (void);</p>
487<h5 class="returnvalue">Return Value</h5>
488<p class="description"></p>
489<h4 class="method"><a name="ppdcArray">ppdcArray</a></h4>
490<p class="description"></p>
491<p class="code">
492void ppdcArray (<br>
493&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcArray">ppdcArray</a> *a<br>
494);</p>
495<h5 class="parameters">Parameters</h5>
496<dl>
497<dt>a</dt>
498</dl>
499<h4 class="method"><a name="remove">remove</a></h4>
500<p class="description"></p>
501<p class="code">
502void remove (<br>
503&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcShared">ppdcShared</a> *d<br>
504);</p>
505<h5 class="parameters">Parameters</h5>
506<dl>
507<dt>d</dt>
508<dd class="description">Data element</dd>
509</dl>
510<h4 class="method"><a name="~ppdcArray">~ppdcArray</a></h4>
511<p class="description"></p>
512<p class="code">
513void ~ppdcArray (void);</p>
514<h3 class="class"><a name="ppdcAttr">ppdcAttr</a></h3>
515<p class="description">// Attribute</p>
516<p class="code">class ppdcAttr : public ppdcShared {<br>
517&nbsp;&nbsp;public:<br>
518&nbsp;&nbsp;&nbsp;&nbsp;bool localizable;<br>
519&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *name, *selector, *text, *value;<br>
520};</p>
521<h4 class="members">Members</h4>
522<dl>
523<dt>localizable </dt>
524<dd class="description">Should this attribute be localized?</dd>
525<dt>value </dt>
526<dd class="description">Value string</dd>
527</dl>
528<h4 class="method"><a name="ppdcAttr">ppdcAttr</a></h4>
529<p class="description"></p>
530<p class="code">
531void ppdcAttr (<br>
532&nbsp;&nbsp;&nbsp;&nbsp;const char *n,<br>
533&nbsp;&nbsp;&nbsp;&nbsp;const char *s,<br>
534&nbsp;&nbsp;&nbsp;&nbsp;const char *t,<br>
535&nbsp;&nbsp;&nbsp;&nbsp;const char *v,<br>
536&nbsp;&nbsp;&nbsp;&nbsp;bool loc<br>
537);</p>
538<h5 class="parameters">Parameters</h5>
539<dl>
540<dt>n</dt>
541<dd class="description">Name</dd>
542<dt>s</dt>
543<dd class="description">Spec string</dd>
544<dt>t</dt>
545<dd class="description">Human-readable text</dd>
546<dt>v</dt>
547<dd class="description">Value</dd>
548<dt>loc</dt>
549<dd class="description">Localize this attribute?</dd>
550</dl>
551<h4 class="method"><a name="~ppdcAttr">~ppdcAttr</a></h4>
552<p class="description"></p>
553<p class="code">
554void ~ppdcAttr (void);</p>
555<h3 class="class"><a name="ppdcCatalog">ppdcCatalog</a></h3>
556<p class="description">// Translation catalog</p>
557<p class="code">class ppdcCatalog : public ppdcShared {<br>
558&nbsp;&nbsp;public:<br>
559&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *filename;<br>
560&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *locale;<br>
561&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcArray">ppdcArray</a> *messages;<br>
562};</p>
563<h4 class="members">Members</h4>
564<dl>
565<dt>filename </dt>
566<dd class="description">Name of translation file</dd>
567<dt>locale </dt>
568<dd class="description">Name of locale</dd>
569<dt>messages </dt>
570<dd class="description">Array of translation messages</dd>
571</dl>
572<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4>
573<p class="description"></p>
574<p class="code">
575void PPDC_NAME (<br>
576&nbsp;&nbsp;&nbsp;&nbsp;void add_message(const char *id,<br>
577&nbsp;&nbsp;&nbsp;&nbsp;const char *string = NULL<br>
578);</p>
579<h5 class="parameters">Parameters</h5>
580<dl>
581<dt>id</dt>
582<dt>string</dt>
583</dl>
584<h4 class="method"><a name="add_message">add_message</a></h4>
585<p class="description"></p>
586<p class="code">
587void add_message (<br>
588&nbsp;&nbsp;&nbsp;&nbsp;const char *id,<br>
589&nbsp;&nbsp;&nbsp;&nbsp;const char *string<br>
590);</p>
591<h5 class="parameters">Parameters</h5>
592<dl>
593<dt>id</dt>
594<dd class="description">Message ID to add</dd>
595<dt>string</dt>
596<dd class="description">Translation string</dd>
597</dl>
598<h4 class="method"><a name="find_message">find_message</a></h4>
599<p class="description"></p>
600<p class="code">
601const char *find_message (<br>
602&nbsp;&nbsp;&nbsp;&nbsp;const char *id<br>
603);</p>
604<h5 class="parameters">Parameters</h5>
605<dl>
606<dt>id</dt>
607<dd class="description">Message ID</dd>
608</dl>
609<h5 class="returnvalue">Return Value</h5>
610<p class="description">Message text</p>
611<h4 class="method"><a name="load_messages">load_messages</a></h4>
612<p class="description"></p>
613<p class="code">
614int load_messages (<br>
615&nbsp;&nbsp;&nbsp;&nbsp;const char *f<br>
616);</p>
617<h5 class="parameters">Parameters</h5>
618<dl>
619<dt>f</dt>
620<dd class="description">Message catalog file</dd>
621</dl>
622<h5 class="returnvalue">Return Value</h5>
623<p class="description">0 on success, -1 on failure</p>
624<h4 class="method"><a name="ppdcCatalog">ppdcCatalog</a></h4>
625<p class="description"></p>
626<p class="code">
627void ppdcCatalog (<br>
628&nbsp;&nbsp;&nbsp;&nbsp;const char *l,<br>
629&nbsp;&nbsp;&nbsp;&nbsp;const char *f<br>
630);</p>
631<h5 class="parameters">Parameters</h5>
632<dl>
633<dt>l</dt>
634<dd class="description">Locale</dd>
635<dt>f</dt>
636<dd class="description">Message catalog file</dd>
637</dl>
638<h4 class="method"><a name="save_messages">save_messages</a></h4>
639<p class="description"></p>
640<p class="code">
641int save_messages (<br>
642&nbsp;&nbsp;&nbsp;&nbsp;const char *f<br>
643);</p>
644<h5 class="parameters">Parameters</h5>
645<dl>
646<dt>f</dt>
647<dd class="description">File to save to</dd>
648</dl>
649<h5 class="returnvalue">Return Value</h5>
650<p class="description">0 on success, -1 on error</p>
651<h4 class="method"><a name="~ppdcCatalog">~ppdcCatalog</a></h4>
652<p class="description"></p>
653<p class="code">
654void ~ppdcCatalog (void);</p>
655<h3 class="class"><a name="ppdcChoice">ppdcChoice</a></h3>
656<p class="description">// Option Choice</p>
657<p class="code">class ppdcChoice : public ppdcShared {<br>
658&nbsp;&nbsp;public:<br>
659&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *name, *text, *code;<br>
660};</p>
661<h4 class="members">Members</h4>
662<dl>
663<dt>code </dt>
664<dd class="description">PS code of choice</dd>
665</dl>
666<h4 class="method"><a name="ppdcChoice">ppdcChoice</a></h4>
667<p class="description"></p>
668<p class="code">
669void ppdcChoice (<br>
670&nbsp;&nbsp;&nbsp;&nbsp;const char *n,<br>
671&nbsp;&nbsp;&nbsp;&nbsp;const char *t,<br>
672&nbsp;&nbsp;&nbsp;&nbsp;const char *c<br>
673);</p>
674<h5 class="parameters">Parameters</h5>
675<dl>
676<dt>n</dt>
677<dd class="description">Name of choice</dd>
678<dt>t</dt>
679<dd class="description">Text of choice</dd>
680<dt>c</dt>
681<dd class="description">Code of choice</dd>
682</dl>
683<h4 class="method"><a name="~ppdcChoice">~ppdcChoice</a></h4>
684<p class="description"></p>
685<p class="code">
686void ~ppdcChoice (void);</p>
687<h3 class="class"><a name="ppdcConstraint">ppdcConstraint</a></h3>
688<p class="description">// Constraint</p>
689<p class="code">class ppdcConstraint : public ppdcShared {<br>
690&nbsp;&nbsp;public:<br>
691&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *option1, *choice1, *option2, *choice2;<br>
692};</p>
693<h4 class="members">Members</h4>
694<dl>
695<dt>choice2 </dt>
696<dd class="description">Second choice</dd>
697</dl>
698<h4 class="method"><a name="ppdcConstraint">ppdcConstraint</a></h4>
699<p class="description"></p>
700<p class="code">
701void ppdcConstraint (<br>
702&nbsp;&nbsp;&nbsp;&nbsp;const char *o1,<br>
703&nbsp;&nbsp;&nbsp;&nbsp;const char *c1,<br>
704&nbsp;&nbsp;&nbsp;&nbsp;const char *o2,<br>
705&nbsp;&nbsp;&nbsp;&nbsp;const char *c2<br>
706);</p>
707<h5 class="parameters">Parameters</h5>
708<dl>
709<dt>o1</dt>
710<dd class="description">First option</dd>
711<dt>c1</dt>
712<dd class="description">First choice</dd>
713<dt>o2</dt>
714<dd class="description">Second option</dd>
715<dt>c2</dt>
716<dd class="description">Second choice</dd>
717</dl>
718<h4 class="method"><a name="~ppdcConstraint">~ppdcConstraint</a></h4>
719<p class="description"></p>
720<p class="code">
721void ~ppdcConstraint (void);</p>
722<h3 class="class"><a name="ppdcDriver">ppdcDriver</a></h3>
723<p class="description">// Printer Driver Data</p>
724<p class="code">class ppdcDriver : public ppdcShared {<br>
725&nbsp;&nbsp;public:<br>
726&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcArray">ppdcArray</a> *copyright;<br>
727&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *custom_size_code;<br>
728&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *default_font, *default_size;<br>
729&nbsp;&nbsp;&nbsp;&nbsp;float left_margin, bottom_margin, right_margin, top_margin, max_width, max_length, min_width, min_length;<br>
730&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcArray">ppdcArray</a> *attrs, *constraints, *filters, *fonts, *groups, *profiles, *sizes;<br>
731&nbsp;&nbsp;&nbsp;&nbsp;int model_number, manual_copies, color_device, throughput;<br>
732&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcDrvType">ppdcDrvType</a> type;<br>
733&nbsp;&nbsp;&nbsp;&nbsp;int variable_paper_size;<br>
734&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *manufacturer, *model_name, *file_name, *pc_file_name, *version;<br>
735};</p>
736<h4 class="members">Members</h4>
737<dl>
738<dt>copyright </dt>
739<dd class="description">Copyright strings</dd>
740<dt>custom_size_code </dt>
741<dd class="description">Custom page size code, if any</dd>
742<dt>default_size </dt>
743<dd class="description">Default size option</dd>
744<dt>min_length </dt>
745<dd class="description">Minimum length (points)</dd>
746<dt>sizes </dt>
747<dd class="description">Fixed sizes</dd>
748<dt>throughput </dt>
749<dd class="description">Throughput in pages per minute</dd>
750<dt>type </dt>
751<dd class="description">Driver type</dd>
752<dt>variable_paper_size </dt>
753<dd class="description">Support variable sizes?</dd>
754<dt>version </dt>
755<dd class="description">Version number</dd>
756</dl>
757<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4>
758<p class="description"></p>
759<p class="code">
760void PPDC_NAME (<br>
761&nbsp;&nbsp;&nbsp;&nbsp;void add_attr(<a href="#ppdcAttr">ppdcAttr</a> *a<br>
762);</p>
763<h5 class="parameters">Parameters</h5>
764<dl>
765<dt>a</dt>
766</dl>
767<h4 class="method"><a name="add_constraint">add_constraint</a></h4>
768<p class="description"></p>
769<p class="code">
770void add_constraint (<br>
771&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcConstraint">ppdcConstraint</a> *c<br>
772);</p>
773<h5 class="parameters">Parameters</h5>
774<dl>
775<dt>c</dt>
776</dl>
777<h4 class="method"><a name="add_copyright">add_copyright</a></h4>
778<p class="description"></p>
779<p class="code">
780void add_copyright (<br>
781&nbsp;&nbsp;&nbsp;&nbsp;const char *c<br>
782);</p>
783<h5 class="parameters">Parameters</h5>
784<dl>
785<dt>c</dt>
786</dl>
787<h4 class="method"><a name="add_filter">add_filter</a></h4>
788<p class="description"></p>
789<p class="code">
790void add_filter (<br>
791&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFilter">ppdcFilter</a> *f<br>
792);</p>
793<h5 class="parameters">Parameters</h5>
794<dl>
795<dt>f</dt>
796</dl>
797<h4 class="method"><a name="add_font">add_font</a></h4>
798<p class="description"></p>
799<p class="code">
800void add_font (<br>
801&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFont">ppdcFont</a> *f<br>
802);</p>
803<h5 class="parameters">Parameters</h5>
804<dl>
805<dt>f</dt>
806</dl>
807<h4 class="method"><a name="add_group">add_group</a></h4>
808<p class="description"></p>
809<p class="code">
810void add_group (<br>
811&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcGroup">ppdcGroup</a> *g<br>
812);</p>
813<h5 class="parameters">Parameters</h5>
814<dl>
815<dt>g</dt>
816</dl>
817<h4 class="method"><a name="add_profile">add_profile</a></h4>
818<p class="description"></p>
819<p class="code">
820void add_profile (<br>
821&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcProfile">ppdcProfile</a> *p<br>
822);</p>
823<h5 class="parameters">Parameters</h5>
824<dl>
825<dt>p</dt>
826</dl>
827<h4 class="method"><a name="add_size">add_size</a></h4>
828<p class="description"></p>
829<p class="code">
830void add_size (<br>
831&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcMediaSize">ppdcMediaSize</a> *m<br>
832);</p>
833<h5 class="parameters">Parameters</h5>
834<dl>
835<dt>m</dt>
836</dl>
837<h4 class="method"><a name="find_attr">find_attr</a></h4>
838<p class="description"></p>
839<p class="code">
840<a href="#ppdcAttr">ppdcAttr</a> *find_attr (<br>
841&nbsp;&nbsp;&nbsp;&nbsp;const char *k,<br>
842&nbsp;&nbsp;&nbsp;&nbsp;const char *s<br>
843);</p>
844<h5 class="parameters">Parameters</h5>
845<dl>
846<dt>k</dt>
847<dd class="description">Keyword string</dd>
848<dt>s</dt>
849<dd class="description">Spec string</dd>
850</dl>
851<h5 class="returnvalue">Return Value</h5>
852<p class="description">Attribute or NULL</p>
853<h4 class="method"><a name="find_group">find_group</a></h4>
854<p class="description"></p>
855<p class="code">
856<a href="#ppdcGroup">ppdcGroup</a> *find_group (<br>
857&nbsp;&nbsp;&nbsp;&nbsp;const char *n<br>
858);</p>
859<h5 class="parameters">Parameters</h5>
860<dl>
861<dt>n</dt>
862<dd class="description">Group name</dd>
863</dl>
864<h5 class="returnvalue">Return Value</h5>
865<p class="description">Matching group or NULL</p>
866<h4 class="method"><a name="find_option">find_option</a></h4>
867<p class="description"></p>
868<p class="code">
869<a href="#ppdcOption">ppdcOption</a> *find_option (<br>
870&nbsp;&nbsp;&nbsp;&nbsp;const char *n<br>
871);</p>
872<h5 class="parameters">Parameters</h5>
873<dl>
874<dt>n</dt>
875<dd class="description">Option name</dd>
876</dl>
877<h5 class="returnvalue">Return Value</h5>
878<p class="description">Matching option or NULL</p>
97c9a8d7
MS
879<h4 class="method"><a name="find_option_group">find_option_group</a></h4>
880<p class="description"></p>
881<p class="code">
882<a href="#ppdcOption">ppdcOption</a> *find_option_group (<br>
883&nbsp;&nbsp;&nbsp;&nbsp;const char *n,<br>
884&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcGroup">ppdcGroup</a> **mg<br>
885);</p>
886<h5 class="parameters">Parameters</h5>
887<dl>
888<dt>n</dt>
889<dd class="description">Option name</dd>
890<dt>mg</dt>
891<dd class="description">Matching group or NULL</dd>
892</dl>
893<h5 class="returnvalue">Return Value</h5>
894<p class="description">Matching option or NULL</p>
f11a948a
MS
895<h4 class="method"><a name="ppdcDriver">ppdcDriver</a></h4>
896<p class="description"></p>
897<p class="code">
898void ppdcDriver (<br>
899&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcDriver">ppdcDriver</a> *d<br>
900);</p>
901<h5 class="parameters">Parameters</h5>
902<dl>
903<dt>d</dt>
904<dd class="description">Printer driver template</dd>
905</dl>
906<h4 class="method"><a name="set_custom_size_code">set_custom_size_code</a></h4>
907<p class="description"></p>
908<p class="code">
909void set_custom_size_code (<br>
910&nbsp;&nbsp;&nbsp;&nbsp;const char *c<br>
911);</p>
912<h5 class="parameters">Parameters</h5>
913<dl>
914<dt>c</dt>
915<dd class="description">CustomPageSize code</dd>
916</dl>
917<h4 class="method"><a name="set_default_font">set_default_font</a></h4>
918<p class="description"></p>
919<p class="code">
920void set_default_font (<br>
921&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFont">ppdcFont</a> *f<br>
922);</p>
923<h5 class="parameters">Parameters</h5>
924<dl>
925<dt>f</dt>
926<dd class="description">Font</dd>
927</dl>
928<h4 class="method"><a name="set_default_size">set_default_size</a></h4>
929<p class="description"></p>
930<p class="code">
931void set_default_size (<br>
932&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcMediaSize">ppdcMediaSize</a> *m<br>
933);</p>
934<h5 class="parameters">Parameters</h5>
935<dl>
936<dt>m</dt>
937<dd class="description">Media size</dd>
938</dl>
939<h4 class="method"><a name="set_file_name">set_file_name</a></h4>
940<p class="description"></p>
941<p class="code">
942void set_file_name (<br>
943&nbsp;&nbsp;&nbsp;&nbsp;const char *f<br>
944);</p>
945<h5 class="parameters">Parameters</h5>
946<dl>
947<dt>f</dt>
948<dd class="description">Filename</dd>
949</dl>
950<h4 class="method"><a name="set_manufacturer">set_manufacturer</a></h4>
951<p class="description"></p>
952<p class="code">
953void set_manufacturer (<br>
954&nbsp;&nbsp;&nbsp;&nbsp;const char *m<br>
955);</p>
956<h5 class="parameters">Parameters</h5>
957<dl>
958<dt>m</dt>
959<dd class="description">Model name</dd>
960</dl>
961<h4 class="method"><a name="set_model_name">set_model_name</a></h4>
962<p class="description"></p>
963<p class="code">
964void set_model_name (<br>
965&nbsp;&nbsp;&nbsp;&nbsp;const char *m<br>
966);</p>
967<h5 class="parameters">Parameters</h5>
968<dl>
969<dt>m</dt>
970<dd class="description">Model name</dd>
971</dl>
972<h4 class="method"><a name="set_pc_file_name">set_pc_file_name</a></h4>
973<p class="description"></p>
974<p class="code">
975void set_pc_file_name (<br>
976&nbsp;&nbsp;&nbsp;&nbsp;const char *f<br>
977);</p>
978<h5 class="parameters">Parameters</h5>
979<dl>
980<dt>f</dt>
981<dd class="description">Filename</dd>
982</dl>
983<h4 class="method"><a name="set_version">set_version</a></h4>
984<p class="description"></p>
985<p class="code">
986void set_version (<br>
987&nbsp;&nbsp;&nbsp;&nbsp;const char *v<br>
988);</p>
989<h5 class="parameters">Parameters</h5>
990<dl>
991<dt>v</dt>
992<dd class="description">Version</dd>
993</dl>
994<h4 class="method"><a name="write_ppd_file">write_ppd_file</a></h4>
995<p class="description"></p>
996<p class="code">
997int write_ppd_file (<br>
998&nbsp;&nbsp;&nbsp;&nbsp;cups_file_t *fp,<br>
999&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcCatalog">ppdcCatalog</a> *catalog,<br>
1000&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcArray">ppdcArray</a> *locales,<br>
1001&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcSource">ppdcSource</a> *src,<br>
1002&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcLineEnding">ppdcLineEnding</a> le<br>
1003);</p>
1004<h5 class="parameters">Parameters</h5>
1005<dl>
1006<dt>fp</dt>
1007<dd class="description">PPD file</dd>
1008<dt>catalog</dt>
1009<dd class="description">Message catalog</dd>
1010<dt>locales</dt>
1011<dd class="description">Additional languages to add</dd>
1012<dt>src</dt>
1013<dd class="description">Driver source</dd>
1014<dt>le</dt>
1015<dd class="description">Line endings to use</dd>
1016</dl>
1017<h5 class="returnvalue">Return Value</h5>
1018<p class="description">0 on success, -1 on failure</p>
1019<h4 class="method"><a name="~ppdcDriver">~ppdcDriver</a></h4>
1020<p class="description"></p>
1021<p class="code">
1022void ~ppdcDriver (void);</p>
1023<h3 class="class"><a name="ppdcFile">ppdcFile</a></h3>
1024<p class="description">// File</p>
1025<p class="code">class ppdcFile {<br>
1026&nbsp;&nbsp;public:<br>
82cc1f9a 1027&nbsp;&nbsp;&nbsp;&nbsp;bool close_on_delete;<br>
f11a948a
MS
1028&nbsp;&nbsp;&nbsp;&nbsp;const char *filename;<br>
1029&nbsp;&nbsp;&nbsp;&nbsp;cups_file_t *fp;<br>
1030&nbsp;&nbsp;&nbsp;&nbsp;int line;<br>
1031};</p>
1032<h4 class="members">Members</h4>
1033<dl>
82cc1f9a
MS
1034<dt>close_on_delete </dt>
1035<dd class="description">Close file on delete?</dd>
f11a948a
MS
1036<dt>filename </dt>
1037<dd class="description">Filename</dd>
1038<dt>fp </dt>
1039<dd class="description">File pointer</dd>
1040<dt>line </dt>
1041<dd class="description">Line in file</dd>
1042</dl>
1043<h4 class="method"><a name="get">get</a></h4>
1044<p class="description">Get a character from a file.</p>
1045<p class="code">
1046int get (void);</p>
1047<h5 class="returnvalue">Return Value</h5>
1048<p class="description"></p>
1049<h4 class="method"><a name="peek">peek</a></h4>
1050<p class="description"></p>
1051<p class="code">
1052int peek (void);</p>
1053<h5 class="returnvalue">Return Value</h5>
1054<p class="description">Next character in file</p>
1055<h4 class="method"><a name="ppdcFile">ppdcFile</a></h4>
1056<p class="description"></p>
1057<p class="code">
1058void ppdcFile (<br>
1059&nbsp;&nbsp;&nbsp;&nbsp;const char *f,<br>
1060&nbsp;&nbsp;&nbsp;&nbsp;cups_file_t *ffp<br>
1061);</p>
1062<h5 class="parameters">Parameters</h5>
1063<dl>
1064<dt>f</dt>
1065<dd class="description">File to open</dd>
1066<dt>ffp</dt>
1067<dd class="description">File pointer to use</dd>
1068</dl>
1069<h4 class="method"><a name="~ppdcFile">~ppdcFile</a></h4>
1070<p class="description"></p>
1071<p class="code">
1072void ~ppdcFile (void);</p>
1073<h3 class="class"><a name="ppdcFilter">ppdcFilter</a></h3>
1074<p class="description">// Filter Program</p>
1075<p class="code">class ppdcFilter : public ppdcShared {<br>
1076&nbsp;&nbsp;public:<br>
1077&nbsp;&nbsp;&nbsp;&nbsp;int cost;<br>
1078&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *mime_type, *program;<br>
1079};</p>
1080<h4 class="members">Members</h4>
1081<dl>
1082<dt>cost </dt>
1083<dd class="description">Relative cost of filter</dd>
1084<dt>program </dt>
1085<dd class="description">Filter program</dd>
1086</dl>
1087<h4 class="method"><a name="ppdcFilter">ppdcFilter</a></h4>
1088<p class="description"></p>
1089<p class="code">
1090void ppdcFilter (<br>
1091&nbsp;&nbsp;&nbsp;&nbsp;const char *t,<br>
1092&nbsp;&nbsp;&nbsp;&nbsp;const char *p,<br>
1093&nbsp;&nbsp;&nbsp;&nbsp;int c<br>
1094);</p>
1095<h5 class="parameters">Parameters</h5>
1096<dl>
1097<dt>t</dt>
1098<dd class="description">MIME type</dd>
1099<dt>p</dt>
1100<dd class="description">Filter program</dd>
1101<dt>c</dt>
1102<dd class="description">Relative cost</dd>
1103</dl>
1104<h4 class="method"><a name="~ppdcFilter">~ppdcFilter</a></h4>
1105<p class="description"></p>
1106<p class="code">
1107void ~ppdcFilter (void);</p>
1108<h3 class="class"><a name="ppdcFont">ppdcFont</a></h3>
1109<p class="description">// Shared Font</p>
1110<p class="code">class ppdcFont : public ppdcShared {<br>
1111&nbsp;&nbsp;public:<br>
1112&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *name, *encoding, *version, *charset;<br>
1113&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFontStatus">ppdcFontStatus</a> status;<br>
1114};</p>
1115<h4 class="members">Members</h4>
1116<dl>
1117<dt>charset </dt>
1118<dd class="description">Font charset</dd>
1119<dt>status </dt>
1120<dd class="description">Font status (ROM or Disk)</dd>
1121</dl>
1122<h4 class="method"><a name="ppdcFont">ppdcFont</a></h4>
1123<p class="description"></p>
1124<p class="code">
1125void ppdcFont (<br>
1126&nbsp;&nbsp;&nbsp;&nbsp;const char *n,<br>
1127&nbsp;&nbsp;&nbsp;&nbsp;const char *e,<br>
1128&nbsp;&nbsp;&nbsp;&nbsp;const char *v,<br>
1129&nbsp;&nbsp;&nbsp;&nbsp;const char *c,<br>
1130&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFontStatus">ppdcFontStatus</a> s<br>
1131);</p>
1132<h5 class="parameters">Parameters</h5>
1133<dl>
1134<dt>n</dt>
1135<dd class="description">Name of font</dd>
1136<dt>e</dt>
1137<dd class="description">Font encoding</dd>
1138<dt>v</dt>
1139<dd class="description">Font version</dd>
1140<dt>c</dt>
1141<dd class="description">Font charset</dd>
1142<dt>s</dt>
1143<dd class="description">Font status</dd>
1144</dl>
1145<h4 class="method"><a name="~ppdcFont">~ppdcFont</a></h4>
1146<p class="description"></p>
1147<p class="code">
1148void ~ppdcFont (void);</p>
1149<h3 class="class"><a name="ppdcGroup">ppdcGroup</a></h3>
1150<p class="description">// Group of Options</p>
1151<p class="code">class ppdcGroup : public ppdcShared {<br>
1152&nbsp;&nbsp;public:<br>
1153&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcArray">ppdcArray</a> *options;<br>
1154&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *name, *text;<br>
1155};</p>
1156<h4 class="members">Members</h4>
1157<dl>
1158<dt>options </dt>
1159<dd class="description">Options</dd>
1160<dt>text </dt>
1161<dd class="description">Human-readable text of option</dd>
1162</dl>
1163<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4>
1164<p class="description"></p>
1165<p class="code">
1166void PPDC_NAME (<br>
1167&nbsp;&nbsp;&nbsp;&nbsp;void add_option(<a href="#ppdcOption">ppdcOption</a> *o<br>
1168);</p>
1169<h5 class="parameters">Parameters</h5>
1170<dl>
1171<dt>o</dt>
1172</dl>
1173<h4 class="method"><a name="find_option">find_option</a></h4>
1174<p class="description">Find an option in a group.</p>
1175<p class="code">
1176<a href="#ppdcOption">ppdcOption</a> *find_option (<br>
1177&nbsp;&nbsp;&nbsp;&nbsp;const char *n<br>
1178);</p>
1179<h5 class="parameters">Parameters</h5>
1180<dl>
1181<dt>n</dt>
1182<dd class="description">Name of option</dd>
1183</dl>
1184<h5 class="returnvalue">Return Value</h5>
1185<p class="description"></p>
1186<h4 class="method"><a name="ppdcGroup">ppdcGroup</a></h4>
1187<p class="description"></p>
1188<p class="code">
1189void ppdcGroup (<br>
1190&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcGroup">ppdcGroup</a> *g<br>
1191);</p>
1192<h5 class="parameters">Parameters</h5>
1193<dl>
1194<dt>g</dt>
1195<dd class="description">Group template</dd>
1196</dl>
1197<h4 class="method"><a name="~ppdcGroup">~ppdcGroup</a></h4>
1198<p class="description"></p>
1199<p class="code">
1200void ~ppdcGroup (void);</p>
1201<h3 class="class"><a name="ppdcInteger">ppdcInteger</a></h3>
1202<p class="description">// Shared integer</p>
1203<p class="code">class ppdcInteger : public ppdcShared {<br>
1204&nbsp;&nbsp;public:<br>
1205&nbsp;&nbsp;&nbsp;&nbsp;int *value;<br>
1206};</p>
1207<h4 class="members">Members</h4>
1208<dl>
1209<dt>value </dt>
1210<dd class="description">Integer value</dd>
1211</dl>
1212<h4 class="method"><a name="ppdcInteger">ppdcInteger</a></h4>
1213<p class="description">Integer value</p>
1214<p class="code">
1215void ppdcInteger (<br>
1216&nbsp;&nbsp;&nbsp;&nbsp;int *v<br>
1217);</p>
1218<h5 class="parameters">Parameters</h5>
1219<dl>
1220<dt>v</dt>
1221</dl>
1222<h3 class="class"><a name="ppdcMediaSize">ppdcMediaSize</a></h3>
1223<p class="description">// Media Size</p>
1224<p class="code">class ppdcMediaSize : public ppdcShared {<br>
1225&nbsp;&nbsp;public:<br>
1226&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *size_code, *region_code;<br>
1227&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *name, *text;<br>
1228&nbsp;&nbsp;&nbsp;&nbsp;float width, length, left, bottom, right, top;<br>
1229};</p>
1230<h4 class="members">Members</h4>
1231<dl>
1232<dt>region_code </dt>
1233<dd class="description">PageRegion code, if any</dd>
1234<dt>text </dt>
1235<dd class="description">Human-readable text</dd>
1236<dt>top </dt>
1237<dd class="description">Top limit in points</dd>
1238</dl>
1239<h4 class="method"><a name="ppdcMediaSize">ppdcMediaSize</a></h4>
1240<p class="description"></p>
1241<p class="code">
1242void ppdcMediaSize (<br>
1243&nbsp;&nbsp;&nbsp;&nbsp;const char *n,<br>
1244&nbsp;&nbsp;&nbsp;&nbsp;const char *t,<br>
1245&nbsp;&nbsp;&nbsp;&nbsp;float w,<br>
1246&nbsp;&nbsp;&nbsp;&nbsp;float l,<br>
1247&nbsp;&nbsp;&nbsp;&nbsp;float lm,<br>
1248&nbsp;&nbsp;&nbsp;&nbsp;float bm,<br>
1249&nbsp;&nbsp;&nbsp;&nbsp;float rm,<br>
1250&nbsp;&nbsp;&nbsp;&nbsp;float tm,<br>
1251&nbsp;&nbsp;&nbsp;&nbsp;const char *sc,<br>
1252&nbsp;&nbsp;&nbsp;&nbsp;const char *rc<br>
1253);</p>
1254<h5 class="parameters">Parameters</h5>
1255<dl>
1256<dt>n</dt>
1257<dd class="description">Name of media size</dd>
1258<dt>t</dt>
1259<dd class="description">Text of media size</dd>
1260<dt>w</dt>
1261<dd class="description">Width in points</dd>
1262<dt>l</dt>
1263<dd class="description">Length in points</dd>
1264<dt>lm</dt>
1265<dd class="description">Left margin in points</dd>
1266<dt>bm</dt>
1267<dd class="description">Bottom margin in points</dd>
1268<dt>rm</dt>
1269<dd class="description">Right margin in points</dd>
1270<dt>tm</dt>
1271<dd class="description">Top margin in points</dd>
1272<dt>sc</dt>
1273<dd class="description">PageSize code, if any</dd>
1274<dt>rc</dt>
1275<dd class="description">PageRegion code, if any</dd>
1276</dl>
1277<h4 class="method"><a name="~ppdcMediaSize">~ppdcMediaSize</a></h4>
1278<p class="description"></p>
1279<p class="code">
1280void ~ppdcMediaSize (void);</p>
1281<h3 class="class"><a name="ppdcMessage">ppdcMessage</a></h3>
1282<p class="description">// Translation message</p>
1283<p class="code">class ppdcMessage : public ppdcShared {<br>
1284&nbsp;&nbsp;public:<br>
1285&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *id, *string;<br>
1286};</p>
1287<h4 class="members">Members</h4>
1288<dl>
1289<dt>string </dt>
1290<dd class="description">Translation string</dd>
1291</dl>
1292<h4 class="method"><a name="ppdcMessage">ppdcMessage</a></h4>
1293<p class="description"></p>
1294<p class="code">
1295void ppdcMessage (<br>
1296&nbsp;&nbsp;&nbsp;&nbsp;const char *i,<br>
1297&nbsp;&nbsp;&nbsp;&nbsp;const char *s<br>
1298);</p>
1299<h5 class="parameters">Parameters</h5>
1300<dl>
1301<dt>i</dt>
1302<dd class="description">ID</dd>
1303<dt>s</dt>
1304<dd class="description">Text</dd>
1305</dl>
1306<h4 class="method"><a name="~ppdcMessage">~ppdcMessage</a></h4>
1307<p class="description"></p>
1308<p class="code">
1309void ~ppdcMessage (void);</p>
1310<h3 class="class"><a name="ppdcOption">ppdcOption</a></h3>
1311<p class="description">// Option</p>
1312<p class="code">class ppdcOption : public ppdcShared {<br>
1313&nbsp;&nbsp;public:<br>
1314&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcArray">ppdcArray</a> *choices;<br>
1315&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *defchoice;<br>
1316&nbsp;&nbsp;&nbsp;&nbsp;float order;<br>
1317&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcOptSection">ppdcOptSection</a> section;<br>
1318&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *name, *text;<br>
1319&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcOptType">ppdcOptType</a> type;<br>
1320};</p>
1321<h4 class="members">Members</h4>
1322<dl>
1323<dt>choices </dt>
1324<dd class="description">Choices</dd>
1325<dt>defchoice </dt>
1326<dd class="description">Default choice</dd>
1327<dt>order </dt>
1328<dd class="description">Order number</dd>
1329<dt>section </dt>
1330<dd class="description">Section for option code</dd>
1331<dt>text </dt>
1332<dd class="description">Human-readable text of option</dd>
1333<dt>type </dt>
1334<dd class="description">Type of option</dd>
1335</dl>
1336<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4>
1337<p class="description"></p>
1338<p class="code">
1339void PPDC_NAME (<br>
1340&nbsp;&nbsp;&nbsp;&nbsp;void add_choice(<a href="#ppdcChoice">ppdcChoice</a> *c<br>
1341);</p>
1342<h5 class="parameters">Parameters</h5>
1343<dl>
1344<dt>c</dt>
1345</dl>
1346<h4 class="method"><a name="find_choice">find_choice</a></h4>
1347<p class="description"></p>
1348<p class="code">
1349<a href="#ppdcChoice">ppdcChoice</a> *find_choice (<br>
1350&nbsp;&nbsp;&nbsp;&nbsp;const char *n<br>
1351);</p>
1352<h5 class="parameters">Parameters</h5>
1353<dl>
1354<dt>n</dt>
1355<dd class="description">Name of choice</dd>
1356</dl>
1357<h5 class="returnvalue">Return Value</h5>
1358<p class="description">Choice or NULL</p>
1359<h4 class="method"><a name="ppdcOption">ppdcOption</a></h4>
1360<p class="description"></p>
1361<p class="code">
1362void ppdcOption (<br>
1363&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcOption">ppdcOption</a> *o<br>
1364);</p>
1365<h5 class="parameters">Parameters</h5>
1366<dl>
1367<dt>o</dt>
1368<dd class="description">Template option</dd>
1369</dl>
1370<h4 class="method"><a name="set_defchoice">set_defchoice</a></h4>
1371<p class="description"></p>
1372<p class="code">
1373void set_defchoice (<br>
1374&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcChoice">ppdcChoice</a> *c<br>
1375);</p>
1376<h5 class="parameters">Parameters</h5>
1377<dl>
1378<dt>c</dt>
1379<dd class="description">Choice</dd>
1380</dl>
1381<h4 class="method"><a name="~ppdcOption">~ppdcOption</a></h4>
1382<p class="description"></p>
1383<p class="code">
1384void ~ppdcOption (void);</p>
1385<h3 class="class"><a name="ppdcProfile">ppdcProfile</a></h3>
1386<p class="description">// Color Profile</p>
1387<p class="code">class ppdcProfile : public ppdcShared {<br>
1388&nbsp;&nbsp;public:<br>
1389&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *resolution, *media_type;<br>
1390&nbsp;&nbsp;&nbsp;&nbsp;float density, gamma, profile[9];<br>
1391};</p>
1392<h4 class="members">Members</h4>
1393<dl>
1394<dt>media_type </dt>
1395<dd class="description">Media type name</dd>
1396<dt>profile[9] </dt>
1397<dd class="description">Color profile matrix</dd>
1398</dl>
1399<h4 class="method"><a name="ppdcProfile">ppdcProfile</a></h4>
1400<p class="description"></p>
1401<p class="code">
1402void ppdcProfile (<br>
1403&nbsp;&nbsp;&nbsp;&nbsp;const char *r,<br>
1404&nbsp;&nbsp;&nbsp;&nbsp;const char *m,<br>
1405&nbsp;&nbsp;&nbsp;&nbsp;float d,<br>
1406&nbsp;&nbsp;&nbsp;&nbsp;float g,<br>
1407&nbsp;&nbsp;&nbsp;&nbsp;const float *p<br>
1408);</p>
1409<h5 class="parameters">Parameters</h5>
1410<dl>
1411<dt>r</dt>
1412<dd class="description">Resolution name</dd>
1413<dt>m</dt>
1414<dd class="description">Media type name</dd>
1415<dt>d</dt>
1416<dd class="description">Density</dd>
1417<dt>g</dt>
1418<dd class="description">Gamma</dd>
1419<dt>p</dt>
1420<dd class="description">3x3 transform matrix</dd>
1421</dl>
1422<h4 class="method"><a name="~ppdcProfile">~ppdcProfile</a></h4>
1423<p class="description"></p>
1424<p class="code">
1425void ~ppdcProfile (void);</p>
1426<h3 class="class"><a name="ppdcShared">ppdcShared</a></h3>
1427<p class="description">// Shared Data Value</p>
1428<p class="code">class ppdcShared {<br>
1429&nbsp;&nbsp;private:<br>
1430&nbsp;&nbsp;&nbsp;&nbsp;int use;<br>
1431};</p>
1432<h4 class="members">Members</h4>
1433<dl>
1434<dt>use </dt>
1435<dd class="description">Use count (delete when 0)</dd>
1436</dl>
1437<h4 class="method"><a name="class_name">class_name</a></h4>
1438<p class="description"></p>
1439<p class="code">
1440virtual const char *class_name (void);</p>
1441<h5 class="returnvalue">Return Value</h5>
1442<p class="description"></p>
1443<h4 class="method"><a name="ppdcShared">ppdcShared</a></h4>
1444<p class="description"></p>
1445<p class="code">
1446void ppdcShared (void);</p>
1447<h4 class="method"><a name="release">release</a></h4>
1448<p class="description"></p>
1449<p class="code">
1450void release (void);</p>
1451<h4 class="method"><a name="retain">retain</a></h4>
1452<p class="description"></p>
1453<p class="code">
1454void retain (void);</p>
1455<h4 class="method"><a name="~ppdcShared">~ppdcShared</a></h4>
1456<p class="description"></p>
1457<p class="code">
1458void ~ppdcShared (void);</p>
1459<h3 class="class"><a name="ppdcSource">ppdcSource</a></h3>
1460<p class="description">// Source File</p>
1461<p class="code">class ppdcSource : public ppdcShared {<br>
1462&nbsp;&nbsp;public:<br>
1463&nbsp;&nbsp;&nbsp;&nbsp;int cond_state, *cond_current, cond_stack[101];<br>
1464&nbsp;&nbsp;&nbsp;&nbsp;static const char *driver_types[];<br>
1465&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *filename;<br>
1466&nbsp;&nbsp;&nbsp;&nbsp;static <a href="#ppdcArray">ppdcArray</a> *includes;<br>
1467&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcArray">ppdcArray</a> *base_fonts, *drivers, *po_files, *sizes, *vars;<br>
1468};</p>
1469<h4 class="members">Members</h4>
1470<dl>
1471<dt>cond_stack[101] </dt>
1472<dd class="description">#if state stack</dd>
1473<dt>driver_types[] </dt>
1474<dd class="description">Driver types</dd>
1475<dt>filename </dt>
1476<dd class="description">Filename</dd>
1477<dt>includes </dt>
1478<dd class="description">Include directories</dd>
1479<dt>vars </dt>
1480<dd class="description">Defined variables</dd>
1481</dl>
1482<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4>
1483<p class="description"></p>
1484<p class="code">
1485void PPDC_NAME (<br>
1486&nbsp;&nbsp;&nbsp;&nbsp;static void add_include(const char *d<br>
1487);</p>
1488<h5 class="parameters">Parameters</h5>
1489<dl>
1490<dt>d</dt>
1491</dl>
1492<h4 class="method"><a name="add_include">add_include</a></h4>
1493<p class="description"></p>
1494<p class="code">
1495void add_include (<br>
1496&nbsp;&nbsp;&nbsp;&nbsp;const char *d<br>
1497);</p>
1498<h5 class="parameters">Parameters</h5>
1499<dl>
1500<dt>d</dt>
1501<dd class="description">Include directory</dd>
1502</dl>
1503<h4 class="method"><a name="find_driver">find_driver</a></h4>
1504<p class="description"></p>
1505<p class="code">
1506<a href="#ppdcDriver">ppdcDriver</a> *find_driver (<br>
1507&nbsp;&nbsp;&nbsp;&nbsp;const char *f<br>
1508);</p>
1509<h5 class="parameters">Parameters</h5>
1510<dl>
1511<dt>f</dt>
1512<dd class="description">Driver file name</dd>
1513</dl>
1514<h5 class="returnvalue">Return Value</h5>
1515<p class="description">Driver</p>
1516<h4 class="method"><a name="find_include">find_include</a></h4>
1517<p class="description"></p>
1518<p class="code">
1519char *find_include (<br>
1520&nbsp;&nbsp;&nbsp;&nbsp;const char *f,<br>
1521&nbsp;&nbsp;&nbsp;&nbsp;const char *base,<br>
1522&nbsp;&nbsp;&nbsp;&nbsp;char *n,<br>
1523&nbsp;&nbsp;&nbsp;&nbsp;int nlen<br>
1524);</p>
1525<h5 class="parameters">Parameters</h5>
1526<dl>
1527<dt>f</dt>
1528<dd class="description">Include filename</dd>
1529<dt>base</dt>
1530<dd class="description">Current directory</dd>
1531<dt>n</dt>
1532<dd class="description">Path buffer</dd>
1533<dt>nlen</dt>
1534<dd class="description">Path buffer length</dd>
1535</dl>
1536<h5 class="returnvalue">Return Value</h5>
1537<p class="description">Found path or NULL</p>
1538<h4 class="method"><a name="find_po">find_po</a></h4>
1539<p class="description"></p>
1540<p class="code">
1541<a href="#ppdcCatalog">ppdcCatalog</a> *find_po (<br>
1542&nbsp;&nbsp;&nbsp;&nbsp;const char *l<br>
1543);</p>
1544<h5 class="parameters">Parameters</h5>
1545<dl>
1546<dt>l</dt>
1547<dd class="description">Locale name</dd>
1548</dl>
1549<h5 class="returnvalue">Return Value</h5>
1550<p class="description">Message catalog or NULL</p>
1551<h4 class="method"><a name="find_size">find_size</a></h4>
1552<p class="description"></p>
1553<p class="code">
1554<a href="#ppdcMediaSize">ppdcMediaSize</a> *find_size (<br>
1555&nbsp;&nbsp;&nbsp;&nbsp;const char *s<br>
1556);</p>
1557<h5 class="parameters">Parameters</h5>
1558<dl>
1559<dt>s</dt>
1560<dd class="description">Size name</dd>
1561</dl>
1562<h5 class="returnvalue">Return Value</h5>
1563<p class="description">Size</p>
1564<h4 class="method"><a name="find_variable">find_variable</a></h4>
1565<p class="description"></p>
1566<p class="code">
1567<a href="#ppdcVariable">ppdcVariable</a> *find_variable (<br>
1568&nbsp;&nbsp;&nbsp;&nbsp;const char *n<br>
1569);</p>
1570<h5 class="parameters">Parameters</h5>
1571<dl>
1572<dt>n</dt>
1573<dd class="description">Variable name</dd>
1574</dl>
1575<h5 class="returnvalue">Return Value</h5>
1576<p class="description">Variable</p>
1577<h4 class="method"><a name="get_attr">get_attr</a></h4>
1578<p class="description"></p>
1579<p class="code">
1580<a href="#ppdcAttr">ppdcAttr</a> *get_attr (<br>
1581&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp,<br>
1582&nbsp;&nbsp;&nbsp;&nbsp;bool loc<br>
1583);</p>
1584<h5 class="parameters">Parameters</h5>
1585<dl>
1586<dt>fp</dt>
1587<dd class="description">File to read</dd>
1588<dt>loc</dt>
1589<dd class="description">Localize this attribute?</dd>
1590</dl>
1591<h5 class="returnvalue">Return Value</h5>
1592<p class="description">Attribute</p>
1593<h4 class="method"><a name="get_boolean">get_boolean</a></h4>
1594<p class="description"></p>
1595<p class="code">
1596int get_boolean (<br>
1597&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1598);</p>
1599<h5 class="parameters">Parameters</h5>
1600<dl>
1601<dt>fp</dt>
1602<dd class="description">File to read</dd>
1603</dl>
1604<h5 class="returnvalue">Return Value</h5>
1605<p class="description">Boolean value</p>
1606<h4 class="method"><a name="get_choice">get_choice</a></h4>
1607<p class="description"></p>
1608<p class="code">
1609<a href="#ppdcChoice">ppdcChoice</a> *get_choice (<br>
1610&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1611);</p>
1612<h5 class="parameters">Parameters</h5>
1613<dl>
1614<dt>fp</dt>
1615<dd class="description">File to read</dd>
1616</dl>
1617<h5 class="returnvalue">Return Value</h5>
1618<p class="description">Choice data</p>
1619<h4 class="method"><a name="get_color_model">get_color_model</a></h4>
1620<p class="description"></p>
1621<p class="code">
1622<a href="#ppdcChoice">ppdcChoice</a> *get_color_model (<br>
1623&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1624);</p>
1625<h5 class="parameters">Parameters</h5>
1626<dl>
1627<dt>fp</dt>
1628<dd class="description">File to read</dd>
1629</dl>
1630<h5 class="returnvalue">Return Value</h5>
1631<p class="description">Choice data</p>
1632<h4 class="method"><a name="get_color_order">get_color_order</a></h4>
1633<p class="description"></p>
1634<p class="code">
1635int get_color_order (<br>
1636&nbsp;&nbsp;&nbsp;&nbsp;const char *co<br>
1637);</p>
1638<h5 class="parameters">Parameters</h5>
1639<dl>
1640<dt>co</dt>
1641<dd class="description">Color order string</dd>
1642</dl>
1643<h5 class="returnvalue">Return Value</h5>
1644<p class="description">Color order value</p>
1645<h4 class="method"><a name="get_color_profile">get_color_profile</a></h4>
1646<p class="description"></p>
1647<p class="code">
1648<a href="#ppdcProfile">ppdcProfile</a> *get_color_profile (<br>
1649&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1650);</p>
1651<h5 class="parameters">Parameters</h5>
1652<dl>
1653<dt>fp</dt>
1654<dd class="description">File to read</dd>
1655</dl>
1656<h5 class="returnvalue">Return Value</h5>
1657<p class="description">Color profile</p>
1658<h4 class="method"><a name="get_color_space">get_color_space</a></h4>
1659<p class="description"></p>
1660<p class="code">
1661int get_color_space (<br>
1662&nbsp;&nbsp;&nbsp;&nbsp;const char *cs<br>
1663);</p>
1664<h5 class="parameters">Parameters</h5>
1665<dl>
1666<dt>cs</dt>
1667<dd class="description">Colorspace string</dd>
1668</dl>
1669<h5 class="returnvalue">Return Value</h5>
1670<p class="description">Colorspace value</p>
1671<h4 class="method"><a name="get_constraint">get_constraint</a></h4>
1672<p class="description"></p>
1673<p class="code">
1674<a href="#ppdcConstraint">ppdcConstraint</a> *get_constraint (<br>
1675&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1676);</p>
1677<h5 class="parameters">Parameters</h5>
1678<dl>
1679<dt>fp</dt>
1680<dd class="description">File to read</dd>
1681</dl>
1682<h5 class="returnvalue">Return Value</h5>
1683<p class="description">Constraint</p>
1684<h4 class="method"><a name="get_custom_size">get_custom_size</a></h4>
1685<p class="description"></p>
1686<p class="code">
1687<a href="#ppdcMediaSize">ppdcMediaSize</a> *get_custom_size (<br>
1688&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1689);</p>
1690<h5 class="parameters">Parameters</h5>
1691<dl>
1692<dt>fp</dt>
1693<dd class="description">File to read</dd>
1694</dl>
1695<h5 class="returnvalue">Return Value</h5>
1696<p class="description">Media size</p>
1697<h4 class="method"><a name="get_duplex">get_duplex</a></h4>
1698<p class="description"></p>
1699<p class="code">
1700void get_duplex (<br>
1701&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp,<br>
1702&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcDriver">ppdcDriver</a> *d<br>
1703);</p>
1704<h5 class="parameters">Parameters</h5>
1705<dl>
1706<dt>fp</dt>
1707<dd class="description">File to read from</dd>
1708<dt>d</dt>
1709<dd class="description">Current driver</dd>
1710</dl>
1711<h4 class="method"><a name="get_filter">get_filter</a></h4>
1712<p class="description"></p>
1713<p class="code">
1714<a href="#ppdcFilter">ppdcFilter</a> *get_filter (<br>
1715&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1716);</p>
1717<h5 class="parameters">Parameters</h5>
1718<dl>
1719<dt>fp</dt>
1720<dd class="description">File to read</dd>
1721</dl>
1722<h5 class="returnvalue">Return Value</h5>
1723<p class="description">Filter</p>
1724<h4 class="method"><a name="get_float">get_float</a></h4>
1725<p class="description"></p>
1726<p class="code">
1727float get_float (<br>
1728&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1729);</p>
1730<h5 class="parameters">Parameters</h5>
1731<dl>
1732<dt>fp</dt>
1733<dd class="description">File to read</dd>
1734</dl>
1735<h5 class="returnvalue">Return Value</h5>
1736<p class="description">Number</p>
1737<h4 class="method"><a name="get_font">get_font</a></h4>
1738<p class="description"></p>
1739<p class="code">
1740<a href="#ppdcFont">ppdcFont</a> *get_font (<br>
1741&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1742);</p>
1743<h5 class="parameters">Parameters</h5>
1744<dl>
1745<dt>fp</dt>
1746<dd class="description">File to read</dd>
1747</dl>
1748<h5 class="returnvalue">Return Value</h5>
1749<p class="description">Font data</p>
1750<h4 class="method"><a name="get_generic">get_generic</a></h4>
1751<p class="description"></p>
1752<p class="code">
1753<a href="#ppdcChoice">ppdcChoice</a> *get_generic (<br>
1754&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp,<br>
1755&nbsp;&nbsp;&nbsp;&nbsp;const char *keyword,<br>
1756&nbsp;&nbsp;&nbsp;&nbsp;const char *tattr,<br>
1757&nbsp;&nbsp;&nbsp;&nbsp;const char *nattr<br>
1758);</p>
1759<h5 class="parameters">Parameters</h5>
1760<dl>
1761<dt>fp</dt>
1762<dd class="description">File to read</dd>
1763<dt>keyword</dt>
1764<dd class="description">Keyword name</dd>
1765<dt>tattr</dt>
1766<dd class="description">Text attribute</dd>
1767<dt>nattr</dt>
1768<dd class="description">Numeric attribute</dd>
1769</dl>
1770<h5 class="returnvalue">Return Value</h5>
1771<p class="description">Choice data</p>
1772<h4 class="method"><a name="get_group">get_group</a></h4>
1773<p class="description"></p>
1774<p class="code">
1775<a href="#ppdcGroup">ppdcGroup</a> *get_group (<br>
1776&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp,<br>
1777&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcDriver">ppdcDriver</a> *d<br>
1778);</p>
1779<h5 class="parameters">Parameters</h5>
1780<dl>
1781<dt>fp</dt>
1782<dd class="description">File to read</dd>
1783<dt>d</dt>
1784<dd class="description">Printer driver</dd>
1785</dl>
1786<h5 class="returnvalue">Return Value</h5>
1787<p class="description">Group</p>
1788<h4 class="method"><a name="get_installable">get_installable</a></h4>
1789<p class="description"></p>
1790<p class="code">
1791<a href="#ppdcOption">ppdcOption</a> *get_installable (<br>
1792&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1793);</p>
1794<h5 class="parameters">Parameters</h5>
1795<dl>
1796<dt>fp</dt>
1797<dd class="description">File to read</dd>
1798</dl>
1799<h5 class="returnvalue">Return Value</h5>
1800<p class="description">Option</p>
1801<h4 class="method"><a name="get_integer">get_integer</a></h4>
1802<p class="description"></p>
1803<p class="code">
1804int get_integer (<br>
1805&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1806);</p>
1807<h5 class="parameters">Parameters</h5>
1808<dl>
1809<dt>fp</dt>
1810<dd class="description">File to read</dd>
1811</dl>
1812<h5 class="returnvalue">Return Value</h5>
1813<p class="description">Integer value</p>
1814<h4 class="method"><a name="get_measurement">get_measurement</a></h4>
1815<p class="description"></p>
1816<p class="code">
1817float get_measurement (<br>
1818&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1819);</p>
1820<h5 class="parameters">Parameters</h5>
1821<dl>
1822<dt>fp</dt>
1823<dd class="description">File to read</dd>
1824</dl>
1825<h5 class="returnvalue">Return Value</h5>
1826<p class="description">Measurement value in points</p>
1827<h4 class="method"><a name="get_option">get_option</a></h4>
1828<p class="description"></p>
1829<p class="code">
1830<a href="#ppdcOption">ppdcOption</a> *get_option (<br>
1831&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp,<br>
1832&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcDriver">ppdcDriver</a> *d,<br>
1833&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcGroup">ppdcGroup</a> *g<br>
1834);</p>
1835<h5 class="parameters">Parameters</h5>
1836<dl>
1837<dt>fp</dt>
1838<dd class="description">File to read</dd>
1839<dt>d</dt>
1840<dd class="description">Printer driver</dd>
1841<dt>g</dt>
1842<dd class="description">Current group</dd>
1843</dl>
1844<h5 class="returnvalue">Return Value</h5>
1845<p class="description">Option</p>
1846<h4 class="method"><a name="get_po">get_po</a></h4>
1847<p class="description"></p>
1848<p class="code">
1849<a href="#ppdcCatalog">ppdcCatalog</a> *get_po (<br>
1850&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1851);</p>
1852<h5 class="parameters">Parameters</h5>
1853<dl>
1854<dt>fp</dt>
1855<dd class="description">File to read</dd>
1856</dl>
1857<h5 class="returnvalue">Return Value</h5>
1858<p class="description">Message catalog</p>
1859<h4 class="method"><a name="get_resolution">get_resolution</a></h4>
1860<p class="description"></p>
1861<p class="code">
1862<a href="#ppdcChoice">ppdcChoice</a> *get_resolution (<br>
1863&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1864);</p>
1865<h5 class="parameters">Parameters</h5>
1866<dl>
1867<dt>fp</dt>
1868<dd class="description">File to read</dd>
1869</dl>
1870<h5 class="returnvalue">Return Value</h5>
1871<p class="description">Choice data</p>
1872<h4 class="method"><a name="get_simple_profile">get_simple_profile</a></h4>
1873<p class="description"></p>
1874<p class="code">
1875<a href="#ppdcProfile">ppdcProfile</a> *get_simple_profile (<br>
1876&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1877);</p>
1878<h5 class="parameters">Parameters</h5>
1879<dl>
1880<dt>fp</dt>
1881<dd class="description">File to read</dd>
1882</dl>
1883<h5 class="returnvalue">Return Value</h5>
1884<p class="description">Color profile</p>
1885<h4 class="method"><a name="get_size">get_size</a></h4>
1886<p class="description"></p>
1887<p class="code">
1888<a href="#ppdcMediaSize">ppdcMediaSize</a> *get_size (<br>
1889&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1890);</p>
1891<h5 class="parameters">Parameters</h5>
1892<dl>
1893<dt>fp</dt>
1894<dd class="description">File to read</dd>
1895</dl>
1896<h5 class="returnvalue">Return Value</h5>
1897<p class="description">Media size</p>
1898<h4 class="method"><a name="get_token">get_token</a></h4>
1899<p class="description"></p>
1900<p class="code">
1901char *get_token (<br>
1902&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp,<br>
1903&nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
1904&nbsp;&nbsp;&nbsp;&nbsp;int buflen<br>
1905);</p>
1906<h5 class="parameters">Parameters</h5>
1907<dl>
1908<dt>fp</dt>
1909<dd class="description">File to read</dd>
1910<dt>buffer</dt>
1911<dd class="description">Buffer</dd>
1912<dt>buflen</dt>
1913<dd class="description">Length of buffer</dd>
1914</dl>
1915<h5 class="returnvalue">Return Value</h5>
1916<p class="description">Token string or NULL</p>
1917<h4 class="method"><a name="get_variable">get_variable</a></h4>
1918<p class="description"></p>
1919<p class="code">
1920<a href="#ppdcVariable">ppdcVariable</a> *get_variable (<br>
1921&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp<br>
1922);</p>
1923<h5 class="parameters">Parameters</h5>
1924<dl>
1925<dt>fp</dt>
1926<dd class="description">File to read</dd>
1927</dl>
1928<h5 class="returnvalue">Return Value</h5>
1929<p class="description">Variable</p>
1930<h4 class="method"><a name="import_ppd">import_ppd</a></h4>
1931<p class="description"></p>
1932<p class="code">
1933int import_ppd (<br>
1934&nbsp;&nbsp;&nbsp;&nbsp;const char *f<br>
1935);</p>
1936<h5 class="parameters">Parameters</h5>
1937<dl>
1938<dt>f</dt>
1939<dd class="description">Filename</dd>
1940</dl>
1941<h5 class="returnvalue">Return Value</h5>
1942<p class="description">1 on success, 0 on failure</p>
1943<h4 class="method"><a name="ppdcSource">ppdcSource</a></h4>
1944<p class="description"></p>
1945<p class="code">
1946void ppdcSource (<br>
1947&nbsp;&nbsp;&nbsp;&nbsp;const char *f,<br>
1948&nbsp;&nbsp;&nbsp;&nbsp;cups_file_t *ffp<br>
1949);</p>
1950<h5 class="parameters">Parameters</h5>
1951<dl>
1952<dt>f</dt>
1953<dd class="description">File to read</dd>
1954<dt>ffp</dt>
1955<dd class="description">File pointer to use</dd>
1956</dl>
1957<h4 class="method"><a name="quotef">quotef</a></h4>
1958<p class="description"></p>
1959<p class="code">
1960int quotef (<br>
1961&nbsp;&nbsp;&nbsp;&nbsp;cups_file_t *fp,<br>
1962&nbsp;&nbsp;&nbsp;&nbsp;const char *format,<br>
1963&nbsp;&nbsp;&nbsp;&nbsp;...<br>
1964);</p>
1965<h5 class="parameters">Parameters</h5>
1966<dl>
1967<dt>fp</dt>
1968<dd class="description">File to write to</dd>
1969<dt>format</dt>
1970<dd class="description">Printf-style format string</dd>
1971<dt>...</dt>
1972<dd class="description">Additional args as needed</dd>
1973</dl>
1974<h5 class="returnvalue">Return Value</h5>
1975<p class="description">Number bytes on success, -1 on failure</p>
1976<h4 class="method"><a name="read_file">read_file</a></h4>
1977<p class="description"></p>
1978<p class="code">
1979void read_file (<br>
1980&nbsp;&nbsp;&nbsp;&nbsp;const char *f,<br>
1981&nbsp;&nbsp;&nbsp;&nbsp;cups_file_t *ffp<br>
1982);</p>
1983<h5 class="parameters">Parameters</h5>
1984<dl>
1985<dt>f</dt>
1986<dd class="description">File to read</dd>
1987<dt>ffp</dt>
1988<dd class="description">File pointer to use</dd>
1989</dl>
1990<h4 class="method"><a name="scan_file">scan_file</a></h4>
1991<p class="description"></p>
1992<p class="code">
1993void scan_file (<br>
1994&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcFile">ppdcFile</a> *fp,<br>
1995&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcDriver">ppdcDriver</a> *td,<br>
1996&nbsp;&nbsp;&nbsp;&nbsp;bool inc<br>
1997);</p>
1998<h5 class="parameters">Parameters</h5>
1999<dl>
2000<dt>fp</dt>
2001<dd class="description">File to read</dd>
2002<dt>td</dt>
2003<dd class="description">Driver template</dd>
2004<dt>inc</dt>
2005<dd class="description">Including?</dd>
2006</dl>
2007<h4 class="method"><a name="set_variable">set_variable</a></h4>
2008<p class="description"></p>
2009<p class="code">
2010<a href="#ppdcVariable">ppdcVariable</a> *set_variable (<br>
2011&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2012&nbsp;&nbsp;&nbsp;&nbsp;const char *value<br>
2013);</p>
2014<h5 class="parameters">Parameters</h5>
2015<dl>
2016<dt>name</dt>
2017<dd class="description">Name</dd>
2018<dt>value</dt>
2019<dd class="description">Value</dd>
2020</dl>
2021<h5 class="returnvalue">Return Value</h5>
2022<p class="description">Variable</p>
2023<h4 class="method"><a name="write_file">write_file</a></h4>
2024<p class="description"></p>
2025<p class="code">
2026int write_file (<br>
2027&nbsp;&nbsp;&nbsp;&nbsp;const char *f<br>
2028);</p>
2029<h5 class="parameters">Parameters</h5>
2030<dl>
2031<dt>f</dt>
2032<dd class="description">File to write</dd>
2033</dl>
2034<h5 class="returnvalue">Return Value</h5>
2035<p class="description">0 on success, -1 on error</p>
2036<h4 class="method"><a name="~ppdcSource">~ppdcSource</a></h4>
2037<p class="description"></p>
2038<p class="code">
2039void ~ppdcSource (void);</p>
2040<h3 class="class"><a name="ppdcString">ppdcString</a></h3>
2041<p class="description">// Shared String</p>
2042<p class="code">class ppdcString : public ppdcShared {<br>
2043&nbsp;&nbsp;public:<br>
2044&nbsp;&nbsp;&nbsp;&nbsp;char *value;<br>
2045};</p>
2046<h4 class="members">Members</h4>
2047<dl>
2048<dt>value </dt>
2049<dd class="description">String value</dd>
2050</dl>
2051<h4 class="method"><a name="ppdcString">ppdcString</a></h4>
2052<p class="description"></p>
2053<p class="code">
2054void ppdcString (<br>
2055&nbsp;&nbsp;&nbsp;&nbsp;const char *v<br>
2056);</p>
2057<h5 class="parameters">Parameters</h5>
2058<dl>
2059<dt>v</dt>
2060<dd class="description">String</dd>
2061</dl>
2062<h4 class="method"><a name="~ppdcString">~ppdcString</a></h4>
2063<p class="description"></p>
2064<p class="code">
2065void ~ppdcString (void);</p>
2066<h3 class="class"><a name="ppdcVariable">ppdcVariable</a></h3>
2067<p class="description">// Variable Definition</p>
2068<p class="code">class ppdcVariable : public ppdcShared {<br>
2069&nbsp;&nbsp;public:<br>
2070&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ppdcString">ppdcString</a> *name, *value;<br>
2071};</p>
2072<h4 class="members">Members</h4>
2073<dl>
2074<dt>value </dt>
2075<dd class="description">Value of variable</dd>
2076</dl>
2077<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4>
2078<p class="description"></p>
2079<p class="code">
2080void PPDC_NAME (<br>
2081&nbsp;&nbsp;&nbsp;&nbsp;void set_value(const char *v<br>
2082);</p>
2083<h5 class="parameters">Parameters</h5>
2084<dl>
2085<dt>v</dt>
2086</dl>
2087<h4 class="method"><a name="ppdcVariable">ppdcVariable</a></h4>
2088<p class="description"></p>
2089<p class="code">
2090void ppdcVariable (<br>
2091&nbsp;&nbsp;&nbsp;&nbsp;const char *n,<br>
2092&nbsp;&nbsp;&nbsp;&nbsp;const char *v<br>
2093);</p>
2094<h5 class="parameters">Parameters</h5>
2095<dl>
2096<dt>n</dt>
2097<dd class="description">Name of variable</dd>
2098<dt>v</dt>
2099<dd class="description">Value of variable</dd>
2100</dl>
2101<h4 class="method"><a name="set_value">set_value</a></h4>
2102<p class="description"></p>
2103<p class="code">
2104void set_value (<br>
2105&nbsp;&nbsp;&nbsp;&nbsp;const char *v<br>
2106);</p>
2107<h5 class="parameters">Parameters</h5>
2108<dl>
2109<dt>v</dt>
2110</dl>
2111<h4 class="method"><a name="~ppdcVariable">~ppdcVariable</a></h4>
2112<p class="description"></p>
2113<p class="code">
2114void ~ppdcVariable (void);</p>
2115<h2 class="title"><a name="TYPES">Data Types</a></h2>
2116<h3 class="typedef"><a name="ppdc_cs_t">ppdc_cs_t</a></h3>
2117<p class="description"></p>
2118<p class="code">
2119typedef enum ppdc_cs_t;
2120</p>
2121<h2 class="title"><a name="VARIABLES">Variables</a></h2>
2122<h3 class="variable"><a name="ppdcSource">ppdcSource</a></h3>
2123<p class="description">// Printer Driver Data</p>
2124<p class="code">class ppdcSource;</p>
2125<h2 class="title"><a name="ENUMERATIONS">Constants</a></h2>
2126<h3 class="enumeration"><a name="ppdcCondFlags">ppdcCondFlags</a></h3>
2127<p class="description">// Condition flags</p>
2128<h4 class="constants">Constants</h4>
2129<dl>
2130<dt>PPDC_COND_NORMAL </dt>
2131<dd class="description">Normal state</dd>
2132<dt>PPDC_COND_SATISFIED </dt>
2133<dd class="description">At least one condition satisfied</dd>
2134<dt>PPDC_COND_SKIP </dt>
2135<dd class="description">Skip state</dd>
2136</dl>
2137<h3 class="enumeration"><a name="ppdcDrvType">ppdcDrvType</a></h3>
2138<p class="description">// Driver type</p>
2139<h4 class="constants">Constants</h4>
2140<dl>
2141<dt>PPDC_DRIVER_CUSTOM </dt>
2142<dd class="description">Custom driver</dd>
2143<dt>PPDC_DRIVER_EPSON </dt>
2144<dd class="description">rastertoepson driver</dd>
2145<dt>PPDC_DRIVER_ESCP </dt>
2146<dd class="description">rastertoescpx driver</dd>
2147<dt>PPDC_DRIVER_HP </dt>
2148<dd class="description">rastertohp driver</dd>
2149<dt>PPDC_DRIVER_LABEL </dt>
2150<dd class="description">rastertolabel/rastertodymo driver</dd>
2151<dt>PPDC_DRIVER_MAX </dt>
2152<dd class="description">Number of driver types defined</dd>
2153<dt>PPDC_DRIVER_PCL </dt>
2154<dd class="description">rastertopclx driver</dd>
2155<dt>PPDC_DRIVER_PS </dt>
2156<dd class="description">PostScript driver</dd>
2157</dl>
2158<h3 class="enumeration"><a name="ppdcFontStatus">ppdcFontStatus</a></h3>
2159<p class="description">// Load status of font</p>
2160<h4 class="constants">Constants</h4>
2161<dl>
2162<dt>PPDC_FONT_DISK </dt>
2163<dd class="description">Font is on disk</dd>
2164<dt>PPDC_FONT_ROM </dt>
2165<dd class="description">Font is in ROM</dd>
2166</dl>
2167<h3 class="enumeration"><a name="ppdcLineEnding">ppdcLineEnding</a></h3>
2168<p class="description">// Line endings</p>
2169<h4 class="constants">Constants</h4>
2170<dl>
2171<dt>PPDC_CRLF </dt>
2172<dd class="description">CR + LF</dd>
2173<dt>PPDC_CRONLY </dt>
2174<dd class="description">CR only</dd>
2175<dt>PPDC_LFONLY </dt>
2176<dd class="description">LF only</dd>
2177</dl>
2178<h3 class="enumeration"><a name="ppdcOptSection">ppdcOptSection</a></h3>
2179<p class="description">// Option section</p>
2180<h4 class="constants">Constants</h4>
2181<dl>
2182<dt>PPDC_SECTION_ANY </dt>
2183<dd class="description">AnySetup</dd>
2184<dt>PPDC_SECTION_DOCUMENT </dt>
2185<dd class="description">DocumentSetup</dd>
2186<dt>PPDC_SECTION_EXIT </dt>
2187<dd class="description">ExitServer</dd>
2188<dt>PPDC_SECTION_JCL </dt>
2189<dd class="description">JCLSetup</dd>
2190<dt>PPDC_SECTION_PAGE </dt>
2191<dd class="description">PageSetup</dd>
2192<dt>PPDC_SECTION_PROLOG </dt>
2193<dd class="description">Prolog</dd>
2194</dl>
2195<h3 class="enumeration"><a name="ppdcOptType">ppdcOptType</a></h3>
2196<p class="description">// Option type</p>
2197<h4 class="constants">Constants</h4>
2198<dl>
2199<dt>PPDC_BOOLEAN </dt>
2200<dd class="description">True/false option</dd>
2201<dt>PPDC_PICKMANY </dt>
2202<dd class="description">Multiple choices from list</dd>
2203<dt>PPDC_PICKONE </dt>
2204<dd class="description">Single choice from list</dd>
2205</dl>
2206</div>
2207</body>
2208</html>