X Version 11
Release 6.4
X Print Service Extension Library
25
Use
XpQueryScreens to query an X Server to determine which of all the screens on the server support the X
Print Service Extension.
Screen **XpQueryScreens (display, list_count_return)
Display *display;
int *list_count_return;
display
Specifies a pointer to the Display structure; returned from XOpenDisplay.
list_count_return Returns the number of screens in the list.
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 sup-
porting video displays on some screens and printers on others.
The list of screen pointers can be freed by calling
XFree.
2.2.12 Getting PDM Parameters
Use
XpGetPdmStartParams as a standard convenience function to build up parameters in accordance with the
PDM Selection Protocol
Status XpGetPdmStartParams (print_display, print_window, print_context, video_display, video_window,
selection_display_return, selection_return, type_return, format_return,
data_return, nelements_return)
Display *print_display;
Window print_window;
XPContext print_context;
Display *video_display;
Window video_window;
Display **selection_display_return;
Atom *selection_return;
Atom *type_return;
int *format_return;
unsigned char **data_return;
int *nelements_return;
print_display
Specifies a pointer to the print Display structure; returned from XOpenDisplay
on the X Print Server.
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.
print_context
An existing print context that the PDM should reference.
video_display
Specifies a pointer to the video Display structure; returned from
XOpenDisplay
on the Video X-Server.
video_window
Specifies the window on video_display near which the transient dialogs from
the PDM should be posted.
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.
selection_return
Returns the selection atom for which a PDM selection should be made.
type_return
Returns the type for the PDM Selection Protocol property the caller is expected
to create.