XtConvert(3Xt) XtConvert(3Xt)NAME XtConvert, XtDirectConvert - invoke resource converters SYNOPSIS void XtConvert(w, from-type, from, to-type, to-return) Widget w; String from-type; XrmValuePtr from; String to-type; XrmValuePtr to-return; void XtDirectConvert(converter, args, num-args, from, to- return) XtConverter converter; XrmValuePtr args; Cardinal num-args; XrmValuePtr from; XrmValuePtr to-return; DESCRIPTION The XtConvert function looks up the type converter re- gistered to convert from-type to to-type, computes any addi- tional arguments needed, and then calls XtDirectConvert. The XtDirectConvert function looks in the converter cache to see if this conversion procedure has been called with the specified arguments. If so, it returns a descriptor for in- formation stored in the cache; otherwise, it calls the con- verter and enters the result in the cache. Before calling the specified converter, XtDirectConvert sets the return value size to 0 and the return value address to NULL. To determine if the conversion was successful, the client should check to-return.address for a non-null value. Arguments These functions accept the following arguments: args Specifies the argument list that contains the addi- tional arguments needed to perform the conversion (often NULL). converter Specifies the conversion procedure that is to be called. from Specifies the value to be converted. from-type Specifies the source type. num-args November, 1990 1
XtConvert(3Xt) XtConvert(3Xt)Specifies the number of additional arguments (often 0). to-type Specifies the destination type. to-return Returns the converted value. w Specifies the widget to use for additional arguments (if any are needed). SEE ALSO XtAppAddConverter(3Xt), XtStringConversionWarning(3Xt)X Toolkit Intrinsics - C Language InterfaceXlib - C Language Interface 2 November, 1990