summaryrefslogtreecommitdiff
path: root/cups
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2019-02-18 10:33:49 -0500
committerMichael R Sweet <michael.r.sweet@gmail.com>2019-02-18 10:33:49 -0500
commit73721e3edb270a33b96a56e4a1f6f6ae1db4ff34 (patch)
treee49b9d081cf9176ff225722b5f02a5195c19c181 /cups
parent1ce6909d23aed05c3e24d2631a5468f09a0c486b (diff)
Documentation updates.
Diffstat (limited to 'cups')
-rw-r--r--cups/Makefile12
-rw-r--r--cups/api-admin.shtml2
-rw-r--r--cups/api-filter.shtml5
-rw-r--r--cups/api-ppd.header9
-rw-r--r--cups/api-ppd.shtml11
-rw-r--r--cups/api-raster.header9
-rw-r--r--cups/api-raster.shtml4
-rw-r--r--cups/cupspm.md31
8 files changed, 53 insertions, 30 deletions
diff --git a/cups/Makefile b/cups/Makefile
index 38080914d..386a66598 100644
--- a/cups/Makefile
+++ b/cups/Makefile
@@ -752,21 +752,21 @@ apihelp:
$(RM) cupspm.xml
codedoc --section "Programming" --title "Administration APIs" \
--css ../doc/cups-printable.css \
- --header api-admin.header --intro api-admin.shtml \
+ --header api-admin.header --body api-admin.shtml \
adminutil.c adminutil.h getdevices.c >../doc/help/api-admin.html
codedoc --section "Programming" --title "PPD API (DEPRECATED)" \
--css ../doc/cups-printable.css \
- --header api-ppd.header --intro api-ppd.shtml \
- ppd.h ppd-*.c >../doc/help/api-ppd.html
+ --header api-ppd.header --body api-ppd.shtml \
+ ppd.h ppd-*.c raster-interstub.c >../doc/help/api-ppd.html
codedoc --section "Programming" --title "Raster API" \
--css ../doc/cups-printable.css \
- --header api-raster.header --intro api-raster.shtml \
- ../cups/raster.h interpret.c raster.c \
+ --header api-raster.header --body api-raster.shtml \
+ ../cups/raster.h raster-stubs.c \
>../doc/help/api-raster.html
codedoc --section "Programming" \
--title "Filter and Backend Programming" \
--css ../doc/cups-printable.css \
- --header api-filter.header --intro api-filter.shtml \
+ --header api-filter.header --body api-filter.shtml \
backchannel.c backend.h backend.c sidechannel.c sidechannel.h \
>../doc/help/api-filter.html
diff --git a/cups/api-admin.shtml b/cups/api-admin.shtml
index 70d284695..ab00c9be8 100644
--- a/cups/api-admin.shtml
+++ b/cups/api-admin.shtml
@@ -11,7 +11,7 @@
<p>The administrative APIs provide convenience functions to perform certain administrative functions with the CUPS scheduler.</p>
-<blockquote><b>Note:<b>
+<blockquote><b>Note:</b>
<p>Administrative functions normally require administrative privileges to execute and must not be used in ordinary user applications!</p>
</blockquote>
diff --git a/cups/api-filter.shtml b/cups/api-filter.shtml
index 0a1e42984..e7ab51014 100644
--- a/cups/api-filter.shtml
+++ b/cups/api-filter.shtml
@@ -868,4 +868,7 @@ void *my_data;
</ol>
-<blockquote><b>Note:</b> The sandbox profile used in CUPS 2.0 still allows some actions that are not listed above - these privileges will be removed over time until the profile matches the list above.</blockquote>
+<blockquote><b>Note:</b>
+
+<p>The sandbox profile used in CUPS still allows some actions that are not listed above - these privileges will be removed over time until the profile matches the list above.</p>
+</blockquote>
diff --git a/cups/api-ppd.header b/cups/api-ppd.header
index cb24cd364..bc555e638 100644
--- a/cups/api-ppd.header
+++ b/cups/api-ppd.header
@@ -1,7 +1,7 @@
<!--
PPD API header for CUPS.
- Copyright © 2008-2012 by Apple Inc.
+ Copyright © 2008-2019 by Apple Inc.
Licensed under Apache License v2.0. See the file "LICENSE" for more
information.
@@ -9,7 +9,10 @@
<h1 class='title'>PPD API (DEPRECATED)</h1>
-<blockquote>The PPD API is deprecated starting in CUPS 1.6/macOS 10.8. Please use the new Job Ticket APIs in the <a href="api-cups.html">CUPS API</a> documentation. These functions will be removed in a future release of CUPS.</blockquote>
+<blockquote><b>Note:</b>
+
+<p>The PPD API was deprecated in CUPS 1.6/macOS 10.8. Please use the new Job Ticket APIs in the <a href="cupspm.html">CUPS Programming Manual</a> documentation. These functions will be removed in a future release of CUPS.</p>
+</blockquote>
<div class='summary'><table summary='General Information'>
<thead>
@@ -26,7 +29,7 @@
<tr>
<th>See Also</th>
<td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
- Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
+ Programming: <a href='cupspm.html' target='_top'>CUPS Programming Manual</a><br>
Specifications: <a href='spec-ppd.html' target='_top'>CUPS PPD Extensions</a></td>
</tr>
</tbody>
diff --git a/cups/api-ppd.shtml b/cups/api-ppd.shtml
index e9eb1cb67..d7a43f48f 100644
--- a/cups/api-ppd.shtml
+++ b/cups/api-ppd.shtml
@@ -1,7 +1,7 @@
<!--
PPD API introduction for CUPS.
- Copyright © 2007-2018 by Apple Inc.
+ Copyright © 2007-2019 by Apple Inc.
Copyright © 1997-2006 by Easy Software Products, all rights reserved.
Licensed under Apache License v2.0. See the file "LICENSE" for more
@@ -10,7 +10,10 @@
<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
-<blockquote>The PPD API is deprecated starting in CUPS 1.6/macOS 10.8. Please use the new Job Ticket APIs in the <a href="cupspm.html">CUPS API</a> documentation. These functions will be removed in a future release of CUPS.</blockquote>
+<blockquote><b>Note:</b>
+
+<p>The PPD API was deprecated in CUPS 1.6/macOS 10.8. Please use the new Job Ticket APIs in the <a href="cupspm.html">CUPS Programming Manual</a> documentation. These functions will be removed in a future release of CUPS.</p>
+</blockquote>
<p>The CUPS PPD API provides read-only access the data in PostScript Printer
Description ("PPD") files which are used for all printers with a driver. With
@@ -28,6 +31,7 @@ values as case-insensitive strings, so option "InputSlot" and choice "Upper"
are equivalent to "inputslot" and "upper", respectively.</p>
</blockquote>
+
<h3><a name="LOADING">Loading a PPD File</a></h3>
<p>The <a href="#ppdOpenFile"><code>ppdOpenFile</code></a> function "opens" a
@@ -115,6 +119,7 @@ int num_options = cupsParseOptions(argv[5], 0, &amp;options);
cupsFreeOptions(num_options, options);
</pre>
+
<h3><a name="CONSTRAINTS">Constraints</a></h3>
<p>PPD files support specification of conflict conditions, called
@@ -125,6 +130,7 @@ the options and choices that conflict with each other. The
how many of the selected options are incompatible. Since constraints are
normally specified in pairs, the returned value is typically an even number.</p>
+
<h3><a name="PAGE_SIZES">Page Sizes</a></h3>
<p>Page sizes are special options which have physical dimensions and margins
@@ -179,6 +185,7 @@ in points. Custom page size names can also be specified in inches
<a href="#ppdPageSize"><code>ppdPageSize</code></a> function will return
<code>NULL</code>.</p>
+
<h3><a name="ATTRIBUTES">Attributes</a></h3>
<p>Every PPD file is composed of one or more attributes. Most of these
diff --git a/cups/api-raster.header b/cups/api-raster.header
index 45fa720c9..f5122d865 100644
--- a/cups/api-raster.header
+++ b/cups/api-raster.header
@@ -1,7 +1,7 @@
<!--
Raster API documentation for CUPS.
- Copyright © 2008-2010 by Apple Inc.
+ Copyright © 2008-2019 by Apple Inc.
Licensed under Apache License v2.0. See the file "LICENSE" for more
information.
@@ -19,13 +19,12 @@
<tbody>
<tr>
<th>Library</th>
- <td>-lcupsimage</td>
+ <td>-lcups</td>
</tr>
<tr>
<th>See Also</th>
- <td>Programming: <a href='api-overview.html'>Introduction to CUPS Programming</a><br>
- Programming: <a href='api-cups.html'>CUPS API</a><br>
- Programming: <a href='api-cups.html'>PPD API</a><br>
+ <td>Programming: <a href='cupspm.html'>CUPS Programming Manual</a><br>
+ Programming: <a href='api-ppd.html'>PPD API</a><br>
References: <a href='spec-ppd.html'>CUPS PPD Specification</a></td>
</tr>
</tbody>
diff --git a/cups/api-raster.shtml b/cups/api-raster.shtml
index d2b8a207b..44a603711 100644
--- a/cups/api-raster.shtml
+++ b/cups/api-raster.shtml
@@ -1,7 +1,7 @@
<!--
Raster API introduction for CUPS.
- Copyright © 2007-2013 by Apple Inc.
+ Copyright © 2007-2019 by Apple Inc.
Copyright © 1997-2006 by Easy Software Products, all rights reserved.
Licensed under Apache License v2.0. See the file "LICENSE" for more
@@ -147,7 +147,7 @@ the memory used to read the raster file:</p>
<ul class="code">
- <li><a href="#cupsRasterInterpretPPD" title="Interpret PPD commands to create a page header.">cupsRasterInterpretPPD</a></li>
+ <li><a href="#cupsRasterInitPWGHeader" title="Interpret IPP attributes to create a page header.">cupsRasterInitPWGHeader</a></li>
<li><a href="#cupsRasterWriteHeader" title="Write a raster page header from a version 1 page header structure.">cupsRasterWriteHeader</a> <span class="info">Deprecated in CUPS 1.2/macOS 10.5</span></li>
<li><a href="#cupsRasterWriteHeader2" title="Write a raster page header from a version 2 page header structure.">cupsRasterWriteHeader2</a></li>
<li><a href="#cupsRasterWritePixels" title="Write raster pixels.">cupsRasterWritePixels</a></li>
diff --git a/cups/cupspm.md b/cups/cupspm.md
index 774f1b1b4..260b261f5 100644
--- a/cups/cupspm.md
+++ b/cups/cupspm.md
@@ -1,7 +1,7 @@
---
title: CUPS Programming Manual
author: Michael R Sweet
-copyright: Copyright © 2007-2018 by Apple Inc. All Rights Reserved.
+copyright: Copyright © 2007-2019 by Apple Inc. All Rights Reserved.
version: 2.3.0
...
@@ -25,7 +25,7 @@ the CUPS scheduler.
## Guidelines
-When writing software that uses the "cups" library:
+When writing software (other than printer drivers) that uses the "cups" library:
- Do not use undocumented or deprecated APIs,
- Do not rely on pre-configured printers,
@@ -42,16 +42,23 @@ Similarly, printer and job management applications can use standard query
operations to obtain the status information in a common, generic form and use
standard management operations to control the state of those printers and jobs.
+> **Note:**
+>
+> CUPS printer drivers necessarily depend on specific file formats and certain
+> implementation details of the CUPS software. Please consult the Postscript
+> and raster printer driver developer documentation on
+> [CUPS.org](https://www.cups.org/documentation.html) for more information.
+
## Terms Used in This Document
A *Destination* is a printer or print queue that accepts print jobs. A
-*Print Job* is one or more documents that are processed by a destination
-using options supplied when creating the job. A *Document* is a file (JPEG
-image, PDF file, etc.) suitable for printing. An *Option* controls some aspect
-of printing, such as the media used. *Media* is the sheets or roll that is
-printed on. An *Attribute* is an option encoded for an Internet Printing
-Protocol (IPP) request.
+*Print Job* is a collection of one or more documents that are processed by a
+destination using options supplied when creating the job. A *Document* is a
+file (JPEG image, PDF file, etc.) suitable for printing. An *Option* controls
+some aspect of printing, such as the media used. *Media* is the sheets or roll
+that is printed on. An *Attribute* is an option encoded for an Internet
+Printing Protocol (IPP) request.
## Compiling Programs That Use the CUPS API
@@ -195,7 +202,9 @@ can have any of the following constant (bit) values set:
The callback function returns 0 to stop enumeration or 1 to continue.
-> Note that the callback function will likely be called multiple times for the
+> **Note:**
+>
+> The callback function will likely be called multiple times for the
> same destination, so it is up to the caller to suppress any duplicate
> destinations.
@@ -817,7 +826,9 @@ which printer is being queried:
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, printer_uri);
-> Note: If we wanted to query the scheduler instead of the device, we would look
+> **Note:**
+>
+> If we wanted to query the scheduler instead of the device, we would look
> up the "printer-uri-supported" option instead of the "device-uri" value.
The `ippAddString` function adds the "printer-uri" attribute the the IPP