Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xtsettypeconverter(1) [hpux man page]

XtSetTypeConverter()													      XtSetTypeConverter()

Name
  XtSetTypeConverter - register a "new-style" type converter for all application contexts in a process.

Synopsis
  void XtSetTypeConverter(from_type, to_type, converter, convert_args, num_args, cache_type, destructor)
	   String from_type, to_type;
	   XtTypeConverter converter;
	   XtConvertArgList convert_args;
	   Cardinal num_args;
	   XtCacheType cache_type;
	   XtDestructor destructor;

Inputs
  from_type Specifies the source type.

  to_type   Specifies the destination type.

  converter Specifies the resource type converter procedure.

  convert_args
	    Specifies additional conversion arguments, or NULL.

  num_args  Specifies the count of additional conversion arguments, or zero.

  cache_type
	    Specifies whether or not resources produced by this converter are sharable or display-specific and when they should be freed.

  destructor
	    Specifies  a  destroy procedure for resources produced by this conversion, or NULL if no additional action is required to deallo-
	    cate resources produced by converter.

Description
  XtSetTypeConverter() registers converter in all application contexts as a "new-style" resource converter to convert data of  resource  type
  from_type  to  resource  type to_type.  The convert_args array describes a list of additional arguments that will be computed and passed to
  the converter when it is invoked.  cache_type specifies how converted values should be cached, and destructor optionally specifies a proce-
  dure to be called to free up resources when a cached value is no longer needed.

  XtSetTypeConverter()	is  identical  to XtAppSetTypeConverter() except that it registers the converter in all current application contexts,
  and all future application contexts.	(In particular, note that XtAppSetTypeConverter() does not supersede XtSetTypeConverter() as  is  the
  case with many other XtApp functions.)  For more information about the arguments and usage of this function, see XtAppSetTypeConverter().

Structures
  The XtConvertArgRec structure is defined as follows:

     typedef enum {
	  /* address mode     parameter representation */
	     XtAddress,       /* address */
	     XtBaseOffset,    /* offset */
	     XtImmediate,     /* constant */
	     XtResourceString,/* resource name string */
	     XtResourceQuark, /* resource name quark */
	     XtWidgetBaseOffset,/* offset */
	     XtProcedureArg   /* procedure to call */
     } XtAddressMode;

     typedef struct {
	  XtAddressMode address_mode;
	  XtPointer address_id;
	  Cardinal size;
     } XtConvertArgRec, *XtConvertArgList;

  The XtCacheType and its legal values are defined as follows:

     typedef int XtCacheType;

     #define		     XtCacheNone       0x001
     #define		     XtCacheAll        0x002
     #define		     XtCacheByDisplay  0x003
     #define		     XtCacheRefCount   0x100

  See XtAppSetTypeConverter() for an explanation of each of the fields and values of these types.

See Also
  XtAppSetTypeConverter(1), XtCallConverter(1), XtConvertAndStore(1),
  XtDestructor(2), XtTypeConverter(2).

Xt - Resource Management												      XtSetTypeConverter()

Check Out this Related Man Page

XtAppSetTypeConverter(3Xt)												XtAppSetTypeConverter(3Xt)

NAME
XtAppSetTypeConverter, XtSetTypeConverter - register resource converter SYNOPSIS
void XtAppSetTypeConverter(app_context, from_type, to_type, converter, convert_args, num_args, cache_type, destructor) XtAppContext app_context; String from_type; String to_type; XtConverter converter; XtConvertArgList convert_args; Cardinal num_args; XtCacheType cache_type; XtDestructor destructor; void XtSetTypeConverter(from_type, to_type, converter, convert_args, num_args, cache_type, destructor) String from_type; String to_type; XtConverter converter; XtConvertArgList convert_args; Cardinal num_args; XtCacheType cache_type; XtDestructor destructor; ARGUMENTS
Specifies the application context. Specifies the type converter procedure. Specifies how to compute the additional arguments to the con- verter or NULL. Specifies the source type. Specifies the number of additional arguments to the converter or zero. Specifies the destina- tion type. Specifies whether or not resources produced by this converter are sharable or display-specific and when they should be freed. Specifies a destroy procedure for resources produced by this conversion, or NULL if no additional action is required to deallocate resources produced by the converter. DESCRIPTION
XtSetTypeConverter registers the specified type converter and destructor in all application contexts created by the calling process, including any future application contexts that may be created. XtAppSetTypeConverter registers the specified type converter in the single application context specified. If the same from_type and to_type are specified in multiple calls to either function, the most recent over- rides the previous ones. SEE ALSO
X Toolkit Intrinsics -- C Language Interface Xlib -- C Language X Interface XtAppSetTypeConverter(3Xt)
Man Page