table of contents
| XpSetAttributes(3Xp) | XPRINT FUNCTIONS | XpSetAttributes(3Xp) |
NAME¶
XpSetAttributes - Sets or updates an attribute pool in the specified print context.SYNOPSIS¶
cc [ flag... ] file... -lXp [ library... ]
#include <X11/extensions/Print.h> void XpSetAttributes ( display, context, type, pool, replacement_rule )
Display * display;
XPContext context;
XPAttributes type;
char * pool;
XPAttrReplacement replacement_rule;
ARGUMENTS¶
- display
- Specifies a pointer to the Display structure; returned from XOpenDisplay.
- context
- The print context whose attribute pool is to be modified.
- type
- Specifies the attribute pool.
- pool
- An attribute pool represented as a resource string. Encoded in COMPOUND_TEXT.
- replacement_rule
- Either XPAttrReplace orXPAttrMerge.
DESCRIPTION¶
XpSetAttributes accepts pool, a COMPOUND_TEXT resource string representing new name-value pairs for the attribute pool specified by type. The attribute pool is modified by the new name-value pairs according to replacement_rule. For XPAttrReplace, the existing attribute pool is discarded and replaced with pool. For XPAttrMerge, pool is merged into the existing attribute pool; pre-existing name-value pairs are replaced, and non-existing name-value pairs are added. The contents of pool is not affected by this call, and can be freed by the caller afterwards.STRUCTURES¶
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 values for the typedef XPAttrReplacement in <X11/extensions/Print.h>
are:
#define XPAttrReplace 1
#define XPAttrMerge 2
DIAGNOSTICS¶
- BadAlloc
- Insufficient memory.
- BadMatch
- The attribute pool specified by pool cannot be set.
- BadValue
- The value specified for type is not valid.
- XPBadContext
- The specified print context-id is not valid.
- XPBadSequence
- A request to set an attribute pool occurred at a time when the attribute pool could not be modified (for example, modifying XPJobAttr immediately after calling XpStartJob).
FILES¶
- <X11/extensions/Print.h>
SEE ALSO¶
XpSelectInput(3Xp), XpStartJob(3Xp)| libXp 1.0.0 | X Version 11 |