Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

592 lines
22 KiB

  1. /*************************************************
  2. * imedefs.h *
  3. * *
  4. * Copyright (C) 1995-1999 Microsoft Inc. *
  5. * *
  6. *************************************************/
  7. #define NATIVE_CHARSET GB2312_CHARSET
  8. #define NATIVE_ANSI_CP 936
  9. #define NATIVE_LANGUAGE 0x0804
  10. // resource ID
  11. #define IDI_IME 0x0100
  12. #define IDS_STATUSERR 0x0200
  13. #define IDS_CHICHAR 0x0201
  14. #define IDS_EUDC 0x0202
  15. #if defined(CROSSREF)
  16. #define IDS_NONE 0x0204
  17. #endif //CROSSREF
  18. #define IDS_USRDIC_FILTER 0x0210
  19. #define IDS_FILE_OPEN_ERR 0x0220
  20. #define IDS_MEM_LESS_ERR 0x0221
  21. #define IDS_SETFILE 0x0300
  22. #define IDS_IMENAME 0x0320
  23. #define IDS_IMEUICLASS 0x0321
  24. #define IDS_IMECOMPCLASS 0x0322
  25. #define IDS_IMECANDCLASS 0x0323
  26. #define IDS_IMESTATUSCLASS 0x0324
  27. #define IDS_IMECMENUCLASS 0x0325
  28. #define IDS_IMESOFTKEYMENUCLASS 0x0326
  29. #define IDS_IMEREGNAME 0x0327
  30. #define IDS_IMENAME_QW 0x0328
  31. #define IDS_IMENAME_NM 0x0329
  32. #define IDS_IMENAME_UNI 0x0330
  33. #define IDS_WARN_OPENREG 0x0602
  34. #define IDC_STATIC -1
  35. #define IDM_HLP 0x0400
  36. #define IDM_OPTGUD 0x0403
  37. #define IDM_IMEGUD 0x0405
  38. #define IDM_VER 0x0401
  39. #define IDM_PROP 0x0402
  40. #define IDM_IME 0x0450
  41. #define IDM_SKL1 0x0500
  42. #define IDM_SKL2 0x0501
  43. #define IDM_SKL3 0x0502
  44. #define IDM_SKL4 0x0503
  45. #define IDM_SKL5 0x0504
  46. #define IDM_SKL6 0x0505
  47. #define IDM_SKL7 0x0506
  48. #define IDM_SKL8 0x0507
  49. #define IDM_SKL9 0x0508
  50. #define IDM_SKL10 0x0509
  51. #define IDM_SKL11 0x050a
  52. #define IDM_SKL12 0x050b
  53. #define IDM_SKL13 0x050c
  54. #define DlgPROP 101
  55. #define DlgUIMODE 102
  56. #define IDC_UIMODE1 1001
  57. #define IDC_UIMODE2 1002
  58. #define IDC_USER1 1003
  59. // setting offset in .SET file
  60. #define OFFSET_MODE_CONFIG 0
  61. #define OFFSET_READLAYOUT 4
  62. // state of composition
  63. #define CST_INIT 0
  64. #define CST_INPUT 1
  65. #define CST_CHOOSE 2
  66. #define CST_SYMBOL 3
  67. #define CST_SOFTKB 4 // not in iImeState
  68. #define CST_TOGGLE_PHRASEWORD 5 // not in iImeState
  69. #define CST_ALPHABET 6 // not in iImeState
  70. #define CST_ALPHANUMERIC 7 // not in iImeState
  71. #define CST_INVALID 8 // not in iImeState
  72. #define CST_INVALID_INPUT 9 // not in iImeState
  73. #define CST_ONLINE_CZ 10
  74. #define CST_CAPITAL 11
  75. // state engin
  76. #define ENGINE_COMP 0
  77. #define ENGINE_ASCII 1
  78. #define ENGINE_RESAULT 2
  79. #define ENGINE_CHCAND 3
  80. #define ENGINE_BKSPC 4
  81. #define ENGINE_MULTISEL 5
  82. #define ENGINE_ESC 6
  83. #define CANDPERPAGE 9
  84. #define MAXSTRLEN 40
  85. #define MAXCAND 256
  86. #define IME_MAXCAND 94
  87. #define IME_XGB_MAXCAND 190
  88. #if defined(COMBO_IME)
  89. #define IME_UNICODE_MAXCAND 256
  90. #endif //COMBO_IME
  91. #define MAXCODE 12
  92. #define MAXSOFTKEYS 48
  93. // set ime character
  94. #define SIC_INIT 0
  95. #define SIC_SAVE2 1
  96. #define SIC_READY 2
  97. #define SIC_MODIFY 3
  98. #define SIC_SAVE1 4
  99. #define BOX_UI 0
  100. #define LIN_UI 1
  101. #if defined(COMBO_IME)
  102. #define IMEINDEXNUM 3
  103. #define IME_CMODE_INDEX_FIRST 0x1000
  104. #define INDEX_GB 0
  105. #define INDEX_GBK 1
  106. #define INDEX_UNICODE 2
  107. #endif
  108. // border for UI
  109. #define UI_MARGIN 4
  110. #define COMP_TEXT_Y 17
  111. #define UI_CANDINF 20
  112. #define UI_CANDBTW 13
  113. #define UI_CANDBTH 13
  114. #define UI_CANDICON 16
  115. #define UI_CANDSTR 300
  116. #define STATUS_DIM_X 20
  117. #define STATUS_DIM_Y 20
  118. #define STATUS_NAME_MARGIN 20
  119. // if UI_MOVE_OFFSET == WINDOW_NOTDRAG, not in drag operation
  120. #define WINDOW_NOT_DRAG 0xFFFFFFFF
  121. // window extra for composition window
  122. #define UI_MOVE_OFFSET 0
  123. #define UI_MOVE_XY 4
  124. // the start number of candidate list
  125. #define CAND_START 1
  126. #define uCandHome 0
  127. #define uCandUp 1
  128. #define uCandDown 2
  129. #define uCandEnd 3
  130. #define CandGBinfoLen 64
  131. // the flag for an opened or start UI
  132. #define IMN_PRIVATE_UPDATE_STATUS 0x0001
  133. #define IMN_PRIVATE_COMPOSITION_SIZE 0x0002
  134. #define IMN_PRIVATE_UPDATE_QUICK_KEY 0x0004
  135. #define IMN_PRIVATE_UPDATE_SOFTKBD 0x0005
  136. #define IMN_PRIVATE_DESTROYCANDWIN 0x0006
  137. #define IMN_PRIVATE_CMENUDESTROYED 0x0007
  138. #define IMN_PRIVATE_SOFTKEYMENUDESTROYED 0x0008
  139. #define MSG_ALREADY_OPEN 0x000001
  140. #define MSG_ALREADY_OPEN2 0x000002
  141. #define MSG_OPEN_CANDIDATE 0x000010
  142. #define MSG_OPEN_CANDIDATE2 0x000020
  143. #define MSG_CLOSE_CANDIDATE 0x000100
  144. #define MSG_CLOSE_CANDIDATE2 0x000200
  145. #define MSG_CHANGE_CANDIDATE 0x001000
  146. #define MSG_CHANGE_CANDIDATE2 0x002000
  147. #define MSG_ALREADY_START 0x010000
  148. #define MSG_START_COMPOSITION 0x020000
  149. #define MSG_END_COMPOSITION 0x040000
  150. #define MSG_COMPOSITION 0x080000
  151. #define MSG_IMN_COMPOSITIONPOS 0x100000
  152. #define MSG_IMN_UPDATE_SOFTKBD 0x200000
  153. #define MSG_IMN_UPDATE_STATUS 0x000400
  154. #define MSG_GUIDELINE 0x400000
  155. #define MSG_IN_IMETOASCIIEX 0x800000
  156. #define MSG_IMN_DESTROYCAND 0x004000
  157. #define MSG_BACKSPACE 0x000800
  158. // this constant is depend on TranslateImeMessage
  159. #define GEN_MSG_MAX 6
  160. // the flag for set context
  161. #define SC_SHOW_UI 0x0001
  162. #define SC_HIDE_UI 0x0002
  163. #define SC_ALREADY_SHOW_STATUS 0x0004
  164. #define SC_WANT_SHOW_STATUS 0x0008
  165. #define SC_HIDE_STATUS 0x0010
  166. // the new flag for set context
  167. #define ISC_SHOW_SOFTKBD 0x02000000
  168. #define ISC_OPEN_STATUS_WINDOW 0x04000000
  169. #define ISC_OFF_CARET_UI 0x08000000
  170. #define ISC_SHOW_UI_ALL (ISC_SHOWUIALL|ISC_SHOW_SOFTKBD|ISC_OPEN_STATUS_WINDOW)
  171. #define ISC_SETCONTEXT_UI (ISC_SHOWUIALL|ISC_SHOW_SOFTKBD)
  172. #define ISC_HIDE_COMP_WINDOW 0x00400000
  173. #define ISC_HIDE_CAND_WINDOW 0x00800000
  174. #define ISC_HIDE_SOFTKBD 0x01000000
  175. // the flag for composition string show status
  176. #define IME_STR_SHOWED 0x0001
  177. #define IME_STR_ERROR 0x0002
  178. // the mode configuration for an IME
  179. #define MODE_CONFIG_QUICK_KEY 0x0001
  180. #define MODE_CONFIG_WORD_PREDICT 0x0002
  181. #define MODE_CONFIG_PREDICT 0x0004
  182. // the virtual key value
  183. #define VK_OEM_SEMICLN 0xba // ; :
  184. #define VK_OEM_EQUAL 0xbb // = +
  185. #define VK_OEM_SLASH 0xbf // / ?
  186. #define VK_OEM_LBRACKET 0xdb // [ {
  187. #define VK_OEM_BSLASH 0xdc // \ |
  188. #define VK_OEM_RBRACKET 0xdd // ] }
  189. #define VK_OEM_QUOTE 0xde // ' "
  190. #define MAXMBNUMS 40
  191. // for ime property info
  192. #define MAXNUMCODES 48
  193. #define LINE_LEN 80
  194. #define CLASS_LEN 24
  195. #define NumsSK 13
  196. // mb file for create word
  197. #define ID_LENGTH 28
  198. #define NUMTABLES 7
  199. #define TAG_DESCRIPTION 0x00000001
  200. #define TAG_RULER 0x00000002
  201. #define TAG_CRTWORDCODE 0x00000004
  202. // window extra for context menu owner
  203. #define CMENU_HUIWND 0
  204. #define CMENU_MENU 4
  205. #define SOFTKEYMENU_HUIWND 0
  206. #define SOFTKEYMENU_MENU 4
  207. #define WM_USER_DESTROY (WM_USER + 0x0400)
  208. // the flags for GetNearCaretPosition
  209. #define NEAR_CARET_FIRST_TIME 0x0001
  210. #define NEAR_CARET_CANDIDATE 0x0002
  211. typedef DWORD UNALIGNED FAR *LPUNADWORD;
  212. typedef WORD UNALIGNED FAR *LPUNAWORD;
  213. typedef struct tagImeL { // local structure, per IME structure
  214. DWORD dwSKState[NumsSK];
  215. DWORD dwSKWant;
  216. HMENU hSKMenu; // SoftKeyboard Menu
  217. HMENU hPropMenu; // Property Menu
  218. HINSTANCE hInst; // IME DLL instance handle
  219. int xCompWi; // width
  220. int yCompHi; // height
  221. POINT ptDefComp; // default composition window position
  222. int cxCompBorder; // border width of composition window
  223. int cyCompBorder; // border height of composition window
  224. RECT rcCompText; // text position relative to composition
  225. // window key related data
  226. WORD fModeConfig; // quick key/prediction mode
  227. WORD nMaxKey; // max key of compsiton str
  228. #if defined(COMBO_IME)
  229. DWORD dwRegImeIndex; // this value defers in different
  230. // process, so can not set in sImeG
  231. #endif
  232. BOOL fWinLogon;
  233. } IMEL;
  234. typedef IMEL *PIMEL;
  235. typedef IMEL NEAR *NPIMEL;
  236. typedef IMEL FAR *LPIMEL;
  237. #define NFULLABC 95
  238. typedef struct _tagFullABC { // match with the IMEG
  239. WORD wFullABC[NFULLABC];
  240. } FULLABC;
  241. typedef FULLABC *PFULLABC;
  242. typedef FULLABC NEAR *NPFULLABC;
  243. typedef FULLABC FAR *LPFULLABC;
  244. // global sturcture for ime init data
  245. typedef struct _tagImeG { // global structure, can be share by all IMEs,
  246. // the seperation (IMEL and IMEG) is only
  247. // useful in UNI-IME, other IME can use one
  248. // the system charset is not NATIVE_CHARSET
  249. BOOL fDiffSysCharSet;
  250. // IME Charact
  251. TCHAR UsedCodes[17];
  252. WORD wNumCodes;
  253. DWORD IC_Enter;
  254. DWORD IC_Trace;
  255. RECT rcWorkArea; // the work area of applications
  256. // Chinese char width & height
  257. int xChiCharWi;
  258. int yChiCharHi;
  259. // candidate list of composition
  260. int xCandWi; // width of candidate list
  261. int yCandHi; // high of candidate list
  262. int cxCandBorder; // border width of candidate list
  263. int cyCandBorder; // border height of candidate list
  264. RECT rcCandText; // text position relative to candidate window
  265. RECT rcCandBTD;
  266. RECT rcCandBTU;
  267. RECT rcCandBTE;
  268. RECT rcCandBTH;
  269. RECT rcCandInf;
  270. RECT rcCandIcon;
  271. // status window
  272. int xStatusWi; // width of status window
  273. int yStatusHi; // high of status window
  274. RECT rcStatusText; // text position relative to status window
  275. RECT rcImeIcon; // ImeIcon position relative to status window
  276. RECT rcImeName; // ImeName position relative to status window
  277. RECT rcShapeText; // shape text relative to status window
  278. RECT rcSymbol; // symbol relative to status window
  279. RECT rcSKText; // SK text relative to status window
  280. // full shape space (reversed internal code)
  281. WORD wFullSpace;
  282. // full shape chars (internal code)
  283. WORD wFullABC[NFULLABC];
  284. // error string
  285. TCHAR szStatusErr[8];
  286. int cbStatusErr;
  287. // candidate string start from 0 or 1
  288. int iCandStart;
  289. // setting of UI
  290. int iPara;
  291. int iPerp;
  292. int iParaTol;
  293. int iPerpTol;
  294. #if defined(CROSSREF)
  295. // reverse conversion
  296. HKL hRevKL; // the HKL of reverse mapping IME
  297. DWORD nRevMaxKey;
  298. #endif //CROSSREF
  299. } IMEG;
  300. typedef IMEG *PIMEG;
  301. typedef IMEG NEAR *NPIMEG;
  302. typedef IMEG FAR *LPIMEG;
  303. #define IME_SELECT_GB 0x0001
  304. #define IME_SELECT_XGB 0x0002
  305. #define IME_SELECT_AREA 0x0004
  306. typedef struct _tagPRIVCONTEXT {// IME private data for each context
  307. int iImeState; // the composition state - input, choose, or
  308. BOOL fdwImeMsg; // what messages should be generated
  309. DWORD dwCompChar; // wParam of WM_IME_COMPOSITION
  310. DWORD fdwGcsFlag; // lParam for WM_IME_COMPOSITION
  311. UINT uSYHFlg;
  312. UINT uDYHFlg;
  313. UINT uDSMHCount;
  314. UINT uDSMHFlg;
  315. // input data
  316. TCHAR bSeq[13]; // sequence code of input char
  317. DWORD fdwGB;
  318. #ifdef CROSSREF
  319. HIMCC hRevCandList; // memory for reconsion result
  320. #endif //CROSSREF
  321. } PRIVCONTEXT;
  322. typedef PRIVCONTEXT *PPRIVCONTEXT;
  323. typedef PRIVCONTEXT NEAR *NPPRIVCONTEXT;
  324. typedef PRIVCONTEXT FAR *LPPRIVCONTEXT;
  325. typedef struct _tagUIPRIV { // IME private UI data
  326. HWND hCompWnd; // composition window
  327. int nShowCompCmd;
  328. HWND hCandWnd; // candidate window for composition
  329. int nShowCandCmd;
  330. HWND hSoftKbdWnd; // soft keyboard window
  331. int nShowSoftKbdCmd;
  332. HWND hStatusWnd; // status window
  333. int nShowStatusCmd;
  334. DWORD fdwSetContext; // the actions to take at set context time
  335. HIMC hIMC; // the recent selected hIMC
  336. HWND hCMenuWnd; // a window owner for context menu
  337. HWND hSoftkeyMenuWnd; // a window owner for softkeyboard menu
  338. } UIPRIV;
  339. typedef UIPRIV *PUIPRIV;
  340. typedef UIPRIV NEAR *NPUIPRIV;
  341. typedef UIPRIV FAR *LPUIPRIV;
  342. typedef struct tagNEARCARET { // for near caret offset calculatation
  343. int iLogFontFacX;
  344. int iLogFontFacY;
  345. int iParaFacX;
  346. int iPerpFacX;
  347. int iParaFacY;
  348. int iPerpFacY;
  349. } NEARCARET;
  350. typedef NEARCARET *PNEARCARET;
  351. typedef NEARCARET NEAR *NPNEARCARET;
  352. typedef NEARCARET FAR *LPNEARCARET;
  353. extern HINSTANCE hInst;
  354. extern IMEG sImeG;
  355. extern IMEL sImeL;
  356. extern LPIMEL lpImeL;
  357. extern HDC ST_UI_hDC;
  358. extern UINT uStartComp;
  359. extern UINT uOpenCand;
  360. extern UINT uCaps;
  361. extern DWORD SaTC_Trace;
  362. extern TCHAR szUIClassName[];
  363. extern TCHAR szCompClassName[];
  364. extern TCHAR szCandClassName[];
  365. extern TCHAR szStatusClassName[];
  366. extern TCHAR szCMenuClassName[];
  367. extern TCHAR szSoftkeyMenuClassName[];
  368. extern TCHAR szHandCursor[];
  369. extern TCHAR szChinese[];
  370. extern TCHAR szCandInf[];
  371. #if defined(COMBO_IME)
  372. extern TCHAR pszImeName[IMEINDEXNUM][MAX_PATH];
  373. extern TCHAR *szImeName;
  374. extern TCHAR szImeRegName[];
  375. #else
  376. extern TCHAR szImeName[];
  377. #endif //COMBO_IME
  378. extern TCHAR szImeXGBName[];
  379. extern TCHAR szSymbol[];
  380. extern TCHAR szNoSymbol[];
  381. extern TCHAR szEnglish[];
  382. extern TCHAR szCode[];
  383. extern TCHAR szEudc[];
  384. extern TCHAR szFullShape[];
  385. extern TCHAR szHalfShape[];
  386. extern TCHAR szNone[];
  387. extern TCHAR szSoftKBD[];
  388. extern TCHAR szNoSoftKBD[];
  389. extern TCHAR szDigit[];
  390. extern BYTE bUpper[];
  391. extern WORD fMask[];
  392. extern TCHAR szRegIMESetting[];
  393. extern TCHAR szPerp[];
  394. extern TCHAR szPara[];
  395. extern TCHAR szPerpTol[];
  396. extern TCHAR szParaTol[];
  397. #if defined(COMBO_IME)
  398. extern TCHAR szRegImeIndex[];
  399. #endif
  400. extern const NEARCARET ncUIEsc[], ncAltUIEsc[];
  401. extern const POINT ptInputEsc[], ptAltInputEsc[];
  402. extern BYTE VirtKey48Map[];
  403. extern TCHAR szTrace[];
  404. extern TCHAR szWarnTitle[];
  405. extern TCHAR szErrorTitle[];
  406. #if defined(CROSSREF)
  407. extern TCHAR szRegRevKL[];
  408. extern TCHAR szRegRevMaxKey[];
  409. #endif
  410. int WINAPI LibMain(HANDLE, WORD, WORD, LPTSTR); // init.c
  411. LRESULT CALLBACK UIWndProc(HWND, UINT, WPARAM, LPARAM); // ui.c
  412. LRESULT PASCAL UIPaint(HWND); // ui.c
  413. // for engine
  414. WORD PASCAL GBEngine(LPPRIVCONTEXT);
  415. WORD PASCAL AsciiToGB(LPPRIVCONTEXT);
  416. WORD PASCAL AsciiToArea(LPPRIVCONTEXT);
  417. WORD PASCAL CharToHex(TCHAR);
  418. void PASCAL AddCodeIntoCand(LPCANDIDATELIST, WORD); // compose.c
  419. void PASCAL CompWord(WORD, LPINPUTCONTEXT, LPCOMPOSITIONSTRING, LPPRIVCONTEXT,
  420. LPGUIDELINE); // compose.c
  421. UINT PASCAL Finalize(LPINPUTCONTEXT, LPCOMPOSITIONSTRING,
  422. LPPRIVCONTEXT, WORD); // compose.c
  423. void PASCAL CompEscapeKey(LPINPUTCONTEXT, LPCOMPOSITIONSTRING,
  424. LPGUIDELINE, LPPRIVCONTEXT); // compose.c
  425. void PASCAL SelectOneCand(LPINPUTCONTEXT, LPCOMPOSITIONSTRING,
  426. LPPRIVCONTEXT, LPCANDIDATELIST); // chcand.c
  427. void PASCAL CandEscapeKey(LPINPUTCONTEXT, LPPRIVCONTEXT); // chcand.c
  428. void PASCAL ChooseCand(WORD, LPINPUTCONTEXT, LPCANDIDATEINFO,
  429. LPPRIVCONTEXT); // chcand.c
  430. void PASCAL SetPrivateFileSetting(LPBYTE, int, DWORD, LPCTSTR); // ddis.c
  431. void PASCAL InitCompStr(LPCOMPOSITIONSTRING); // ddis.c
  432. BOOL PASCAL ClearCand(LPINPUTCONTEXT); // ddis.c
  433. LONG OpenReg_PathSetup(HKEY *);
  434. LONG OpenReg_User(HKEY ,LPCTSTR ,PHKEY);
  435. VOID InfoMessage(HANDLE ,WORD ); //ddis.c
  436. VOID FatalMessage(HANDLE ,WORD); //ddis.c
  437. #if defined(CROSSREF)
  438. void PASCAL ReverseConversionList(HWND); // ddis.c
  439. void CrossReverseConv(LPINPUTCONTEXT, LPCOMPOSITIONSTRING, LPPRIVCONTEXT, LPCANDIDATELIST);
  440. #endif
  441. UINT PASCAL TranslateImeMessage(LPTRANSMSGLIST, LPINPUTCONTEXT, LPPRIVCONTEXT); // toascii.c
  442. void PASCAL GenerateMessage(HIMC, LPINPUTCONTEXT,LPPRIVCONTEXT); // notify.c
  443. DWORD PASCAL ReadingToPattern(LPCTSTR, BOOL); // regword.c
  444. void PASCAL ReadingToSequence(LPCTSTR, LPBYTE, BOOL); // regword.c
  445. void PASCAL DrawDragBorder(HWND, LONG, LONG); // uisubs.c
  446. void PASCAL DrawFrameBorder(HDC, HWND); // uisubs.c
  447. void PASCAL ContextMenu(HWND, int, int); // uisubs.c
  448. void PASCAL SoftkeyMenu(HWND, int, int); // uisubs.c
  449. LRESULT CALLBACK ContextMenuWndProc(HWND, UINT, WPARAM,LPARAM); // uisubs.c
  450. LRESULT CALLBACK SoftkeyMenuWndProc(HWND, UINT, WPARAM,LPARAM); // uisubs.c
  451. HWND PASCAL GetCompWnd(HWND); // compui.c
  452. void PASCAL SetCompPosition(HWND, HIMC, LPINPUTCONTEXT); // compui.c
  453. void PASCAL SetCompWindow(HWND); // compui.c
  454. void PASCAL MoveDefaultCompPosition(HWND); // compui.c
  455. void PASCAL ShowComp(HWND, int); // compui.c
  456. void PASCAL StartComp(HWND); // compui.c
  457. void PASCAL EndComp(HWND); // compui.c
  458. void PASCAL UpdateCompWindow(HWND); // compui.c
  459. LRESULT CALLBACK CompWndProc(HWND, UINT, WPARAM, LPARAM); // compui.c
  460. void PASCAL CompCancel(HIMC, LPINPUTCONTEXT);
  461. HWND PASCAL GetCandWnd(HWND); // candui.c
  462. void PASCAL CalcCandPos(HIMC, HWND, LPPOINT); // candui.c
  463. LRESULT PASCAL SetCandPosition(HWND); // candui.c
  464. void PASCAL ShowCand(HWND, int); // candui.c
  465. void PASCAL OpenCand(HWND); // candui.c
  466. void PASCAL CloseCand(HWND); // candui.c
  467. void PASCAL PaintCandWindow(HWND, HDC); // candui.c
  468. LRESULT CALLBACK CandWndProc(HWND, UINT, WPARAM, LPARAM); // candui.c
  469. void PASCAL UpdateSoftKbd(HWND);
  470. HWND PASCAL GetStatusWnd(HWND); // statusui.c
  471. LRESULT PASCAL SetStatusWindowPos(HWND); // statusui.c
  472. void PASCAL ShowStatus(HWND, int); // statusui.c
  473. void PASCAL OpenStatus(HWND); // statusui.c
  474. LRESULT CALLBACK StatusWndProc(HWND, UINT, WPARAM, LPARAM); // statusui.c
  475. void DrawConvexRect(HDC, int, int, int, int);
  476. void DrawConvexRectP(HDC, int, int, int, int);
  477. void DrawConcaveRect(HDC, int, int, int, int);
  478. BOOL IsUsedCode(WORD);
  479. void PASCAL InitStatusUIData(int, int);
  480. void PASCAL InitCandUIData(int, int, int);
  481. BOOL UpdateStatusWindow(HWND);
  482. void PASCAL EngChCand(LPCOMPOSITIONSTRING, LPCANDIDATELIST, LPPRIVCONTEXT, LPINPUTCONTEXT, WORD);
  483. void PASCAL CandPageDownUP(HWND, UINT);
  484. void PASCAL GenerateImeMessage(HIMC, LPINPUTCONTEXT, DWORD);
  485. UINT PASCAL TranslateSymbolChar(LPTRANSMSGLIST, WORD, BOOL);
  486. UINT PASCAL TranslateFullChar(LPTRANSMSGLIST, WORD);
  487. UINT PASCAL ConvListProcessKey(BYTE,LPPRIVCONTEXT); //ddis.c
  488. UINT PASCAL GBProcessKey(WORD, LPPRIVCONTEXT);
  489. UINT PASCAL XGBProcessKey(WORD, LPPRIVCONTEXT);
  490. WORD PASCAL XGBEngine(LPPRIVCONTEXT);
  491. void PASCAL XGBAddCodeIntoCand(LPCANDIDATELIST, WORD); // compose.c
  492. UINT PASCAL UnicodeProcessKey(WORD wCharCode, LPPRIVCONTEXT lpImcP);
  493. WORD PASCAL UnicodeEngine(LPPRIVCONTEXT lpImcP);
  494. #if defined(COMBO_IME)
  495. void PASCAL UnicodeAddCodeIntoCand(LPCANDIDATELIST, WORD);
  496. #endif
  497. // dialog procedure
  498. BOOL FAR PASCAL ImeVerDlgProc(HWND, UINT, WORD, LONG);
  499. BOOL FAR PASCAL CrtWordDlgProc(HWND, UINT, WORD, LONG);
  500. BOOL FAR PASCAL SetImeDlgProc(HWND, UINT, WORD, LONG);
  501. #ifdef MUL_MONITOR // Multi-Monitor Support
  502. RECT PASCAL ImeMonitorWorkAreaFromWindow(HWND); // mmonitor.c
  503. RECT PASCAL ImeMonitorWorkAreaFromPoint(POINT); // mmonitor.c
  504. RECT PASCAL ImeMonitorWorkAreaFromRect(LPRECT); // mmonitor.c
  505. #endif
  506. #ifdef UNICODE
  507. extern TCHAR SKLayout[NumsSK][MAXSOFTKEYS];
  508. extern TCHAR SKLayoutS[NumsSK][MAXSOFTKEYS];
  509. #else
  510. extern BYTE SKLayout[NumsSK][MAXSOFTKEYS*2];
  511. extern BYTE SKLayoutS[NumsSK][MAXSOFTKEYS*2];
  512. #endif //UNICODE