20
December 15, 1997
X Print Service Extension Library
20
X Print Service Extension Library
Release 6.4
X Version 11
BadValue
The value specified for event_mask is not valid.
Use
XpInputSelected to query which X Print events the client has selected to receive from the specific print
context.
unsigned long XpInputSelected (display, context, all_event_mask_return)
Display *display;
XPContext context;
unsigned long *all_event_mask_return;
display
Specifies a pointer to the Display structure; returned from XOpenDisplay.
context
Specifies the print context to which the query is being made.
all_event_mask_return
Returns the set of events any client has selected.
This request returns a bit mask describing which event classes the client has selected to receive. The value
returned to all_event_mask_return is the union of every client's event mask.
XpInputSelected queries which X Print events from the specified print context the client has selected to
receive. The X Print Events are generated from a print context, and not from a window as is the case with
XSelectInput. As events arrive, the context field in the event can be used to determine which print context gen-
erated the event.
See
XpSelectInput for the event_mask and all_event_mask values.
XpInputSelected can generate an XPBadContext error.
2.2.9 Getting and Setting Attributes
Use
XpGetAttributes to get an attribute pool from the specified print context.
char *XpGetAttributes (display, context, type)
Display *display;
XPContext context;
XPAttributes type;
display
Specifies a pointer to the Display structure; returned from XOpenDisplay.
context
The print context from which the attribute pool is to be retrieved.
type
Specifies the attribute pool.
XpGetAttributes returns pool, a COMPOUND_TEXT resource string representing the attribute pool specified
by type. The caller is expected to free pool when it is no longer needed using XFree.
The values for the typedef
XPAttributes in <X11/extensions/Print.h> are:
#define XPJobAttr
1
/* get/set */
#define XPDocAttr
2
/* get/set */
#define XPPageAttr
3
/* get/set - subset of XPDocAttr */
#define XPPrinterAttr
4
/* get only (library) */
#define XPServerAttr
5
/* get only (library), no context needed */
The attribute pool (hence the resource string) consists of many name-value pairs (for example,
`copy-count:
3'). The syntax of an attribute pool is the same as an X resource file (see "Resource File Syntax" in the Xlib
specification).
Valid characters for each name (left hand side) are derived from the Posix Portable Filename Character Set
(PPFCS), which is
"a"-"z" and "A"-"Z" and "0"-"9" and "_" and "-". Valid characters for each value (right hand
side) are all characters except
NULL and unescaped NEWLINE, though all predefined values in the X Print Ser-