X Version 11
Release 6.4
X Print Service Extension Library
19
Use
XpCancelPage to cancel a print page.
void XpCancelPage (display, discard)
Display *display;
Bool discard;
display
Specifies a pointer to the Display structure; returned from XOpenDisplay.
discard
When
TRUE, specifies that XPPrintNotify events with a detail of XPEndPageNotify should be
discarded.
XpCancelPage cancels an in-progress 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 will be 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 discard is
True all XPPrintNotify events with a detail field of XPEndPageNotify are discarded before XpCan-
celPage returns.
For clients selecting
XPPrintMask (see XpSelectInput), the event XPPrintNotify will be generated with its detail
field set to
XPEndPageNotify when the X Print Server has completed XpCancelPage.
XpCancelPage can generate an XPBadSequence error.
2.2.8 Selecting Input
Use
XpSelectInput to select which X Print events from the specified print context the client is interested in.
void XpSelectInput (display, context, event_mask)
Display *display;
XPContext context;
unsigned long event_mask;
display
Specifies a pointer to the Display structure; returned from XOpenDisplay.
context
The print context from which to select events.
event_mask
Specifies the event mask. This mask is the bitwise OR one or more of the valid events
mask bits (see below).
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
XSelectIn-
put.
The bits for event_mask are defined in <X11/extensions/Print.h>:
#define XPNoEventMask
0
#define XPPrintMask
(1L<<0)
#define XPAttributeMask
(1L<<1)
The resulting events are defined in <X11/extensions/Print.h>:
#define XPPrintNotify
0
#define XPAttributeNotify
1
XpSelectInput can generate one of the following errors:
XPBadContext
The specified print context is not valid.