summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/XpCancelDoc.man101
-rw-r--r--man/XpCancelJob.man96
-rw-r--r--man/XpCancelPage.man97
-rw-r--r--man/XpCreateContext.man162
-rw-r--r--man/XpDestroyContext.man78
-rw-r--r--man/XpEndDoc.man76
-rw-r--r--man/XpEndJob.man77
-rw-r--r--man/XpEndPage.man80
-rw-r--r--man/XpFreePrinterList.man64
-rw-r--r--man/XpGetAttributes.man118
-rw-r--r--man/XpGetContext.man62
-rw-r--r--man/XpGetDocumentData.man215
-rw-r--r--man/XpGetImageResolution.man73
-rw-r--r--man/XpGetLocaleHinter.man63
-rw-r--r--man/XpGetOneAttribute.man97
-rw-r--r--man/XpGetPageDimensions.man96
-rw-r--r--man/XpGetPdmStartParams.man195
-rw-r--r--man/XpGetPrinterList.man122
-rw-r--r--man/XpGetScreenOfContext.man81
-rw-r--r--man/XpInputSelected.man100
-rw-r--r--man/XpPutDocumentData.man161
-rw-r--r--man/XpQueryExtension.man80
-rw-r--r--man/XpQueryScreens.man75
-rw-r--r--man/XpQueryVersion.man80
-rw-r--r--man/XpRehashPrinterList.man71
-rw-r--r--man/XpSelectInput.man101
-rw-r--r--man/XpSetAttributes.man171
-rw-r--r--man/XpSetContext.man112
-rw-r--r--man/XpSetImageResolution.man96
-rw-r--r--man/XpSetLocaleHinter.man205
-rw-r--r--man/XpStartDoc.man127
-rw-r--r--man/XpStartJob.man126
-rw-r--r--man/XpStartPage.man111
-rw-r--r--man/libXp.man210
34 files changed, 3779 insertions, 0 deletions
diff --git a/man/XpCancelDoc.man b/man/XpCancelDoc.man
new file mode 100644
index 0000000..c49af96
--- /dev/null
+++ b/man/XpCancelDoc.man
@@ -0,0 +1,101 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpCancelDoc 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpCancelDoc \- Cancels a print document.
+.SH SYNOPSIS
+.B void XpCancelDoc
+(
+.I display,
+.I discard
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Bool \fIdiscard\fP\^;
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I discard
+When TRUE, specifies that all XPPrintNotify events with a detail of
+XPEndPageNotify or
+XPEndDocNotify should be discarded.
+.if n .ti +5n
+.if t .ti +.5i
+.SH DESCRIPTION
+.LP
+XpCancelDoc cancels an in-progress document. If the job was started with
+output_mode XPGetData
+then the data stream to
+XpGetDocumentData is interrupted; no further data for the current document will
+be generated
+but data for subsequent documents can be
+generated. For many page description languages such arbitrary termination may
+invalidate the
+output.
+
+If the job was started with output_mode XPSpool then depending on the driver and
+spooler
+implementation the entire document may be
+canceled or a partial document may be generated.
+
+If
+.I discard
+is True all XPPrintNotify events with a detail field of XPEndPageNotify or
+XPEndDocNotify are discarded before XpCancelDoc
+returns.
+
+For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify
+will be
+generated with its detail field set to
+XPEndDocNotify.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
+.TP 15
+.SM XPBadSequence
+The function was not called in the proper order with respect to the other X
+Print Service
+Extension calls (example, XpEndDoc prior to
+XpStartDoc).
+.SH "SEE ALSO"
+.BR XpEndDoc (3Xp),
+.BR XpGetDocumentData (3Xp),
+.BR XpSelectInput (3Xp),
+.BR XpStartDoc (3Xp)
diff --git a/man/XpCancelJob.man b/man/XpCancelJob.man
new file mode 100644
index 0000000..244d6da
--- /dev/null
+++ b/man/XpCancelJob.man
@@ -0,0 +1,96 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpCancelJob 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpCancelJob \- Cancels a single print job.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpCancelJob
+(
+.I display,
+.I discard
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Bool \fIdiscard\fP\^;
+
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I discard
+When TRUE, specifies that all XPPrintNotify events should be discarded.
+.SH DESCRIPTION
+.LP
+XpCancelJob cancels an in-progress job. If the job was started with output_mode
+XPGetData then the data stream to XpGetDocumentData is terminated. For many
+page description languages such arbitrary termination may invalidate the
+output.
+
+If the job was started with output_mode XPSpool then depending on the driver
+and spooler configuration the entire job may be canceled or a partial job may
+be generated.
+
+If
+.I discard
+is TRUE, all XPPrintNotify events with a detail field of
+XPEndPageNotify, XPEndDocNotify, or XPEndJobNotify are discarded before
+XpCancelJob returns.
+
+For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify
+will be generated with its detail field set to XPEndJobNotify.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
+.TP 15
+.SM XPBadSequence
+The function was not called in the proper order with respect to the other X
+Print Service Extension calls (for example, XpEndJob prior to XpStartJob).
+.SH "SEE ALSO"
+.BR XpEndJob (3Xp),
+.BR XpGetDocumentData (3Xp),
+.BR XpSelectInput (3Xp),
+.BR XpStartJob (3Xp)
+
diff --git a/man/XpCancelPage.man b/man/XpCancelPage.man
new file mode 100644
index 0000000..ed2ed02
--- /dev/null
+++ b/man/XpCancelPage.man
@@ -0,0 +1,97 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpCancelPage 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpCancelPage \- Cancels a print page.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpCancelPage
+(
+.I display,
+.I discard
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Bool \fIdiscard\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I discard
+When TRUE, specifies that XPPrintNotify events with a detail of XPEndPageNotify
+should be discarded.
+.SH DESCRIPTION
+.LP
+XpCancelPage cancels an in-progress print page. If the job was started with
+output_mode XPGetData then the data stream to XpGetDocumentData is interrupted;
+no
+further data for the current page is generated but data for subsequent pages can
+be generated. For many page description languages, such arbitrary interruptions
+may invalidate the output.
+
+If the job was started with output_mode XPSpool then depending on the driver and
+spooler implementation the
+entire page may be canceled or a partial page may be generated.
+
+If
+.I discard
+is True all XPPrintNotify events with a detail field of XPEndPageNotify
+are discarded before XpCancelPage returns.
+
+For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify
+is
+generated with its detail field set to XPEndPageNotify when the X Print Server
+has
+completed XpCancelPage.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadSequence
+The function was not called in the proper order with respect to the
+other X Print Service Extension calls; for example, XpStartPage was
+called before XpStartJob or was called for a type XPDocRaw document.
+.SH "SEE ALSO"
+.BR XpGetDocumentData (3Xp),
+.BR XpSelectInput (3Xp),
+.BR XpStartJob (3Xp),
+.BR XpStartPage (3Xp)
diff --git a/man/XpCreateContext.man b/man/XpCreateContext.man
new file mode 100644
index 0000000..6b8400b
--- /dev/null
+++ b/man/XpCreateContext.man
@@ -0,0 +1,162 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpCreateContext 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpCreateContext \- Creates and initializes a new print context.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B XPContext XpCreateContext
+(
+.I display,
+.I printer_name
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ char *\fIprinter_name\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I printer_name
+The name of a printer on display. String encoded as COMPOUND_TEXT.
+.SH DESCRIPTION
+.LP
+XpCreateContext creates a new print context that is initialized with the default
+printer attributes and other information available for
+.I printer_name
+on display. A print context maintains the printer name, print
+attributes, font capabilities, print (rendering) state and results, and is the
+object upon which the Xp calls act.
+
+If the library fails to generate a new print context-id, a value of None is
+returned, otherwise a print context-id is always returned. If
+.I printer_name
+is invalid, a BadMatch is generated later by the
+.I X Print Server.
+
+A call to XpGetPrinterList will return a valid list of values for
+.I printer_name.
+All printer name values in the X Print Service are encoded as COMPOUND_TEXT (of
+which the ISO-8859-1 code-set is a proper subset).
+
+As soon as a print context is created, the print attributes in it can be
+accessed and modified by calling XpGetAttributes and XpSetAttributes, and the
+event selections in it can be modified by calling XpSelectInput and
+XpInputSelected. Other Xp calls that explicitly take a print context-id as a
+parameter will operate directly on that print context. All Xp and X calls
+without a print context-id parameter (for example, all rendering oriented calls
+like XpStartJob and XDrawLine) require that a print context be set on the
+display connection (see XpSetContext). Failure to set a print context prior to
+calling a print-context-dependent call will result in the generation of an
+XPBadContext error.
+
+The XPContext returned by XpCreateContext is an XID, and can be used to set the
+print context on display connections by calling XpSetContext. The XPContext id
+can be shared between processes and display connections. It is the
+responsibility of the clients sharing a print context to coordinate their usage
+of the context; for example they must ensure that in-use print contexts are not
+prematurely destroyed.
+
+The context_id remains valid for all clients until 1) the client creating the
+print context closes its display connection, or 2) any client calls
+XpDestroyContext. The context_id can be kept valid after the creating client's
+display connection
+closes if XSetCloseDownMode is called on display with RetainPermanent or
+RetainTemporary.
+
+After creating a print context, and possibly modifying the XPDocAttr attribute
+document-format using a value from the list of available formats shown in the
+XPPrinterAttr attribute document-formats-supported, the application must query
+the
+.I X Print Server
+via XpGetScreenOfContext for the screen that has been
+associated with the print context, and then create all server resources that
+will be used in the print job on that screen. Failure to do so will result in
+undefined behavior.
+
+When XpCreateContext is called, the
+.I client's
+locale (see XpSetLocaleHinter) is
+included in the request as a "hint" to the
+.I X Print Server.
+If supported by the
+implementation, the
+.I X Print Server
+will use the hint to initialize the attribute
+pools with any localized attribute values (for example, the human readable
+XPPrinterAttr attribute "descriptor" may be available in several different
+languages, and the hint will be used to select one). If the
+.I X Print Server
+cannot understand the hint, the
+.I X Print Server
+chooses a default value.
+
+This function can generate a BadMatch error if the specified
+.I printer_name
+does not exist on display, or if the print server could not interpret the code
+set specified in
+.I printer_name.
+.SH DIAGNOSTICS
+.TP 15
+.SM BadMatch
+The value specified for doc_fmt is not valid for the current document type or
+the value specified for drawable is not valid for the print context and print
+screen.
+.SH "SEE ALSO"
+.BR XpDestroyContext (3Xp),
+.BR XpGetAttributes (3Xp),
+.BR XpGetPrinterList (3Xp),
+.BR XpGetScreenOfContext (3Xp),
+.BR XpInputSelected (3Xp),
+.BR XpSelectInput (3Xp),
+.BR XpSetAttributes (3Xp),
+.BR XpSetContext (3Xp),
+.BR XpSetLocaleHinter (3Xp),
+.BR XpStartJob (3Xp)
+
+
+
+
+
+
diff --git a/man/XpDestroyContext.man b/man/XpDestroyContext.man
new file mode 100644
index 0000000..c6a6146
--- /dev/null
+++ b/man/XpDestroyContext.man
@@ -0,0 +1,78 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpDestroyContext 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpDestroyContext \- Gets the current print context-id for a display connection.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpDestroyContext
+(
+.I display,
+.I print_context
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPContext \fIprint_context\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I print_context
+Specifies the print context to destroy.
+.SH DESCRIPTION
+.LP
+XpDestroyContext closes any outstanding associations between the print context
+and
+any display connections, and then destroys the print context. All display
+connections using the print context will no longer be able to access the print
+context.
+
+Destroying a print context will cause any in-progress pages, documents and jobs
+to
+be canceled within the
+.I X Print Server.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
diff --git a/man/XpEndDoc.man b/man/XpEndDoc.man
new file mode 100644
index 0000000..c226e80
--- /dev/null
+++ b/man/XpEndDoc.man
@@ -0,0 +1,76 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpEndDoc 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpEndDoc \- Indicates the ending of a print document.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpEndDoc
+(
+.I display
+)
+.br
+ Display *\fIdisplay\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.SH DESCRIPTION
+.LP
+XpEndDoc signals the end of a print document. All resulting document data is
+assembled and combined with data previously sent by XpPutDocumentData.
+
+For clients selecting XPPrintMask (see XpSelectInput), the event
+XPPrintNotify is generated with its detail field set to XPEndDocNotify.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
+.TP 15
+.SM XPBadSequence
+The function was not called in the proper order with respect to the other
+X Print Service Extension calls. (Example, XpEndDoc prior to XpStartDoc).
+.SH "SEE ALSO"
+.BR XpPutDocumentData (3Xp),
+.BR XpSelectInput (3Xp),
+.BR XpStartDoc (3Xp)
+
diff --git a/man/XpEndJob.man b/man/XpEndJob.man
new file mode 100644
index 0000000..7c30b77
--- /dev/null
+++ b/man/XpEndJob.man
@@ -0,0 +1,77 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpEndJob 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpEndJob \- Indicates the ending of a single print job.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpEndJob
+(
+.I display
+)
+.br
+ Display *\fIdisplay\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.SH DESCRIPTION
+.LP
+XpEndJob signals the end of a print job. Any accumulated print data that remains
+is either sent to the printer or made available to XpGetDocumentData.
+
+For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify
+will be generated with its detail field set to XPEndJobNotify when the
+.I X Print Server
+has completed the request.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
+.TP 15
+.SM XPBadSequence
+The function was not called in the proper order with respect to the other
+X Print Service Extension calls. (Example, XpEndDoc prior to XpStartDoc).
+.SH "SEE ALSO"
+.BR XpGetDocumentData (3Xp),
+.BR XpSelectInput (3Xp),
+.BR XpStartJob (3Xp)
diff --git a/man/XpEndPage.man b/man/XpEndPage.man
new file mode 100644
index 0000000..2e0b8d6
--- /dev/null
+++ b/man/XpEndPage.man
@@ -0,0 +1,80 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpEndPage 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpEndPage \- Indicates the end of a print page.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpEndPage
+(
+.I display
+)
+.br
+ Display *\fIdisplay\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH DESCRIPTION
+.LP
+XpEndPage signals the end of a print page, and causes
+window to be unmapped. All resulting page data is assembled and combined with
+data previously sent by XpPutDocumentData. No generation of document data will
+occur for rendering operations to the corresponding windows after XpEndPage is
+called.
+
+For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify
+is generated with its detail field set to XPEndPageNotify when the
+.I X Print Server
+has completed XpEndPage.
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadSequence
+The function was not called in the proper order with respect to the
+other X Print Service Extension calls; for example, XpStartPage was
+called before XpStartJob or was called for a type XPDocRaw document.
+.SH "SEE ALSO"
+.BR XpPutDocumentData. (3Xp),
+.BR XpSelectInput (3Xp),
+.BR XpStartPage (3Xp)
+
+
diff --git a/man/XpFreePrinterList.man b/man/XpFreePrinterList.man
new file mode 100644
index 0000000..ae96804
--- /dev/null
+++ b/man/XpFreePrinterList.man
@@ -0,0 +1,64 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpFreePrinterList 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpFreePrinterList \- Frees a list of printer records.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpFreePrinterList
+(
+.I printer_list
+)
+.br
+ XPPrinterList \fIprinter_list\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I printer_list
+A list of printer records returned by XpGetPrinterList.
+.SH DESCRIPTION
+.LP
+.I XpFreePrinterList
+frees the list of printer records returned by
+.I XpGetPrinterList.
+.SH "SEE ALSO"
+.BR XpGetPrinterList (3Xp)
+
diff --git a/man/XpGetAttributes.man b/man/XpGetAttributes.man
new file mode 100644
index 0000000..6c84b09
--- /dev/null
+++ b/man/XpGetAttributes.man
@@ -0,0 +1,118 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpGetAttributes 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpGetAttributes \- Gets an attribute pool from the specified print context.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B char *XpGetAttributes
+(
+.I display,
+.I context,
+.I type
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPContext \fIcontext\fP\^;
+.br
+ XPAttributes \fItype\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I context
+The print context from which the attribute pool is to be retrieved.
+.TP
+.I type
+Specifies the attribute pool.
+.SH DESCRIPTION
+.LP
+XpGetAttributes returns a pool, a COMPOUND_TEXT resource string representing the
+attribute pool specified by type. The caller is expected to free pool when it is
+no longer needed using XFree.
+
+The attribute pool (hence the resource string) consists of many name-value pairs
+(for example, "copy-count: 3"). The syntax of an attribute pool is the same as an
+X resource file (see "Resource File Syntax" in the Xlib specification).
+
+Valid characters for each name (left hand side) are derived from the Posix which is
+"a"-"z" and "A"="Z" and"0"-"9" and "_" and "-". Valid characters for each value
+(right hand side) are all characters except NULL and unescaped NEWLINE, though all
+predefined values in the X Print Service are confined to X Portable Character Set
+(XPCS) characters. Non XPCS values are typically limited to localized "description"
+strings. See XpCreateContext regarding the locale hint for more information on
+localized
+values.
+
+If any errors occur,
+.I XpGetAttributes
+returns NULL.
+.SH STRUCTURES
+The values for the typedef XPAttributes in <X11/extensions/Print.h> are:
+.nf
+ #define XPJobAttr 1 /* get/set */
+ #define XPDocAttr 2 /* get/set */
+ #define XPPageAttr 3 /* get/set-subset of XPDocAttr */
+ #define XPPrinterAttr 4 /* get only (library) */
+ #define XPServerAttr 5 /* get only (library), no context needed */
+.LP
+.fi
+.SH DIAGNOSTICS
+.TP 15
+.SM BadAlloc
+Insufficient memory.
+.TP 15
+.SM BadValue
+The value specified for type is not valid.
+.TP 15
+.SM XPBadContext
+The specified print context-id is not valid.
+.SH FILES
+.PD 0
+.TP 20
+.B <X11/extensions/Print.h>
+.SH "SEE ALSO"
+.BR XpCreateContext (3Xp)
+
+
diff --git a/man/XpGetContext.man b/man/XpGetContext.man
new file mode 100644
index 0000000..c6ee756
--- /dev/null
+++ b/man/XpGetContext.man
@@ -0,0 +1,62 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpGetContext 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpGetContext \- Gets the current print context-id for a display connection.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B XPContext XpGetContext
+(
+.I display
+)
+.br
+ Display *\fIdisplay\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.SH DESCRIPTION
+.LP
+.I XpGetContext
+returns the id of the current print context associated with
+.I display.
+If a print context has not been set, a value of None is returned.
diff --git a/man/XpGetDocumentData.man b/man/XpGetDocumentData.man
new file mode 100644
index 0000000..ea4d0be
--- /dev/null
+++ b/man/XpGetDocumentData.man
@@ -0,0 +1,215 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpGetDocumentData 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpGetDocumentData \- Creates and initializes a new print context.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B Status XpGetDocumentData
+(
+.I data_display,
+.I context,
+.I save_proc,
+.I finish_proc,
+.I client_data
+)
+.br
+ Display *\fIdata_display\fP\^;
+.br
+ XPContext \fIcontext\fP\^;
+.br
+ XPSaveProc \fIsave_proc\fP\^;
+.br
+ XPFinishProc \fIfinish_proc\fP\^;
+.br
+ XPointer \fIclient_data\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I data_display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I context
+The print context from which document data is to be retrieved.
+.TP
+.I save_proc
+A procedure to be registered and called repeatedly to save blocks of document
+data.
+.TP
+.I finish_proc
+A procedure to be registered and called once when the print job has completed
+and
+all document data has been sent to save_proc.
+.TP
+.I client_data
+Specifies client data to be passed to save_proc and finish_proc when called.
+.SH DESCRIPTION
+.LP
+XpGetDocumentData registers callbacks that allow a "consumer" to continuously
+retrieve document data generated in the
+.I X Print Server
+by a separate "producer",
+where both are referencing the same print context by way of
+.I different
+display
+connections. Though XpGetDocumentData retrieves document data, its effect is
+bounded by XpStartJob and XpEndJob. XpGetDocumentData always returns
+immediately;
+if an error occurs and the callbacks cannot be registered, the return status is
+0,
+else the return status is non-zero and the callbacks will be called sometime
+after
+the return from XpGetDocumentData. This producer/consumer exchange is set up
+when
+XpStartJob is called by the producer with output_mode equal XPGetData, and is
+subsequently initiated when XpGetDocumentData is called by the consumer. Though
+XpStartJob will return immediately, further attempts to use the producer's
+display
+connection may be blocked by the
+.I X Print Server
+until XpGetDocumentData is called on the consumer's display connection.
+
+Following a successful call to
+.I XpGetDocumentData,
+the consumer must enter a loop to process events from the server, for example,
+by calling XNextEvent. The event processing code will invoke save_proc and
+finish_proc as needed to consume incoming data. To avoid blocking indefinitely
+in XNextEvent, the consumer should select for XPPrintNotify events, and watch
+for XPEndJobNotify. This event will be sent following the call to finish_proc
+and the consumer can safely exit the loop at this point. Aside from this
+processing of XPrintNotify events, data_display must not be used for any
+additional X requests until finish_proc is called and returns.
+
+.SH STRUCTURES
+The save_proc is defined in <X11/extensions/Print.h> as:
+.LP
+.nf
+typedef void (*XPSaveProc)( Display *data_display,
+ XPContext context,
+ unsigned char *data,
+ unsigned int data_len,
+ XPointer client_data);
+.fi
+
+.LP
+The save_proc is repeatedly called on each chunk of document data sent by the X
+Print Server until either XpEndJob or XpCancelJob is called. data_len specifies
+the number of bytes in data. The memory for data itself is owned by the library,
+so save_proc should copy data to another location before returning. After the
+last block of data has been delivered to save_proc, finish_proc is called with
+final status.
+
+The finish_proc is defined in <X11/extensions/Print.h> as:
+.LP
+.nf
+typedef void (*XPFinishProc)( Display *data_display,
+ XPContext context,
+ XPGetDocStatus status,
+ XPointer client_data);
+.fi
+.LP
+After XpGetDocumentData successfully registers the callbacks, any generated X
+errors (for example, BadAlloc) or Xp errors (for example, XPBadContext or
+XPBadSequence) that are the result of XpGetDocumentData will cause the Xlib
+error handler to be invoked, and then will cause finish_proc to be called with a
+status of XPGetDocError. Any other activities (for example, a separate process
+destroying the print context) that prove fatal to the progress of
+XpGetDocumentData will also cause finish_proc to be called with a status of
+XPGetDocError.
+
+If XpGetDocumentData is called prior to XpStartJob, then an XPBadSequence error
+is generated and finish_proc is called with XPGetDocError. If XpGetDocumentData
+is called after XpStartJob and output_mode was specified as XPSpool, then an
+XPBadSequence error is generated and finish_proc is called with XPGetDocError.
+If the producer starts generating data and the consumer cannot consume data
+quickly enough, then the producer's display connection will be blocked by the
+.I X Print Server.
+
+Until XpEndJob or XpCancelJob is called, it is possible that various
+XPPrintNotify events will be generated (for example, a page has been canceled).
+The data passed to save_proc is not necessarily organized according to the
+consumer's requests or any generated events, and its consistency is guaranteed
+only if the entire job completes successfully (i.e. without being canceled or
+generating an error).
+
+When finish_proc is called, sometime after XpGetDocumentData is called and
+returns, status gives the completion status of the job and is defined in
+<X11/extensions/Print.h> as:
+.LP
+.nf
+ #define XPGetDocFinished 0 /* normal termination */
+ #define XPGetDocSecondConsumer 1 /* setup error */
+ #define XPGetDocError 2 /* progress error */
+.fi
+.LP
+XPGetDocFinished indicates that all intended document data has been delivered by
+way of save_proc. All cancellation events are guaranteed to have arrived by the
+time finished_proc is called, and they should be taken into consideration for
+evaluating the validity of the document data returned.
+
+XPGetDocSecondConsumer indicates that a consumer had already been established
+for the print context. The
+.I X Print Server
+only supports one consumer per print context.
+
+XPGetDocError indicates that an error has been generated (for example,
+XPBadContext or XPBadSequence) and that no further document data will be
+delivered by the
+.I X Print Server
+to save_proc.
+
+After finish_proc returns, save_proc and finish_proc are unregistered and will
+no longer be called.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
+.TP 15
+.SM XPBadSequence
+The function was not called in the proper order with respect to the other X
+Print Service Extension calls (for example, XpGetDocumentData prior to
+XpStartJob).
+.SH "SEE ALSO"
+.BR XpCancelJob (3Xp),
+.BR XpEndJob (3Xp),
+.BR XpStartJob (3Xp)
+
+
diff --git a/man/XpGetImageResolution.man b/man/XpGetImageResolution.man
new file mode 100644
index 0000000..43e7b08
--- /dev/null
+++ b/man/XpGetImageResolution.man
@@ -0,0 +1,73 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpGetImageResolution 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpGetImageResolution \- Gets the current image
+resolution for a print context.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B int XpGetImageResolution
+(
+.I display,
+.I print_context
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPContext \fIprint_context\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure.
+.TP
+.I print_context
+Specifies the print context on which to get the resolution.
+.SH DESCRIPTION
+.LP
+XpGetImageResolution returns the current image resolution for the specified
+print context. A value of zero means the resolution automatically tracks
+the printer resolution. If the request fails in some way, a negative value
+is returned.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
diff --git a/man/XpGetLocaleHinter.man b/man/XpGetLocaleHinter.man
new file mode 100644
index 0000000..57d657e
--- /dev/null
+++ b/man/XpGetLocaleHinter.man
@@ -0,0 +1,63 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpGetLocaleHinter 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpGetLocaleHinter \- Gets a pointer to and description of the current "locale
+hinter" function.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B char *XpGetLocaleHinter
+(
+.I hinter_proc_return
+)
+.br
+ XPHinterProc *\fIhinter_proc_return\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I hinter_proc_return
+Returns a pointer to the current hinter proc.
+.SH DESCRIPTION
+.LP
+XpGetLocaleHinter returns the currently installed hinter proc and hinter
+description. The function value is the pointer to the description. The caller is
+expected to XFree the returned hinter description string.
+
diff --git a/man/XpGetOneAttribute.man b/man/XpGetOneAttribute.man
new file mode 100644
index 0000000..b8c92ad
--- /dev/null
+++ b/man/XpGetOneAttribute.man
@@ -0,0 +1,97 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpGetOneAttribute 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpGetOneAttribute \- Gets a single print attribute from the specified print
+context.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B char *XpGetOneAttribute
+(
+.I display,
+.I context,
+.I type,
+.I attribute_name
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPContext \fIcontext\fP\^;
+.br
+ XPAttributes \fItype\fP\^;
+.br
+ char *\fIattribute_name\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I context
+The print context from which the attribute pool is to be retrieved.
+.TP
+.I type
+Specifies the attribute pool.
+.TP
+.I attribute_name
+The name of the attribute to be returned.
+.SH DESCRIPTION
+.LP
+This request returns a COMPOUND_TEXT string attribute_value, else NULL if any
+errors occurred.
+XpGetOneAttribute is a variation of XpGetAttributes to get a single attribute
+value from an attribute pool. Unlike XpGetAttributes, where the reply contains
+an entire attribute pool, XpGetOneAttribute returns just one attribute_value.
+attribute_name should not include a colon. The caller is expected to free the
+attribute value returned using XFree.
+.SH DIAGNOSTICS
+.TP 15
+.SM BadAlloc
+Insufficient memory.
+.TP 15
+.SM BadValue
+The value specified for type is not valid.
+.TP 15
+.SM XPBadContext
+The specified print context-id is not valid.
+.SH "SEE ALSO"
+.BR XpGetAttributes (3Xp)
+
diff --git a/man/XpGetPageDimensions.man b/man/XpGetPageDimensions.man
new file mode 100644
index 0000000..5723c6c
--- /dev/null
+++ b/man/XpGetPageDimensions.man
@@ -0,0 +1,96 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpGetPageDimensions 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpGetPageDimensions \- Gets the page dimensions for the current printer
+settings.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B Status XpGetPageDimensions
+(
+.I display,
+.I print_context,
+.I width,
+.I height,
+.I reproducible_area
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPContext \fIprint_context\fP\^;
+.br
+ unsigned short *\fIwidth\fP\^;
+.br
+ unsigned short *\fIheight\fP\^;
+.br
+ XRectangle *\fIreproducible_area\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I print_context
+A pre-existing print context.
+.TP
+.I width
+Returns the pixel width of the page currently selected in the print context.
+.TP
+.I height
+Returns the pixel height of the page currently selected in the print context.
+.TP
+.I reproducible_area
+Returns the net reproducible area of the page currently selected in the print
+context, expressed in pixel offsets and dimensions.
+.SH DESCRIPTION
+.LP
+XpGetPageDimensions considers the medium currently selected in the print context
+(derived in part from default-medium, default-input-tray, input-trays-medium,
+content-orientation, default-resolution), and returns the total width and height
+of the page in pixels, and the net reproducible area within the total width and
+height. The net reproducible area is the portion of the page on which the
+printer is physically capable of placing ink.
+
+XpGetPageDimensions returns a Status of 0 on failure, or 1 on success.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
diff --git a/man/XpGetPdmStartParams.man b/man/XpGetPdmStartParams.man
new file mode 100644
index 0000000..08f702e
--- /dev/null
+++ b/man/XpGetPdmStartParams.man
@@ -0,0 +1,195 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpGetPdmStartParams 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpGetPdmStartParams \- Builds up parameters in accordance with the PDM
+Selection Protocol as a standard convenience function.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B Status XpGetPdmStartParams
+(
+.I print_display
+.I print_window
+.I print_context
+.I video_display
+.I video_window
+.I selection_display_return
+.I selection_return
+.I type_return
+.I format_return
+.I data_return
+.I nelements_return
+)
+.br
+ Display *\fIprint_display\fP\^;
+.br
+ Window \fIprint_window\fP\^;
+.br
+ XPContext \fIprint_context\fP\^;
+.br
+ Display *\fIvideo_display\fP\^;
+.br
+ Window \fIvideo_window\fP\^;
+.br
+ Display **\fIselection_display_return\fP\^;
+.br
+ Atom *\fIselection_return\fP\^;
+.br
+ Atom *\fItype_return\fP\^;
+.br
+ int *\fIformat_return\fP\^;
+.br
+ unsigned char **\fIdata_return\fP\^;
+.br
+ int *\fInelements_return\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I print_display
+Specifies a pointer to the print Display structure; returned from XOpenDisplay
+on the X Print Server.
+.TP
+.I print_window
+Specifies a client window on any screen of print_display long-lived enough for
+ICCCM communications of the final PDM status ("OK" or "CANCEL" ClientMessage)
+sent to print_window.
+.TP
+.I print_context
+An existing print context that the PDM should reference.
+.TP
+.I video_display
+Specifies a pointer to the video Display structure; returned from XOpenDisplay
+on the Video X-Server.
+.TP
+.I video_window
+Specifies the window on video_display near which the transient dialogs from the
+PDM should be posted.
+.TP
+.I selection_display_return
+Returns the display connection on which the PDM selection should be made. May
+be equal to print_display or video_display, or may be a new display connection
+that the caller should close when done.
+.TP
+.I selection_return
+Returns the selection atom for which a PDM selection should be made.
+.TP
+.I type_return
+Returns the type for the PDM Selection Protocol property the caller is expected
+to create.
+.TP
+.I format_return
+Returns the format for the PDM Selection Protocol property the caller is
+expected to create.
+.TP
+.I data_return
+Returns the data set for the PDM Selection Protocol property the caller is
+expected to create. The caller is expected to XFree the data when finished.
+.TP
+.I nelements_return
+Returns the number of elements for the PDM Selection Protocol property the
+caller is expected to create.
+.SH DESCRIPTION
+.LP
+This request returns a zero status if an error occurred, non-zero otherwise.
+
+XpGetPdmStartParams is a convenience routine used to construct the necessary
+property information and selection display connection information needed to
+initiate a PDM Selection per the "PDM Selection Protocol". Once the information
+is constructed, the caller is responsible for the creation of a property, the
+generation of a SelectionRequest, the receipt of a SelectionNotify event, and
+the receipt of a ClientMessage event, as described in the PDM Selection Protocol.
+
+When finished, the caller is expected to free data using XFree.
+XpGetPdmStartParams returns zero if an error occurred, else non-zero. If an
+error occurs all
+.I other_return
+values are undefined.
+
+Setting the environment variable XPDMSELECTION causes XpGetPdmStartParams to use
+an alternate selection name. If not set, the selection name
+.I
+PDM_MANAGER
+is used.
+
+Setting the environment variable XPDMDISPLAY causes XpGetPdmStartParams to
+locate the selection on an alternate X Server. If not set,
+.I
+selection_display_return
+ is set equal to
+.I
+print_display.
+If XPDMDISPLAY is set to one of the keywords "print" or "video",
+.I
+selection_display_return
+is set to
+.I
+print_display
+or
+.I
+video_display,
+respectively. If XPDMDISPLAY is set to a valid DISPLAY-style string,
+.I
+selection_display_return
+may be set, as appropriate, to one of
+.I
+print_display,
+.I
+video_display,
+or to a new display connection opened from within
+XpGetPdmStartParams. Only in the single case where a new display connection is
+made should the caller close
+.I
+selection_display_return
+using XCloseDisplay.
+
+When XpGetPdmStartParams is called, the caller's locale (see XpSetLocaleHinter)
+is included in the information as a "hint" to the Print Dialog Manager (PDM). If
+supported by the implementation, the PDM will use the hint to display dialogs
+more appropriately labeled for the locale of the client. If the Print Dialog
+Manager cannot understand the hint, the PDM will choose a default. Note that the
+locale of the print attributes that the PDM will subsequently access, will
+already have been determined when the client called XpCreateContext.
+
+The environment variables XPDMDISPLAY and XPDMSELECTION are re-read each time
+XpGetPdmStartParams is called.
+.SH "SEE ALSO"
+.BR XpCreateContext (3Xp),
+.BR XpSetLocaleHinter (3Xp)
diff --git a/man/XpGetPrinterList.man b/man/XpGetPrinterList.man
new file mode 100644
index 0000000..78efd24
--- /dev/null
+++ b/man/XpGetPrinterList.man
@@ -0,0 +1,122 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpGetPrinterList 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpGetPrinterList \- Retrieves a list of all printers supported on an X Print
+Server.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B XPPrinterList XpGetPrinterList
+(
+.I display,
+.I printer_name,
+.I list_count_return
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ char *\fIprinter_name\fP\^;
+.br
+ int *\fIlist_count_return\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I printer_name
+Specifies the name of the printer for which information is desired. If NULL,
+then information is returned for all printers associated with the server.
+.TP
+.I list_count_return
+Returns the number of printers in the list.
+.SH DESCRIPTION
+.LP
+XpGetPrinterList returns a list of printer records where each record describes a
+printer supported by the X Print Server, or NULL if any errors occur.
+
+If
+.I printer_name
+is NULL, then a list of all printers supported is returned. If
+.I printer_name
+is non-NULL, only print records matching
+.I printer_name
+are returned,
+and if no records match
+.I printer_name
+, then NULL is returned.
+
+.I printer_name
+is a COMPOUND_TEXT string, and the name and desc fields in the
+returned list will be in COMPOUND_TEXT (note, ISO 8859-1 (Latin-1) is a proper
+subset of COMPOUND_TEXT, so can be used directly). If
+.I printer_name
+is in a code-set that the X Print Server cannot convert (into its operating
+code-set), then the X Print Server may fail to locate the requested printer.
+If
+.I printer_name
+is NULL, then all printer names, regardless of their code-set, can
+be returned, leaving the task of specific printer recognition up to the caller.
+
+When XpGetPrinterList is called, the caller's locale (see XpSetLocaleHinter) is
+included in the request as a "hint" to the X Print Server. If supported by the
+implementation, the X Print Server will use the hint to locate a localized
+description for each printer in the list. If the X Print Server cannot
+understand the hint, the X Print Server will choose a default.
+The returned printer list can be freed by calling XpFreePrinterList.
+
+The XPPrinterList structure defined in <X11/extensions/Print.h> contains:
+.nf
+
+typedef struct {
+ char *name; /* name */
+ char *desc; /* localized description */
+} XPPrinterRec, *XPPrinterList;
+
+.fi
+.SH DIAGNOSTICS
+.TP 15
+.SM BadAlloc
+Insufficient memory.
+.SH "SEE ALSO"
+.BR XpFreePrinterList (3Xp),
+.BR XpSetLocaleHinter (3Xp)
+
diff --git a/man/XpGetScreenOfContext.man b/man/XpGetScreenOfContext.man
new file mode 100644
index 0000000..4177edc
--- /dev/null
+++ b/man/XpGetScreenOfContext.man
@@ -0,0 +1,81 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpGetScreenOfContext 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpGetScreenOfContext \- Obtains a pointer to the screen associated with the
+specified print context.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B Screen *XpGetScreenOfContext
+(
+.I display,
+.I print_context
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPContext \fIprint_context\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I print_context
+A pre-existing print context. This argument is currently ignored, but must be
+specified.
+.SH DESCRIPTION
+.LP
+XpGetScreenOfContext returns the screen that is associated with the current
+print context of display. This call must be made after XpSetContext to determine
+which specific screen other X resources must be created on.
+
+Each printer supported by a print server is associated with exactly one of the
+screens returned in the connection setup reply.
+
+This function returns NULL if failed to get the screen.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
+.SH "SEE ALSO"
+.BR XpSetContext (3Xp)
+
diff --git a/man/XpInputSelected.man b/man/XpInputSelected.man
new file mode 100644
index 0000000..e27416f
--- /dev/null
+++ b/man/XpInputSelected.man
@@ -0,0 +1,100 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpInputSelected 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpInputSelected \- Queries which X Print events the client has selected to
+receive
+from the specific print context.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B unsigned long XpInputSelected
+(
+.I display,
+.I context,
+.I event_mask
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPContext \fIcontext\fP\^;
+.br
+ unsigned long *\fIall_event_mask_return\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I context
+Specifies the print context to which the query is being made.
+.TP
+.I all_event_mask_return
+Returns the set of events that any client has selected.
+.SH DESCRIPTION
+.LP
+XpInputSelected returns a bit mask describing which event classes the client has
+selected to receive. The value returned to
+.I
+all_event_mask_return
+is the union of every client's event mask.
+XpInputSelected queries which X Print events from the specified print context
+the
+client has selected to receive. The X Print Events are generated from a print
+context, and not from a window as is the case with XSelectInput. As events
+arrive,
+the context field in the event is used to determine which print context
+generated
+the event.
+.\"--- The following line; all_event_mask is not in either XpSelectInput or
+.\"--- XpInputSelected!!!!
+See XpSelectInput for the
+.I event_mask
+and
+.I all_event_mask
+(??return??) values.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadContext
+The specified print context is not valid.
+.SH "SEE ALSO"
+.BR XpSelectInput (3Xp)
+
+
diff --git a/man/XpPutDocumentData.man b/man/XpPutDocumentData.man
new file mode 100644
index 0000000..ea66b05
--- /dev/null
+++ b/man/XpPutDocumentData.man
@@ -0,0 +1,161 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpPutDocumentData 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+void XpPutDocumentData \- Sends and incorporates
+data into the output.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B XpPutDocumentData
+(
+.I display,
+.I drawable,
+.I data,
+.I data_len,
+.I doc_fmt,
+.I options
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Drawable \fIdrawable\fP\^;
+.br
+ unsigned char *\fIdata\fP\^;
+.br
+ int \fIdata_len\fP\^;
+.br
+ char *\fIdoc_fmt\fP\^;
+.br
+ char *\fIoptions\fP\^;
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I drawable
+Specifies the destination drawable for rendering.
+.TP
+.I data
+Specifies the device-specific data sent.
+.TP
+.I data_len
+Specifies the number of bytes in data.
+.TP
+.I doc_fmt
+Specifies the type of data sent.
+See below for valid values. String limited to XPCS characters.
+.TP
+.I options
+Specifies DDX driver dependent options. String limited to XPCS characters.
+.SH DESCRIPTION
+.LP
+Depending on type for XpStartDoc, XpPutDocumentData
+has two modes of operation.
+.P
+In XPDocRaw mode, XpPutDocumentData sends
+.I data
+directly to the output, and
+.I drawable
+must be None, else a BadDrawable error is generated. The X Print Server does not emit document or page control codes into the output, and data is passed through unmodified. This is useful for sending previously constructed and completed documents using the X Print Server job control and submission capabilities. The printer attribute xp-raw-formats-supported defines the valid values for
+.I doc_fmt
+in this mode. Unsupported values for
+.I doc_fmt
+cause a BadMatch error to be generated.
+.P
+In XPDocNormal mode, XpPutDocumentData sends
+.I data
+to the
+.I X Print Server
+, and depending on the DDX driver implementation, integrates
+.I data
+into the output. The parameters
+.I doc_fmt
+and
+.I options
+describe the format of data which guides the DDX driver in interpreting data. The printer attribute
+xp-embedded-formats-supported defines the valid values for
+.I doc_fmt
+in this mode, with unsupported values for
+.I doc_fmt
+causing a BadMatch error to be generated.
+.P
+If
+.I doc_fmt
+is not in either xp-raw-formats-supported or
+xp-embedded-formats-supported a BadValue error is generated.
+.P
+Depending on the DDX driver implementation in use, XpPutDocumentData might be used, for example, to send a simple text file to a Postscript DDX driver that
+is capable of wrapping the appropriate document and page control constructs around the text so that it can be printed on a Postscript printer. Likewise,
+Encapsulated Postscript Files might be handled. Another use could be to send a
+TIFF file to a PCL DDX driver that can convert the image from TIFF into PCL and then integrate it into the current PCL output.
+.P
+There is no limit to the value of
+.I data_len.
+XpPutDocumentData automatically decomposes the call into multiple protocol requests to make sure that the
+maximum request size of the server is not exceeded.
+.SH DIAGNOSTICS
+.TP 15
+.SM BadDrawable
+The value specified for
+.I
+drawable is not valid.
+.TP 15
+.SM BadMatch
+The value specified for
+.I doc_fmt
+is not valid for the current document type
+or the value specified for
+.Idrawable
+is not valid for the print context and
+print screen.
+.TP 15
+.SM BadValue
+The value specified for
+.I doc_fmt
+is not supported.
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
+.TP 15
+.SM XPBadSequence
+The function was not called in the proper order with respect to the other X Print Service Extension calls (for example, XpPutDocumentData prior to XpStartDoc).
+.SH "SEE ALSO"
+.BR XpStartDoc (3Xp)
+
diff --git a/man/XpQueryExtension.man b/man/XpQueryExtension.man
new file mode 100644
index 0000000..0cf6587
--- /dev/null
+++ b/man/XpQueryExtension.man
@@ -0,0 +1,80 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpQueryExtension 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpQueryExtension \- Queries an X Server to determine if it supports the X Print
+Service Extension, and if it does, what the offsets are for associated events
+and errors.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B Bool XpQueryExtension
+(
+.I display,
+.I event_base_return
+.I error_base_return
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ int *\fIevent_base_return\fP\^;
+.br
+ int *\fIerror_base_return\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I event_base_return
+The base value for X Print Service Extension events
+.TP
+.I error_base_return
+The base value for X Print Service Extension errors.
+.SH DESCRIPTION
+.LP
+XpQueryExtension determines if the X Print Service Extension is present. It
+returns True if the extension is supported, otherwise False. If the extension is
+present, the base values for events and errors are returned, and can be used to
+decode incoming event and error values.
+
+The X Print Service Extension is initialized on the first call to any X Print
+Service function; there is no need to explicitly initialize the X Print Service
+Extension.
diff --git a/man/XpQueryScreens.man b/man/XpQueryScreens.man
new file mode 100644
index 0000000..36a09d9
--- /dev/null
+++ b/man/XpQueryScreens.man
@@ -0,0 +1,75 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpQueryScreens 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpQueryScreens \- Queries an X Server to determine which screens, of all the
+screens on the server, support the X Print Service Extension
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B Screen **XpQueryScreens
+(
+.I display,
+.I list_count_return
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ int *\fIlist_count_return\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I list_count_return
+Returns the number of screens in the list.
+.SH DESCRIPTION
+.LP
+This request returns a non-NULL pointer to a list of screen pointers if one or
+more screens support the X Print Service Extension; otherwise it returns NULL.
+
+XpQueryScreens determines if the X Print Service Extension is present, and if
+so, which of all the screens on the X Server support the X Print Service
+Extension. Unlike many other extensions, the X Print Service Extension may be
+restricted to a subset of all available screens - for example, a single X Server
+may be supporting video displays on some screens and printers on others.
+
+The list of screen pointers can be freed by calling XFree.
diff --git a/man/XpQueryVersion.man b/man/XpQueryVersion.man
new file mode 100644
index 0000000..f296a6a
--- /dev/null
+++ b/man/XpQueryVersion.man
@@ -0,0 +1,80 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpQueryVersion 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpQueryVersion \- Queries an X Server to determine if it supports the X Print
+Service Extension, and if it does, which version of the X Print Service
+Extension.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B Status XpQueryVersion
+(
+.I display,
+.I major_version_return,
+.I minor_version_return
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ short *\fImajor_version_return\fP\^;
+.br
+ short *\fIminor_version_return\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I major_version_return
+Returns the major version if the X Print Service Extension exists, else zero.
+.TP
+.I minor_version_return
+Returns the minor version if the X Print Service Extension exists, else zero.
+.SH DESCRIPTION
+.LP
+XpQueryVersion determines if the X Print Service Extension is present. A
+non-zero Status is returned if the extension is supported, otherwise a zero
+Status is returned. If the extension is supported, the major and minor version
+numbers are returned to indicate the level of X Print Service Extension support.
+
+The X Print Service Extension is initialized on the first call to any X Print
+Service function; there is no need to explicitly initialize the X Print Service
+Extension.
diff --git a/man/XpRehashPrinterList.man b/man/XpRehashPrinterList.man
new file mode 100644
index 0000000..927f3d2
--- /dev/null
+++ b/man/XpRehashPrinterList.man
@@ -0,0 +1,71 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpRehashPrinterList 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpRehashPrinterList \- Recomputes the list of available printers.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpRehashPrinterList
+(
+.I display
+)
+.br
+ Display *\fIdisplay\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.SH DESCRIPTION
+.LP
+XpRehashPrinterList causes the X Print Server to recompute (update) its list of
+available printers, and update the attributes for the printers. The intended
+usage of this routine is in a special tool that a system administrator can run
+after changing the printer topology. General applications are encouraged to use
+this call sparingly if at all, and let the system administrator control printer
+topology updates.
+
+Depending on the print facilities underlying the X Print Server, the X Print
+Server may be able to detect changes in the printer topology and dynamically
+update to reflect the changes, or may not be able to detect the changes and will
+have to be notified via XpRehashPrinterList.
+Existing print contexts will not be affected by XpRehashPrinterList as long as
+their printer destination remains valid.
diff --git a/man/XpSelectInput.man b/man/XpSelectInput.man
new file mode 100644
index 0000000..c852b57
--- /dev/null
+++ b/man/XpSelectInput.man
@@ -0,0 +1,101 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpSelectInput 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpSelectInput \- Specifies which X Print events, from the specified print context,
+the client is interested in.
+.SH SYNOPSIS
+.B void XpSelectInput
+(
+.I display,
+.I context,
+.I event_mask
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPContext \fIcontext\fP\^;
+.br
+ unsigned long \fIevent_mask\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I context
+Specifies the print context from which to select events.
+.TP
+.I event_mask
+Specifies the
+.I event mask.
+This mask is the bitwise OR one or more of the valid events mask bits
+(see below).
+.SH DESCRIPTION
+.LP
+XpSelectInput selects which X Print events from the specified print context the
+client is interest in. The X Print Events are generated from a current print
+context, and not from a window as is the case with XSelectInput.
+.SH STRUCTURES
+The bits for event_mask are defined in <X11/extensions/Print.h>:
+
+.nf
+ #define XPNoEventMask 0
+ #define XPPrintMask (1L<<0)
+ #define XPAttributeMask (1L<<1)
+.LP
+.fi
+The resulting events are defined in <X11/extensions/Print.h>:
+
+.nf
+ #define XPPrintNotify 0
+ #define XPAttributeNotify 1
+.LP
+.fi
+.SH DIAGNOSTICS
+.TP 15
+.SM BadValue
+The value specified for
+.I event_mask
+is not valid.
+.TP 15
+.SM XPBadContext
+The specified print context is not valid.
+.SH FILES
+.PD 0
+.TP 20
+.B <X11/extensions/Print.h>
diff --git a/man/XpSetAttributes.man b/man/XpSetAttributes.man
new file mode 100644
index 0000000..b9bda9c
--- /dev/null
+++ b/man/XpSetAttributes.man
@@ -0,0 +1,171 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpSetAttributes 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpSetAttributes \- Sets or updates an attribute pool in the specified print
+context.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpSetAttributes
+(
+.I display,
+.I context,
+.I type,
+.I pool,
+.I replacement_rule
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPContext \fIcontext\fP\^;
+.br
+ XPAttributes \fItype\fP\^;
+.br
+ char *\fIpool\fP\^;
+.br
+ XPAttrReplacement \fIreplacement_rule\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I context
+The print context whose attribute pool is to be modified.
+.TP
+.I type
+Specifies the attribute pool.
+.TP
+.I pool
+An attribute pool represented as a resource string. Encoded in COMPOUND_TEXT.
+.TP
+.I replacement_rule
+Either XPAttrReplace orXPAttrMerge.
+.SH DESCRIPTION
+.LP
+XpSetAttributes accepts pool, a COMPOUND_TEXT resource string representing new
+name-value pairs for the attribute pool specified by type. The attribute pool
+is modified by the new name-value pairs according to replacement_rule. For
+XPAttrReplace, the existing attribute pool is discarded and replaced with
+pool. For XPAttrMerge, pool is merged into the existing attribute pool;
+pre-existing name-value pairs are replaced, and non-existing name-value pairs
+are added. The contents of pool is not affected by this call, and can be freed
+by the caller afterwards.
+
+When setting supported attribute names, the X Print Server and associated
+driver will validate the new values and ignore those that are invalid;
+previous values remain unchanged. When setting unsupported (that is, unknown)
+attribute names, no validation is done, and the name-value pairs will be set,
+even though they will not be used. When deleting (that is, failing to reset
+with XPAttrReplace) a supported attribute name, the X Print Server explicitly
+or implicitly resets the attribute to a default value.
+
+When setting certain supported attributes, the X Print Server may modify other
+associated attributes. For example, considering the XPPrinterAttr attribute
+document-formats-supported, setting the XPDocAttr attribute document-format
+may cause a number of other attributes to change.
+
+For attribute pools that are read-only (see "get only" in XPAttributes
+definition), attempting to use XpSetAttributes generates a BadMatch. For
+attribute pools that are writable, lists of the supported attributes can be
+found in the XPPrinterAttr pool.
+
+The lifetime of all attribute pools are bounded by the lifetime of the print
+context they are contained in. When set, all attribute values will be retained
+across all Xp operations, until changed by the user directly, the X Print
+Server directly, or changed because of a side effect when either the user or X
+Print Server changed another attribute value.
+
+Refer to a complete description of all print attributes, the precedence
+between print attributes, and the side effects of setting certain print
+attributes on other print attributes, etc.
+
+To monitor changes to the attribute pools, see XpSelectInput and the event
+XPAttributeNotify. Since a print context can be shared among clients, changes
+made by one client will be seen by all others, and if selected for, the event
+XPAttributeNotify will be sent to all clients referencing the print context
+when changes do occur. It is the responsibility of the clients sharing a print
+context to coordinate their operations.
+.SH STRUCTURES
+The values for the typedef XPAttributes in <X11/extensions/Print.h> are:
+.nf
+
+ #define XPJobAttr 1 /* get/set */
+ #define XPDocAttr 2 /* get/set */
+ #define XPPageAttr 3 /* get/set - subset of XPDocAttr */
+ #define XPPrinterAttr 4 /* get only (library) */
+ #define XPServerAttr 5 /* get only (library), no context needed */
+
+.fi
+The values for the typedef XPAttrReplacement in <X11/extensions/Print.h> are:
+.nf
+
+ #define XPAttrReplace 1
+ #define XPAttrMerge 2
+
+.fi
+.SH DIAGNOSTICS
+.TP 15
+.SM BadAlloc
+Insufficient memory.
+.TP 15
+.SM BadMatch
+The attribute pool specified by pool cannot be set.
+.TP 15
+.SM BadValue
+The value specified for type is not valid.
+.TP 15
+.SM XPBadContext
+The specified print context-id is not valid.
+.TP 15
+.SM XPBadSequence
+A request to set an attribute pool occurred at a time when the attribute pool
+could not be modified (for example, modifying XPJobAttr immediately after
+calling XpStartJob).
+.SH FILES
+.PD 0
+.TP 20
+<X11/extensions/Print.h>
+.SH "SEE ALSO"
+.BR XpSelectInput (3Xp),
+.BR XpStartJob (3Xp)
+
+
diff --git a/man/XpSetContext.man b/man/XpSetContext.man
new file mode 100644
index 0000000..088c556
--- /dev/null
+++ b/man/XpSetContext.man
@@ -0,0 +1,112 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpSetContext 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpSetContext \- Sets or unsets a print context with the specified display
+connection to the X Print Server.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpSetContext
+(
+.I display,
+.I print_context
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPContext \fIprint_context\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I print_context
+A pre-existing print context on the same X Server.
+.SH DESCRIPTION
+.LP
+XpSetContext sets the print context for a display connection. All subsequent
+print operations that do not explicitly take a print context-id (for example,
+XpStartJob) on display will use and act upon the print context set by this call,
+until the print context is unset or XpDestroyContext is called. The print
+context can be set and used on multiple jobs, if not destroyed.
+
+If
+.I print_context
+is None, XpSetContext will unset (disassociate) the print
+context previously associated with display. If there was no previously
+associated print context, no action is taken. The content of the formerly
+associated print context is not affected by this call, and other display
+connections may continue to use the print context.
+
+Since font capabilities can vary from printer to printer, XpSetContext may
+modify the list of available fonts (see XListFonts) on display, and the actual
+set of usable fonts (see XLoadFont). A unique combination of fonts may be
+available from within a given print context; a client should not assume that all
+the fonts available when no print context is set will be available when a print
+context is set.
+
+When a print context is set on a display connection, the default behavior of
+ListFonts and ListFontsWithInfo is to list all of the fonts normally associated
+with the X print server (i.e. fonts containing glyphs) as well as any internal
+printer fonts defined for the printer. The xp-listfonts-modes attribute is
+provided so that applications can control the behavior of ListFonts and
+ListFontsWithInfo and is typically used to show just internal printer fonts.
+Using only internal printer fonts is useful for performance reasons; the glyphs
+associated with the font are contained within the printer and do not have to be
+downloaded.
+
+If the value of xp-listfonts-modes includes xp-list-glyph-fonts, ListFonts and
+ListFontsWithInfo will include all of the fonts available to the server that
+have glyphs associated with them. If the value of xp-listfonts-modes includes
+xp-list-internal-printer-fonts, then ListFonts and ListFontsWithInfo will
+include all of the fonts defined as internal printer fonts.
+
+When the print context is unset or XpDestroyContext is called, the available
+fonts on display revert back to what they were previously.
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
+.SH "SEE ALSO"
+.BR XpDestroyContext (3Xp),
+.BR XpStartJob (3Xp)
+
diff --git a/man/XpSetImageResolution.man b/man/XpSetImageResolution.man
new file mode 100644
index 0000000..4f6af3a
--- /dev/null
+++ b/man/XpSetImageResolution.man
@@ -0,0 +1,96 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpSetImageResolution 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+
+.SH NAME
+XpSetImageResolution \- Sets the resolution for subsequent PutImage requests
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B Bool XpSetImageResolution
+(
+.I display,
+.I print_context,
+.I image_res,
+.I prev_res_return
+)
+.br
+ Display *\fI display \fP\^;
+.br
+ XPContext \fI print_context \fP\^;
+.br
+ int \fI image_res \fP\^;
+.br
+ int *\fI prev_res_return \fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I \- display
+Specifies a pointer to the Display structure.
+.TP
+.I \- print_context
+Specifies the print context on which to set the resolution.
+.TP
+.I \- image_res
+Specifies the image resolution in pixels per inch.
+.TP
+.I \- prev_res_return
+Returns the previous image resolution in pixels per inch.
+.SH DESCRIPTION
+.LP
+XpSetImageResolution returns True if the printer server allowed the resolution to be set, otherwise False is returned.
+
+XpSetImageResolution sets the resolution for subsequent PutImage requests to the screen of the specified print context. If the return value is False, then the print server does not support image scaling for the particular resolution given the current configuration of the printer, and the application is responsible for any desired scaling. If the return value is True, then the contents of any subsequent PutImage request to a Pixmap or to a Window on the screen of the specified print context will automatically be scaled as part of the PutImage request. The scale factor is:
+
+.nf
+ default_printer_resolution / image_res
+.fi
+
+Where default_printer_resolution is the current value of that page attribute. Only the image itself is scaled (meaning the effective width and height of the image change), the dst-x and dst-y parameters to PutImage are not altered.
+
+As a special case, a value of zero for image_res resets the resolution to automatically track the printer resolution; in this case (which is also the default setting for a newly created print context), subsequent images will not be scaled.
+
+If the return value is True and prev_res_return is a non-NULL pointer, then the previous image resolution that was set for the print context is stored in prev_res_return.
+
+XpSetImageResolution returns False immediately if image_res is negative or greater than 65535.
+.SH DIAGNOSTICS
+.TP 15
+.B XpBadContext
+A valid print context-id has not been set prior to making this call.
diff --git a/man/XpSetLocaleHinter.man b/man/XpSetLocaleHinter.man
new file mode 100644
index 0000000..73a5445
--- /dev/null
+++ b/man/XpSetLocaleHinter.man
@@ -0,0 +1,205 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpSetLocaleHinter 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpSetLocaleHinter \- Sets a "locale hinter" function and description of it.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpSetLocaleHinter
+(
+.I hinter_proc
+.I hinter_desc
+)
+.br
+ XPHinterProc \fIhinter_proc\fP\^;
+.br
+ char *\fIhinter_desc\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I hinter_proc
+A pointer to a "hinter proc".
+.TP
+.I hinter_desc
+A pointer to contextual information about the locale hinter proc.
+.SH DESCRIPTION
+.LP
+Since (to date) there is no single industry standard for locale values, locale
+information about the current client required by XpCreateContext,
+XpGetPrinterList
+and XpGetPdmStartParams is at best considered a "hint" when transmitted to the X
+Print Server and PDM. In single vendor environments, the locale hint should be
+consistent and understood. In multi-vendor environments however, the locale hint
+may or may not be understood. The caller locale will be used as the fallback
+default.
+
+XpSetLocaleHinter and XpGetLocaleHinter access hooks that are used to register
+more advanced hint generators. By default, Xp uses a hinter proc that calls
+setlocale on the CTYPE category on POSIX systems, and
+.I hinter_desc
+is NULL.
+
+XpSetLocaleHinter sets the
+.I hinter_proc
+and
+.I hinter_desc
+which will be subsequently used by the Xp calls requiring a locale hint (see
+above).
+.I hinter_proc
+is the function that will generate the locale hint (for example,
+"C"), and
+.I hinter_desc
+is a string, with or without the embeddable keyword %locale%, that provides a
+higher level context for the results of
+.I hinter_proc.
+
+If
+.I hinter_proc
+is set to NULL, then the default Xp hinter proc is installed.
+XpSetLocaleHinter makes its own private copy of
+.I hinter_desc
+prior to returning.
+
+An example set call might look as follows:
+
+.nf
+ XpSetLocaleHinter( my_hinter, "%locale%;CDElocale" );
+.fi
+
+Where my_hinter might look as follows:
+
+.nf
+ char *my_hinter()
+ {
+ /*
+ * Use setlocale() to retrieve the current locale.
+ */
+ return( my_x_strdup( setlocale(LC_CTYPE, (char *) NULL) ) );
+ }
+
+.fi
+
+
+When the client's locale is needed, if both
+.I hinter_desc
+and the results of
+.I hinter_proc
+are non-NULL, and the keyword %locale% is found in
+.I hinter_desc,
+then the keyword will be replaced with the result of
+.I hinter_proc.
+The resulting string will be used as the locale hint by the Xp calls.
+
+If both
+.I hinter_desc
+and the results of
+.I hinter_proc
+are non-NULL, but the keyword %locale% is not found in
+.I hinter_desc,
+then
+.I hinter_desc,
+as is, becomes the string used as the locale hint by the Xp calls.
+
+If one of
+.I hinter_desc
+or the results of
+.I hinter_proc
+is NULL, then the other non-NULL value becomes the string used as the locale
+hint by the Xp calls.
+
+If
+.I hinter_desc
+and the results of
+.I hinter_proc
+are NULL, then a NULL (i.e. (char *) NULL) locale hint is sent by the Xp calls.
+
+The syntax for
+.I hinter_desc
+is a variation of the unadopted X/Open standard for a "String Network
+Locale-Specification Syntax" (X/Open, Distributed Internationalization Services,
+Version 2, 1994 Snapshot). The Xp
+.I hinter_desc
+syntax is:
+
+.nf
+ name_spec[;registry_spec[;ver_spec[;encoding_spec]]]
+
+.fi
+
+In Xp, the first item is the locale name, followed by progressively more
+detailed information about the locale name, with each piece of information
+separated by a `;'.
+.SH STRUCTURES
+The signature for
+.I hinter_proc
+is defined in <X11/extensions/Print.h> as follows:
+
+.nf
+ typedef char * (*XPHinterProc)();
+
+.fi
+.I hinter_proc
+is expected to return a string that can be freed using XFree by the Xp calls
+themselves.
+
+Some examples include (
+.I hinter_desc
+to left, expanded results to the right):
+
+.nf
+ CFRENCH CFRENCH
+ %locale% C
+ %locale%;CDElocale C;CDElocale
+ %locale%;HP C;HP
+ %locale%;IBM C;IBM
+ %locale%;XOPEN;01_11;XFN-001001 de_DE;XOPEN;01_11;XFN-001001
+
+.fi
+.SH FILES
+.PD 0
+.TP 20
+<X11/extensions/Print.h>
+.SH "SEE ALSO"
+.BR XpCreateContext (3Xp),
+.BR XpGetLocaleHinter (3Xp),
+.BR XpGetPdmStartParams (3Xp),
+.BR XpGetPrinterList (3Xp),
+.BR XpSetLocaleHinter (3Xp)
diff --git a/man/XpStartDoc.man b/man/XpStartDoc.man
new file mode 100644
index 0000000..6e8e915
--- /dev/null
+++ b/man/XpStartDoc.man
@@ -0,0 +1,127 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpStartDoc 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpStartDoc \- Indicates the beginning of a print document.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpStartDoc
+(
+.I display,
+.I type
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPDocumentType \fItype\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I type
+Specifies the type of document. It can be either XPDocRaw or XPDocNormal.
+.SH DESCRIPTION
+.LP
+XpStartDoc signals the beginning of a new print document.
+
+If type is XPDocRaw, then the client will provide all the data for the resulting
+document using XpPutDocumentData; the X Print Server will not write any data
+into the resulting document. Calling XpStartPage in a XPDocRaw document will
+generate an XPBadSequence error. For more information, see XpPutDocumentData.
+
+If type is XPDocNormal, then the X Print Server will generate document data, and
+depending on the DDX driver, can incorporate additional data from
+XpPutDocumentData into the output. For more information, see XpPutDocumentData.
+
+
+All changes to the XPDocAttr attribute pool (see XpSetAttributes) must be made
+prior to calling XpStartDoc, after which an XPBadSequence will be generated if
+changes are attempted, until XpEndDoc is called.
+
+The application is not required to call XpStartDoc and XpEndDoc in the process
+of printing. The "document" delineation may not be useful from the application's
+or spooler's perspective, hence is optional. If XpStartPage is called
+immediately after XpStartJob then a synthetic XpStartDoc with XPDocNormal will
+be assumed by the X Print Server prior to XpStartPage (i.e. the XPStartDocNotify
+and XPStartPageNotify events will have the same sequence number). Likewise, if
+XpEndJob is called immediately after XpEndPage then a synthetic XpEndDoc will be
+assumed by the X Print Server prior to XpEndJob (i.e., the XPEndDocNotify and
+XPEndJobNotify events will have the same sequence number).
+
+For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify
+will be generated with its detail field set to XPStartDocNotify.
+.SH STRUCTURES
+The XPDocumentType values are defined in <X11/extensions/Print.h>:
+
+.nf
+
+ #define XPDocNormal 1 /* Doc data handled by Xserver*/
+ #define XPDocRaw 2 /* Doc data passed through Xserver*/
+
+.fi
+
+.SH DIAGNOSTICS
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
+.TP 15
+.SM XPBadSequence
+The function was not called in the proper order with respect to the other X
+Print Service
+Extension calls (example, XpEndDoc prior to XpStartDoc).
+.TP 15
+.SM BadValue
+The value specified for type is not valid.
+.SH FILES
+.PD 0
+.TP 20
+.B <X11/extensions/Print.h>
+.SH "SEE ALSO"
+.BR XpEndDoc (3Xp),
+.BR XpEndJob (3Xp),
+.BR XpEndPage (3Xp),
+.BR XpPutDocumentData (3Xp),
+.BR XpSelectInput (3Xp),
+.BR XpSetAttributes (3Xp),
+.BR XpStartJob (3Xp),
+.BR XpStartPage (3Xp)
diff --git a/man/XpStartJob.man b/man/XpStartJob.man
new file mode 100644
index 0000000..b90b9cc
--- /dev/null
+++ b/man/XpStartJob.man
@@ -0,0 +1,126 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpStartJob 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpStartJob \- Indicates the beginning of a single print job.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpStartJob
+(
+.I display,
+.I output_mode
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ XPSaveData \fIoutput_mode\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I output_mode
+Specifies how the printer output data is to be handled.
+.SH DESCRIPTION
+.LP
+XpStartJob signals the beginning of a new print job.
+
+If
+.I output_mode
+is XPSpool the X Print Server will automatically spool the
+printer output. If
+.I output_mode
+is XPGetData, then the X Print Server buffers the
+document output for retrieval by XpGetDocumentData. In this case, the print
+server suspends processing further requests on this print context until some
+other client sends XpGetDocumentData. Subsequent operations that use the print
+context may be suspended at any time pending the processing of XpGetDocumentData
+replies to read any buffered output.
+
+
+XpStartJob sets the job-owner job attribute (included in the XPJobAttr pool)
+immediately prior to issuing the PrintStartJob request. On POSIX systems, the
+job-owner attribute is set using getpwuid_r on the result of getuid. This
+attribute may be used by the X Print Server to identify the user to the spooler.
+
+All changes to the XPJobAttr attribute pool (see XpSetAttributes) must be made
+prior to calling XpStartJob, after which an XPBadSequence will be generated if
+changes are attempted, until XpEndJob is called.
+
+For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify
+will be generated with its detail field set to XPStartJobNotify when the X Print
+Server has completed the PrintStartJob request.
+
+Conceptually, a "Job" is a collection of "Documents", where each Document is in
+turn a collection of "Pages". Depending on the print facilities underlying the X
+Print Server, these delineations may be mapped by a DDX driver into real
+functionality (e.g. see the server attribute multiple-documents-supported).
+
+.SH STRUCTURES
+The XPSaveData values for output_mode are defined in <X11/extensions/Print.h>.
+:
+
+.nf
+
+ #define XPSpool 1 /* Job data sent to spooler */
+ #define XPGetData 2 /* Job data via XpGetDocumentData */
+
+.fi
+
+.SH DIAGNOSTICS
+.TP 15
+.SM BadValue
+The value specified for output_mode is not valid.
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
+.TP 15
+.SM XPBadSequence
+The function was not called in the proper order with respect to the other X
+Print Service
+Extension calls (example, XpEndDoc prior to XpStartDoc).
+.SH "SEE ALSO"
+.BR XpEndJob (3Xp),
+.BR XpGetDocumentData (3Xp),
+.BR XpSelectInput (3Xp),
+.BR XpSetAttributes (3Xp),
+.BR XpStartJob (3Xp)
diff --git a/man/XpStartPage.man b/man/XpStartPage.man
new file mode 100644
index 0000000..532e546
--- /dev/null
+++ b/man/XpStartPage.man
@@ -0,0 +1,111 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XpStartPage 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+XpStartPage \- Indicates the beginning of a print page.
+.SH SYNOPSIS
+.br
+ cc [ flag... ] file... -lXp [ library... ]
+.br
+ #include <X11/extensions/Print.h>
+.LP
+.B void XpStartPage
+(
+.I display,
+.I window
+)
+.br
+ Display *\fIdisplay\fP\^;
+.br
+ Window \fIwindow\fP\^;
+.if n .ti +5n
+.if t .ti +.5i
+.SH ARGUMENTS
+.TP
+.I display
+Specifies a pointer to the Display structure; returned from XOpenDisplay.
+.TP
+.I window
+Specifies the window ID.
+.SH DESCRIPTION
+.LP
+XpStartPage signals the beginning of a new print page, with window serving as
+the drawable representing the page.
+.I window
+is required to be a descendant of the root window of the current print context
+window, else a BadWindow is generated. No generation of document data will occur
+for rendering operations against window or its inferiors prior to XpStartPage.
+
+XpStartPage causes window to be mapped. See XpGetPageDimensions and
+XResizeWindow for details on resizing window to the size of the media selected
+prior to calling XpStartPage. Within the XpStartPage and XpEndPage sequence,
+attempts to resize, move or unmap window will yield undefined results. To resize
+or move inferiors of window the standard semantics of ConfigureWindow apply,
+except that the contents of any configured window may be discarded. An Expose
+event will be generated if a window's contents are discarded.
+
+All changes to the XPPageAttr attribute pool (see XpSetAttributes) must be made
+prior to calling XpStartPage, after which an XPBadSequence error will be
+generated if changes are attempted, until XpEndPage is called.
+
+For clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify
+will be generated with its detail field set to XPStartPageNotify when the
+.I X Print Server
+has completed XpStartPage. If the event Expose is also selected for (see
+XSelectInput), the exposure events will be generated prior to XPPrintNotify.
+
+The client need not wait for XPStartPageNotify prior to calling any other X
+rendering routines.
+
+.SH DIAGNOSTICS
+.TP 15
+.SM BadWindow
+The value specified for window is not valid.
+.TP 15
+.SM XPBadContext
+A valid print context-id has not been set prior to making this call.
+.TP 15
+.SM XPBadSequence
+The function was not called in the proper order with respect to the
+other X Print Service Extension calls; for example, XpStartPage was
+called before XpStartJob or was called for a type XPDocRaw document.
+.SH "SEE ALSO"
+.BR XpEndPage (3Xp),
+.BR XpGetPageDimensions (3Xp),
+.BR XpSelectInput (3Xp),
+.BR XpSetAttributes (3Xp)
+
+
diff --git a/man/libXp.man b/man/libXp.man
new file mode 100644
index 0000000..c886327
--- /dev/null
+++ b/man/libXp.man
@@ -0,0 +1,210 @@
+.\" $XdotOrg: $
+.\"
+.\" Copyright 1996 Hewlett-Packard Company
+.\" Copyright 1996 International Business Machines Corp.
+.\" Copyright 1996, 1999, 2004 Sun Microsystems, Inc.
+.\" Copyright 1996 Novell, Inc.
+.\" Copyright 1996 Digital Equipment Corp.
+.\" Copyright 1996 Fujitsu Limited
+.\" Copyright 1996 Hitachi, Ltd.
+.\" Copyright 1996 X Consortium, Inc.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute,
+.\" sublicense, and/or sell copies of the Software, and to permit persons
+.\" to whom the Software is furnished to do so, subject to the following
+.\" conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH libXp 3Xp __xorgversion__ "XPRINT FUNCTIONS"
+.SH NAME
+libXp \- X Print Client Library
+.SH SYNOPSIS
+.B cc
+[
+.B flag...
+]
+file...-lXp
+[
+.B library...
+]
+.BR
+.nf
+XCOMM\&include <X11/extensions/Print.h>
+.fi
+.SH DESCRIPTION
+.LP
+libXp provides public APIs to allow client applications to render to non-display devices.
+
+When an application wishes to print, it makes a display connection to the X print server and asks
+to see the list of
+printers available with an
+.I XpGetPrinterList()
+request. Once the application has selected a printer, it creates and sets a print context using
+.I XpCreateContext()
+and
+.I XpSetContext().
+
+The Print Context represents the embodiment of the printer selected. It is initialized by the
+Xprint server at
+.I XpCreateContext()
+time to contain a printer's default capabilities, as well as, the description of its overall
+capabilties, and to maintain
+the state of settings on the printer, the state of rendering against the printer, and the rendered
+output.
+
+The Print Context affects how the DDX driver generates its page description language (PDL) and how
+the PDL is submitted to
+a spooler. The print context may also affect fonts and other elements in the dix layer of the X
+Print Server. The print
+contexts can be shared among processes. Applications can enlist the help of secondary processes to
+manipulate print options
+in the Print context rather than taking on the task directly.
+
+Once an application has set options within the print context, it makes calls such as
+.I XpStartJob()
+to delineate jobs, documents, and pages within a sequence of normal X calls.
+
+A job is a collection of documents, where each document is in turn a collection of pages. When
+.I XpEndJob()
+is called, the resulting PDL is either sent to a print spooler or can be retrieved by the
+application itself.
+
+The developer basically has to make changes to the X application to make use of the X Print
+Service.
+.LP
+
+A simple X application supplemented with some of the libXp routines might look like this:
+
+
+.\" Note: C Comments and include statements in the sample code must use the
+.\" zero-width non-printing nroff entity \& to prevent the C pre-processor
+.\" from processing or stripping them out during the build
+
+.nf
+
+XCOMM\&include <X11/Xlib.h>
+XCOMM\&include <X11/extensions/Print.h>
+
+main()
+{
+ Display *pdpy;
+ Screen *pscreen;
+ Window pwin;
+ XPPrinterList plist;
+ XPContext pcontext;
+ int plistCnt;
+ char *attrPool;
+XCOMM\&define NPOOLTYPES 5
+ XPAttributes poolType[NPOOLTYPES] = {XPJobAttr,XPDocAttr,XPPageAttr,
+ XPPrinterAttr,XPServerAttr};
+ int i;
+ unsigned short width, height;
+ XRectangle rect;
+ char *printServerName = ":1";
+ char *mylaser = "varos";
+
+ /\&*
+ * connect to the X print server
+ *\&/
+ pdpy = XOpenDisplay( printServerName );
+
+ /\&*
+ * see if the printer "mylaser" is available
+ *\&/
+
+ plist = XpGetPrinterList (pdpy, mylaser, &plistCnt );
+
+ /\&*
+ * Initialize a print context representing "mylaser"
+ *\&/
+
+ pcontext = XpCreateContext( pdpy, plist[0].name );
+ XpFreePrinterList( plist );
+
+ /\&*
+ * Possibly modify attributes in the print context
+ *\&/
+ for(i=0;i < NPOOLTYPES;i++) {
+ if(attrPool = XpGetAttributes( pdpy, pcontext, poolType[i] )) {
+ /\&* twiddle attributes *\&/
+ /\&*
+ XpSetAttributes( pdpy, pcontext, poolType[i],
+ attrPool, XPAttrMerge );
+ *\&/
+ XFree(attrPool);
+ }
+ }
+
+
+ /\&*
+ * Set a print server, then start a print job against it
+ *\&/
+
+ XpSetContext( pdpy, pcontext );
+ XpStartJob( pdpy, XPSpool );
+
+ /\&*
+ * Generate the first page
+ *\&/
+
+ pscreen = XpGetScreenOfContext( pdpy, pcontext );
+ XpGetPageDimensions( pdpy, pcontext, &width, &height,
+ &rect);
+ pwin = XCreateSimpleWindow( pdpy, RootWindowOfScreen( pscreen ),
+ rect.x, rect.y, rect.width, rect.height, 2,
+ BlackPixelOfScreen( pscreen),
+ WhitePixelOfScreen( pscreen));
+
+ XpStartPage( pdpy, pwin );
+ /\&* usual rendering stuff..... *\&/
+ XpEndPage( pdpy );
+
+ XpStartPage( pdpy, pwin );
+ /\&* some more rendering..... *\&/
+ XpEndPage( pdpy );
+
+ /\&*
+ * End the print job - the final results are sent by the X print
+ * server to the spooler sub system.
+ *\&/
+
+ XpEndJob( pdpy );
+ XpDestroyContext( pdpy, pcontext );
+ XCloseDisplay( pdpy );
+}
+
+.fi
+.SH "SEE ALSO"
+.BR Xprt (1),
+.BR XpCreateContext (3Xp),
+.BR XpDestroyContext (3Xp),
+.BR XpEndJob (3Xp),
+.BR XpEndPage (3Xp),
+.BR XpFreePrinterList (3Xp),
+.BR XpGetAttributes (3Xp),
+.BR XpGetPageDimensions (3Xp),
+.BR XpGetPrinterList (3Xp),
+.BR XpSetAttributes (3Xp),
+.BR XpSetContext (3Xp),
+.BR XpStartJob (3Xp),
+.BR XpStartPage (3Xp)
+
+.I X Print Service Extension Library