


XtConvert(3Xt)						       XtConvert(3Xt)
X11R5									X11R5



NAME
  XtConvert, XtDirectConvert - invoke resource converters

SYNTAX
  void XtConvert(_w, _f_r_o_m__t_y_p_e, _f_r_o_m, _t_o__t_y_p_e, _t_o__r_e_t_u_r_n)
      Widget _w;
      String _f_r_o_m__t_y_p_e;
      XrmValuePtr _f_r_o_m;
      String _t_o__t_y_p_e;
      XrmValuePtr _t_o__r_e_t_u_r_n;

  void XtDirectConvert(_c_o_n_v_e_r_t_e_r, _a_r_g_s,	_n_u_m__a_r_g_s, _f_r_o_m,	_t_o__r_e_t_u_r_n)
      XtConverter _c_o_n_v_e_r_t_e_r;
      XrmValuePtr _a_r_g_s;
      Cardinal _n_u_m__a_r_g_s;
      XrmValuePtr _f_r_o_m;
      XrmValuePtr _t_o__r_e_t_u_r_n;

ARGUMENTS

  _a_r_g_s	    Specifies the argument list	that contains the additional argu-
	    ments needed to perform the	conversion (often NULL).

  _c_o_n_v_e_r_t_e_r Specifies the conversion procedure that is to be called.

  _f_r_o_m	    Specifies the value	to be converted.

  _f_r_o_m__t_y_p_e Specifies the source type.

  _n_u_m__a_r_g_s  Specifies the number of additional arguments (often	zero).

  _t_o__t_y_p_e   Specifies the destination type.

  _t_o__r_e_t_u_r_n Returns the	converted value.

  _w	    Specifies the widget to use	for additional arguments (if any are
	    needed).

DESCRIPTION
  The _X_t_C_o_n_v_e_r_t	function looks up the type converter registered	to convert
  from_type to to_type,	computes any additional	arguments needed, and then
  calls	_X_t_D_i_r_e_c_t_C_o_n_v_e_r_t.

  The _X_t_D_i_r_e_c_t_C_o_n_v_e_r_t 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 information stored in the	cache; otherwise, it
  calls	the converter and enters the result in the cache.

  Before calling the specified converter, _X_t_D_i_r_e_c_t_C_o_n_v_e_r_t sets the return
  value	size to	zero and the return value address to NULL.  To determine if
  the conversion was successful, the client should check to_return.address
  for non-NULL.

SEE ALSO
  XtAppAddConverter(3Xt), XtStringConversionWarning(3Xt)
  _X _T_o_o_l_k_i_t _I_n_t_r_i_n_s_i_c_s - _C _L_a_n_g_u_a_g_e _I_n_t_e_r_f_a_c_e
  _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e	delim off

