_fallcPublic.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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. #ifndef _XLCPUBLIC_H_
  59. #define _XLCPUBLIC_H_
  60. #include "_fallcint.h"
  61. #define XlcNCharSize "charSize"
  62. #define XlcNCodeset "codeset"
  63. #define XlcNControlSequence "controlSequence"
  64. #define XlcNDefaultString "defaultString"
  65. #define XlcNEncodingName "encodingName"
  66. #define XlcNLanguage "language"
  67. #define XlcNMbCurMax "mbCurMax"
  68. #define XlcNName "name"
  69. #define XlcNSetSize "setSize"
  70. #define XlcNSide "side"
  71. #define XlcNStateDependentEncoding "stateDependentEncoding"
  72. #define XlcNTerritory "territory"
  73. typedef enum {
  74. XlcUnknown, XlcC0, XlcGL, XlcC1, XlcGR, XlcGLGR, XlcOther, XlcNONE
  75. } XlcSide;
  76. typedef struct _FonScope {
  77. unsigned long start;
  78. unsigned long end;
  79. unsigned long shift;
  80. unsigned long shift_direction;
  81. } FontScopeRec, *FontScope;
  82. typedef struct _UDCArea {
  83. unsigned long start,end;
  84. } UDCAreaRec, *UDCArea;
  85. typedef struct _XlcCharSetRec *XlcCharSet;
  86. typedef char* (*XlcGetCSValuesProc)(
  87. XlcCharSet /* charset */,
  88. XlcArgList /* args */,
  89. int /* num_args */
  90. );
  91. typedef struct _XlcCharSetRec {
  92. char *name; /* character set name */
  93. XrmQuark xrm_name;
  94. char *encoding_name; /* XLFD encoding name */
  95. XrmQuark xrm_encoding_name;
  96. XlcSide side; /* GL, GR or others */
  97. int char_size; /* number of bytes per character */
  98. int set_size; /* graphic character sets */
  99. char *ct_sequence; /* control sequence of CT */
  100. XlcGetCSValuesProc get_values;
  101. /* UDC */
  102. Bool string_encoding;
  103. UDCArea udc_area;
  104. int udc_area_num;
  105. } XlcCharSetRec;
  106. /*
  107. * conversion methods
  108. */
  109. typedef struct _XlcConvRec *XlcConv;
  110. typedef XlcConv (*XlcOpenConverterProc)(
  111. XLCd /* from_lcd */,
  112. char* /* from_type */,
  113. XLCd /* to_lcd */,
  114. char* /* to_type */
  115. );
  116. typedef void (*XlcCloseConverterProc)(
  117. XlcConv /* conv */
  118. );
  119. typedef int (*XlcConvertProc)(
  120. XlcConv /* conv */,
  121. XPointer* /* from */,
  122. int* /* from_left */,
  123. XPointer* /* to */,
  124. int* /* to_left */,
  125. XPointer* /* args */,
  126. int /* num_args */
  127. );
  128. typedef void (*XlcResetConverterProc)(
  129. XlcConv /* conv */
  130. );
  131. typedef struct _XlcConvMethodsRec{
  132. XlcCloseConverterProc close;
  133. XlcConvertProc convert;
  134. XlcResetConverterProc reset;
  135. } XlcConvMethodsRec, *XlcConvMethods;
  136. /*
  137. * conversion data
  138. */
  139. #define XlcNMultiByte "multiByte"
  140. #define XlcNWideChar "wideChar"
  141. #define XlcNCompoundText "compoundText"
  142. #define XlcNString "string"
  143. #define XlcNCharSet "charSet"
  144. #define XlcNCTCharSet "CTcharSet"
  145. #define XlcNChar "char"
  146. typedef struct _XlcConvRec {
  147. XlcConvMethods methods;
  148. XPointer state;
  149. } XlcConvRec;
  150. _XFUNCPROTOBEGIN
  151. extern Bool _falInitOM(
  152. XLCd /* lcd */
  153. );
  154. extern Bool _XInitIM(
  155. XLCd /* lcd */
  156. );
  157. extern char *_falGetLCValues(
  158. XLCd /* lcd */,
  159. ...
  160. );
  161. extern XlcCharSet _fallcGetCharSet(
  162. char* /* name */
  163. );
  164. extern Bool _fallcAddCharSet(
  165. XlcCharSet /* charset */
  166. );
  167. extern char *_fallcGetCSValues(
  168. XlcCharSet /* charset */,
  169. ...
  170. );
  171. extern XlcConv _fallcOpenConverter(
  172. XLCd /* from_lcd */,
  173. char* /* from_type */,
  174. XLCd /* to_lcd */,
  175. char* /* to_type */
  176. );
  177. extern void _fallcCloseConverter(
  178. XlcConv /* conv */
  179. );
  180. extern int _fallcConvert(
  181. XlcConv /* conv */,
  182. XPointer* /* from */,
  183. int* /* from_left */,
  184. XPointer* /* to */,
  185. int* /* to_left */,
  186. XPointer* /* args */,
  187. int /* num_args */
  188. );
  189. extern void _fallcResetConverter(
  190. XlcConv /* conv */
  191. );
  192. extern Bool _fallcSetConverter(
  193. XLCd /* from_lcd */,
  194. char* /* from_type */,
  195. XLCd /* to_lcd */,
  196. char* /* to_type */,
  197. XlcOpenConverterProc /* open_converter */
  198. );
  199. extern void _fallcGetResource(
  200. XLCd /* lcd */,
  201. char* /* category */,
  202. char* /* class */,
  203. char*** /* value */,
  204. int* /* count */
  205. );
  206. extern char *_fallcFileName(
  207. XLCd /* lcd */,
  208. char* /* category */
  209. );
  210. extern int _falwcslen(
  211. wchar_t* /* wstr */
  212. );
  213. extern wchar_t *_falwcscpy(
  214. wchar_t* /* wstr1 */,
  215. wchar_t* /* wstr2 */
  216. );
  217. extern int _fallcCompareISOLatin1(
  218. char* /* str1 */,
  219. char* /* str2 */
  220. );
  221. extern int _fallcNCompareISOLatin1(
  222. char* /* str1 */,
  223. char* /* str2 */,
  224. int /* len */
  225. );
  226. _XFUNCPROTOEND
  227. #endif /* _XLCPUBLIC_H_ */