4
December 15, 1997
X Print Service Overview
4
X Print Service Overview
Release 6.4
X Version 11
Figure 0-2. Developer's/Integrator's View
A simple X application supplemented with some of the libXp routines might look like this:
/*
* 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
*/
attrPool =
XpGetAttributes( pdpy, pcontext, poolType );
/* twiddle attributes */
XpSetAttributes( pdpy, pcontext, poolType, attrPool, XPAttrMerge );
X Video Server
X Print Server
X Application
Dt Print Dialog Manager
Application
Display Window
Application
Print Window
Coordinated
Print Setup
GUIs
Printer Spooler Subsystem
A
B
E
C
D