Back to index

im-sdk  12.3.91
NewPY.h
Go to the documentation of this file.
00001 /*
00002 Copyright 1990-2001 Sun Microsystems, Inc. All Rights Reserved.
00003 
00004 Permission is hereby granted, free of charge, to any person obtaining a
00005 copy of this software and associated documentation files (the
00006 "Software"), to deal in the Software without restriction, including
00007 without limitation the rights to use, copy, modify, merge, publish,
00008 distribute, sublicense, and/or sell copies of the Software, and to
00009 permit persons to whom the Software is furnished to do so, subject to
00010 the following conditions: The above copyright notice and this
00011 permission notice shall be included in all copies or substantial
00012 portions of the Software.
00013 
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00016 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00018 IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE
00019 FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
00020 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
00021 THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
00022 ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
00023 
00024 
00025 Except as contained in this notice, the names of The Open Group and/or
00026 Sun Microsystems, Inc. shall not be used in advertising or otherwise to
00027 promote the sale, use or other dealings in this Software without prior
00028 written authorization from The Open Group and/or Sun Microsystems,
00029 Inc., as applicable.
00030 
00031 
00032 X Window System is a trademark of The Open Group
00033 
00034 OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF
00035 logo, LBX, X Window System, and Xinerama are trademarks of the Open
00036 Group. All other trademarks and registered trademarks mentioned herein
00037 are the property of their respective owners. No right, title or
00038 interest in or to any trademark, service mark, logo or trade name of
00039 Sun Microsystems, Inc. or its licensors is granted.
00040 
00041 */
00042 #define MAX_SESSION         512    
00043 #define MAX_CANDIDATE              30
00044 #define MAXLEN_PREEDIT             9
00045 #define MAX_CHAR_PREEDIT    7
00046 #define MAX_CHAR_COMMIT            10
00047 #define MAX_UNICODE_LEN            4
00048 #define MAX_GBK_CODE        23940
00049 #define IM_NAME_LEN         4
00050 
00051 #define CIM_INTERM          0
00052 #define CIM_COMMIT          1
00053 #define CIM_BOUNCEKEY       2
00054 #define CIM_STATUS          8
00055 #define CIM_COMMITSYMBOL    6
00056 
00057 #define USE_HTT_LABEL           0
00058 #define NUMERIC_LABEL           1
00059 #define LOWER_LABEL      2
00060 #define UPPER_LABEL      3
00061 
00062 #define PUNCTUATION_STATUS    1
00063 #define SOFTKEYBOARD_LAYOUT   2
00064 #define GBKSWITCH_STATUS      3
00065 
00066 #define USER_NAME 1
00067 #define ENGINE_PATH 2
00068 
00069 typedef struct _im_data {
00070     int      operation;            /* operation type */
00071     unsigned char pre_str[256];    /* the preedit string */
00072     int      caret_pos;            /* the caret postion */
00073     char     luc_str[10][48];      /* the lookup choice string */
00074     int      luc_num;              /* the number of choices */
00075     char     commit_str[512];      /* the committed string */
00076     char     status_str[32];       /* the status string */
00077     int      error_num;
00078     int      labeltype;               /* label type "123", "abc", "ABC" */
00079 } im_data;
00080 
00081 struct U_G_table {
00082        char unicode[5];
00083        char gbkcode[5];
00084        };
00085 
00086 /*
00087         for new mode of Chinese symbols. -- roxon
00088  */
00089 
00090 #define PERIOD 0xa1a3           /* . */
00091 #define COMMAM 0xa3ac           /* , */
00092 #define EXCLMM 0xa3a1           /* ! */
00093 #define COLONM 0xa3ba           /* : */
00094 #define HYPHEN 0xa3ad           /* - */
00095 #define CARETM 0xa3de           /* ^ */
00096 #define DSPACE 0xa1a1           /*   */
00097 
00098 #define LPARNT 0xa3a8           /* ( */
00099 #define RPARNT 0xa3a9           /* ) */
00100 #define LCUBRT 0xa3fb           /* { */
00101 #define RCUBRT 0xa3fd           /* } */
00102 #define LSQBRT 0xa3db           /* [ */
00103 #define RSQBRT 0xa3dd           /* ] */
00104 
00105 #define SNGQUO 0xa1e4           /* ' */
00106 #define ACCENT 0xa3e0           /* ` */
00107 #define DBLQUO 0xa1e5           /* " */
00108 
00109 #define AMPERS 0xa3a6           /* & */
00110 #define COMMAT 0xa3c0           /* @ */
00111 #define SOLDUS 0xa1a2           /* / 0xa3af*/
00112 #define SEMCLN 0xa3bb           /* ; */
00113 #define QUESTM 0xa3bf           /* ? */
00114 #define LESSTH 0xa3bc           /* < */
00115 #define GREATH 0xa3be           /* > */
00116 #define VERBAR 0xa3fc           /* | */
00117 #define EQUALS 0xa3bd           /* = */
00118 
00119 #define SGNNUM 0xa3a3           /* # */
00120 #define DALLAR 0xa3a4           /* $ */
00121 #define PERCNT 0xa3a5           /* % */
00122 #define SGNSTR 0xa3aa           /* * */
00123 #define UNDSCR 0xa3df           /* _ */
00124 #define BCKSLH 0xa3dc           /* \ */
00125 #define STILDE 0xa1ab           /* ~ */
00126 #define SGNADD 0xa3ab           /* + */
00127 
00128 #define DIGITS 0xa3b0           /* 0-9 */
00129 
00130 #define UPPERS 0xa3c1           /* A-Z */
00131 
00132 #define LOWERS 0xa3e1           /* a-z */
00133 
00134