Revert "dtudcfonted, dtudcexch: delete from repository"
[oweals/cde.git] / cde / programs / dtudcfonted / libfal / _fallcPublic.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* XlcPublic.h 1.3 - Fujitsu source for CDEnext    95/12/07 10:53:08    */
24 /* $XConsortium: _fallcPublic.h /main/1 1996/04/08 15:18:31 cde-fuj $ */
25 /*
26  * Copyright 1992, 1993 by TOSHIBA Corp.
27  *
28  * Permission to use, copy, modify, and distribute this software and its
29  * documentation for any purpose and without fee is hereby granted, provided
30  * that the above copyright notice appear in all copies and that both that
31  * copyright notice and this permission notice appear in supporting
32  * documentation, and that the name of TOSHIBA not be used in advertising
33  * or publicity pertaining to distribution of the software without specific,
34  * written prior permission. TOSHIBA make no representations about the
35  * suitability of this software for any purpose.  It is provided "as is"
36  * without express or implied warranty.
37  *
38  * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40  * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44  * SOFTWARE.
45  *
46  * Author: Katsuhisa Yano       TOSHIBA Corp.
47  *                              mopi@osa.ilab.toshiba.co.jp
48  */
49 /*
50  * Copyright 1995 by FUJITSU LIMITED
51  * This is source code modified by FUJITSU LIMITED under the Joint
52  * Development Agreement for the CDEnext PST.
53  * This is unpublished proprietry source code of FUJITSU LIMITED
54  *
55  * Modifier: Takanori Tateno   FUJITSU LIMITED
56  *
57  */
58
59 #ifndef _XLCPUBLIC_H_
60 #define _XLCPUBLIC_H_
61
62 #include "_fallcint.h"
63
64 #define XlcNCharSize            "charSize"
65 #define XlcNCodeset             "codeset"
66 #define XlcNControlSequence     "controlSequence"
67 #define XlcNDefaultString       "defaultString"
68 #define XlcNEncodingName        "encodingName"
69 #define XlcNLanguage            "language"
70 #define XlcNMbCurMax            "mbCurMax"
71 #define XlcNName                "name"
72 #define XlcNSetSize             "setSize"
73 #define XlcNSide                "side"
74 #define XlcNStateDependentEncoding "stateDependentEncoding"
75 #define XlcNTerritory           "territory"
76
77 typedef enum {
78     XlcUnknown, XlcC0, XlcGL, XlcC1, XlcGR, XlcGLGR, XlcOther, XlcNONE
79 } XlcSide;
80
81 typedef struct _FonScope {
82         unsigned long   start;
83         unsigned long   end;
84         unsigned long   shift;
85         unsigned long   shift_direction;
86 } FontScopeRec, *FontScope;
87
88 typedef struct _UDCArea {
89         unsigned long   start,end;
90 } UDCAreaRec, *UDCArea;
91
92 typedef struct _XlcCharSetRec *XlcCharSet;
93
94 typedef char* (*XlcGetCSValuesProc)(
95 #if NeedFunctionPrototypes
96     XlcCharSet          /* charset */,
97     XlcArgList          /* args */,
98     int                 /* num_args */
99 #endif
100 );
101
102 typedef struct _XlcCharSetRec {
103     char                *name;          /* character set name */
104     XrmQuark            xrm_name;
105     char                *encoding_name; /* XLFD encoding name */
106     XrmQuark            xrm_encoding_name;
107     XlcSide             side;           /* GL, GR or others */
108     int                 char_size;      /* number of bytes per character */
109     int                 set_size;       /* graphic character sets */
110     char                *ct_sequence;   /* control sequence of CT */
111     XlcGetCSValuesProc  get_values;
112     /* UDC */
113     Bool                string_encoding;
114     UDCArea             udc_area;
115     int                 udc_area_num;
116 } XlcCharSetRec;
117
118 /*
119  * conversion methods
120  */
121
122 typedef struct _XlcConvRec *XlcConv;
123
124 typedef XlcConv (*XlcOpenConverterProc)(
125 #if NeedFunctionPrototypes
126     XLCd                /* from_lcd */,
127     char*               /* from_type */,
128     XLCd                /* to_lcd */,
129     char*               /* to_type */
130 #endif
131 );
132
133 typedef void (*XlcCloseConverterProc)(
134 #if NeedFunctionPrototypes
135     XlcConv             /* conv */
136 #endif
137 );
138
139 typedef int (*XlcConvertProc)(
140 #if NeedFunctionPrototypes
141     XlcConv             /* conv */,
142     XPointer*           /* from */,
143     int*                /* from_left */,
144     XPointer*           /* to */,
145     int*                /* to_left */,
146     XPointer*           /* args */,
147     int                 /* num_args */
148 #endif
149 );
150
151 typedef void (*XlcResetConverterProc)(
152 #if NeedFunctionPrototypes
153     XlcConv             /* conv */
154 #endif
155 );
156
157 typedef struct _XlcConvMethodsRec{
158     XlcCloseConverterProc       close;
159     XlcConvertProc              convert;
160     XlcResetConverterProc       reset;
161 } XlcConvMethodsRec, *XlcConvMethods;
162
163 /*
164  * conversion data
165  */
166
167 #define XlcNMultiByte           "multiByte"
168 #define XlcNWideChar            "wideChar"
169 #define XlcNCompoundText        "compoundText"
170 #define XlcNString              "string"
171 #define XlcNCharSet             "charSet"
172 #define XlcNCTCharSet           "CTcharSet"
173 #define XlcNChar                "char"
174
175 typedef struct _XlcConvRec {
176     XlcConvMethods              methods;
177     XPointer                    state;
178 } XlcConvRec;
179
180
181 _XFUNCPROTOBEGIN
182
183 extern Bool _falInitOM(
184 #if NeedFunctionPrototypes
185     XLCd                /* lcd */
186 #endif
187 );
188
189 extern Bool _XInitIM(
190 #if NeedFunctionPrototypes
191     XLCd                /* lcd */
192 #endif
193 );
194
195 extern char *_falGetLCValues(
196 #if NeedVarargsPrototypes
197     XLCd                /* lcd */,
198     ...
199 #endif
200 );
201
202 extern XlcCharSet _fallcGetCharSet(
203 #if NeedFunctionPrototypes
204     char*               /* name */
205 #endif
206 );
207
208 extern Bool _fallcAddCharSet(
209 #if NeedFunctionPrototypes
210     XlcCharSet          /* charset */
211 #endif
212 );
213
214 extern char *_fallcGetCSValues(
215 #if NeedVarargsPrototypes
216     XlcCharSet          /* charset */,
217     ...
218 #endif
219 );
220
221 extern XlcConv _fallcOpenConverter(
222 #if NeedFunctionPrototypes
223     XLCd                /* from_lcd */,
224     char*               /* from_type */,
225     XLCd                /* to_lcd */,
226     char*               /* to_type */
227 #endif
228 );
229
230 extern void _fallcCloseConverter(
231 #if NeedFunctionPrototypes
232     XlcConv             /* conv */
233 #endif
234 );
235
236 extern int _fallcConvert(
237 #if NeedFunctionPrototypes
238     XlcConv             /* conv */,
239     XPointer*           /* from */,
240     int*                /* from_left */,
241     XPointer*           /* to */,
242     int*                /* to_left */,
243     XPointer*           /* args */,
244     int                 /* num_args */
245 #endif
246 );
247
248 extern void _fallcResetConverter(
249 #if NeedFunctionPrototypes
250     XlcConv             /* conv */
251 #endif
252 );
253
254 extern Bool _fallcSetConverter(
255 #if NeedFunctionPrototypes
256     XLCd                        /* from_lcd */,
257     char*                       /* from_type */,
258     XLCd                        /* to_lcd */,
259     char*                       /* to_type */,
260     XlcOpenConverterProc        /* open_converter */
261 #endif
262 );
263
264 extern void _fallcGetResource(
265 #if NeedFunctionPrototypes
266     XLCd                /* lcd */,
267     char*               /* category */,
268     char*               /* class */,
269     char***             /* value */,
270     int*                /* count */
271 #endif
272 );
273
274 extern char *_fallcFileName(
275 #if NeedFunctionPrototypes
276     XLCd                /* lcd */,
277     char*               /* category */
278 #endif
279 );
280
281 extern int _falwcslen(
282 #if NeedFunctionPrototypes
283     wchar_t*            /* wstr */
284 #endif
285 );
286
287 extern wchar_t *_falwcscpy(
288 #if NeedFunctionPrototypes
289     wchar_t*            /* wstr1 */,
290     wchar_t*            /* wstr2 */
291 #endif
292 );
293
294 extern int _fallcCompareISOLatin1(
295 #if NeedFunctionPrototypes
296     char*               /* str1 */,
297     char*               /* str2 */
298 #endif
299 );
300
301 extern int _fallcNCompareISOLatin1(
302 #if NeedFunctionPrototypes
303     char*               /* str1 */,
304     char*               /* str2 */,
305     int                 /* len */
306 #endif
307 );
308
309 _XFUNCPROTOEND
310
311 #endif  /* _XLCPUBLIC_H_ */