Functional specification
21
CDE/Motif PST
CDEnext
ARGUMENTS
display
Specifies a pointer to the
Display
structure; returned from
XOpenDisplay
.
print_context
A pre-existing print context on the same X-Server.
RETURN VALUE
None.
DESCRIPTION
XpSetContext
sets (i.e. associates) a print context previously created and initialized by
XpCreateContext
with 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 subsequent jobs if not destroyed.
XpSetContext
, if given
None
for
print_context
, 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 (for example, PCL vs Postscript),
XpSetContext
may modify the list of available fonts (see
XListFonts
) on
display
, and the actual set of usable fonts
(for example, see
XLoadFont
). A unique mix of true X fonts (see
fs(1)
), soft printer fonts
masquerading as X fonts, and built-in printer fonts masquerading as X fonts may be available from within
a given print context; a client should not assume all fonts available outside a print context will be available
from within a print context. In other words, after calling
XpSetContext
, the global font path (see
XGetFontPath
) shows all "potential" sources of fonts,
XListFonts
shows all valid font names, but
only
XLoadFont
will determine for sure if a specific instance of a font can be used.
Depending on the Print X-Server implementation, additional attributes may be available to help control
which fonts can and can not be seen when a print context is set. For example, it may be desirable to show
only the higher-performance built-in fonts when a print context is set, and ignore fonts that would have to
be downloaded into the printer prior to printing.
When the print context is unset or
XpDestroyContext
is called, the font capabilities on
display
revert back to what they were previously.
See
XpCreateContext
for more details.
ERRORS/WARNINGS
This function can generate one of the following errors:
XPBadContext
The specified print context id is not valid.
SEE ALSO
XpCreateContext, XpDestroyContext