Converters.h revision 6c321187
1/* $Xorg: Converters.h,v 1.5 2001/02/09 02:03:51 xorgcvs Exp $ */
2
3/*
4
5Copyright 1988, 1998  The Open Group
6
7Permission to use, copy, modify, distribute, and sell this software and its
8documentation for any purpose is hereby granted without fee, provided that
9the above copyright notice appear in all copies and that both that
10copyright notice and this permission notice appear in supporting
11documentation.
12
13The above copyright notice and this permission notice shall be included in
14all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
19OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23Except as contained in this notice, the name of The Open Group shall not be
24used in advertising or otherwise to promote the sale, use or other dealings
25in this Software without prior written authorization from The Open Group.
26
27*/
28
29/* $XFree86: xc/lib/Xmu/Converters.h,v 1.5 2001/01/17 19:42:53 dawes Exp $ */
30
31/*
32 * The interfaces described by this header file are for miscellaneous utilities
33 * and are not part of the Xlib standard.
34 */
35
36#ifndef _XMU_STRCONVERT_H_
37#define _XMU_STRCONVERT_H_
38
39#include <X11/Intrinsic.h>
40#include <X11/Xfuncproto.h>
41
42_XFUNCPROTOBEGIN
43
44void XmuCvtFunctionToCallback
45(
46 XrmValue		*args,
47 Cardinal		*num_args,
48 XrmValuePtr		fromVal,
49 XrmValuePtr		toVal
50 );
51
52#define XtNbackingStore "backingStore"
53#define XtCBackingStore "BackingStore"
54#define XtRBackingStore "BackingStore"
55#define XtEnotUseful "notUseful"
56#define XtEwhenMapped "whenMapped"
57#define XtEalways "always"
58#define XtEdefault "default"
59void XmuCvtStringToBackingStore
60(
61 XrmValue		*args,
62 Cardinal		*num_args,
63 XrmValuePtr		fromVal,
64 XrmValuePtr		toVal
65 );
66
67Boolean XmuCvtBackingStoreToString
68(
69 Display		*dpy,
70 XrmValue		*args,
71 Cardinal		*num_args,
72 XrmValuePtr		fromVal,
73 XrmValuePtr		toVal,
74 XtPointer		*converter_data
75 );
76
77void XmuCvtStringToCursor
78(
79 XrmValue		*args,
80 Cardinal		*num_args,
81 XrmValuePtr		fromVal,
82 XrmValuePtr		toVal
83 );
84
85#define XtRColorCursor "ColorCursor"
86#define XtNpointerColor "pointerColor"
87#define XtNpointerColorBackground "pointerColorBackground"
88Boolean XmuCvtStringToColorCursor
89(
90 Display		*dpy,
91 XrmValue		*args,
92 Cardinal		*num_args,
93 XrmValuePtr		fromVal,
94 XrmValuePtr		toVal,
95 XtPointer		*converter_data
96 );
97
98typedef int XtGravity;
99
100#ifndef XtRGravity
101#define XtRGravity "Gravity"
102#endif
103#define XtEForget "forget"
104#define XtENorthWest "northwest"
105#define XtENorth "north"
106#define XtENorthEast "northeast"
107#define XtEWest "west"
108#define XtECenter "center"
109#define XtEEast "east"
110#define XtESouthWest "southwest"
111#define XtESouth "south"
112#define XtESouthEast "southeast"
113#define XtEStatic "static"
114#define XtEUnmap "unmap"
115void XmuCvtStringToGravity
116(
117 XrmValue		*args,
118 Cardinal		*num_args,
119 XrmValuePtr		fromVal,
120 XrmValuePtr		toVal
121 );
122
123Boolean XmuCvtGravityToString
124(
125 Display		*dpy,
126 XrmValue		*args,
127 Cardinal		*num_args,
128 XrmValuePtr		fromVal,
129 XrmValuePtr		toVal,
130 XtPointer		*converter_data
131 );
132
133typedef enum {
134    XtJustifyLeft,       /* justify text to left side of button   */
135    XtJustifyCenter,     /* justify text in center of button      */
136    XtJustifyRight       /* justify text to right side of button  */
137} XtJustify;
138#ifndef XtRJustify
139#define XtRJustify "Justify"
140#endif
141#define XtEleft "left"
142#define XtEcenter "center"
143#define XtEright "right"
144#define XtEtop "top"
145#define XtEbottom "bottom"
146void XmuCvtStringToJustify
147(
148 XrmValue		*args,
149 Cardinal		*num_args,
150 XrmValuePtr		fromVal,
151 XrmValuePtr		toVal
152 );
153
154Boolean XmuCvtJustifyToString
155(
156 Display		*dpy,
157 XrmValue		*args,
158 Cardinal		*num_args,
159 XrmValuePtr		fromVal,
160 XrmValuePtr		toVal,
161 XtPointer		*converter_data
162 );
163
164#define XtRLong "Long"
165void XmuCvtStringToLong
166(
167 XrmValue		*args,
168 Cardinal		*num_args,
169 XrmValuePtr		fromVal,
170 XrmValuePtr		toVal
171 );
172Boolean XmuCvtLongToString
173(
174 Display		*dpy,
175 XrmValue		*args,
176 Cardinal		*num_args,
177 XrmValuePtr		fromVal,
178 XrmValuePtr		toVal,
179 XtPointer		*converter_data
180 );
181
182typedef enum {
183  XtorientHorizontal,
184  XtorientVertical
185} XtOrientation;
186void XmuCvtStringToOrientation
187(
188 XrmValue		*args,
189 Cardinal		*num_args,
190 XrmValuePtr		fromVal,
191 XrmValuePtr		toVal
192 );
193
194Boolean XmuCvtOrientationToString
195(
196 Display		*dpy,
197 XrmValue		*args,
198 Cardinal		*num_args,
199 XrmValuePtr		fromVal,
200 XrmValuePtr		toVal,
201 XtPointer		*converter_data
202 );
203
204void XmuCvtStringToBitmap
205(
206 XrmValue		*args,
207 Cardinal		*num_args,
208 XrmValuePtr		fromVal,
209 XrmValuePtr		toVal
210 );
211
212#define XtRShapeStyle "ShapeStyle"
213#define XtERectangle "Rectangle"
214#define XtEOval "Oval"
215#define XtEEllipse "Ellipse"
216#define XtERoundedRectangle "RoundedRectangle"
217
218#define XmuShapeRectangle 1
219#define XmuShapeOval 2
220#define XmuShapeEllipse 3
221#define XmuShapeRoundedRectangle 4
222
223Boolean XmuCvtStringToShapeStyle
224(
225 Display		*dpy,
226 XrmValue		*args,
227 Cardinal		*num_args,
228 XrmValuePtr		fromVal,
229 XrmValuePtr		toVal,
230 XtPointer		*converter_data
231 );
232
233Boolean XmuCvtShapeStyleToString
234(
235 Display		*dpy,
236 XrmValue		*args,
237 Cardinal		*num_args,
238 XrmValuePtr		fromVal,
239 XrmValuePtr		toVal,
240 XtPointer		*converter_data
241 );
242
243Boolean XmuReshapeWidget
244(
245 Widget			w,
246 int			shape_style,
247 int			corner_width,
248 int			corner_height
249 );
250
251void XmuCvtStringToWidget
252(
253 XrmValue		*args,
254 Cardinal		*num_args,
255 XrmValuePtr		fromVal,
256 XrmValuePtr		toVal
257 );
258
259Boolean XmuNewCvtStringToWidget
260(
261 Display		*display,
262 XrmValue		*args,
263 Cardinal		*num_args,
264 XrmValue		*fromVal,
265 XrmValue		*toVal,
266 XtPointer		*converter_data
267 );
268
269Boolean XmuCvtWidgetToString
270(
271 Display		*dpy,
272 XrmValue		*args,
273 Cardinal		*num_args,
274 XrmValue		*fromVal,
275 XrmValue		*toVal,
276 XtPointer		*converter_data
277 );
278
279_XFUNCPROTOEND
280
281#endif /* _XMU_STRCONVERT_H_ */
282