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