home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / evbl0627.zip / everblue_20010627.zip / x11 / XlcPublic.h < prev    next >
C/C++ Source or Header  |  1999-11-02  |  7KB  |  288 lines

  1. /* $TOG: XlcPublic.h /main/6 1997/06/22 07:38:55 kaleb $ */
  2. /*
  3.  * Copyright 1992, 1993 by TOSHIBA Corp.
  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 TOSHIBA not be used in advertising
  10.  * or publicity pertaining to distribution of the software without specific,
  11.  * written prior permission. TOSHIBA make 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.  * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  16.  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  17.  * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  18.  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  19.  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  20.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21.  * SOFTWARE.
  22.  *
  23.  * Author: Katsuhisa Yano    TOSHIBA Corp.
  24.  *                   mopi@osa.ilab.toshiba.co.jp
  25.  */
  26. /*
  27.  * Copyright 1995 by FUJITSU LIMITED
  28.  * This is source code modified by FUJITSU LIMITED under the Joint
  29.  * Development Agreement for the CDE/Motif PST.
  30.  *
  31.  * Modifier: Takanori Tateno   FUJITSU LIMITED
  32.  *
  33.  */
  34.  
  35. #ifndef _XLCPUBLIC_H_
  36. #define _XLCPUBLIC_H_
  37.  
  38. #include "Xlcint.h"
  39.  
  40. #define XlcNCharSize         "charSize"
  41. #define XlcNCodeset         "codeset"
  42. #define XlcNControlSequence     "controlSequence"
  43. #define XlcNDefaultString     "defaultString"
  44. #define XlcNEncodingName     "encodingName"
  45. #define XlcNLanguage         "language"
  46. #define XlcNMbCurMax         "mbCurMax"
  47. #define XlcNName         "name"
  48. #define XlcNSetSize         "setSize"
  49. #define XlcNSide         "side"
  50. #define XlcNStateDependentEncoding "stateDependentEncoding"
  51. #define XlcNTerritory         "territory"
  52.  
  53. typedef enum {
  54.     XlcUnknown, XlcC0, XlcGL, XlcC1, XlcGR, XlcGLGR, XlcOther, XlcNONE
  55. } XlcSide;
  56.  
  57. typedef struct _FontScope {
  58.         unsigned long   start;
  59.         unsigned long   end;
  60.         unsigned long   shift;
  61.         unsigned long   shift_direction;
  62. } FontScopeRec, *FontScope;
  63.  
  64. typedef struct _UDCArea {
  65.         unsigned long     start,end;
  66. } UDCAreaRec, *UDCArea;
  67.  
  68. typedef struct _XlcCharSetRec *XlcCharSet;
  69.  
  70. typedef char* (*XlcGetCSValuesProc)(
  71. #if NeedFunctionPrototypes
  72.     XlcCharSet        /* charset */,
  73.     XlcArgList        /* args */,
  74.     int            /* num_args */
  75. #endif
  76. );
  77.  
  78. typedef struct _XlcCharSetRec {
  79.     char         *name;        /* character set name */
  80.     XrmQuark         xrm_name;
  81.     char         *encoding_name;    /* XLFD encoding name */
  82.     XrmQuark         xrm_encoding_name;
  83.     XlcSide         side;        /* GL, GR or others */
  84.     int         char_size;    /* number of bytes per character */
  85.     int         set_size;    /* graphic character sets */
  86.     char         *ct_sequence;    /* control sequence of CT */
  87.     XlcGetCSValuesProc     get_values;
  88.     /* UDC */
  89.     Bool            string_encoding;
  90.     UDCArea         udc_area;
  91.     int             udc_area_num;
  92. } XlcCharSetRec;
  93.  
  94. /*
  95.  * conversion methods
  96.  */
  97.  
  98. typedef struct _XlcConvRec *XlcConv;
  99.  
  100. typedef XlcConv (*XlcOpenConverterProc)(
  101. #if NeedFunctionPrototypes
  102.     XLCd        /* from_lcd */,
  103.     char*        /* from_type */,
  104.     XLCd        /* to_lcd */,
  105.     char*        /* to_type */
  106. #endif
  107. );
  108.  
  109. typedef void (*XlcCloseConverterProc)(
  110. #if NeedFunctionPrototypes
  111.     XlcConv        /* conv */
  112. #endif
  113. );
  114.  
  115. typedef int (*XlcConvertProc)(
  116. #if NeedFunctionPrototypes
  117.     XlcConv        /* conv */,
  118.     XPointer*        /* from */,
  119.     int*        /* from_left */,
  120.     XPointer*        /* to */,
  121.     int*        /* to_left */,
  122.     XPointer*        /* args */,
  123.     int            /* num_args */
  124. #endif
  125. );
  126.  
  127. typedef void (*XlcResetConverterProc)(
  128. #if NeedFunctionPrototypes
  129.     XlcConv        /* conv */
  130. #endif
  131. );
  132.  
  133. typedef struct _XlcConvMethodsRec{
  134.     XlcCloseConverterProc     close;
  135.     XlcConvertProc         convert;
  136.     XlcResetConverterProc     reset;
  137. } XlcConvMethodsRec, *XlcConvMethods;
  138.  
  139. /*
  140.  * conversion data
  141.  */
  142.  
  143. #define XlcNMultiByte         "multiByte"
  144. #define XlcNWideChar         "wideChar"
  145. #define XlcNCompoundText     "compoundText"
  146. #define XlcNString         "string"
  147. #define XlcNCharSet         "charSet"
  148. #define XlcNCTCharSet         "CTcharSet"
  149. #define XlcNChar         "char"
  150.  
  151. typedef struct _XlcConvRec {
  152.     XlcConvMethods         methods;
  153.     XPointer             state;
  154. } XlcConvRec;
  155.  
  156.  
  157. _XFUNCPROTOBEGIN
  158.  
  159. extern Bool _XInitOM(
  160. #if NeedFunctionPrototypes
  161.     XLCd        /* lcd */
  162. #endif
  163. );
  164.  
  165. extern Bool _XInitIM(
  166. #if NeedFunctionPrototypes
  167.     XLCd        /* lcd */
  168. #endif
  169. );
  170.  
  171. extern char *_XGetLCValues(
  172. #if NeedVarargsPrototypes
  173.     XLCd        /* lcd */,
  174.     ...
  175. #endif
  176. );
  177.  
  178. extern XlcCharSet _XlcGetCharSet(
  179. #if NeedFunctionPrototypes
  180.     char*        /* name */
  181. #endif
  182. );
  183.  
  184. extern Bool _XlcAddCharSet(
  185. #if NeedFunctionPrototypes
  186.     XlcCharSet        /* charset */
  187. #endif
  188. );
  189.  
  190. extern char *_XlcGetCSValues(
  191. #if NeedVarargsPrototypes
  192.     XlcCharSet        /* charset */,
  193.     ...
  194. #endif
  195. );
  196.  
  197. extern XlcConv _XlcOpenConverter(
  198. #if NeedFunctionPrototypes
  199.     XLCd        /* from_lcd */,
  200.     char*        /* from_type */,
  201.     XLCd        /* to_lcd */,
  202.     char*        /* to_type */
  203. #endif
  204. );
  205.  
  206. extern void _XlcCloseConverter(
  207. #if NeedFunctionPrototypes
  208.     XlcConv        /* conv */
  209. #endif
  210. );
  211.  
  212. extern int _XlcConvert(
  213. #if NeedFunctionPrototypes
  214.     XlcConv        /* conv */,
  215.     XPointer*        /* from */,
  216.     int*        /* from_left */,
  217.     XPointer*        /* to */,
  218.     int*        /* to_left */,
  219.     XPointer*        /* args */,
  220.     int            /* num_args */
  221. #endif
  222. );
  223.  
  224. extern void _XlcResetConverter(
  225. #if NeedFunctionPrototypes
  226.     XlcConv        /* conv */
  227. #endif
  228. );
  229.  
  230. extern Bool _XlcSetConverter(
  231. #if NeedFunctionPrototypes
  232.     XLCd            /* from_lcd */,
  233.     char*            /* from_type */,
  234.     XLCd            /* to_lcd */,
  235.     char*            /* to_type */,
  236.     XlcOpenConverterProc    /* open_converter */
  237. #endif
  238. );
  239.  
  240. extern void _XlcGetResource(
  241. #if NeedFunctionPrototypes
  242.     XLCd        /* lcd */,
  243.     char*        /* category */,
  244.     char*        /* class */,
  245.     char***        /* value */,
  246.     int*        /* count */
  247. #endif
  248. );
  249.  
  250. extern char *_XlcFileName(
  251. #if NeedFunctionPrototypes
  252.     XLCd        /* lcd */,
  253.     char*        /* category */
  254. #endif
  255. );
  256.  
  257. extern int _Xwcslen(
  258. #if NeedFunctionPrototypes
  259.     wchar_t*        /* wstr */
  260. #endif
  261. );
  262.  
  263. extern wchar_t *_Xwcscpy(
  264. #if NeedFunctionPrototypes
  265.     wchar_t*        /* wstr1 */,
  266.     wchar_t*        /* wstr2 */
  267. #endif
  268. );
  269.  
  270. extern int _XlcCompareISOLatin1(
  271. #if NeedFunctionPrototypes
  272.     char*        /* str1 */,
  273.     char*        /* str2 */
  274. #endif
  275. );
  276.  
  277. extern int _XlcNCompareISOLatin1(
  278. #if NeedFunctionPrototypes
  279.     char*        /* str1 */,
  280.     char*        /* str2 */,
  281.     int            /* len */
  282. #endif
  283. );
  284.  
  285. _XFUNCPROTOEND
  286.  
  287. #endif  /* _XLCPUBLIC_H_ */
  288.