_fallcPubI.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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. /* 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. #ifndef _XLCPUBLICI_H_
  50. #define _XLCPUBLICI_H_
  51. #include "_fallcPublic.h"
  52. #define XLC_PUBLIC(lcd, x) (((XLCdPublic) lcd->core)->pub.x)
  53. #define XLC_PUBLIC_PART(lcd) (&(((XLCdPublic) lcd->core)->pub))
  54. #define XLC_PUBLIC_METHODS(lcd) (&(((XLCdPublicMethods) lcd->methods)->pub))
  55. /*
  56. * XLCd public methods
  57. */
  58. typedef struct _XLCdPublicMethodsRec *XLCdPublicMethods;
  59. typedef XLCd (*XlcPubCreateProc)(
  60. char* /* name */,
  61. XLCdMethods /* methods */
  62. );
  63. typedef Bool (*XlcPubInitializeProc)(
  64. XLCd /* lcd */
  65. );
  66. typedef void (*XlcPubDestroyProc)(
  67. XLCd /* lcd */
  68. );
  69. typedef char* (*XlcPubGetValuesProc)(
  70. XLCd /* lcd */,
  71. XlcArgList /* args */,
  72. int /* num_args */
  73. );
  74. typedef void (*XlcPubGetResourceProc)(
  75. XLCd /* lcd */,
  76. char* /* category */,
  77. char* /* class */,
  78. char*** /* value */,
  79. int* /* count */
  80. );
  81. typedef struct _XLCdPublicMethodsPart {
  82. XLCdPublicMethods superclass;
  83. XlcPubCreateProc create;
  84. XlcPubInitializeProc initialize;
  85. XlcPubDestroyProc destroy;
  86. XlcPubGetValuesProc get_values;
  87. XlcPubGetResourceProc get_resource;
  88. } XLCdPublicMethodsPart;
  89. typedef struct _XLCdPublicMethodsRec {
  90. XLCdMethodsRec core;
  91. XLCdPublicMethodsPart pub;
  92. } XLCdPublicMethodsRec;
  93. /*
  94. * XLCd public data
  95. */
  96. typedef struct _XLCdPublicPart {
  97. char *siname; /* for _fallcMapOSLocaleName() */
  98. char *language; /* language part of locale name */
  99. char *territory; /* territory part of locale name */
  100. char *codeset; /* codeset part of locale name */
  101. char *encoding_name; /* encoding name */
  102. int mb_cur_max; /* ANSI C MB_CUR_MAX */
  103. Bool is_state_depend; /* state-depend encoding */
  104. char *default_string; /* for falDefaultString() */
  105. XPointer xlocale_db;
  106. } XLCdPublicPart;
  107. typedef struct _XLCdPublicRec {
  108. XLCdCoreRec core;
  109. XLCdPublicPart pub;
  110. } XLCdPublicRec, *XLCdPublic;
  111. extern XLCdMethods _fallcPublicMethods;
  112. _XFUNCPROTOBEGIN
  113. extern XLCd _fallcCreateLC(
  114. char* /* name */,
  115. XLCdMethods /* methods */
  116. );
  117. extern void _fallcDestroyLC(
  118. XLCd /* lcd */
  119. );
  120. extern Bool _fallcParseCharSet(
  121. XlcCharSet /* charset */
  122. );
  123. extern XlcCharSet _fallcCreateDefaultCharSet(
  124. char* /* name */,
  125. char* /* control_sequence */
  126. );
  127. extern XlcCharSet _fallcAddCT(
  128. char* /* name */,
  129. char* /* control_sequence */
  130. );
  131. extern XrmMethods _falrmDefaultInitParseInfo(
  132. XLCd /* lcd */,
  133. XPointer* /* state */
  134. );
  135. extern int _falmbTextPropertyToTextList(
  136. XLCd /* lcd */,
  137. Display* /* dpy */,
  138. XTextProperty* /* text_prop */,
  139. char*** /* list_ret */,
  140. int* /* count_ret */
  141. );
  142. extern int _falwcTextPropertyToTextList(
  143. XLCd /* lcd */,
  144. Display* /* dpy */,
  145. XTextProperty* /* text_prop */,
  146. wchar_t*** /* list_ret */,
  147. int* /* count_ret */
  148. );
  149. extern int _falmbTextListToTextProperty(
  150. XLCd /* lcd */,
  151. Display* /* dpy */,
  152. char** /* list */,
  153. int /* count */,
  154. XICCEncodingStyle /* style */,
  155. XTextProperty* /* text_prop */
  156. );
  157. extern int _falwcTextListToTextProperty(
  158. XLCd /* lcd */,
  159. Display* /* dpy */,
  160. wchar_t** /* list */,
  161. int /* count */,
  162. XICCEncodingStyle /* style */,
  163. XTextProperty* /* text_prop */
  164. );
  165. extern void _falwcFreeStringList(
  166. XLCd /* lcd */,
  167. wchar_t** /* list */
  168. );
  169. extern int _fallcResolveLocaleName(
  170. char* /* lc_name */,
  171. char* /* full_name */,
  172. char* /* language */,
  173. char* /* territory */,
  174. char* /* codeset */
  175. );
  176. extern int _fallcResolveDBName(
  177. char* /* lc_name */,
  178. char* /* file_name */
  179. );
  180. extern int _fallcResolveI18NPath(
  181. char* /* path_name */
  182. );
  183. extern XPointer _fallcCreateLocaleDataBase(
  184. XLCd /* lcd */
  185. );
  186. extern void _fallcDestroyLocaleDataBase(
  187. XLCd /* lcd */
  188. );
  189. extern void _fallcGetLocaleDataBase(
  190. XLCd /* lcd */,
  191. char* /* category */,
  192. char* /* name */,
  193. char*** /* value */,
  194. int* /* count */
  195. );
  196. _XFUNCPROTOEND
  197. #endif /* _XLCPUBLICI_H_ */