/*
Copyright 1990-2001 Sun Microsystems, Inc. All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: The above copyright notice and this
permission notice shall be included in all copies or substantial
portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.


Except as contained in this notice, the names of The Open Group and/or
Sun Microsystems, Inc. shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Software without prior
written authorization from The Open Group and/or Sun Microsystems,
Inc., as applicable.


X Window System is a trademark of The Open Group

OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF
logo, LBX, X Window System, and Xinerama are trademarks of the Open
Group. All other trademarks and registered trademarks mentioned herein
are the property of their respective owners. No right, title or
interest in or to any trademark, service mark, logo or trade name of
Sun Microsystems, Inc. or its licensors is granted.

*/
#define MAX_SESSION		512    
#define MAX_CANDIDATE		30
#define MAXLEN_PREEDIT		9
#define MAX_CHAR_PREEDIT	7
#define MAX_CHAR_COMMIT		10
#define MAX_UNICODE_LEN		4
#define MAX_GBK_CODE		23940
#define IM_NAME_LEN		4

#define CIM_INTERM          0
#define CIM_COMMIT          1
#define CIM_BOUNCEKEY       2
#define CIM_STATUS          8
#define CIM_COMMITSYMBOL    6

#define USE_HTT_LABEL	    0
#define NUMERIC_LABEL	    1
#define LOWER_LABEL	    2
#define UPPER_LABEL	    3

#define PUNCTUATION_STATUS    1
#define SOFTKEYBOARD_LAYOUT   2
#define GBKSWITCH_STATUS      3

#define USER_NAME 1
#define ENGINE_PATH 2

typedef struct _im_data {
    int      operation;            /* operation type */
    unsigned char pre_str[256];    /* the preedit string */
    int      caret_pos;            /* the caret postion */
    char     luc_str[10][48];      /* the lookup choice string */
    int      luc_num;              /* the number of choices */
    char     commit_str[512];      /* the committed string */
    char     status_str[32];       /* the status string */
    int      error_num;
    int      labeltype;		   /* label type "123", "abc", "ABC" */
} im_data;

struct U_G_table {
       char unicode[5];
       char gbkcode[5];
       };

/*
        for new mode of Chinese symbols. -- roxon
 */

#define PERIOD 0xa1a3           /* . */
#define COMMAM 0xa3ac           /* , */
#define EXCLMM 0xa3a1           /* ! */
#define COLONM 0xa3ba           /* : */
#define HYPHEN 0xa3ad           /* - */
#define CARETM 0xa3de           /* ^ */
#define DSPACE 0xa1a1           /*   */

#define LPARNT 0xa3a8           /* ( */
#define RPARNT 0xa3a9           /* ) */
#define LCUBRT 0xa3fb           /* { */
#define RCUBRT 0xa3fd           /* } */
#define LSQBRT 0xa3db           /* [ */
#define RSQBRT 0xa3dd           /* ] */

#define SNGQUO 0xa1e4           /* ' */
#define ACCENT 0xa3e0           /* ` */
#define DBLQUO 0xa1e5           /* " */

#define AMPERS 0xa3a6           /* & */
#define COMMAT 0xa3c0           /* @ */
#define SOLDUS 0xa1a2           /* / 0xa3af*/
#define SEMCLN 0xa3bb           /* ; */
#define QUESTM 0xa3bf           /* ? */
#define LESSTH 0xa3bc           /* < */
#define GREATH 0xa3be           /* > */
#define VERBAR 0xa3fc           /* | */
#define EQUALS 0xa3bd           /* = */

#define SGNNUM 0xa3a3           /* # */
#define DALLAR 0xa3a4           /* $ */
#define PERCNT 0xa3a5           /* % */
#define SGNSTR 0xa3aa           /* * */
#define UNDSCR 0xa3df           /* _ */
#define BCKSLH 0xa3dc           /* \ */
#define STILDE 0xa1ab           /* ~ */
#define SGNADD 0xa3ab           /* + */

#define DIGITS 0xa3b0           /* 0-9 */

#define UPPERS 0xa3c1           /* A-Z */

#define LOWERS 0xa3e1           /* a-z */


