Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / programs / dtudcfonted / libfal / _fallcPubI.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 librararies 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 /* XlcPubI.h 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:05      */ 
24 /* $XConsortium: _fallcPubI.h /main/1 1996/04/08 15:17:59 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 #ifndef _XLCPUBLICI_H_
51 #define _XLCPUBLICI_H_
52
53 #include "_fallcPublic.h"
54
55 #define XLC_PUBLIC(lcd, x)      (((XLCdPublic) lcd->core)->pub.x)
56 #define XLC_PUBLIC_PART(lcd)    (&(((XLCdPublic) lcd->core)->pub))
57 #define XLC_PUBLIC_METHODS(lcd) (&(((XLCdPublicMethods) lcd->methods)->pub))
58
59 /*
60  * XLCd public methods
61  */
62
63 typedef struct _XLCdPublicMethodsRec *XLCdPublicMethods;
64
65 typedef XLCd (*XlcPubCreateProc)(
66 #if NeedFunctionPrototypes
67     char*               /* name */,
68     XLCdMethods         /* methods */
69 #endif
70 );
71
72 typedef Bool (*XlcPubInitializeProc)(
73 #if NeedFunctionPrototypes
74     XLCd                /* lcd */
75 #endif
76 );
77
78 typedef void (*XlcPubDestroyProc)(
79 #if NeedFunctionPrototypes
80     XLCd                /* lcd */
81 #endif
82 );
83
84 typedef char* (*XlcPubGetValuesProc)(
85 #if NeedFunctionPrototypes
86     XLCd                /* lcd */,
87     XlcArgList          /* args */,
88     int                 /* num_args */
89 #endif
90 );
91
92 typedef void (*XlcPubGetResourceProc)(
93 #if NeedFunctionPrototypes
94     XLCd                /* lcd */,
95     char*               /* category */,
96     char*               /* class */,
97     char***             /* value */,
98     int*                /* count */
99 #endif
100 );
101
102 typedef struct _XLCdPublicMethodsPart {
103     XLCdPublicMethods superclass;
104     XlcPubCreateProc create;
105     XlcPubInitializeProc initialize;
106     XlcPubDestroyProc destroy;
107     XlcPubGetValuesProc get_values;
108     XlcPubGetResourceProc get_resource;
109 } XLCdPublicMethodsPart;
110
111 typedef struct _XLCdPublicMethodsRec {
112     XLCdMethodsRec core;
113     XLCdPublicMethodsPart pub;
114 } XLCdPublicMethodsRec;
115
116 /*
117  * XLCd public data
118  */
119
120 typedef struct _XLCdPublicPart {
121     char *siname;                       /* for _fallcMapOSLocaleName() */
122     char *language;                     /* language part of locale name */
123     char *territory;                    /* territory part of locale name */
124     char *codeset;                      /* codeset part of locale name */
125     char *encoding_name;                /* encoding name */
126     int mb_cur_max;                     /* ANSI C MB_CUR_MAX */
127     Bool is_state_depend;               /* state-depend encoding */
128     char *default_string;               /* for falDefaultString() */
129     XPointer xlocale_db;
130 } XLCdPublicPart;
131
132 typedef struct _XLCdPublicRec {
133     XLCdCoreRec core;   
134     XLCdPublicPart pub;
135 } XLCdPublicRec, *XLCdPublic;
136
137 extern XLCdMethods _fallcPublicMethods;
138
139 _XFUNCPROTOBEGIN
140
141 extern XLCd _fallcCreateLC(
142 #if NeedFunctionPrototypes
143     char*               /* name */,
144     XLCdMethods         /* methods */
145 #endif
146 );
147
148 extern void _fallcDestroyLC(
149 #if NeedFunctionPrototypes
150     XLCd                /* lcd */
151 #endif
152 );
153
154 extern Bool _fallcParseCharSet(
155 #if NeedFunctionPrototypes
156     XlcCharSet          /* charset */
157 #endif
158 );
159
160 extern XlcCharSet _fallcCreateDefaultCharSet(
161 #if NeedFunctionPrototypes
162     char*               /* name */,
163     char*               /* control_sequence */
164 #endif
165 );
166
167 extern XlcCharSet _fallcAddCT(
168 #if NeedFunctionPrototypes
169     char*               /* name */,
170     char*               /* control_sequence */
171 #endif
172 );
173
174 extern XrmMethods _falrmDefaultInitParseInfo(
175 #if NeedFunctionPrototypes
176     XLCd                /* lcd */,
177     XPointer*           /* state */
178 #endif
179 );
180
181 extern int _falmbTextPropertyToTextList(
182 #if NeedFunctionPrototypes
183     XLCd                /* lcd */,
184     Display*            /* dpy */,
185     XTextProperty*      /* text_prop */,
186     char***             /* list_ret */,
187     int*                /* count_ret */
188 #endif
189 );
190
191 extern int _falwcTextPropertyToTextList(
192 #if NeedFunctionPrototypes
193     XLCd                /* lcd */,
194     Display*            /* dpy */,
195     XTextProperty*      /* text_prop */,
196     wchar_t***          /* list_ret */,
197     int*                /* count_ret */
198 #endif
199 );
200
201 extern int _falmbTextListToTextProperty(
202 #if NeedFunctionPrototypes
203     XLCd                /* lcd */,
204     Display*            /* dpy */,
205     char**              /* list */,
206     int                 /* count */,
207     XICCEncodingStyle   /* style */,
208     XTextProperty*      /* text_prop */
209 #endif
210 );
211
212 extern int _falwcTextListToTextProperty(
213 #if NeedFunctionPrototypes
214     XLCd                /* lcd */,
215     Display*            /* dpy */,
216     wchar_t**           /* list */,
217     int                 /* count */,
218     XICCEncodingStyle   /* style */,
219     XTextProperty*      /* text_prop */
220 #endif
221 );
222
223 extern void _falwcFreeStringList(
224 #if NeedFunctionPrototypes
225     XLCd                /* lcd */,
226     wchar_t**           /* list */
227 #endif
228 );
229
230 extern int _fallcResolveLocaleName(
231 #if NeedFunctionPrototypes
232     char*               /* lc_name */,
233     char*               /* full_name */,
234     char*               /* language */,
235     char*               /* territory */,
236     char*               /* codeset */
237 #endif
238 );
239
240 extern int _fallcResolveDBName(
241 #if NeedFunctionPrototypes
242     char*               /* lc_name */,
243     char*               /* file_name */
244 #endif
245 );
246
247 extern int _fallcResolveI18NPath(
248 #if NeedFunctionPrototypes
249     char*               /* path_name */
250 #endif
251 );
252
253 extern XPointer _fallcCreateLocaleDataBase(
254 #if NeedFunctionPrototypes
255     XLCd                /* lcd */
256 #endif
257 );
258
259 extern void _fallcDestroyLocaleDataBase(
260 #if NeedFunctionPrototypes
261     XLCd                /* lcd */
262 #endif
263 );
264
265 extern void _fallcGetLocaleDataBase(
266 #if NeedFunctionPrototypes
267     XLCd                /* lcd */,
268     char*               /* category */,
269     char*               /* name */,
270     char***             /* value */,
271     int*                /* count */
272 #endif
273 );
274
275 _XFUNCPROTOEND
276
277 #endif  /* _XLCPUBLICI_H_ */