Back to index

im-sdk  12.3.91
XlcPublic.h
Go to the documentation of this file.
00001 /* $XConsortium: XlcPublic.h,v 1.3 94/12/12 20:34:32 kaleb Exp $ */
00002 /*
00003  * Copyright 1992, 1993 by TOSHIBA Corp.
00004  *
00005  * Permission to use, copy, modify, and distribute this software and its
00006  * documentation for any purpose and without fee is hereby granted, provided
00007  * that the above copyright notice appear in all copies and that both that
00008  * copyright notice and this permission notice appear in supporting
00009  * documentation, and that the name of TOSHIBA not be used in advertising
00010  * or publicity pertaining to distribution of the software without specific,
00011  * written prior permission. TOSHIBA make no representations about the
00012  * suitability of this software for any purpose.  It is provided "as is"
00013  * without express or implied warranty.
00014  *
00015  * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
00016  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
00017  * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
00018  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
00019  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
00020  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
00021  * SOFTWARE.
00022  *
00023  * Author: Katsuhisa Yano   TOSHIBA Corp.
00024  *                          mopi@osa.ilab.toshiba.co.jp
00025  */
00026 
00027 #ifndef _XLCPUBLIC_H_
00028 #define _XLCPUBLIC_H_
00029 
00030 #include "Xlcint.h"
00031 
00032 #define XlcNCharSize "charSize"
00033 #define XlcNCodeset "codeset"
00034 #define XlcNControlSequence "controlSequence"
00035 #define XlcNDefaultString "defaultString"
00036 #define XlcNEncodingName "encodingName"
00037 #define XlcNLanguage "language"
00038 #define XlcNMbCurMax "mbCurMax"
00039 #define XlcNName "name"
00040 #define XlcNSetSize "setSize"
00041 #define XlcNSide "side"
00042 #define XlcNStateDependentEncoding "stateDependentEncoding"
00043 #define XlcNTerritory "territory"
00044 
00045 typedef enum {
00046     XlcUnknown, XlcC0, XlcGL, XlcC1, XlcGR, XlcGLGR, XlcOther
00047 } XlcSide;
00048 
00049 typedef struct _XlcCharSetRec *XlcCharSet;
00050 
00051 typedef char* (*XlcGetCSValuesProc)(
00052 #if NeedFunctionPrototypes
00053     XlcCharSet              /* charset */,
00054     XlcArgList              /* args */,
00055     int                     /* num_args */
00056 #endif
00057 );
00058 
00059 typedef struct _XlcCharSetRec {
00060     char *name;                    /* character set name */
00061     XrmQuark xrm_name;
00062     char *encoding_name;    /* XLFD encoding name */
00063     XrmQuark xrm_encoding_name;
00064     XlcSide side;           /* GL, GR or others */
00065     int char_size;          /* number of bytes per character */
00066     int set_size;           /* graphic character sets */
00067     char *ct_sequence;             /* control sequence of CT */
00068     XlcGetCSValuesProc get_values;
00069 } XlcCharSetRec;
00070 
00071 /*
00072  * conversion methods
00073  */
00074 
00075 typedef struct _XlcConvRec *XlcConv;
00076 
00077 typedef XlcConv (*XlcOpenConverterProc)(
00078 #if NeedFunctionPrototypes
00079     XLCd             /* from_lcd */,
00080     char*            /* from_type */,
00081     XLCd             /* to_lcd */,
00082     char*            /* to_type */
00083 #endif
00084 );
00085 
00086 typedef void (*XlcCloseConverterProc)(
00087 #if NeedFunctionPrototypes
00088     XlcConv          /* conv */
00089 #endif
00090 );
00091 
00092 typedef int (*XlcConvertProc)(
00093 #if NeedFunctionPrototypes
00094     XlcConv          /* conv */,
00095     XPointer*        /* from */,
00096     int*             /* from_left */,
00097     XPointer*        /* to */,
00098     int*             /* to_left */,
00099     XPointer*        /* args */,
00100     int                     /* num_args */
00101 #endif
00102 );
00103 
00104 typedef void (*XlcResetConverterProc)(
00105 #if NeedFunctionPrototypes
00106     XlcConv          /* conv */
00107 #endif
00108 );
00109 
00110 typedef struct _XlcConvMethodsRec{
00111     XlcCloseConverterProc close;
00112     XlcConvertProc convert;
00113     XlcResetConverterProc reset;
00114 } XlcConvMethodsRec, *XlcConvMethods;
00115 
00116 /*
00117  * conversion data
00118  */
00119 
00120 #define XlcNMultiByte "multiByte"
00121 #define XlcNWideChar "wideChar"
00122 #define XlcNCompoundText "compoundText"
00123 #define XlcNString "string"
00124 #define XlcNCharSet "charSet"
00125 #define XlcNCTCharSet "CTcharSet"
00126 #define XlcNChar "char"
00127 
00128 typedef struct _XlcConvRec {
00129     XlcConvMethods methods;
00130     XPointer state;
00131 } XlcConvRec;
00132 
00133 
00134 _XFUNCPROTOBEGIN
00135 
00136 extern Bool _XInitPublicOM(
00137 #if NeedFunctionPrototypes
00138     XLCd             /* lcd */
00139 #endif
00140 );
00141 
00142 extern Bool _XInitPublicIM(
00143 #if NeedFunctionPrototypes
00144     XLCd             /* lcd */
00145 #endif
00146 );
00147 
00148 extern char *_XGetLCValues(
00149 #if NeedVarargsPrototypes
00150     XLCd             /* lcd */,
00151     ...
00152 #endif
00153 );
00154 
00155 extern XlcCharSet _XlcGetCharSet(
00156 #if NeedFunctionPrototypes
00157     char*            /* name */
00158 #endif
00159 );
00160 
00161 extern Bool _XlcAddCharSet(
00162 #if NeedFunctionPrototypes
00163     XlcCharSet              /* charset */
00164 #endif
00165 );
00166 
00167 extern char *_XlcGetCSValues(
00168 #if NeedVarargsPrototypes
00169     XlcCharSet              /* charset */,
00170     ...
00171 #endif
00172 );
00173 
00174 extern XlcConv _XlcOpenConverter(
00175 #if NeedFunctionPrototypes
00176     XLCd             /* from_lcd */,
00177     char*            /* from_type */,
00178     XLCd             /* to_lcd */,
00179     char*            /* to_type */
00180 #endif
00181 );
00182 
00183 extern void _XlcCloseConverter(
00184 #if NeedFunctionPrototypes
00185     XlcConv          /* conv */
00186 #endif
00187 );
00188 
00189 extern int _XlcConvert(
00190 #if NeedFunctionPrototypes
00191     XlcConv          /* conv */,
00192     XPointer*        /* from */,
00193     int*             /* from_left */,
00194     XPointer*        /* to */,
00195     int*             /* to_left */,
00196     XPointer*        /* args */,
00197     int                     /* num_args */
00198 #endif
00199 );
00200 
00201 extern void _XlcResetConverter(
00202 #if NeedFunctionPrototypes
00203     XlcConv          /* conv */
00204 #endif
00205 );
00206 
00207 extern Bool _XlcSetConverter(
00208 #if NeedFunctionPrototypes
00209     XLCd                    /* from_lcd */,
00210     char*                   /* from_type */,
00211     XLCd                    /* to_lcd */,
00212     char*                   /* to_type */,
00213     XlcOpenConverterProc    /* open_converter */
00214 #endif
00215 );
00216 
00217 extern void _XlcGetResource(
00218 #if NeedFunctionPrototypes
00219     XLCd             /* lcd */,
00220     char*            /* category */,
00221     char*            /* class */,
00222     char***          /* value */,
00223     int*             /* count */
00224 #endif
00225 );
00226 
00227 extern char *_XlcFileName(
00228 #if NeedFunctionPrototypes
00229     XLCd             /* lcd */,
00230     char*            /* category */
00231 #endif
00232 );
00233 
00234 extern char *_XlcLocaleDirName(
00235 #if NeedFunctionPrototypes
00236     char*            /* lc_name */
00237 #endif
00238 );
00239 extern int _Xwcslen(
00240 #if NeedFunctionPrototypes
00241     wchar_t*         /* wstr */
00242 #endif
00243 );
00244 
00245 extern wchar_t *_Xwcscpy(
00246 #if NeedFunctionPrototypes
00247     wchar_t*         /* wstr1 */,
00248     wchar_t*         /* wstr2 */
00249 #endif
00250 );
00251 
00252 extern int _XlcCompareISOLatin1(
00253 #if NeedFunctionPrototypes
00254     char*            /* str1 */,
00255     char*            /* str2 */
00256 #endif
00257 );
00258 
00259 extern int _XlcNCompareISOLatin1(
00260 #if NeedFunctionPrototypes
00261     char*            /* str1 */,
00262     char*            /* str2 */,
00263     int                     /* len */
00264 #endif
00265 );
00266 
00267 _XFUNCPROTOEND
00268 
00269 #endif  /* _XLCPUBLIC_H_ */