Ximint.h revision 61b2299d
11ab64890Smrg/* $Xorg: Ximint.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */
21ab64890Smrg/******************************************************************
31ab64890Smrg
41ab64890Smrg                Copyright 1992, 1993, 1994 by FUJITSU LIMITED
51ab64890Smrg                Copyright 1993, 1994 by Sony Corporation
61ab64890Smrg
71ab64890SmrgPermission to use, copy, modify, distribute, and sell this software
81ab64890Smrgand its documentation for any purpose is hereby granted without fee,
91ab64890Smrgprovided that the above copyright notice appear in all copies and that
101ab64890Smrgboth that copyright notice and this permission notice appear in
111ab64890Smrgsupporting documentation, and that the name of FUJITSU LIMITED and
121ab64890SmrgSony Corporation not be used in advertising or publicity pertaining to
131ab64890Smrgdistribution of the software without specific, written prior
141ab64890Smrgpermission.  FUJITSU LIMITED and Sony Corporation makes no
151ab64890Smrgrepresentations about the suitability of this software for any
1661b2299dSmrgpurpose.  It is provided "as is" without express or implied warranty.
171ab64890Smrg
181ab64890SmrgFUJITSU LIMITED AND SONY CORPORATION DISCLAIM ALL WARRANTIES WITH
191ab64890SmrgREGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
201ab64890SmrgMERCHANTABILITY AND FITNESS, IN NO EVENT SHALL FUJITSU LIMITED AND
211ab64890SmrgSONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
221ab64890SmrgDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
231ab64890SmrgPROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
241ab64890SmrgTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2561b2299dSmrgPERFORMANCE OF THIS SOFTWARE.
261ab64890Smrg
2761b2299dSmrg  Author:   Takashi Fujiwara   FUJITSU LIMITED
281ab64890Smrg                               fujiwara@a80.tech.yk.fujitsu.co.jp
291ab64890Smrg  Motifier: Makoto Wakamatsu   Sony Corporation
301ab64890Smrg			       makoto@sm.sony.co.jp
311ab64890Smrg
321ab64890Smrg******************************************************************/
331ab64890Smrg/* $XFree86: xc/lib/X11/Ximint.h,v 3.13 2003/09/06 14:06:32 pascal Exp $ */
341ab64890Smrg
351ab64890Smrg#ifndef _XIMINT_H
361ab64890Smrg#define _XIMINT_H
371ab64890Smrg
381ab64890Smrg#include <stdio.h>
391ab64890Smrg#include <X11/Xutil.h>
401ab64890Smrg
411ab64890Smrg#define Public /**/
421ab64890Smrg#define Private static
431ab64890Smrg
441ab64890Smrgtypedef struct _Xim	*Xim;
451ab64890Smrgtypedef struct _Xic	*Xic;
461ab64890Smrg
471ab64890Smrg/*
481ab64890Smrg * Input Method data
491ab64890Smrg */
501ab64890Smrg#include "XimintP.h"
511ab64890Smrg#include "XimintL.h"
521ab64890Smrg
531ab64890Smrg/*
541ab64890Smrg * XIM dependent data
551ab64890Smrg */
561ab64890Smrg
571ab64890Smrgtypedef struct _XimCommonPrivateRec {
581ab64890Smrg    /* This struct is also inlined in XimLocalPrivateRec, XimProtoPrivateRec. */
591ab64890Smrg    XlcConv		ctom_conv;
601ab64890Smrg    XlcConv		ctow_conv;
611ab64890Smrg    XlcConv		ctoutf8_conv;
621ab64890Smrg    XlcConv		cstomb_conv;
631ab64890Smrg    XlcConv		cstowc_conv;
641ab64890Smrg    XlcConv		cstoutf8_conv;
651ab64890Smrg    XlcConv		ucstoc_conv;
661ab64890Smrg    XlcConv		ucstoutf8_conv;
671ab64890Smrg} XimCommonPrivateRec;
681ab64890Smrg
691ab64890Smrgtypedef union _XIMPrivateRec {
701ab64890Smrg    XimCommonPrivateRec  common;
711ab64890Smrg    XimLocalPrivateRec   local;
721ab64890Smrg    XimProtoPrivateRec   proto;
731ab64890Smrg} XIMPrivateRec;
741ab64890Smrg
751ab64890Smrg/*
761ab64890Smrg * IM struct
771ab64890Smrg */
781ab64890Smrgtypedef struct _Xim {
791ab64890Smrg    XIMMethods		methods;
801ab64890Smrg    XIMCoreRec		core;
811ab64890Smrg    XIMPrivateRec	private;
821ab64890Smrg} XimRec;
831ab64890Smrg
841ab64890Smrg/*
851ab64890Smrg * IC deprndent data
861ab64890Smrg */
871ab64890Smrgtypedef union _XICPrivateRec {
881ab64890Smrg    XicLocalPrivateRec   local;
891ab64890Smrg    XicProtoPrivateRec   proto;
901ab64890Smrg} XICPrivateRec;
911ab64890Smrg
921ab64890Smrg/*
931ab64890Smrg * IC struct
941ab64890Smrg */
951ab64890Smrgtypedef struct _Xic {
961ab64890Smrg	XICMethods	methods;
971ab64890Smrg	XICCoreRec	core;
981ab64890Smrg	XICPrivateRec	private;
991ab64890Smrg} XicRec;
1001ab64890Smrg
1011ab64890Smrgtypedef struct _XimDefIMValues {
1021ab64890Smrg	XIMValuesList		*im_values_list;
1031ab64890Smrg	XIMValuesList		*ic_values_list;
1041ab64890Smrg	XIMStyles		*styles;
1051ab64890Smrg	XIMCallback		 destroy_callback;
1061ab64890Smrg	char			*res_name;
1071ab64890Smrg	char			*res_class;
1081ab64890Smrg	Bool			 visible_position;
1091ab64890Smrg} XimDefIMValues;
1101ab64890Smrg
1111ab64890Smrgtypedef struct _XimDefICValues {
1121ab64890Smrg    XIMStyle			 input_style;
1131ab64890Smrg    Window			 client_window;
1141ab64890Smrg    Window			 focus_window;
1151ab64890Smrg    unsigned long		 filter_events;
1161ab64890Smrg    XICCallback			 geometry_callback;
1171ab64890Smrg    char			*res_name;
1181ab64890Smrg    char			*res_class;
1191ab64890Smrg    XICCallback			 destroy_callback;
1201ab64890Smrg    XICCallback			 preedit_state_notify_callback;
1211ab64890Smrg    XICCallback			 string_conversion_callback;
1221ab64890Smrg    XIMStringConversionText	 string_conversion;
1231ab64890Smrg    XIMResetState		 reset_state;
1241ab64890Smrg    XIMHotKeyTriggers		*hotkey;
1251ab64890Smrg    XIMHotKeyState		 hotkey_state;
1261ab64890Smrg    ICPreeditAttributes		 preedit_attr;
1271ab64890Smrg    ICStatusAttributes		 status_attr;
1281ab64890Smrg} XimDefICValues;
1291ab64890Smrg
1301ab64890Smrg#define XIM_MODE_IM_GET		(1 << 0)
1311ab64890Smrg#define XIM_MODE_IM_SET		(1 << 1)
1321ab64890Smrg#define XIM_MODE_IM_DEFAULT	(1 << 2)
1331ab64890Smrg
1341ab64890Smrg#define XIM_MODE_PRE_GET	(1 << 0)
1351ab64890Smrg#define XIM_MODE_PRE_SET	(1 << 1)
1361ab64890Smrg#define XIM_MODE_PRE_CREATE	(1 << 2)
1371ab64890Smrg#define XIM_MODE_PRE_ONCE	(1 << 3)
1381ab64890Smrg#define XIM_MODE_PRE_DEFAULT	(1 << 4)
1391ab64890Smrg
1401ab64890Smrg#define XIM_MODE_STS_GET	(1 << 5)
1411ab64890Smrg#define XIM_MODE_STS_SET	(1 << 6)
1421ab64890Smrg#define XIM_MODE_STS_CREATE	(1 << 7)
1431ab64890Smrg#define XIM_MODE_STS_ONCE	(1 << 8)
1441ab64890Smrg#define XIM_MODE_STS_DEFAULT	(1 << 9)
1451ab64890Smrg
1461ab64890Smrg#define XIM_MODE_IC_GET		(XIM_MODE_PRE_GET      | XIM_MODE_STS_GET)
1471ab64890Smrg#define XIM_MODE_IC_SET		(XIM_MODE_PRE_SET      | XIM_MODE_STS_SET)
1481ab64890Smrg#define XIM_MODE_IC_CREATE	(XIM_MODE_PRE_CREATE   | XIM_MODE_STS_CREATE)
1491ab64890Smrg#define XIM_MODE_IC_ONCE	(XIM_MODE_PRE_ONCE     | XIM_MODE_STS_ONCE)
1501ab64890Smrg#define XIM_MODE_IC_DEFAULT	(XIM_MODE_PRE_DEFAULT  | XIM_MODE_STS_DEFAULT)
1511ab64890Smrg
1521ab64890Smrg#define XIM_MODE_PRE_MASK	(XIM_MODE_PRE_GET    | XIM_MODE_PRE_SET    | \
1531ab64890Smrg				 XIM_MODE_PRE_CREATE | XIM_MODE_PRE_ONCE   | \
1541ab64890Smrg				 XIM_MODE_PRE_DEFAULT)
1551ab64890Smrg#define XIM_MODE_STS_MASK	(XIM_MODE_STS_GET    | XIM_MODE_STS_SET    | \
1561ab64890Smrg				 XIM_MODE_STS_CREATE | XIM_MODE_STS_ONCE   | \
1571ab64890Smrg				 XIM_MODE_STS_DEFAULT)
1581ab64890Smrg
1591ab64890Smrg#define XIM_SETIMDEFAULTS	(1L << 0)
1601ab64890Smrg#define XIM_SETIMVALUES		(1L << 1)
1611ab64890Smrg#define XIM_GETIMVALUES		(1L << 2)
1621ab64890Smrg
1631ab64890Smrg#define XIM_SETICDEFAULTS	(1L << 0)
1641ab64890Smrg#define XIM_CREATEIC		(1L << 1)
1651ab64890Smrg#define XIM_SETICVALUES		(1L << 2)
1661ab64890Smrg#define XIM_GETICVALUES		(1L << 3)
1671ab64890Smrg#define XIM_PREEDIT_ATTR	(1L << 4)
1681ab64890Smrg#define XIM_STATUS_ATTR		(1L << 5)
1691ab64890Smrg
1701ab64890Smrg#define XIM_CHECK_VALID		0
1711ab64890Smrg#define XIM_CHECK_INVALID	1
1721ab64890Smrg#define XIM_CHECK_ERROR		2
1731ab64890Smrg
1741ab64890Smrg#define FILTERD         True
1751ab64890Smrg#define NOTFILTERD      False
1761ab64890Smrg
1771ab64890Smrg#define XIMMODIFIER		"@im="
1781ab64890Smrg
1791ab64890Smrg#define	XIM_TRUE	True
1801ab64890Smrg#define	XIM_FALSE	False
1811ab64890Smrg#define	XIM_OVERFLOW	(-1)
1821ab64890Smrg
1831ab64890Smrg#define BRL_UC_ROW	0x2800
1841ab64890Smrg
1851ab64890Smrg/*
1861ab64890Smrg * Global symbols
1871ab64890Smrg */
1881ab64890Smrg
1891ab64890SmrgXPointer _XimGetLocaleCode (
1901ab64890Smrg    const char	*encoding_name
1911ab64890Smrg);
1921ab64890Smrg
1931ab64890Smrgint _XimGetCharCode (
1941ab64890Smrg    XPointer		conv,
1951ab64890Smrg    KeySym		keysym,
1961ab64890Smrg    unsigned char	*buf,
1971ab64890Smrg    int			nbytes
1981ab64890Smrg);
1991ab64890Smrg
2001ab64890Smrgunsigned int KeySymToUcs4 (
2011ab64890Smrg    KeySym		keysym
2021ab64890Smrg);
2031ab64890Smrg
2041ab64890Smrgextern Bool _XimSetIMResourceList(
2051ab64890Smrg    XIMResourceList	*res_list,
2061ab64890Smrg    unsigned int	*list_num
2071ab64890Smrg);
2081ab64890Smrg
2091ab64890Smrgextern Bool _XimSetICResourceList(
2101ab64890Smrg    XIMResourceList	*res_list,
2111ab64890Smrg    unsigned int	*list_num
2121ab64890Smrg);
2131ab64890Smrg
2141ab64890Smrgextern Bool _XimSetInnerIMResourceList(
2151ab64890Smrg    XIMResourceList	*res_list,
2161ab64890Smrg    unsigned int	*list_num
2171ab64890Smrg);
2181ab64890Smrg
2191ab64890Smrgextern Bool _XimSetInnerICResourceList(
2201ab64890Smrg    XIMResourceList	*res_list,
2211ab64890Smrg    unsigned int	*list_num
2221ab64890Smrg);
2231ab64890Smrg
2241ab64890Smrgextern Bool _XimCheckCreateICValues(
2251ab64890Smrg    XIMResourceList	 res_list,
2261ab64890Smrg    unsigned int	 list_num
2271ab64890Smrg);
2281ab64890Smrg
2291ab64890Smrgextern XIMResourceList _XimGetResourceListRec(
2301ab64890Smrg    XIMResourceList	 res_list,
2311ab64890Smrg    unsigned int	 list_num,
2321ab64890Smrg    const char		*name
2331ab64890Smrg);
2341ab64890Smrg
2351ab64890Smrgextern void _XimSetIMMode(
2361ab64890Smrg    XIMResourceList	 res_list,
2371ab64890Smrg    unsigned int	 list_num
2381ab64890Smrg);
2391ab64890Smrg
2401ab64890Smrgextern void _XimSetICMode(
2411ab64890Smrg    XIMResourceList	 res_list,
2421ab64890Smrg    unsigned int	 list_num,
2431ab64890Smrg    XIMStyle		 style
2441ab64890Smrg);
2451ab64890Smrg
2461ab64890Smrgextern int _XimCheckIMMode(
2471ab64890Smrg    XIMResourceList	 res_list,
2481ab64890Smrg    unsigned long	 mode
2491ab64890Smrg);
2501ab64890Smrg
2511ab64890Smrgextern int _XimCheckICMode(
2521ab64890Smrg    XIMResourceList	 res_list,
2531ab64890Smrg    unsigned long	 mode
2541ab64890Smrg);
2551ab64890Smrg
2561ab64890Smrgextern Bool _XimSetLocalIMDefaults(
2571ab64890Smrg    Xim			 im,
2581ab64890Smrg    XPointer		 top,
2591ab64890Smrg    XIMResourceList	 res_list,
2601ab64890Smrg    unsigned int	 list_num
2611ab64890Smrg);
2621ab64890Smrg
2631ab64890Smrgextern Bool _XimSetICDefaults(
2641ab64890Smrg    Xic			 ic,
2651ab64890Smrg    XPointer		 top,
2661ab64890Smrg    unsigned long	 mode,
2671ab64890Smrg    XIMResourceList	 res_list,
2681ab64890Smrg    unsigned int	 list_num
2691ab64890Smrg);
2701ab64890Smrg
2711ab64890Smrgextern Bool _XimEncodeLocalIMAttr(
2721ab64890Smrg    XIMResourceList	 res,
2731ab64890Smrg    XPointer		 top,
2741ab64890Smrg    XPointer		 val
2751ab64890Smrg);
2761ab64890Smrg
2771ab64890Smrgextern Bool _XimEncodeLocalICAttr(
2781ab64890Smrg    Xic			 ic,
2791ab64890Smrg    XIMResourceList	 res,
2801ab64890Smrg    XPointer		 top,
2811ab64890Smrg    XIMArg		*arg,
2821ab64890Smrg    unsigned long	 mode
2831ab64890Smrg);
2841ab64890Smrg
2851ab64890Smrgextern Bool _XimCheckLocalInputStyle(
2861ab64890Smrg    Xic			 ic,
2871ab64890Smrg    XPointer		 top,
2881ab64890Smrg    XIMArg		*values,
2891ab64890Smrg    XIMStyles           *styles,
2901ab64890Smrg    XIMResourceList	 res_list,
2911ab64890Smrg    unsigned int	 list_num
2921ab64890Smrg);
2931ab64890Smrg
2941ab64890Smrgextern Bool _XimDecodeLocalIMAttr(
2951ab64890Smrg    XIMResourceList	 res,
2961ab64890Smrg    XPointer		 top,
2971ab64890Smrg    XPointer		 val
2981ab64890Smrg);
2991ab64890Smrg
3001ab64890Smrgextern Bool _XimDecodeLocalICAttr(
3011ab64890Smrg    XIMResourceList	 res,
3021ab64890Smrg    XPointer		 top,
3031ab64890Smrg    XPointer		 val,
3041ab64890Smrg    unsigned long	mode
3051ab64890Smrg);
3061ab64890Smrg
3071ab64890Smrgextern void _XimGetCurrentIMValues(
3081ab64890Smrg    Xim			 im,
3091ab64890Smrg    XimDefIMValues	*im_values
3101ab64890Smrg);
3111ab64890Smrg
3121ab64890Smrgextern void _XimSetCurrentIMValues(
3131ab64890Smrg    Xim			 im,
3141ab64890Smrg    XimDefIMValues	*im_values
3151ab64890Smrg);
3161ab64890Smrg
3171ab64890Smrgextern void _XimGetCurrentICValues(
3181ab64890Smrg    Xic			 ic,
3191ab64890Smrg    XimDefICValues	*ic_values
3201ab64890Smrg);
3211ab64890Smrg
3221ab64890Smrgextern void _XimSetCurrentICValues(
3231ab64890Smrg    Xic			 ic,
3241ab64890Smrg    XimDefICValues	*ic_values
3251ab64890Smrg);
3261ab64890Smrg
3271ab64890Smrgextern void _XimInitialResourceInfo(
3281ab64890Smrg    void
3291ab64890Smrg);
3301ab64890Smrg
3311ab64890Smrgextern void	 _XimParseStringFile(
3321ab64890Smrg    FILE        *fp,
3331ab64890Smrg    Xim          im
3341ab64890Smrg);
3351ab64890Smrg
3361ab64890Smrgextern Bool	 _XimCheckIfLocalProcessing(
3371ab64890Smrg    Xim		 im
3381ab64890Smrg);
3391ab64890Smrg
3401ab64890Smrgextern Bool	 _XimCheckIfThaiProcessing(
3411ab64890Smrg    Xim		 im
3421ab64890Smrg);
3431ab64890Smrg
3441ab64890Smrgextern Bool	 _XimLocalOpenIM(
3451ab64890Smrg    Xim		 im
3461ab64890Smrg);
3471ab64890Smrg
3481ab64890Smrgextern Bool	 _XimThaiOpenIM(
3491ab64890Smrg    Xim		 im
3501ab64890Smrg);
3511ab64890Smrg
3521ab64890Smrgextern Bool	 _XimProtoOpenIM(
3531ab64890Smrg    Xim		 im
3541ab64890Smrg);
3551ab64890Smrg
3561ab64890Smrgextern void	 _XimLocalIMFree(
3571ab64890Smrg    Xim		 im
3581ab64890Smrg);
3591ab64890Smrg
3601ab64890Smrgextern void	 _XimThaiIMFree(
3611ab64890Smrg    Xim	         im
3621ab64890Smrg);
3631ab64890Smrg
3641ab64890Smrgextern void	 _XimProtoIMFree(
3651ab64890Smrg    Xim		 im
3661ab64890Smrg);
3671ab64890Smrg
3681ab64890Smrgextern char *	 _XimSetIMValueData(
3691ab64890Smrg    Xim			 im,
3701ab64890Smrg    XPointer		 top,
3711ab64890Smrg    XIMArg		*arg,
3721ab64890Smrg    XIMResourceList	 res_list,
3731ab64890Smrg    unsigned int	 list_num
3741ab64890Smrg);
3751ab64890Smrg
3761ab64890Smrgextern char *	 _XimGetIMValueData(
3771ab64890Smrg    Xim			 im,
3781ab64890Smrg    XPointer		 top,
3791ab64890Smrg    XIMArg		*arg,
3801ab64890Smrg    XIMResourceList	 res_list,
3811ab64890Smrg    unsigned int	 list_num
3821ab64890Smrg);
3831ab64890Smrg
3841ab64890Smrgextern char *	 _XimSetICValueData(
3851ab64890Smrg    Xic			 ic,
3861ab64890Smrg    XPointer		 top,
3871ab64890Smrg    XIMResourceList	 res_list,
3881ab64890Smrg    unsigned int	 list_num,
3891ab64890Smrg    XIMArg		*arg,
3901ab64890Smrg    unsigned long	 mode,
3911ab64890Smrg    Bool		 flag
3921ab64890Smrg);
3931ab64890Smrg
3941ab64890Smrgextern char *	 _XimGetICValueData(
3951ab64890Smrg    Xic			 ic,
3961ab64890Smrg    XPointer		 top,
3971ab64890Smrg    XIMResourceList	 res_list,
3981ab64890Smrg    unsigned int	 list_num,
3991ab64890Smrg    XIMArg		*arg,
4001ab64890Smrg    unsigned long	 mode
4011ab64890Smrg);
4021ab64890Smrg
4031ab64890Smrgextern char *	 _XimLocalSetIMValues(
4041ab64890Smrg    XIM		 im,
4051ab64890Smrg    XIMArg	*arg
4061ab64890Smrg);
4071ab64890Smrg
4081ab64890Smrgextern char *	 _XimLocalGetIMValues(
4091ab64890Smrg    XIM		 im,
4101ab64890Smrg    XIMArg	*arg
4111ab64890Smrg);
4121ab64890Smrg
4131ab64890Smrgextern XIC	 _XimLocalCreateIC(
4141ab64890Smrg    XIM		 im,
4151ab64890Smrg    XIMArg	*arg
4161ab64890Smrg);
4171ab64890Smrg
4181ab64890Smrgextern Bool	_XimDispatchInit(
4191ab64890Smrg    Xim		 im
4201ab64890Smrg);
4211ab64890Smrg
4221ab64890Smrgextern Bool	 _XimGetAttributeID(
4231ab64890Smrg    Xim		 im,
4241ab64890Smrg    CARD16	*buf
4251ab64890Smrg);
4261ab64890Smrg
4271ab64890Smrgextern Bool	 _XimExtension(
4281ab64890Smrg    Xim		 im
4291ab64890Smrg);
4301ab64890Smrg
4311ab64890Smrgextern void	_XimDestroyIMStructureList(
4321ab64890Smrg    Xim		 im
4331ab64890Smrg);
4341ab64890Smrg
4351ab64890Smrgextern char *	_XimMakeIMAttrIDList(
4361ab64890Smrg    Xim			 im,
4371ab64890Smrg    XIMResourceList	 res_list,
4381ab64890Smrg    unsigned int	 res_num,
4391ab64890Smrg    XIMArg		*arg,
4401ab64890Smrg    CARD16		*buf,
4411ab64890Smrg    INT16		*len,
4421ab64890Smrg    unsigned long        mode
4431ab64890Smrg);
4441ab64890Smrg
4451ab64890Smrgextern char *	_XimMakeICAttrIDList(
4461ab64890Smrg    Xic                  ic,
4471ab64890Smrg    XIMResourceList	 res_list,
4481ab64890Smrg    unsigned int	 res_num,
4491ab64890Smrg    XIMArg		*arg,
4501ab64890Smrg    CARD16		*idList,
4511ab64890Smrg    INT16		*num,
4521ab64890Smrg    unsigned long	 mode
4531ab64890Smrg);
4541ab64890Smrg
4551ab64890Smrgextern char *	_XimDecodeIMATTRIBUTE(
4561ab64890Smrg    Xim			 im,
4571ab64890Smrg    XIMResourceList	 res_list,
4581ab64890Smrg    unsigned int	 res_num,
4591ab64890Smrg    CARD16		*buf,
4601ab64890Smrg    INT16		 buf_len,
4611ab64890Smrg    XIMArg		*arg,
4621ab64890Smrg    BITMASK32		 mode
4631ab64890Smrg);
4641ab64890Smrg
4651ab64890Smrgextern char *	_XimDecodeICATTRIBUTE(
4661ab64890Smrg    Xic			 ic,
4671ab64890Smrg    XIMResourceList	 res_list,
4681ab64890Smrg    unsigned int	 res_num,
4691ab64890Smrg    CARD16		*buf,
4701ab64890Smrg    INT16		 buf_len,
4711ab64890Smrg    XIMArg		*arg,
4721ab64890Smrg    BITMASK32		 mode
4731ab64890Smrg);
4741ab64890Smrg
4751ab64890Smrgextern Bool	_XimRegProtoIntrCallback(
4761ab64890Smrg    Xim		 im,
4771ab64890Smrg    CARD16	 major_code,
4781ab64890Smrg    CARD16	 minor_code,
4791ab64890Smrg    Bool	 (*proc)(
4801ab64890Smrg			Xim, INT16, XPointer, XPointer
4811ab64890Smrg			),
4821ab64890Smrg    XPointer	 call_data
4831ab64890Smrg);
4841ab64890Smrg
4851ab64890Smrgextern Bool	_XimErrorCallback(
4861ab64890Smrg    Xim		 im,
4871ab64890Smrg    INT16	 len,
4881ab64890Smrg    XPointer	 data,
4891ab64890Smrg    XPointer	 call_data
4901ab64890Smrg);
4911ab64890Smrg
4921ab64890Smrgextern Bool	_XimError(
4931ab64890Smrg    Xim		 im,
4941ab64890Smrg    Xic		 ic,
4951ab64890Smrg    CARD16	 error_code,
4961ab64890Smrg    INT16	 detail_length,
4971ab64890Smrg    CARD16	 type,
4981ab64890Smrg    char	*detail
4991ab64890Smrg);
5001ab64890Smrg
5011ab64890Smrgextern Bool	_XimRegisterTriggerKeysCallback(
5021ab64890Smrg    Xim		 im,
5031ab64890Smrg    INT16	 len,
5041ab64890Smrg    XPointer	 data,
5051ab64890Smrg    XPointer	 call_data
5061ab64890Smrg);
5071ab64890Smrg
5081ab64890Smrgextern Bool	_XimSetEventMaskCallback(
5091ab64890Smrg    Xim		 im,
5101ab64890Smrg    INT16	 len,
5111ab64890Smrg    XPointer	 data,
5121ab64890Smrg    XPointer	 call_data
5131ab64890Smrg);
5141ab64890Smrg
5151ab64890Smrgextern Bool	_XimForwardEventCallback(
5161ab64890Smrg    Xim		 im,
5171ab64890Smrg    INT16	 len,
5181ab64890Smrg    XPointer	 data,
5191ab64890Smrg    XPointer	 call_data
5201ab64890Smrg);
5211ab64890Smrg
5221ab64890Smrgextern Bool	_XimCommitCallback(
5231ab64890Smrg    Xim		 im,
5241ab64890Smrg    INT16	 len,
5251ab64890Smrg    XPointer	 data,
5261ab64890Smrg    XPointer	 call_data
5271ab64890Smrg);
5281ab64890Smrg
5291ab64890Smrgextern Bool	_XimSyncCallback(
5301ab64890Smrg    Xim		 im,
5311ab64890Smrg    INT16	 len,
5321ab64890Smrg    XPointer	 data,
5331ab64890Smrg    XPointer	 call_data
5341ab64890Smrg);
5351ab64890Smrg
5361ab64890Smrgextern void	_XimFreeProtoIntrCallback(
5371ab64890Smrg    Xim		 im
5381ab64890Smrg);
5391ab64890Smrg
5401ab64890Smrgextern XIC	 _XimProtoCreateIC(
5411ab64890Smrg    XIM		 im,
5421ab64890Smrg    XIMArg	*arg
5431ab64890Smrg);
5441ab64890Smrg
5451ab64890Smrgextern void	_XimRegisterServerFilter(
5461ab64890Smrg    Xim		 im
5471ab64890Smrg);
5481ab64890Smrg
5491ab64890Smrgextern void	_XimUnregisterServerFilter(
5501ab64890Smrg    Xim		 im
5511ab64890Smrg);
5521ab64890Smrg
5531ab64890Smrgextern Bool	_XimTriggerNotify(
5541ab64890Smrg    Xim		 im,
5551ab64890Smrg    Xic		 ic,
5561ab64890Smrg    int		 mode,
5571ab64890Smrg    CARD32	 idx
5581ab64890Smrg);
5591ab64890Smrg
5601ab64890Smrgextern Bool	_XimProcSyncReply(
5611ab64890Smrg    Xim		 im,
5621ab64890Smrg    Xic		 ic
5631ab64890Smrg);
5641ab64890Smrg
5651ab64890Smrgextern void	_XimSendSetFocus(
5661ab64890Smrg    Xim		 im,
5671ab64890Smrg    Xic		 ic
5681ab64890Smrg);
5691ab64890Smrg
5701ab64890Smrgextern Bool	_XimForwardEvent(
5711ab64890Smrg    Xic		 ic,
5721ab64890Smrg    XEvent	*ev,
5731ab64890Smrg    Bool	 sync
5741ab64890Smrg);
5751ab64890Smrg
5761ab64890Smrgextern void	_XimFreeRemakeArg(
5771ab64890Smrg    XIMArg	*arg
5781ab64890Smrg);
5791ab64890Smrg
5801ab64890Smrgextern void	_XimServerDestroy(
5811ab64890Smrg    Xim			im
5821ab64890Smrg);
5831ab64890Smrg
5841ab64890Smrgextern char *	_XimEncodeIMATTRIBUTE(
5851ab64890Smrg    Xim			  im,
5861ab64890Smrg    XIMResourceList	  res_list,
5871ab64890Smrg    unsigned int	  res_num,
58861b2299dSmrg    XIMArg               *arg,
5891ab64890Smrg    XIMArg		**arg_ret,
5901ab64890Smrg    char		 *buf,
5911ab64890Smrg    int			  size,
5921ab64890Smrg    int			 *ret_len,
5931ab64890Smrg    XPointer		  top,
5941ab64890Smrg    unsigned long	  mode
5951ab64890Smrg);
5961ab64890Smrg
5971ab64890Smrgextern char *	_XimEncodeICATTRIBUTE(
5981ab64890Smrg    Xic			  ic,
5991ab64890Smrg    XIMResourceList	  res_list,
6001ab64890Smrg    unsigned int	  res_num,
60161b2299dSmrg    XIMArg               *arg,
6021ab64890Smrg    XIMArg		**arg_ret,
6031ab64890Smrg    char		 *buf,
6041ab64890Smrg    int			  size,
6051ab64890Smrg    int			 *ret_len,
6061ab64890Smrg    XPointer		  top,
6071ab64890Smrg    BITMASK32		 *flag,
6081ab64890Smrg    unsigned long	  mode
6091ab64890Smrg);
6101ab64890Smrg
6111ab64890Smrg#ifdef EXT_MOVE
6121ab64890Smrgextern Bool	_XimExtenMove(
6131ab64890Smrg    Xim		 im,
6141ab64890Smrg    Xic		 ic,
6151ab64890Smrg    CARD32	 flag,
6161ab64890Smrg    CARD16	*buf,
6171ab64890Smrg    INT16	 length
6181ab64890Smrg);
6191ab64890Smrg#endif
6201ab64890Smrg
6211ab64890Smrgextern int	_Ximctstombs(
6221ab64890Smrg    XIM		 im,
6231ab64890Smrg    char	*from,
6241ab64890Smrg    int		 from_len,
6251ab64890Smrg    char	*to,
6261ab64890Smrg    int		 to_len,
6271ab64890Smrg    Status	*state
6281ab64890Smrg);
6291ab64890Smrg
6301ab64890Smrgextern int	_Ximctstowcs(
6311ab64890Smrg    XIM		 im,
6321ab64890Smrg    char	*from,
6331ab64890Smrg    int		 from_len,
6341ab64890Smrg    wchar_t	*to,
6351ab64890Smrg    int		 to_len,
6361ab64890Smrg    Status	*state
6371ab64890Smrg);
6381ab64890Smrg
6391ab64890Smrgextern int	_Ximctstoutf8(
6401ab64890Smrg    XIM		 im,
6411ab64890Smrg    char	*from,
6421ab64890Smrg    int		 from_len,
6431ab64890Smrg    char	*to,
6441ab64890Smrg    int		 to_len,
6451ab64890Smrg    Status	*state
6461ab64890Smrg);
6471ab64890Smrg
6481ab64890Smrgextern int	_XimLcctstombs(
6491ab64890Smrg    XIM		 im,
6501ab64890Smrg    char	*from,
6511ab64890Smrg    int		 from_len,
6521ab64890Smrg    char	*to,
6531ab64890Smrg    int		 to_len,
6541ab64890Smrg    Status	*state
6551ab64890Smrg);
6561ab64890Smrg
6571ab64890Smrgextern int	_XimLcctstowcs(
6581ab64890Smrg    XIM		 im,
6591ab64890Smrg    char	*from,
6601ab64890Smrg    int		 from_len,
6611ab64890Smrg    wchar_t	*to,
6621ab64890Smrg    int		 to_len,
6631ab64890Smrg    Status	*state
6641ab64890Smrg);
6651ab64890Smrg
6661ab64890Smrgextern int	_XimLcctstoutf8(
6671ab64890Smrg    XIM		 im,
6681ab64890Smrg    char	*from,
6691ab64890Smrg    int		 from_len,
6701ab64890Smrg    char	*to,
6711ab64890Smrg    int		 to_len,
6721ab64890Smrg    Status	*state
6731ab64890Smrg);
6741ab64890Smrg
6751ab64890Smrgextern char _XimGetMyEndian(
6761ab64890Smrg    void
6771ab64890Smrg);
6781ab64890Smrg
6791ab64890Smrgextern int	_XimCheckDataSize(
6801ab64890Smrg    XPointer	 buf,
6811ab64890Smrg    int		 len
6821ab64890Smrg);
6831ab64890Smrg
6841ab64890Smrgextern void	_XimSetHeader(
6851ab64890Smrg    XPointer	 buf,
6861ab64890Smrg    CARD8	 major_opcode,
6871ab64890Smrg    CARD8	 minor_opcode,
6881ab64890Smrg    INT16	*len
6891ab64890Smrg);
6901ab64890Smrg
6911ab64890Smrgextern Bool	_XimSync(
6921ab64890Smrg    Xim		 im,
6931ab64890Smrg    Xic		 ic
6941ab64890Smrg);
6951ab64890Smrg
6961ab64890Smrgextern int	_XimProtoMbLookupString(
6971ab64890Smrg    XIC		 xic,
6981ab64890Smrg    XKeyEvent	*ev,
6991ab64890Smrg    char	*buffer,
7001ab64890Smrg    int		 bytes,
7011ab64890Smrg    KeySym	*keysym,
7021ab64890Smrg    Status	*state
7031ab64890Smrg);
7041ab64890Smrg
7051ab64890Smrgextern int	_XimProtoWcLookupString(
7061ab64890Smrg    XIC		 xic,
7071ab64890Smrg    XKeyEvent	*ev,
7081ab64890Smrg    wchar_t	*buffer,
7091ab64890Smrg    int		 bytes,
7101ab64890Smrg    KeySym	*keysym,
7111ab64890Smrg    Status	*state
7121ab64890Smrg);
7131ab64890Smrg
7141ab64890Smrgextern int	_XimProtoUtf8LookupString(
7151ab64890Smrg    XIC		 xic,
7161ab64890Smrg    XKeyEvent	*ev,
7171ab64890Smrg    char	*buffer,
7181ab64890Smrg    int		 bytes,
7191ab64890Smrg    KeySym	*keysym,
7201ab64890Smrg    Status	*state
7211ab64890Smrg);
7221ab64890Smrg
7231ab64890Smrgextern void	_XimRegisterFilter(
7241ab64890Smrg    Xic		 ic
7251ab64890Smrg);
7261ab64890Smrg
7271ab64890Smrgextern void	_XimUnregisterFilter(
7281ab64890Smrg    Xic		 ic
7291ab64890Smrg);
7301ab64890Smrg
7311ab64890Smrgextern void	_XimReregisterFilter(
7321ab64890Smrg    Xic		 ic
7331ab64890Smrg);
7341ab64890Smrg
7351ab64890Smrgextern Status	_XimProtoEventToWire(
7361ab64890Smrg    XEvent	*re,
7371ab64890Smrg    xEvent	*event,
7381ab64890Smrg    Bool	sw
7391ab64890Smrg);
7401ab64890Smrg
7411ab64890Smrgextern Bool	_XimProtoWireToEvent(
7421ab64890Smrg    XEvent	*re,
7431ab64890Smrg    xEvent	*event,
7441ab64890Smrg    Bool	 sw
7451ab64890Smrg);
7461ab64890Smrg
7471ab64890Smrg#ifdef EXT_FORWARD
7481ab64890Smrgextern Bool	_XimExtForwardKeyEvent(
7491ab64890Smrg    Xic		 ic,
7501ab64890Smrg    XKeyEvent	*ev,
7511ab64890Smrg    Bool	 sync
7521ab64890Smrg);
7531ab64890Smrg#endif
7541ab64890Smrg
7551ab64890Smrgextern int	_XimLookupMBText(
7561ab64890Smrg    Xic			 ic,
7571ab64890Smrg    XKeyEvent		*event,
7581ab64890Smrg    char		*buffer,
7591ab64890Smrg    int			 nbytes,
7601ab64890Smrg    KeySym		*keysym,
7611ab64890Smrg    XComposeStatus	*status
7621ab64890Smrg);
7631ab64890Smrg
7641ab64890Smrgextern int	_XimLookupWCText(
7651ab64890Smrg    Xic			 ic,
7661ab64890Smrg    XKeyEvent		*event,
7671ab64890Smrg    wchar_t		*buffer,
7681ab64890Smrg    int			 nbytes,
7691ab64890Smrg    KeySym		*keysym,
7701ab64890Smrg    XComposeStatus	*status
7711ab64890Smrg);
7721ab64890Smrg
7731ab64890Smrgextern int	_XimLookupUTF8Text(
7741ab64890Smrg    Xic			 ic,
7751ab64890Smrg    XKeyEvent		*event,
7761ab64890Smrg    char		*buffer,
7771ab64890Smrg    int			 nbytes,
7781ab64890Smrg    KeySym		*keysym,
7791ab64890Smrg    XComposeStatus	*status
7801ab64890Smrg);
7811ab64890Smrg
7821ab64890Smrgextern EVENTMASK	_XimGetWindowEventmask(
7831ab64890Smrg    Xic		 ic
7841ab64890Smrg);
7851ab64890Smrg
7861ab64890Smrgextern Xic	_XimICOfXICID(
7871ab64890Smrg    Xim		im,
7881ab64890Smrg    XICID	icid
7891ab64890Smrg);
7901ab64890Smrg
7911ab64890Smrgextern void	_XimResetIMInstantiateCallback(
7921ab64890Smrg    Xim         xim
7931ab64890Smrg);
7941ab64890Smrg
7951ab64890Smrgextern Bool	_XimRegisterIMInstantiateCallback(
7961ab64890Smrg    XLCd	 lcd,
7971ab64890Smrg    Display	*display,
7981ab64890Smrg    XrmDatabase	 rdb,
7991ab64890Smrg    char	*res_name,
8001ab64890Smrg    char	*res_class,
8011ab64890Smrg    XIDProc	 callback,
8021ab64890Smrg    XPointer	 client_data
8031ab64890Smrg);
8041ab64890Smrg
8051ab64890Smrgextern Bool	_XimUnRegisterIMInstantiateCallback(
8061ab64890Smrg    XLCd	 lcd,
8071ab64890Smrg    Display	*display,
8081ab64890Smrg    XrmDatabase	 rdb,
8091ab64890Smrg    char	*res_name,
8101ab64890Smrg    char	*res_class,
8111ab64890Smrg    XIDProc	 callback,
8121ab64890Smrg    XPointer	 client_data
8131ab64890Smrg);
8141ab64890Smrg
8151ab64890Smrgextern void	_XimFreeCommitInfo(
8161ab64890Smrg    Xic		 ic
8171ab64890Smrg);
8181ab64890Smrg
8191ab64890Smrgextern Bool	_XimConnect(
8201ab64890Smrg    Xim		 im
8211ab64890Smrg);
8221ab64890Smrg
8231ab64890Smrgextern Bool	_XimShutdown(
8241ab64890Smrg    Xim		 im
8251ab64890Smrg);
8261ab64890Smrg
8271ab64890Smrgextern Bool	_XimWrite(
8281ab64890Smrg    Xim		 im,
8291ab64890Smrg    INT16	 len,
8301ab64890Smrg    XPointer	 data
8311ab64890Smrg);
8321ab64890Smrg
8331ab64890Smrgextern Bool	_XimRead(
8341ab64890Smrg    Xim		 im,
8351ab64890Smrg    INT16	*len,
8361ab64890Smrg    XPointer	 data,
8371ab64890Smrg    int		 data_len,
8381ab64890Smrg    Bool	 (*predicate)(
8391ab64890Smrg			      Xim, INT16, XPointer, XPointer
8401ab64890Smrg			      ),
8411ab64890Smrg    XPointer	 arg
8421ab64890Smrg);
8431ab64890Smrg
8441ab64890Smrgextern void	_XimFlush(
8451ab64890Smrg    Xim		 im
8461ab64890Smrg);
8471ab64890Smrg
8481ab64890Smrgextern Bool	_XimFilterWaitEvent(
8491ab64890Smrg    Xim		 im
8501ab64890Smrg);
8511ab64890Smrg
8521ab64890Smrgextern void   _XimProcError(
8531ab64890Smrg    Xim		im,
8541ab64890Smrg    Xic		ic,
8551ab64890Smrg    XPointer	data
8561ab64890Smrg);
8571ab64890Smrg
8581ab64890Smrg#ifdef EXT_MOVE
8591ab64890Smrgextern CARD32	_XimExtenArgCheck(
8601ab64890Smrg    XIMArg	*arg
8611ab64890Smrg);
8621ab64890Smrg#endif
8631ab64890Smrg
8641ab64890Smrgextern Bool _XimCbDispatch(
86561b2299dSmrg    Xim im,
86661b2299dSmrg    INT16 len,
86761b2299dSmrg    XPointer data,
8681ab64890Smrg    XPointer call_data
8691ab64890Smrg);
8701ab64890Smrg
8711ab64890Smrgextern Bool _XimLocalFilter(
8721ab64890Smrg    Display		*d,
8731ab64890Smrg    Window		 w,
8741ab64890Smrg    XEvent		*ev,
8751ab64890Smrg    XPointer		 client_data
8761ab64890Smrg);
8771ab64890Smrg
8781ab64890Smrgextern XIMResourceList _XimGetResourceListRecByQuark(
8791ab64890Smrg    XIMResourceList	 res_list,
8801ab64890Smrg    unsigned int	 list_num,
8811ab64890Smrg    XrmQuark		 quark
8821ab64890Smrg);
8831ab64890Smrg
8841ab64890Smrgextern Bool _XimReconnectModeCreateIC(
8851ab64890Smrg    Xic			 ic
8861ab64890Smrg);
8871ab64890Smrg
8881ab64890Smrgextern char *_XimLocalSetICValues(
8891ab64890Smrg    XIC			 ic,
8901ab64890Smrg    XIMArg		*values
8911ab64890Smrg);
8921ab64890Smrg
8931ab64890Smrgextern char * _XimLocalGetICValues(
8941ab64890Smrg    XIC			 ic,
8951ab64890Smrg    XIMArg		*values
8961ab64890Smrg);
8971ab64890Smrg
8981ab64890Smrgextern int _XimLocalMbLookupString(
8991ab64890Smrg    XIC			 ic,
9001ab64890Smrg    XKeyEvent		*ev,
9011ab64890Smrg    char		*buffer,
9021ab64890Smrg    int			 bytes,
9031ab64890Smrg    KeySym		*keysym,
9041ab64890Smrg    Status		*status
9051ab64890Smrg);
9061ab64890Smrg
9071ab64890Smrgextern int _XimLocalWcLookupString(
9081ab64890Smrg    XIC			 ic,
9091ab64890Smrg    XKeyEvent		*ev,
9101ab64890Smrg    wchar_t		*buffer,
9111ab64890Smrg    int			 bytes,
9121ab64890Smrg    KeySym		*keysym,
9131ab64890Smrg    Status		*status
9141ab64890Smrg);
9151ab64890Smrg
9161ab64890Smrgextern int _XimLocalUtf8LookupString(
9171ab64890Smrg    XIC			 ic,
9181ab64890Smrg    XKeyEvent		*ev,
9191ab64890Smrg    char		*buffer,
9201ab64890Smrg    int			 bytes,
9211ab64890Smrg    KeySym		*keysym,
9221ab64890Smrg    Status		*status
9231ab64890Smrg);
9241ab64890Smrg
9251ab64890Smrgextern Bool _XimThaiFilter(
9261ab64890Smrg    Display		*d,
9271ab64890Smrg    Window		 w,
9281ab64890Smrg    XEvent		*ev,
9291ab64890Smrg    XPointer		 client_data
9301ab64890Smrg);
9311ab64890Smrg
9321ab64890Smrgextern XIC _XimThaiCreateIC(
9331ab64890Smrg    XIM			 im,
9341ab64890Smrg    XIMArg		*values
9351ab64890Smrg);
9361ab64890Smrg
9371ab64890Smrgextern Status _XimThaiCloseIM(
9381ab64890Smrg    XIM			 xim
9391ab64890Smrg);
9401ab64890Smrg
9411ab64890Smrg#ifdef XIM_CONNECTABLE
9421ab64890Smrgextern void _XimSetProtoResource(
9431ab64890Smrg    Xim im
9441ab64890Smrg);
9451ab64890Smrg
9461ab64890Smrgextern Bool _XimConnectServer(
9471ab64890Smrg    Xim im
9481ab64890Smrg);
9491ab64890Smrg
9501ab64890Smrgextern Bool _XimDelayModeSetAttr(
9511ab64890Smrg    Xim			 im
9521ab64890Smrg);
9531ab64890Smrg
9541ab64890Smrgextern void	_XimServerReconectableDestroy(
9551ab64890Smrg    void
9561ab64890Smrg);
9571ab64890Smrg
9581ab64890Smrgextern Bool _XimReCreateIC(
9591ab64890Smrg    Xic			ic
9601ab64890Smrg);
9611ab64890Smrg
9621ab64890Smrgextern Bool _XimEncodeSavedIMATTRIBUTE(
9631ab64890Smrg    Xim			 im,
9641ab64890Smrg    XIMResourceList	 res_list,
9651ab64890Smrg    unsigned int	 res_num,
9661ab64890Smrg    int			*idx,
9671ab64890Smrg    char		*buf,
9681ab64890Smrg    int			 size,
9691ab64890Smrg    int			*ret_len,
9701ab64890Smrg    XPointer		 top,
9711ab64890Smrg    unsigned long	 mode
9721ab64890Smrg);
9731ab64890Smrg
9741ab64890Smrgextern Bool _XimEncodeSavedICATTRIBUTE(
9751ab64890Smrg    Xic			 ic,
9761ab64890Smrg    XIMResourceList	 res_list,
9771ab64890Smrg    unsigned int	 res_num,
9781ab64890Smrg    int			*idx,
9791ab64890Smrg    char		*buf,
9801ab64890Smrg    int			 size,
9811ab64890Smrg    int			*ret_len,
9821ab64890Smrg    XPointer		 top,
9831ab64890Smrg    unsigned long	 mode
9841ab64890Smrg);
9851ab64890Smrg#endif
9861ab64890Smrg
9871ab64890Smrgextern Public Bool
9881ab64890Smrg_XimRegisterDispatcher(
9891ab64890Smrg    Xim          im,
9901ab64890Smrg    Bool         (*callback)(
9911ab64890Smrg                             Xim, INT16, XPointer, XPointer
9921ab64890Smrg                             ),
9931ab64890Smrg    XPointer     call_data);
9941ab64890Smrg
9951ab64890Smrgextern Public Bool
9961ab64890Smrg_XimRespSyncReply(
9971ab64890Smrg    Xic          ic,
9981ab64890Smrg    BITMASK16    mode);
9991ab64890Smrg
10001ab64890Smrg#endif /* _XIMINT_H */
1001