26
December 15, 1997
X Print Service Extension Library
26
X Print Service Extension Library
Release 6.4
X Version 11
format_return
Returns the format for the PDM Selection Protocol property the caller is
expected to create.
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.
nelements_return
Returns the number of elements for the PDM Selection Protocol property the
caller is expected to create.
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 Proto-
col". Once the information is constructed, the caller is responsible for the creation of a property, the genera-
tion of a
SelectionRequest, the receipt of a SelectionNotify event, and the recept 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 other _return val-
ues are undefined.
Setting the environment variable XPDMSELECTION causes
XpGetPdmStartParams to use an alternate selec-
tion name. If not set, the selection name
PDM_MANAGER is used.
Setting the environment variable XPDMDISPLAY causes
XpGetPdmStartParams to locate the selection on an
alternate X Server. If not set, selection_display_return is set equal to print_display. If XPDMDISPLAY is set
to one of the keywords
"print" or "video", selection_display_return is set to print_display or video_display,
respectively. If XPDMDISPLAY is set to a valid
DISPLAY-style string, selection_display_return may be set,
as appropriate, to one of print_display, 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 selection_display_return using XCloseDisplay.
When
XpGetPdmStartParams is called, the caller's locale (see XpSetLocaleHinter) is included in the informa-
tion 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
XpGetPdmStart-
Params is called.
2.2.13 Setting and Getting Locale Hinters
Use
XpSetLocaleHinter to set a "locale hinter" function and description of it.
void XpSetLocaleHinter (hinter_proc, hinter_desc)
XPHinterProc hinter_proc;
char *hinter_desc;
hinter_proc
A pointer to a "hinter proc".
hinter_desc
A pointer to contextual information about the locale hinter proc.
Since (to date) there is no single industry standard for locale values, locale information about the current cli-
ent 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 under-
stood. The caller locale will be used as the fallback default.