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