Home | History | Annotate | Line # | Download | only in xlibi18n
      1 /******************************************************************
      2 
      3                 Copyright 1992, 1993, 1994 by FUJITSU LIMITED
      4                 Copyright 1993, 1994 by Sony Corporation
      5 
      6 Permission to use, copy, modify, distribute, and sell this software
      7 and its documentation for any purpose is hereby granted without fee,
      8 provided that the above copyright notice appear in all copies and that
      9 both that copyright notice and this permission notice appear in
     10 supporting documentation, and that the name of FUJITSU LIMITED and
     11 Sony Corporation not be used in advertising or publicity pertaining to
     12 distribution of the software without specific, written prior
     13 permission.  FUJITSU LIMITED and Sony Corporation makes no
     14 representations about the suitability of this software for any
     15 purpose.  It is provided "as is" without express or implied warranty.
     16 
     17 FUJITSU LIMITED AND SONY CORPORATION DISCLAIM ALL WARRANTIES WITH
     18 REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
     19 MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL FUJITSU LIMITED AND
     20 SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
     21 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
     22 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
     23 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     24 PERFORMANCE OF THIS SOFTWARE.
     25 
     26   Author:   Takashi Fujiwara   FUJITSU LIMITED
     27                                fujiwara (at) a80.tech.yk.fujitsu.co.jp
     28   Motifier: Makoto Wakamatsu   Sony Corporation
     29 			       makoto (at) sm.sony.co.jp
     30 
     31 ******************************************************************/
     32 
     33 #ifndef _XIMINT_H
     34 #define _XIMINT_H
     35 
     36 #include <stdio.h>
     37 #include <X11/Xutil.h>
     38 
     39 typedef struct _Xim	*Xim;
     40 typedef struct _Xic	*Xic;
     41 
     42 /*
     43  * Input Method data
     44  */
     45 #include "XimintP.h"
     46 #include "XimintL.h"
     47 
     48 /*
     49  * XIM dependent data
     50  */
     51 
     52 typedef struct _XimCommonPrivateRec {
     53     /* This struct is also inlined in XimLocalPrivateRec, XimProtoPrivateRec. */
     54     XlcConv		ctom_conv;
     55     XlcConv		ctow_conv;
     56     XlcConv		ctoutf8_conv;
     57     XlcConv		cstomb_conv;
     58     XlcConv		cstowc_conv;
     59     XlcConv		cstoutf8_conv;
     60     XlcConv		ucstoc_conv;
     61     XlcConv		ucstoutf8_conv;
     62 } XimCommonPrivateRec;
     63 
     64 typedef union _XIMPrivateRec {
     65     XimCommonPrivateRec  common;
     66     XimLocalPrivateRec   local;
     67     XimProtoPrivateRec   proto;
     68 } XIMPrivateRec;
     69 
     70 /*
     71  * IM struct
     72  */
     73 typedef struct _Xim {
     74     XIMMethods		methods;
     75     XIMCoreRec		core;
     76     XIMPrivateRec	private;
     77 } XimRec;
     78 
     79 /*
     80  * IC deprndent data
     81  */
     82 typedef union _XICPrivateRec {
     83     XicLocalPrivateRec   local;
     84     XicProtoPrivateRec   proto;
     85 } XICPrivateRec;
     86 
     87 /*
     88  * IC struct
     89  */
     90 typedef struct _Xic {
     91 	XICMethods	methods;
     92 	XICCoreRec	core;
     93 	XICPrivateRec	private;
     94 } XicRec;
     95 
     96 typedef struct _XimDefIMValues {
     97 	XIMValuesList		*im_values_list;
     98 	XIMValuesList		*ic_values_list;
     99 	XIMStyles		*styles;
    100 	XIMCallback		 destroy_callback;
    101 	char			*res_name;
    102 	char			*res_class;
    103 	Bool			 visible_position;
    104 } XimDefIMValues;
    105 
    106 typedef struct _XimDefICValues {
    107     XIMStyle			 input_style;
    108     Window			 client_window;
    109     Window			 focus_window;
    110     unsigned long		 filter_events;
    111     XICCallback			 geometry_callback;
    112     char			*res_name;
    113     char			*res_class;
    114     XICCallback			 destroy_callback;
    115     XICCallback			 preedit_state_notify_callback;
    116     XICCallback			 string_conversion_callback;
    117     XIMStringConversionText	 string_conversion;
    118     XIMResetState		 reset_state;
    119     XIMHotKeyTriggers		*hotkey;
    120     XIMHotKeyState		 hotkey_state;
    121     ICPreeditAttributes		 preedit_attr;
    122     ICStatusAttributes		 status_attr;
    123 } XimDefICValues;
    124 
    125 #define XIM_MODE_IM_GET		(1 << 0)
    126 #define XIM_MODE_IM_SET		(1 << 1)
    127 #define XIM_MODE_IM_DEFAULT	(1 << 2)
    128 
    129 #define XIM_MODE_PRE_GET	(1 << 0)
    130 #define XIM_MODE_PRE_SET	(1 << 1)
    131 #define XIM_MODE_PRE_CREATE	(1 << 2)
    132 #define XIM_MODE_PRE_ONCE	(1 << 3)
    133 #define XIM_MODE_PRE_DEFAULT	(1 << 4)
    134 
    135 #define XIM_MODE_STS_GET	(1 << 5)
    136 #define XIM_MODE_STS_SET	(1 << 6)
    137 #define XIM_MODE_STS_CREATE	(1 << 7)
    138 #define XIM_MODE_STS_ONCE	(1 << 8)
    139 #define XIM_MODE_STS_DEFAULT	(1 << 9)
    140 
    141 #define XIM_MODE_IC_GET		(XIM_MODE_PRE_GET      | XIM_MODE_STS_GET)
    142 #define XIM_MODE_IC_SET		(XIM_MODE_PRE_SET      | XIM_MODE_STS_SET)
    143 #define XIM_MODE_IC_CREATE	(XIM_MODE_PRE_CREATE   | XIM_MODE_STS_CREATE)
    144 #define XIM_MODE_IC_ONCE	(XIM_MODE_PRE_ONCE     | XIM_MODE_STS_ONCE)
    145 #define XIM_MODE_IC_DEFAULT	(XIM_MODE_PRE_DEFAULT  | XIM_MODE_STS_DEFAULT)
    146 
    147 #define XIM_MODE_PRE_MASK	(XIM_MODE_PRE_GET    | XIM_MODE_PRE_SET    | \
    148 				 XIM_MODE_PRE_CREATE | XIM_MODE_PRE_ONCE   | \
    149 				 XIM_MODE_PRE_DEFAULT)
    150 #define XIM_MODE_STS_MASK	(XIM_MODE_STS_GET    | XIM_MODE_STS_SET    | \
    151 				 XIM_MODE_STS_CREATE | XIM_MODE_STS_ONCE   | \
    152 				 XIM_MODE_STS_DEFAULT)
    153 
    154 #define XIM_SETIMDEFAULTS	(1L << 0)
    155 #define XIM_SETIMVALUES		(1L << 1)
    156 #define XIM_GETIMVALUES		(1L << 2)
    157 
    158 #define XIM_SETICDEFAULTS	(1L << 0)
    159 #define XIM_CREATEIC		(1L << 1)
    160 #define XIM_SETICVALUES		(1L << 2)
    161 #define XIM_GETICVALUES		(1L << 3)
    162 #define XIM_PREEDIT_ATTR	(1L << 4)
    163 #define XIM_STATUS_ATTR		(1L << 5)
    164 
    165 #define XIM_CHECK_VALID		0
    166 #define XIM_CHECK_INVALID	1
    167 #define XIM_CHECK_ERROR		2
    168 
    169 #define FILTERD         True
    170 #define NOTFILTERD      False
    171 
    172 #define XIMMODIFIER		"@im="
    173 
    174 #define	XIM_TRUE	True
    175 #define	XIM_FALSE	False
    176 #define	XIM_OVERFLOW	(-1)
    177 
    178 #define BRL_UC_ROW	0x2800
    179 
    180 /*
    181  * Global symbols
    182  */
    183 
    184 XPointer _XimGetLocaleCode (
    185     const char	*encoding_name
    186 );
    187 
    188 int _XimGetCharCode (
    189     XPointer		conv,
    190     KeySym		keysym,
    191     unsigned char	*buf,
    192     int			nbytes
    193 );
    194 
    195 unsigned int KeySymToUcs4 (
    196     KeySym		keysym
    197 );
    198 
    199 extern Bool _XimSetIMResourceList(
    200     XIMResourceList	*res_list,
    201     unsigned int	*list_num
    202 );
    203 
    204 extern Bool _XimSetICResourceList(
    205     XIMResourceList	*res_list,
    206     unsigned int	*list_num
    207 );
    208 
    209 extern Bool _XimSetInnerIMResourceList(
    210     XIMResourceList	*res_list,
    211     unsigned int	*list_num
    212 );
    213 
    214 extern Bool _XimSetInnerICResourceList(
    215     XIMResourceList	*res_list,
    216     unsigned int	*list_num
    217 );
    218 
    219 extern Bool _XimCheckCreateICValues(
    220     XIMResourceList	 res_list,
    221     unsigned int	 list_num
    222 );
    223 
    224 extern XIMResourceList _XimGetResourceListRec(
    225     XIMResourceList	 res_list,
    226     unsigned int	 list_num,
    227     const char		*name
    228 );
    229 
    230 extern void _XimSetIMMode(
    231     XIMResourceList	 res_list,
    232     unsigned int	 list_num
    233 );
    234 
    235 extern void _XimSetICMode(
    236     XIMResourceList	 res_list,
    237     unsigned int	 list_num,
    238     XIMStyle		 style
    239 );
    240 
    241 extern int _XimCheckIMMode(
    242     XIMResourceList	 res_list,
    243     unsigned long	 mode
    244 );
    245 
    246 extern int _XimCheckICMode(
    247     XIMResourceList	 res_list,
    248     unsigned long	 mode
    249 );
    250 
    251 extern Bool _XimSetLocalIMDefaults(
    252     Xim			 im,
    253     XPointer		 top,
    254     XIMResourceList	 res_list,
    255     unsigned int	 list_num
    256 );
    257 
    258 extern Bool _XimSetICDefaults(
    259     Xic			 ic,
    260     XPointer		 top,
    261     unsigned long	 mode,
    262     XIMResourceList	 res_list,
    263     unsigned int	 list_num
    264 );
    265 
    266 extern Bool _XimEncodeLocalIMAttr(
    267     XIMResourceList	 res,
    268     XPointer		 top,
    269     XPointer		 val
    270 );
    271 
    272 extern Bool _XimEncodeLocalICAttr(
    273     Xic			 ic,
    274     XIMResourceList	 res,
    275     XPointer		 top,
    276     XIMArg		*arg,
    277     unsigned long	 mode
    278 );
    279 
    280 extern Bool _XimCheckLocalInputStyle(
    281     Xic			 ic,
    282     XPointer		 top,
    283     XIMArg		*values,
    284     XIMStyles           *styles,
    285     XIMResourceList	 res_list,
    286     unsigned int	 list_num
    287 );
    288 
    289 extern Bool _XimDecodeLocalIMAttr(
    290     XIMResourceList	 res,
    291     XPointer		 top,
    292     XPointer		 val
    293 );
    294 
    295 extern Bool _XimDecodeLocalICAttr(
    296     XIMResourceList	 res,
    297     XPointer		 top,
    298     XPointer		 val,
    299     unsigned long	mode
    300 );
    301 
    302 extern void _XimGetCurrentIMValues(
    303     Xim			 im,
    304     XimDefIMValues	*im_values
    305 );
    306 
    307 extern void _XimSetCurrentIMValues(
    308     Xim			 im,
    309     XimDefIMValues	*im_values
    310 );
    311 
    312 extern void _XimGetCurrentICValues(
    313     Xic			 ic,
    314     XimDefICValues	*ic_values
    315 );
    316 
    317 extern void _XimSetCurrentICValues(
    318     Xic			 ic,
    319     XimDefICValues	*ic_values
    320 );
    321 
    322 extern void _XimInitialResourceInfo(
    323     void
    324 );
    325 
    326 extern void	 _XimParseStringFile(
    327     FILE        *fp,
    328     Xim          im
    329 );
    330 
    331 extern Bool	 _XimCheckIfLocalProcessing(
    332     Xim		 im
    333 );
    334 
    335 extern Bool	 _XimCheckIfThaiProcessing(
    336     Xim		 im
    337 );
    338 
    339 extern Bool	 _XimLocalOpenIM(
    340     Xim		 im
    341 );
    342 
    343 extern Bool	 _XimThaiOpenIM(
    344     Xim		 im
    345 );
    346 
    347 extern Bool	 _XimProtoOpenIM(
    348     Xim		 im
    349 );
    350 
    351 extern void	 _XimLocalIMFree(
    352     Xim		 im
    353 );
    354 
    355 extern void	 _XimThaiIMFree(
    356     Xim	         im
    357 );
    358 
    359 extern void	 _XimProtoIMFree(
    360     Xim		 im
    361 );
    362 
    363 extern char *	 _XimSetIMValueData(
    364     Xim			 im,
    365     XPointer		 top,
    366     XIMArg		*arg,
    367     XIMResourceList	 res_list,
    368     unsigned int	 list_num
    369 );
    370 
    371 extern char *	 _XimGetIMValueData(
    372     Xim			 im,
    373     XPointer		 top,
    374     XIMArg		*arg,
    375     XIMResourceList	 res_list,
    376     unsigned int	 list_num
    377 );
    378 
    379 extern char *	 _XimSetICValueData(
    380     Xic			 ic,
    381     XPointer		 top,
    382     XIMResourceList	 res_list,
    383     unsigned int	 list_num,
    384     XIMArg		*arg,
    385     unsigned long	 mode,
    386     Bool		 flag
    387 );
    388 
    389 extern char *	 _XimGetICValueData(
    390     Xic			 ic,
    391     XPointer		 top,
    392     XIMResourceList	 res_list,
    393     unsigned int	 list_num,
    394     XIMArg		*arg,
    395     unsigned long	 mode
    396 );
    397 
    398 extern char *	 _XimLocalSetIMValues(
    399     XIM		 im,
    400     XIMArg	*arg
    401 );
    402 
    403 extern char *	 _XimLocalGetIMValues(
    404     XIM		 im,
    405     XIMArg	*arg
    406 );
    407 
    408 extern XIC	 _XimLocalCreateIC(
    409     XIM		 im,
    410     XIMArg	*arg
    411 );
    412 
    413 extern Bool	_XimDispatchInit(
    414     Xim		 im
    415 );
    416 
    417 extern Bool	 _XimGetAttributeID(
    418     Xim		 im,
    419     CARD16	*buf
    420 );
    421 
    422 extern Bool	 _XimExtension(
    423     Xim		 im
    424 );
    425 
    426 extern void	_XimDestroyIMStructureList(
    427     Xim		 im
    428 );
    429 
    430 extern char *	_XimMakeIMAttrIDList(
    431     Xim			 im,
    432     XIMResourceList	 res_list,
    433     unsigned int	 res_num,
    434     XIMArg		*arg,
    435     CARD16		*buf,
    436     INT16		*len,
    437     unsigned long        mode
    438 );
    439 
    440 extern char *	_XimMakeICAttrIDList(
    441     Xic                  ic,
    442     XIMResourceList	 res_list,
    443     unsigned int	 res_num,
    444     XIMArg		*arg,
    445     CARD16		*idList,
    446     INT16		*num,
    447     unsigned long	 mode
    448 );
    449 
    450 extern char *	_XimDecodeIMATTRIBUTE(
    451     Xim			 im,
    452     XIMResourceList	 res_list,
    453     unsigned int	 res_num,
    454     CARD16		*buf,
    455     INT16		 buf_len,
    456     XIMArg		*arg,
    457     BITMASK32		 mode
    458 );
    459 
    460 extern char *	_XimDecodeICATTRIBUTE(
    461     Xic			 ic,
    462     XIMResourceList	 res_list,
    463     unsigned int	 res_num,
    464     CARD16		*buf,
    465     INT16		 buf_len,
    466     XIMArg		*arg,
    467     BITMASK32		 mode
    468 );
    469 
    470 extern Bool	_XimRegProtoIntrCallback(
    471     Xim		 im,
    472     CARD16	 major_code,
    473     CARD16	 minor_code,
    474     Bool	 (*proc)(
    475 			Xim, INT16, XPointer, XPointer
    476 			),
    477     XPointer	 call_data
    478 );
    479 
    480 extern Bool	_XimErrorCallback(
    481     Xim		 im,
    482     INT16	 len,
    483     XPointer	 data,
    484     XPointer	 call_data
    485 );
    486 
    487 extern Bool	_XimError(
    488     Xim		 im,
    489     Xic		 ic,
    490     CARD16	 error_code,
    491     INT16	 detail_length,
    492     CARD16	 type,
    493     char	*detail
    494 );
    495 
    496 extern Bool	_XimRegisterTriggerKeysCallback(
    497     Xim		 im,
    498     INT16	 len,
    499     XPointer	 data,
    500     XPointer	 call_data
    501 );
    502 
    503 extern Bool	_XimSetEventMaskCallback(
    504     Xim		 im,
    505     INT16	 len,
    506     XPointer	 data,
    507     XPointer	 call_data
    508 );
    509 
    510 extern Bool	_XimForwardEventCallback(
    511     Xim		 im,
    512     INT16	 len,
    513     XPointer	 data,
    514     XPointer	 call_data
    515 );
    516 
    517 extern Bool	_XimCommitCallback(
    518     Xim		 im,
    519     INT16	 len,
    520     XPointer	 data,
    521     XPointer	 call_data
    522 );
    523 
    524 extern Bool	_XimSyncCallback(
    525     Xim		 im,
    526     INT16	 len,
    527     XPointer	 data,
    528     XPointer	 call_data
    529 );
    530 
    531 extern void	_XimFreeProtoIntrCallback(
    532     Xim		 im
    533 );
    534 
    535 extern XIC	 _XimProtoCreateIC(
    536     XIM		 im,
    537     XIMArg	*arg
    538 );
    539 
    540 extern void	_XimRegisterServerFilter(
    541     Xim		 im
    542 );
    543 
    544 extern void	_XimUnregisterServerFilter(
    545     Xim		 im
    546 );
    547 
    548 extern Bool	_XimTriggerNotify(
    549     Xim		 im,
    550     Xic		 ic,
    551     int		 mode,
    552     CARD32	 idx
    553 );
    554 
    555 extern Bool	_XimProcSyncReply(
    556     Xim		 im,
    557     Xic		 ic
    558 );
    559 
    560 extern void	_XimSendSetFocus(
    561     Xim		 im,
    562     Xic		 ic
    563 );
    564 
    565 extern Bool	_XimForwardEvent(
    566     Xic		 ic,
    567     XEvent	*ev,
    568     Bool	 sync
    569 );
    570 
    571 extern void	_XimFreeRemakeArg(
    572     XIMArg	*arg
    573 );
    574 
    575 extern void	_XimServerDestroy(
    576     Xim			im
    577 );
    578 
    579 extern char *	_XimEncodeIMATTRIBUTE(
    580     Xim			  im,
    581     XIMResourceList	  res_list,
    582     unsigned int	  res_num,
    583     XIMArg               *arg,
    584     XIMArg		**arg_ret,
    585     char		 *buf,
    586     int			  size,
    587     int			 *ret_len,
    588     XPointer		  top,
    589     unsigned long	  mode
    590 );
    591 
    592 extern char *	_XimEncodeICATTRIBUTE(
    593     Xic			  ic,
    594     XIMResourceList	  res_list,
    595     unsigned int	  res_num,
    596     XIMArg               *arg,
    597     XIMArg		**arg_ret,
    598     char		 *buf,
    599     int			  size,
    600     int			 *ret_len,
    601     XPointer		  top,
    602     BITMASK32		 *flag,
    603     unsigned long	  mode
    604 );
    605 
    606 #ifdef EXT_MOVE
    607 extern Bool	_XimExtenMove(
    608     Xim		 im,
    609     Xic		 ic,
    610     CARD32	 flag,
    611     CARD16	*buf,
    612     INT16	 length
    613 );
    614 #endif
    615 
    616 extern int	_Ximctstombs(
    617     XIM		 im,
    618     char	*from,
    619     int		 from_len,
    620     char	*to,
    621     int		 to_len,
    622     Status	*state
    623 );
    624 
    625 extern int	_Ximctstowcs(
    626     XIM		 im,
    627     char	*from,
    628     int		 from_len,
    629     wchar_t	*to,
    630     int		 to_len,
    631     Status	*state
    632 );
    633 
    634 extern int	_Ximctstoutf8(
    635     XIM		 im,
    636     char	*from,
    637     int		 from_len,
    638     char	*to,
    639     int		 to_len,
    640     Status	*state
    641 );
    642 
    643 extern int	_XimLcctstombs(
    644     XIM		 im,
    645     char	*from,
    646     int		 from_len,
    647     char	*to,
    648     int		 to_len,
    649     Status	*state
    650 );
    651 
    652 extern int	_XimLcctstowcs(
    653     XIM		 im,
    654     char	*from,
    655     int		 from_len,
    656     wchar_t	*to,
    657     int		 to_len,
    658     Status	*state
    659 );
    660 
    661 extern int	_XimLcctstoutf8(
    662     XIM		 im,
    663     char	*from,
    664     int		 from_len,
    665     char	*to,
    666     int		 to_len,
    667     Status	*state
    668 );
    669 
    670 extern char _XimGetMyEndian(
    671     void
    672 );
    673 
    674 extern int	_XimCheckDataSize(
    675     XPointer	 buf,
    676     int		 len
    677 );
    678 
    679 extern void	_XimSetHeader(
    680     XPointer	 buf,
    681     CARD8	 major_opcode,
    682     CARD8	 minor_opcode,
    683     INT16	*len
    684 );
    685 
    686 extern Bool	_XimSync(
    687     Xim		 im,
    688     Xic		 ic
    689 );
    690 
    691 extern int	_XimProtoMbLookupString(
    692     XIC		 xic,
    693     XKeyEvent	*ev,
    694     char	*buffer,
    695     int		 bytes,
    696     KeySym	*keysym,
    697     Status	*state
    698 );
    699 
    700 extern int	_XimProtoWcLookupString(
    701     XIC		 xic,
    702     XKeyEvent	*ev,
    703     wchar_t	*buffer,
    704     int		 bytes,
    705     KeySym	*keysym,
    706     Status	*state
    707 );
    708 
    709 extern int	_XimProtoUtf8LookupString(
    710     XIC		 xic,
    711     XKeyEvent	*ev,
    712     char	*buffer,
    713     int		 bytes,
    714     KeySym	*keysym,
    715     Status	*state
    716 );
    717 
    718 extern void	_XimRegisterFilter(
    719     Xic		 ic
    720 );
    721 
    722 extern void	_XimUnregisterFilter(
    723     Xic		 ic
    724 );
    725 
    726 extern void	_XimReregisterFilter(
    727     Xic		 ic
    728 );
    729 
    730 extern Status	_XimProtoEventToWire(
    731     XEvent	*re,
    732     xEvent	*event,
    733     Bool	sw
    734 );
    735 
    736 extern Bool	_XimProtoWireToEvent(
    737     XEvent	*re,
    738     xEvent	*event,
    739     Bool	 sw
    740 );
    741 
    742 #ifdef EXT_FORWARD
    743 extern Bool	_XimExtForwardKeyEvent(
    744     Xic		 ic,
    745     XKeyEvent	*ev,
    746     Bool	 sync
    747 );
    748 #endif
    749 
    750 extern int	_XimLookupMBText(
    751     Xic			 ic,
    752     XKeyEvent		*event,
    753     char		*buffer,
    754     int			 nbytes,
    755     KeySym		*keysym,
    756     XComposeStatus	*status
    757 );
    758 
    759 extern int	_XimLookupWCText(
    760     Xic			 ic,
    761     XKeyEvent		*event,
    762     wchar_t		*buffer,
    763     int			 nbytes,
    764     KeySym		*keysym,
    765     XComposeStatus	*status
    766 );
    767 
    768 extern int	_XimLookupUTF8Text(
    769     Xic			 ic,
    770     XKeyEvent		*event,
    771     char		*buffer,
    772     int			 nbytes,
    773     KeySym		*keysym,
    774     XComposeStatus	*status
    775 );
    776 
    777 extern EVENTMASK	_XimGetWindowEventmask(
    778     Xic		 ic
    779 );
    780 
    781 extern Xic	_XimICOfXICID(
    782     Xim		im,
    783     XICID	icid
    784 );
    785 
    786 extern void	_XimResetIMInstantiateCallback(
    787     Xim         xim
    788 );
    789 
    790 extern Bool	_XimRegisterIMInstantiateCallback(
    791     XLCd	 lcd,
    792     Display	*display,
    793     XrmDatabase	 rdb,
    794     char	*res_name,
    795     char	*res_class,
    796     XIDProc	 callback,
    797     XPointer	 client_data
    798 );
    799 
    800 extern Bool	_XimUnRegisterIMInstantiateCallback(
    801     XLCd	 lcd,
    802     Display	*display,
    803     XrmDatabase	 rdb,
    804     char	*res_name,
    805     char	*res_class,
    806     XIDProc	 callback,
    807     XPointer	 client_data
    808 );
    809 
    810 extern void	_XimFreeCommitInfo(
    811     Xic		 ic
    812 );
    813 
    814 extern Bool	_XimConnect(
    815     Xim		 im
    816 );
    817 
    818 extern Bool	_XimShutdown(
    819     Xim		 im
    820 );
    821 
    822 extern Bool	_XimWrite(
    823     Xim		 im,
    824     INT16	 len,
    825     XPointer	 data
    826 );
    827 
    828 extern Bool	_XimRead(
    829     Xim		 im,
    830     INT16	*len,
    831     XPointer	 data,
    832     int		 data_len,
    833     Bool	 (*predicate)(
    834 			      Xim, INT16, XPointer, XPointer
    835 			      ),
    836     XPointer	 arg
    837 );
    838 
    839 extern void	_XimFlush(
    840     Xim		 im
    841 );
    842 
    843 extern Bool	_XimFilterWaitEvent(
    844     Xim		 im
    845 );
    846 
    847 extern void   _XimProcError(
    848     Xim		im,
    849     Xic		ic,
    850     XPointer	data
    851 );
    852 
    853 #ifdef EXT_MOVE
    854 extern CARD32	_XimExtenArgCheck(
    855     XIMArg	*arg
    856 );
    857 #endif
    858 
    859 extern Bool _XimCbDispatch(
    860     Xim im,
    861     INT16 len,
    862     XPointer data,
    863     XPointer call_data
    864 );
    865 
    866 extern Bool _XimLocalFilter(
    867     Display		*d,
    868     Window		 w,
    869     XEvent		*ev,
    870     XPointer		 client_data
    871 );
    872 
    873 extern XIMResourceList _XimGetResourceListRecByQuark(
    874     XIMResourceList	 res_list,
    875     unsigned int	 list_num,
    876     XrmQuark		 quark
    877 );
    878 
    879 extern Bool _XimReconnectModeCreateIC(
    880     Xic			 ic
    881 );
    882 
    883 extern char *_XimLocalSetICValues(
    884     XIC			 ic,
    885     XIMArg		*values
    886 );
    887 
    888 extern char * _XimLocalGetICValues(
    889     XIC			 ic,
    890     XIMArg		*values
    891 );
    892 
    893 extern int _XimLocalMbLookupString(
    894     XIC			 ic,
    895     XKeyEvent		*ev,
    896     char		*buffer,
    897     int			 bytes,
    898     KeySym		*keysym,
    899     Status		*status
    900 );
    901 
    902 extern int _XimLocalWcLookupString(
    903     XIC			 ic,
    904     XKeyEvent		*ev,
    905     wchar_t		*buffer,
    906     int			 bytes,
    907     KeySym		*keysym,
    908     Status		*status
    909 );
    910 
    911 extern int _XimLocalUtf8LookupString(
    912     XIC			 ic,
    913     XKeyEvent		*ev,
    914     char		*buffer,
    915     int			 bytes,
    916     KeySym		*keysym,
    917     Status		*status
    918 );
    919 
    920 extern Bool _XimThaiFilter(
    921     Display		*d,
    922     Window		 w,
    923     XEvent		*ev,
    924     XPointer		 client_data
    925 );
    926 
    927 extern XIC _XimThaiCreateIC(
    928     XIM			 im,
    929     XIMArg		*values
    930 );
    931 
    932 extern Status _XimThaiCloseIM(
    933     XIM			 xim
    934 );
    935 
    936 #ifdef XIM_CONNECTABLE
    937 extern void _XimSetProtoResource(
    938     Xim im
    939 );
    940 
    941 extern Bool _XimConnectServer(
    942     Xim im
    943 );
    944 
    945 extern Bool _XimDelayModeSetAttr(
    946     Xim			 im
    947 );
    948 
    949 extern void	_XimServerReconectableDestroy(
    950     void
    951 );
    952 
    953 extern Bool _XimReCreateIC(
    954     Xic			ic
    955 );
    956 
    957 extern Bool _XimEncodeSavedIMATTRIBUTE(
    958     Xim			 im,
    959     XIMResourceList	 res_list,
    960     unsigned int	 res_num,
    961     int			*idx,
    962     char		*buf,
    963     int			 size,
    964     int			*ret_len,
    965     XPointer		 top,
    966     unsigned long	 mode
    967 );
    968 
    969 extern Bool _XimEncodeSavedICATTRIBUTE(
    970     Xic			 ic,
    971     XIMResourceList	 res_list,
    972     unsigned int	 res_num,
    973     int			*idx,
    974     char		*buf,
    975     int			 size,
    976     int			*ret_len,
    977     XPointer		 top,
    978     unsigned long	 mode
    979 );
    980 #endif
    981 
    982 extern Bool
    983 _XimRegisterDispatcher(
    984     Xim          im,
    985     Bool         (*callback)(
    986                              Xim, INT16, XPointer, XPointer
    987                              ),
    988     XPointer     call_data);
    989 
    990 extern Bool
    991 _XimRespSyncReply(
    992     Xic          ic,
    993     BITMASK16    mode);
    994 
    995 #endif /* _XIMINT_H */
    996