NAME
XtConvert − 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
objectSpecifies the object to use for additional arguments (if any are needed); may be of class Object or any subclass thereof.
from_typeSpecifies the source type.
fromSpecifies the value to be converted.
to_typeSpecifies the destination type.
Outputs
to_returnReturns the address and the size of the converted value.
AVAILABILITY
Superseded by XtConvertAndStore().
DESCRIPTION
XtConvert() 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 ALSO
XtConvertAndStoreUNIX SYSTEM V/68.