📄 imedefs.h
字号:
/*************************************************
* imedefs.h *
* *
* Copyright (C) 1995-1999 Microsoft Inc. *
* *
*************************************************/
#define NATIVE_CHARSET GB2312_CHARSET
#define NATIVE_ANSI_CP 936
#define NATIVE_LANGUAGE 0x0804
// resource ID
#define IDI_IME 0x0100
#define IDS_STATUSERR 0x0200
#define IDS_CHICHAR 0x0201
#define IDS_EUDC 0x0202
#if defined(CROSSREF)
#define IDS_NONE 0x0204
#endif //CROSSREF
#define IDS_USRDIC_FILTER 0x0210
#define IDS_FILE_OPEN_ERR 0x0220
#define IDS_MEM_LESS_ERR 0x0221
#define IDS_SETFILE 0x0300
#define IDS_IMENAME 0x0320
#define IDS_IMEUICLASS 0x0321
#define IDS_IMECOMPCLASS 0x0322
#define IDS_IMECANDCLASS 0x0323
#define IDS_IMESTATUSCLASS 0x0324
#define IDS_IMECMENUCLASS 0x0325
#define IDS_IMESOFTKEYMENUCLASS 0x0326
#define IDS_IMEREGNAME 0x0327
#define IDS_IMENAME_QW 0x0328
#define IDS_IMENAME_NM 0x0329
#define IDS_IMENAME_UNI 0x0330
#define IDS_WARN_OPENREG 0x0602
#define IDC_STATIC -1
#define IDM_HLP 0x0400
#define IDM_OPTGUD 0x0403
#define IDM_IMEGUD 0x0405
#define IDM_VER 0x0401
#define IDM_PROP 0x0402
#define IDM_IME 0x0450
#define IDM_SKL1 0x0500
#define IDM_SKL2 0x0501
#define IDM_SKL3 0x0502
#define IDM_SKL4 0x0503
#define IDM_SKL5 0x0504
#define IDM_SKL6 0x0505
#define IDM_SKL7 0x0506
#define IDM_SKL8 0x0507
#define IDM_SKL9 0x0508
#define IDM_SKL10 0x0509
#define IDM_SKL11 0x050a
#define IDM_SKL12 0x050b
#define IDM_SKL13 0x050c
#define DlgPROP 101
#define DlgUIMODE 102
#define IDC_UIMODE1 1001
#define IDC_UIMODE2 1002
#define IDC_USER1 1003
// setting offset in .SET file
#define OFFSET_MODE_CONFIG 0
#define OFFSET_READLAYOUT 4
// state of composition
#define CST_INIT 0
#define CST_INPUT 1
#define CST_CHOOSE 2
#define CST_SYMBOL 3
#define CST_SOFTKB 4 // not in iImeState
#define CST_TOGGLE_PHRASEWORD 5 // not in iImeState
#define CST_ALPHABET 6 // not in iImeState
#define CST_ALPHANUMERIC 7 // not in iImeState
#define CST_INVALID 8 // not in iImeState
#define CST_INVALID_INPUT 9 // not in iImeState
#define CST_ONLINE_CZ 10
#define CST_CAPITAL 11
// state engin
#define ENGINE_COMP 0
#define ENGINE_ASCII 1
#define ENGINE_RESAULT 2
#define ENGINE_CHCAND 3
#define ENGINE_BKSPC 4
#define ENGINE_MULTISEL 5
#define ENGINE_ESC 6
#define CANDPERPAGE 9
#define MAXSTRLEN 40
#define MAXCAND 256
#define IME_MAXCAND 94
#define IME_XGB_MAXCAND 190
#if defined(COMBO_IME)
#define IME_UNICODE_MAXCAND 256
#endif //COMBO_IME
#define MAXCODE 12
#define MAXSOFTKEYS 48
// set ime character
#define SIC_INIT 0
#define SIC_SAVE2 1
#define SIC_READY 2
#define SIC_MODIFY 3
#define SIC_SAVE1 4
#define BOX_UI 0
#define LIN_UI 1
#if defined(COMBO_IME)
#define IMEINDEXNUM 3
#define IME_CMODE_INDEX_FIRST 0x1000
#define INDEX_GB 0
#define INDEX_GBK 1
#define INDEX_UNICODE 2
#endif
// border for UI
#define UI_MARGIN 4
#define COMP_TEXT_Y 17
#define UI_CANDINF 20
#define UI_CANDBTW 13
#define UI_CANDBTH 13
#define UI_CANDICON 16
#define UI_CANDSTR 300
#define STATUS_DIM_X 20
#define STATUS_DIM_Y 20
#define STATUS_NAME_MARGIN 20
// if UI_MOVE_OFFSET == WINDOW_NOTDRAG, not in drag operation
#define WINDOW_NOT_DRAG 0xFFFFFFFF
// window extra for composition window
#define UI_MOVE_OFFSET 0
#define UI_MOVE_XY 4
// the start number of candidate list
#define CAND_START 1
#define uCandHome 0
#define uCandUp 1
#define uCandDown 2
#define uCandEnd 3
#define CandGBinfoLen 64
// the flag for an opened or start UI
#define IMN_PRIVATE_UPDATE_STATUS 0x0001
#define IMN_PRIVATE_COMPOSITION_SIZE 0x0002
#define IMN_PRIVATE_UPDATE_QUICK_KEY 0x0004
#define IMN_PRIVATE_UPDATE_SOFTKBD 0x0005
#define IMN_PRIVATE_DESTROYCANDWIN 0x0006
#define IMN_PRIVATE_CMENUDESTROYED 0x0007
#define IMN_PRIVATE_SOFTKEYMENUDESTROYED 0x0008
#define MSG_ALREADY_OPEN 0x000001
#define MSG_ALREADY_OPEN2 0x000002
#define MSG_OPEN_CANDIDATE 0x000010
#define MSG_OPEN_CANDIDATE2 0x000020
#define MSG_CLOSE_CANDIDATE 0x000100
#define MSG_CLOSE_CANDIDATE2 0x000200
#define MSG_CHANGE_CANDIDATE 0x001000
#define MSG_CHANGE_CANDIDATE2 0x002000
#define MSG_ALREADY_START 0x010000
#define MSG_START_COMPOSITION 0x020000
#define MSG_END_COMPOSITION 0x040000
#define MSG_COMPOSITION 0x080000
#define MSG_IMN_COMPOSITIONPOS 0x100000
#define MSG_IMN_UPDATE_SOFTKBD 0x200000
#define MSG_IMN_UPDATE_STATUS 0x000400
#define MSG_GUIDELINE 0x400000
#define MSG_IN_IMETOASCIIEX 0x800000
#define MSG_IMN_DESTROYCAND 0x004000
#define MSG_BACKSPACE 0x000800
// this constant is depend on TranslateImeMessage
#define GEN_MSG_MAX 6
// the flag for set context
#define SC_SHOW_UI 0x0001
#define SC_HIDE_UI 0x0002
#define SC_ALREADY_SHOW_STATUS 0x0004
#define SC_WANT_SHOW_STATUS 0x0008
#define SC_HIDE_STATUS 0x0010
// the new flag for set context
#define ISC_SHOW_SOFTKBD 0x02000000
#define ISC_OPEN_STATUS_WINDOW 0x04000000
#define ISC_OFF_CARET_UI 0x08000000
#define ISC_SHOW_UI_ALL (ISC_SHOWUIALL|ISC_SHOW_SOFTKBD|ISC_OPEN_STATUS_WINDOW)
#define ISC_SETCONTEXT_UI (ISC_SHOWUIALL|ISC_SHOW_SOFTKBD)
#define ISC_HIDE_COMP_WINDOW 0x00400000
#define ISC_HIDE_CAND_WINDOW 0x00800000
#define ISC_HIDE_SOFTKBD 0x01000000
// the flag for composition string show status
#define IME_STR_SHOWED 0x0001
#define IME_STR_ERROR 0x0002
// the mode configuration for an IME
#define MODE_CONFIG_QUICK_KEY 0x0001
#define MODE_CONFIG_WORD_PREDICT 0x0002
#define MODE_CONFIG_PREDICT 0x0004
// the virtual key value
#define VK_OEM_SEMICLN 0xba // ; :
#define VK_OEM_EQUAL 0xbb // = +
#define VK_OEM_SLASH 0xbf // / ?
#define VK_OEM_LBRACKET 0xdb // [ {
#define VK_OEM_BSLASH 0xdc // \ |
#define VK_OEM_RBRACKET 0xdd // ] }
#define VK_OEM_QUOTE 0xde // ' "
#define MAXMBNUMS 40
// for ime property info
#define MAXNUMCODES 48
#define LINE_LEN 80
#define CLASS_LEN 24
#define NumsSK 13
// mb file for create word
#define ID_LENGTH 28
#define NUMTABLES 7
#define TAG_DESCRIPTION 0x00000001
#define TAG_RULER 0x00000002
#define TAG_CRTWORDCODE 0x00000004
// window extra for context menu owner
#define CMENU_HUIWND 0
#define CMENU_MENU 4
#define SOFTKEYMENU_HUIWND 0
#define SOFTKEYMENU_MENU 4
#define WM_USER_DESTROY (WM_USER + 0x0400)
// the flags for GetNearCaretPosition
#define NEAR_CARET_FIRST_TIME 0x0001
#define NEAR_CARET_CANDIDATE 0x0002
typedef DWORD UNALIGNED FAR *LPUNADWORD;
typedef WORD UNALIGNED FAR *LPUNAWORD;
typedef struct tagImeL { // local structure, per IME structure
DWORD dwSKState[NumsSK];
DWORD dwSKWant;
HMENU hSKMenu; // SoftKeyboard Menu
HMENU hPropMenu; // Property Menu
HINSTANCE hInst; // IME DLL instance handle
int xCompWi; // width
int yCompHi; // height
POINT ptDefComp; // default composition window position
int cxCompBorder; // border width of composition window
int cyCompBorder; // border height of composition window
RECT rcCompText; // text position relative to composition
// window key related data
WORD fModeConfig; // quick key/prediction mode
WORD nMaxKey; // max key of compsiton str
#if defined(COMBO_IME)
DWORD dwRegImeIndex; // this value defers in different
// process, so can not set in sImeG
#endif
} IMEL;
typedef IMEL *PIMEL;
typedef IMEL NEAR *NPIMEL;
typedef IMEL FAR *LPIMEL;
#define NFULLABC 95
typedef struct _tagFullABC { // match with the IMEG
WORD wFullABC[NFULLABC];
} FULLABC;
typedef FULLABC *PFULLABC;
typedef FULLABC NEAR *NPFULLABC;
typedef FULLABC FAR *LPFULLABC;
// global sturcture for ime init data
typedef struct _tagImeG { // global structure, can be share by all IMEs,
// the seperation (IMEL and IMEG) is only
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -