XtAddConverter() XtAddConverter()
Name
XtAddConverter - register an "old-style" resource converter.
Synopsis
void XtAddConverter(from_type, to_type, converter, convert_args, num_args)
String from_type;
String to_type;
XtConverter converter;
XtConvertArgList convert_args;
Cardinal num_args;
Inputs
from_type Specifies the resource name of the datatype that the converter converts from.
to_type Specifies the resource name of the datatype that the converter converts to.
converter Specifies the converter procedure. See XtConverter(2).
convert_args
Specifies how to obtain any additional arguments needed for the conversion.
num_args Specifies the number elements in convert_args.
Availability
Superseded by XtAppAddConverter().
Description
XtAddConverter() registers converter as a procedure to convert data of resource type from_type to resource type to_type. The convert_args
array is registered with the converter, and will be used to obtain arguments to pass to the converter each time it is invoked.
Usage
XtAddConverter() has been superseded by XtAppAddConverter(), which allows the registration of converter functions on a per-application con-
text basis. XtAddConverter() now calls XtAppAddConverter() passing the default application context created by XtInitialize(). Very few
programs need multiple application contexts, and you can continue to use XtAddConverter() if you initialize your application with XtIni-
tialize(). We recommend, however, that you use XtAppInitialize(), XtAppAddConverter(), and the other XtApp*() application context specific
functions.
See XtAppAddConverter() for more information about converters and the XtConvertArgList data type.
XtAddConverter() and XtAppAddConverter() register "old-style" converters which are still in common use, but are not as flexible as the
(incompatible) "new-style" converters added in Release 4. If you must register an existing old-style converter, use XtAppAddConverter(),
but if you are writing a converter of your own, consider using a new-style converter. See XtAppSetTypeConverter().
See Also
XtAppAddConverter(1), XtAppSetTypeConverter(1), XtSetTypeConverter(1),
XtConverter(2), XtTypeConverter(2).
Xt - Resource Management XtAddConverter()