xref: /386bsd/usr/X386/include/X11/Xmu/Converters.h (revision a2142627)
1 /* $XConsortium: Converters.h,v 1.14 91/07/22 23:51:43 converse Exp $
2  *
3  * Copyright 1988 by the Massachusetts Institute of Technology
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation for any purpose and without fee is hereby granted, provided
7  * that the above copyright notice appear in all copies and that both that
8  * copyright notice and this permission notice appear in supporting
9  * documentation, and that the name of M.I.T. not be used in advertising
10  * or publicity pertaining to distribution of the software without specific,
11  * written prior permission. M.I.T. makes no representations about the
12  * suitability of this software for any purpose.  It is provided "as is"
13  * without express or implied warranty.
14  *
15  * The X Window System is a Trademark of MIT.
16  *
17  * The interfaces described by this header file are for miscellaneous utilities
18  * and are not part of the Xlib standard.
19  */
20 
21 #ifndef _XMU_STRCONVERT_H_
22 #define _XMU_STRCONVERT_H_
23 
24 #include <X11/Xfuncproto.h>
25 
26 _XFUNCPROTOBEGIN
27 
28 /*
29  * Converters - insert in alphabetical order
30  */
31 
32 /******************************************************************************
33  * XmuCvtFunctionToCallback
34  */
35 extern void XmuCvtFunctionToCallback(
36 #if NeedFunctionPrototypes
37     XrmValue*		/* args */,
38     Cardinal*		/* num_args */,
39     XrmValuePtr		/* fromVal */,
40     XrmValuePtr		/* toVal */
41 #endif
42 );
43 
44 
45 /******************************************************************************
46  * XmuCvtStringToBackingStore
47  */
48 #define XtNbackingStore "backingStore"
49 #define XtCBackingStore "BackingStore"
50 #define XtRBackingStore "BackingStore"
51 #define XtEnotUseful "notUseful"
52 #define XtEwhenMapped "whenMapped"
53 #define XtEalways "always"
54 #define XtEdefault "default"
55 extern void XmuCvtStringToBackingStore(
56 #if NeedFunctionPrototypes
57     XrmValue*		/* args */,
58     Cardinal*		/* num_args */,
59     XrmValuePtr		/* fromVal */,
60     XrmValuePtr		/* toVal */
61 #endif
62 );
63 
64 
65 /******************************************************************************
66  * XmuCvtStringToCursor
67  */
68 extern void XmuCvtStringToCursor(
69 #if NeedFunctionPrototypes
70     XrmValue*		/* args */,
71     Cardinal*		/* num_args */,
72     XrmValuePtr		/* fromVal */,
73     XrmValuePtr		/* toVal */
74 #endif
75 );
76 extern Boolean XmuCvtStringToColorCursor(
77 #if NeedFunctionPrototypes
78     Display*		/* dpy */,
79     XrmValue*		/* args */,
80     Cardinal*		/* num_args */,
81     XrmValuePtr		/* fromVal */,
82     XrmValuePtr		/* toVal */,
83     XtPointer*		/* converter_data */
84 #endif
85 );
86 
87 #define XtRColorCursor "ColorCursor"
88 #define XtNpointerColor "pointerColor"
89 #define XtNpointerColorBackground "pointerColorBackground"
90 
91 
92 /******************************************************************************
93  * XmuCvtStringToGravity
94  */
95 typedef int XtGravity;
96 
97 #define XtRGravity "Gravity"
98 #define XtEForget "forget"
99 #define XtENorthWest "northwest"
100 #define XtENorth "north"
101 #define XtENorthEast "northeast"
102 #define XtEWest "west"
103 #define XtECenter "center"
104 #define XtEEast "east"
105 #define XtESouthWest "southwest"
106 #define XtESouth "south"
107 #define XtESouthEast "southeast"
108 #define XtEStatic "static"
109 #define XtEUnmap "unmap"
110 
111 extern void XmuCvtStringToGravity (
112 #if NeedFunctionPrototypes
113     XrmValue*		/* args */,
114     Cardinal*		/* num_args */,
115     XrmValuePtr		/* fromVal */,
116     XrmValuePtr		/* toVal */
117 #endif
118 );
119 
120 
121 /******************************************************************************
122  * XmuCvtStringToJustify
123  */
124 typedef enum {
125     XtJustifyLeft,       /* justify text to left side of button   */
126     XtJustifyCenter,     /* justify text in center of button      */
127     XtJustifyRight       /* justify text to right side of button  */
128 } XtJustify;
129 #define XtEleft "left"
130 #define XtEcenter "center"
131 #define XtEright "right"
132 #define XtEtop "top"
133 #define XtEbottom "bottom"
134 
135 extern void XmuCvtStringToJustify(
136 #if NeedFunctionPrototypes
137     XrmValue*		/* args */,
138     Cardinal*		/* num_args */,
139     XrmValuePtr		/* fromVal */,
140     XrmValuePtr		/* toVal */
141 #endif
142 );
143 
144 
145 /******************************************************************************
146  * XmuCvtStringToLong
147  */
148 #define XtRLong "Long"
149 extern void XmuCvtStringToLong(
150 #if NeedFunctionPrototypes
151     XrmValue*		/* args */,
152     Cardinal*		/* num_args */,
153     XrmValuePtr		/* fromVal */,
154     XrmValuePtr		/* toVal */
155 #endif
156 );
157 
158 
159 /******************************************************************************
160  * XmuCvtStringToOrientation
161  */
162 typedef enum {XtorientHorizontal, XtorientVertical} XtOrientation;
163 extern void XmuCvtStringToOrientation(
164 #if NeedFunctionPrototypes
165     XrmValue*		/* args */,
166     Cardinal*		/* num_args */,
167     XrmValuePtr		/* fromVal */,
168     XrmValuePtr		/* toVal */
169 #endif
170 );
171 
172 
173 /******************************************************************************
174  * XmuCvtStringToBitmap
175  */
176 extern void XmuCvtStringToBitmap(
177 #if NeedFunctionPrototypes
178     XrmValue*		/* args */,
179     Cardinal*		/* num_args */,
180     XrmValuePtr		/* fromVal */,
181     XrmValuePtr		/* toVal */
182 #endif
183 );
184 
185 
186 /******************************************************************************
187  * XmuCvtStringToShapeStyle; is XtTypeConverter (i.e. new style)
188  * no conversion arguments, not particularly useful to cache the results.
189  */
190 
191 #define XtRShapeStyle "ShapeStyle"
192 #define XtERectangle "Rectangle"
193 #define XtEOval "Oval"
194 #define XtEEllipse "Ellipse"
195 #define XtERoundedRectangle "RoundedRectangle"
196 
197 #define XmuShapeRectangle 1
198 #define XmuShapeOval 2
199 #define XmuShapeEllipse 3
200 #define XmuShapeRoundedRectangle 4
201 
202 extern Boolean XmuCvtStringToShapeStyle(
203 #if NeedFunctionPrototypes
204     Display*		/* dpy */,
205     XrmValue*		/* args */,
206     Cardinal*		/* num_args */,
207     XrmValuePtr		/* fromVal */,
208     XrmValuePtr		/* toVal */,
209     XtPointer*		/* converter_data */
210 #endif
211 );
212 
213 extern Boolean XmuReshapeWidget(
214 #if NeedFunctionPrototypes
215     Widget	/* w */,
216     int		/* shape_style */,
217     int		/* corner_width */,
218     int		/* corner_height */
219 #endif
220 );
221 
222 /******************************************************************************
223  * XmuCvtStringToWidget
224  */
225 extern void XmuCvtStringToWidget(
226 #if NeedFunctionPrototypes
227     XrmValue*		/* args */,
228     Cardinal*		/* num_args */,
229     XrmValuePtr		/* fromVal */,
230     XrmValuePtr		/* toVal */
231 #endif
232 );
233 
234 /******************************************************************************
235  * XmuNewCvtStringToWidget
236  */
237 extern Boolean XmuNewCvtStringToWidget(
238 #if NeedFunctionPrototypes
239     Display*            /* display */,
240     XrmValue*		/* args */,
241     Cardinal*		/* num_args */,
242     XrmValue*		/* fromVal */,
243     XrmValue*		/* toVal */,
244     XtPointer*          /* converter_data */
245 #endif
246 );
247 
248 _XFUNCPROTOEND
249 
250 #endif /* _XMU_STRCONVERT_H_ */
251