1 .\" Copyright (c) 1993, 1994 X Consortium
3 .\" Permission is hereby granted, free of charge, to any person obtaining a
4 .\" copy of this software and associated documentation files (the "Software"),
5 .\" to deal in the Software without restriction, including without limitation
6 .\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 .\" and/or sell copies of the Software, and to permit persons to whom the
8 .\" Software furnished to do so, subject to the following conditions:
10 .\" The above copyright notice and this permission notice shall be included in
11 .\" all copies or substantial portions of the Software.
13 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 .\" THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17 .\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
18 .\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 .\" Except as contained in this notice, the name of the X Consortium shall not
22 .\" be used in advertising or otherwise to promote the sale, use or other
23 .\" dealing in this Software without prior written authorization from the
27 .ds xT X Toolkit Intrinsics \- C Language Interface
29 .ds xW X Toolkit Athena Widgets \- C Language Interface
30 .ds xL Xlib \- C Language X Interface
31 .ds xC Inter-Client Communication Conventions Manual
34 .hw XtConvert-And-Store XtCall-Converter wid-get
41 .\".if \\n(VS>=40 .vs \\n(VSu
42 .\".if \\n(VS<=39 .vs \\n(VSp
53 .de IN \" send an index entry to the stderr
56 .ie t \\$1\fB\^\\$2\^\fR\\$3
57 .el \\$1\fI\^\\$2\^\fP\\$3
60 .ie t \fB\^\\$1\^\fR\\$2
61 .el \fI\^\\$1\^\fP\\$2
64 .TH XtConvertAndStore __libmansuffix__ __xorgversion__ "XT FUNCTIONS"
66 XtConvertAndStore, XtCallConverter \- invoke resource converters
69 Boolean XtConvertAndStore(Widget \fIwidget\fP, String \fIfrom_type\fP,
70 XrmValuePtr \fIfrom\fP, String \fIto_type\fP, XrmValuePtr \fIto_in_out\fP);
72 Boolean XtCallConverter(Display* \fIdpy\fP, XtConverter \fIconverter\fP,
73 XrmValuePtr \fIargs\fP, Cardinal \fInum_args\fP, XrmValuePtr \fIfrom\fP,
74 XrmValuePtr \fIto_in_out\fP, XtCacheRef* \fIcache_ref_return\fP);
77 Specifies the argument list that contains the additional arguments needed
78 to perform the conversion, or NULL.
79 .IP \fIconverter\fP 1i
80 Specifies the conversion procedure that is to be called.
82 Specifies the value to be converted.
83 .IP \fIfrom_type\fP 1i
84 Specifies the source type.
86 Specifies the number of additional arguments (often zero).
88 Specifies the destination type.
89 .IP \fIto_in_out\fP 1i
90 Returns the converted value.
92 Specifies the widget to use for additional arguments, if any are needed,
93 and the destroy callback list.
95 Specifies the display with which the conversion is to be associated.
99 function looks up the type converter registered to convert from_type
100 to to_type, computes any additional arguments needed, and then calls
101 .ZN XtCallConverter .
104 if an old-style converter was registered with
107 .ZN XtAppAddConverter .
108 ) with the from and to_in_out arguments.
112 function looks up the specified type converter in the application
113 context associated with the display and, if the converter was not
114 registered or was registered with cache type
118 looks in the conversion cache to see if this conversion procedure
119 has been called with the specified conversion arguments. If so, it
120 checks the success status of the prior call, and if the conversion
125 immediately; otherwise it checks the size specified in the \fIto\fP
126 argument and, if it is greater than or equal to the size stored in the
127 cache, copies the information stored in the cache into the location
128 specified by \fIto->addr\fP, stores the cache size into \fIto->size\fP,
131 If the size specified in the \fIto\fP argument is smaller than the size
134 copies the cache size into the \fIto->size\fP and returns
136 If the converter was registered with cache type
138 or no value was found in the conversion cache,
140 calls the converter and, if it was not registered with cache type
142 enters the result into the cache.
144 then returns what the converter returned.
146 The \fIcache_ref_return\fP field specifies storage allocated by the
147 caller in which an opaque value will be stored. If the type converter
148 has been registered with the
150 modifier and if the value returned in in \fIcache_ref_return\fP is
151 non-NULL, then the call should store the \fIcache_ref_return\fP value
152 in order to decrement the reference count when the converted value
153 is no longer required. The \fIcache_ref_return\fP argument should be
154 NULL if the caller is unwilling or unable to store the value.
156 XtAppReleaseCacheRefs(__libmansuffix__)