background image
Functional specification
41
CDE/Motif PST
CDEnext
2.16.1
Long Description
NAME
XpGetOneAttribute - get a single print attribute from the specified print context.
SYNOPSIS
#include <X11/extensions/Print.h>
char *XpGetOneAttribute (
Display
*display
,
XPContext
context,
XPAttributes
type
,
char
*attribute_name
)
ARGUMENTS
display
Specifies a pointer to the
Display
structure; returned from
XOpenDisplay
.
context
The print context from which the attribute value is being retrieved.
type
Type of pool from which the attribute will be retrieved.
attribute_name
Name of attribute to be returned.
RETURN VALUE
A COMPOUND_TEXT string
attribute_value
, else
NULL
if any errors occured.
DESCRIPTION
XpGetOneAttribute
is a variation of
XpGetAttributes
to get a single attribute value from an
attribute pool. Unlike the protocol used with
XpGetAttributes
, in which the reply contains an entire
attribute pool, the protocol for
XpGetOneAttribute
has a reply with just one
attribute_value
.
When retrieving
attribute_value
(for example, from the name-value pair
"copy-count: 3"
),
attribute_name
should not include a colon (for example,
"copy-count"
), and the caller is
expected to free the
attribute_value
returned (for example,
"3"
) using
XFree(3)
.
XpSetAttributes
can be used with the
XPAttrMerge
flag to set a single attribute.
ERRORS/WARNINGS
These functions can generate of one of the following errors:
XPBadContext
The specified print context id is not valid.
BadValue
The value specified for
type
is not valid.
BadAlloc
Insufficient memory.