XtConvert()XtConvert()NameXtConvert - convert resource type.
Synopsis
void XtConvert(object, from_type, from, to_type, to_return)
Widget object;
String from_type;
XrmValuePtr from;
String to_type;
XrmValuePtr to_return;
Inputs
object Specifies the object to use for additional arguments (if any
are needed); may be of class Object or any subclass thereof.
from_type Specifies the source type.
from Specifies the value to be converted.
to_type Specifies the destination type.
Outputs
to_return Returns the address and the size of the converted value.
Availability
Superseded by XtConvertAndStore().
DescriptionXtConvert() looks up the appropriate resource converter registered to
convert from_type to to_type, computes any additional arguments
required by that converter (see XtSetTypeConverter() for an explanation
of how these arguments are computed) and then calls XtDirectConvert()
or XtCallConverter() depending on whether the converter procedure is an
"old-style" or a "new-style" converter.
If the conversion is successful, to_return->addr will be non-NULL. The
data at this address must be copied immediately by the caller, because
it may be in static storage owned by the type converter procedure.
Usage
As of Release 4, XtConvert() is superseded by the more general function
XtConvertAndStore().
You do not often need, in applications or widgets, to convert between
resource types directly. Generally you can rely on the Intrinsics
resource management code to perform all necessary conversions for you.
When writing a resource converter, however, you may find that you need
to invoke another converter.
Structures
typedef struct {
unsigned int size;
XPointer addr;
} XrmValue, *XrmValuePtr;
See AlsoXtConvertAndStore(1).
Xt - Resource Management XtConvert()