1XtConvertAndStore(3)             XT FUNCTIONS             XtConvertAndStore(3)
2
3
4

NAME

6       XtConvertAndStore, XtCallConverter - invoke resource converters
7

SYNTAX

9       Boolean XtConvertAndStore(Widget widget, String from_type, XrmValuePtr
10              from, String to_type, XrmValuePtr to_in_out);
11
12       Boolean XtCallConverter(Display* dpy, XtConverter converter, XrmVal‐
13              uePtr args, Cardinal num_args, XrmValuePtr from, XrmValuePtr
14              to_in_out, XtCacheRef* cache_ref_return);
15

ARGUMENTS

17       args      Specifies the argument list that contains the additional
18                 arguments needed to perform the conversion, or NULL.
19
20       converter Specifies the conversion procedure that is to be called.
21
22       from      Specifies the value to be converted.
23
24       from_type Specifies the source type.
25
26       num_args  Specifies the number of additional arguments (often zero).
27
28       to_type   Specifies the destination type.
29
30       to_in_out Returns the converted value.
31
32       widget    Specifies the widget to use for additional arguments, if any
33                 are needed, and the destroy callback list.
34
35       dpy       Specifies the display with which the conversion is to be
36                 associated.
37

DESCRIPTION

39       The XtConvertAndStore function looks up the type converter registered
40       to convert from_type to to_type, computes any additional arguments
41       needed, and then calls XtCallConverter.  (or XtDirectConvert if an old-
42       style converter was registered with XtAddConverter or XtAppAddCon‐
43       verter.  ) with the from and to_in_out arguments.
44
45       The XtCallConverter function looks up the specified type converter in
46       the application context associated with the display and, if the con‐
47       verter was not registered or was registered with cache type XtCacheAll
48       or XtCacheByDisplay looks in the conversion cache to see if this con‐
49       version procedure has been called with the specified conversion argu‐
50       ments. If so, it checks the success status of the prior call, and if
51       the conversion failed, XtCallConverter returns False immediately; oth‐
52       erwise it checks the size specified in the to argument and, if it is
53       greater than or equal to the size stored in the cache, copies the
54       information stored in the cache into the location specified by
55       to->addr, stores the cache size into to->size, and returns True.  If
56       the size specified in the to argument is smaller than the size stored
57       in the cache, XtCallConverter copies the cache size into the to->size
58       and returns False.  If the converter was registered with cache type
59       XtCacheNone or no value was found in the conversion cache, XtCall‐
60       Converter calls the converter and, if it was not registered with cache
61       type XtCacheNone, enters the result into the cache.  XtCallConverter
62       then returns what the converter returned.
63
64       The cache_ref_return field specifies storage allocated by the caller in
65       which an opaque value will be stored. If the type converter has been
66       registered with the XtCacheRefCount modifier and if the value returned
67       in in cache_ref_return is non-NULL, then the call should store the
68       cache_ref_return value in order to decrement the reference count when
69       the converted value is no longer required. The cache_ref_return argu‐
70       ment should be NULL if the caller is unwilling or unable to store the
71       value.
72

SEE ALSO

74       XtAppReleaseCacheRefs(3)
75       X Toolkit Intrinsics - C Language Interface
76       Xlib - C Language X Interface
77
78
79
80X Version 11                      libXt 1.1.5             XtConvertAndStore(3)
Impressum