Back to index

im-sdk  12.3.91
SesElement.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 /*
00043 **  Define Basic Session Structure
00044 */
00045 
00046 #ifndef _SES_ELEMENT_H
00047 #define _SES_ELEMENT_H
00048 
00049 #include "GeneType.h"
00050 #include "CikuOper.h"
00051 
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #endif
00055 
00056 #define  PYIM_RESTORE_ALL       0
00057 #define  PYIM_RESTORE_LAST      1
00058 
00059 #define  UHLF                 128
00060 #define  UONE                 256
00061 #define  UTWO                 512
00062 
00063 #define  F_PREVPAGE           0x0001
00064 #define  F_NEXTPAGE           0x0002
00065 #define  F_PREVPAGE_BLINK     0x0004
00066 #define  F_NEXTPAGE_BLINK     0x0008
00067 #define  F_LEFTARROW          0x0010
00068 #define  F_RIGHTARROW         0x0020
00069 #define  F_LEFTARROW_BLINK    0x0040
00070 #define  F_RIGHTARROW_BLINK   0x0080
00071 #define  F_HALFWIDTH          0x0100
00072 #define  F_FULLWIDTH          0x0200
00073 #define  F_SETUP              0x0400
00074 #define  F_SETUP_BLINK        0x0800
00075 
00076 #define  SESPY_TYPE_QP        1       /* Quan Pin */
00077 #define  SESPY_TYPE_SP        2       /* Shuang Pin */
00078 #define  SESPY_TYPE_JP1       3       /* Japanese One */
00079 #define  SESPY_TYPE_JP2       4       /* Japanese Two */
00080 #define  SESPY_TYPE_GC        5       /* Greece */
00081 #define  SESPY_TYPE_RS        6       /* Russian */
00082 
00083 typedef struct _SesGuiElement {
00084        JINT      nPinyinType;
00085        JINT      nPrevKeyLayMode;
00086        JINT      nKeyLayMode;
00087        JINT      nPunctMode;
00088        JINT     nGBKMode;
00089        JWORD     pwSpRawPyStr[40];        /* After each EditKey or SelectKey, this item was converted */
00090                                           /* to pwRawPyStr[256], and then was Prased to pwPrsPyStr */
00091        JWORD     pwSpMixPeStr[256];       /* Mixed ShuangPinyin and HanziString, unParased!! */
00092        JINT      nSpRawCaretPos;          /* nSpRawCaretPos is relative to pwSpMixPeStr[256]!! Not pwSpRawPyStr */
00093        JWORD     pwSpSlctRawPy[512];      /* Crossponding Shuang Pinyin (include <'> <~>) of Item15, septed by 0009 */
00094        
00095        JWORD     pwRawPyStr[256];         /* Item1:  Raw PinYin Keystroke include <a...z> , <'>  <~> */
00096        JWORD     pwMixPeStr[256];         /* Item2:  Mix PinYin Hanzi string, unParased */
00097        JWORD     pwPrsPyStr[512];         /* Item3:  Parsed PinYin String (of Item2) include SPACE */
00098        JINT      nPrsPyYjCode[256];       /* Item4:  Integer Form of Item3 */
00099        JWORD     pwPrsMixStr[512];        /* Item5:  Parsed Form of Item2 */
00100        JINT      nRawCaretPos;            /* Item6:  Raw Caret Position relative to Item2 */
00101        
00102        JWORD     pwViewPe[128];           /* Item7:  Viewable content of Item5 */
00103        JINT      nViewCaretPos;           /* Item8:  Item6 relative to Item9 */
00104        JINT      nViewPeStart;            /* Item9:  Start of Item7 */
00105        JINT      nViewPeEnd;              /* Item10: End of Item7 */
00106        
00107        SysCandi  scSysCandi;              /* Item11: Defined in "CikuOper.h" */
00108        UdcCandi  ucUdcCandi;              /* Item12: Defined in "CikuOper.h" */
00109        JINT      nViewPage;               /* Item13: Current View Candi Page Number. The Min Value is 0 */
00110        JWORD     pwViewCandi[128];        /* Item14: Viewable Content of Item11 */
00111        JINT      nViewCandiStart;         /* Item15: Start of Item12 */
00112        JINT      nViewCandiEnd;           /* Item16: End of Item12 + 1, !!!! If there are 12 single Hanzi candi.,
00113                                           **         For first View Candi page, nViewCandiStart is 0, 
00114                                           **         nViewCandiEnd is 7.
00115                                           */
00116        
00117        JWORD     pwSlctHz[512];           /* Item17: Selected Hanzi of Every Step, each seperated by 0009 */
00118        JWORD     pwSlctRawPy[512];        /* Item18: Crossponding Pinyin (include <'> <~>) of Item15, septed by 0009 */
00119        JINT      nSlctSteps;              /* Item19: Step Number of Selection */
00120        
00121        JWORD     pwCommit[256];           /* Item20: Committed String. After each commit, must init this struct to New it */
00122        JINT      nErrorCode;              /* Item21: ErrorCode. Before processing each new KeySym, must set ErrorCode to ZERO */
00123        JWORD     pwStatus[16];            /* Item22: IM name field. For Example, "QuanPin", "ShuangPin" */
00124        JINT      nIconFlag;               /* Item23: Bitwise Flag for Icons */
00125        
00126        /* The following 3 items were added to Fix Bug 4165549: Scott Ma, 12/8, 1998 */
00127        JINT      nPrevMatchMode;
00128        JINT      pnCurChoiceYjNew[9];
00129        JINT      pnCurChoiceYjOld[9];
00130 } SesGuiElement;
00131 
00132 #ifdef __cplusplus
00133 }
00134 #endif
00135 
00136 #endif  /* End of _SES_ELEMENT_H */
00137