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.

840 lines
24 KiB

  1. /*************************************************
  2. * imedefs.h *
  3. * *
  4. * Copyright (C) 1995-1999 Microsoft Inc. *
  5. * *
  6. *************************************************/
  7. // IME designer can change this file according to each IME
  8. #include "immsec.h"
  9. // debug flag
  10. #define DEB_FATAL 0
  11. #define DEB_ERR 1
  12. #define DEB_WARNING 2
  13. #define DEB_TRACE 3
  14. #ifdef _WIN32
  15. void FAR cdecl _DebugOut(UINT, LPCSTR, ...);
  16. #endif
  17. #define NATIVE_CHARSET CHINESEBIG5_CHARSET
  18. #define NATIVE_LANGUAGE 0x0404
  19. #ifdef UNICODE
  20. #define NATIVE_CP 1200
  21. #define ALT_NATIVE_CP 938
  22. #define MAX_EUDC_CHARS 6217
  23. #else
  24. #define NATIVE_CP 950
  25. #define ALT_NATIVE_CP 938
  26. #define MAX_EUDC_CHARS 5809
  27. #endif
  28. #define NATIVE_ANSI_CP 950
  29. #if !defined(ROMANIME) && !defined(WINIME)
  30. #define SIGN_CWIN 0x4E495743
  31. #define SIGN__TBL 0x4C42545F
  32. #endif
  33. #if !defined(MINIIME)
  34. #if !defined(ROMANIME)
  35. // table load status
  36. #define TBL_NOTLOADED 0
  37. #define TBL_LOADED 1
  38. #define TBL_LOADERR 2
  39. // error MessageBox flags
  40. #define ERRMSG_LOAD_0 0x0010
  41. #define ERRMSG_LOAD_1 0x0020
  42. #define ERRMSG_LOAD_2 0x0040
  43. #define ERRMSG_LOAD_3 0x0080
  44. #define ERRMSG_LOAD_USRDIC 0x0400
  45. #define ERRMSG_MEM_0 0x1000
  46. #define ERRMSG_MEM_1 0x2000
  47. #define ERRMSG_MEM_2 0x4000
  48. #define ERRMSG_MEM_3 0x8000
  49. #define ERRMSG_MEM_USRDIC 0x00040000
  50. // hack flag, I borrow one bit from fdwErrMsg for reverse conversion
  51. #define NO_REV_LENGTH 0x80000000
  52. // state of composition
  53. #define CST_INIT 0
  54. #define CST_INPUT 1
  55. #define CST_CHOOSE 2
  56. #define CST_SYMBOL 3
  57. #define CST_ALPHABET 4 // not in iImeState
  58. #endif
  59. #if defined(DAYI)
  60. #define CST_ROAD 5 // not in iImeState
  61. #else
  62. #define CST_EURO 5
  63. #endif
  64. #define CST_ALPHANUMERIC 6 // not in iImeState
  65. #define CST_INVALID 7 // not in iImeState
  66. #define CST_IME_HOTKEYS 0x40 // not in iImeState
  67. #define CST_RESEND_RESULT (CST_IME_HOTKEYS)
  68. #define CST_PREVIOUS_COMP (CST_IME_HOTKEYS+1)
  69. #define CST_TOGGLE_UI (CST_IME_HOTKEYS+2)
  70. // IME specific constants
  71. #if defined(WINAR30) || defined(DAYI)
  72. #define CANDPERPAGE 10
  73. #else
  74. #define CANDPERPAGE 9
  75. #endif
  76. #define CHOOSE_PREVPAGE 0x10
  77. #define CHOOSE_NEXTPAGE 0x11
  78. #define CHOOSE_CIRCLE 0x12
  79. #define CHOOSE_HOME 0x13
  80. #define MAXSTRLEN 128
  81. #define MAXCAND 256
  82. #define CAND_PROMPT_PHRASE 0
  83. #define CAND_PROMPT_QUICK_VIEW 1
  84. #define CAND_PROMPT_NORMAL 2
  85. // max composition ways of one big5 code, it is for reverse conversion
  86. #if defined(ROMANIME)
  87. #define MAX_COMP 0
  88. #elif defined(WINIME)
  89. #define MAX_COMP 1
  90. #else
  91. #define MAX_COMP 10
  92. #endif
  93. #define MAX_COMP_BUF 10
  94. // border for UI
  95. #define UI_MARGIN 4
  96. #define STATUS_DIM_X 24
  97. #define STATUS_DIM_Y 24
  98. #define CAND_PROMPT_DIM_X 80
  99. #define CAND_PROMPT_DIM_Y 16
  100. #define PAGE_DIM_X 16
  101. #define PAGE_DIM_Y CAND_PROMPT_DIM_Y
  102. // if UI_MOVE_OFFSET == WINDOW_NOTDRAG, not in drag operation
  103. #define WINDOW_NOT_DRAG 0xFFFFFFFF
  104. // window extra for composition window
  105. #define UI_MOVE_OFFSET 0
  106. #define UI_MOVE_XY 4
  107. // window extra for context menu owner
  108. #define CMENU_HUIWND 0
  109. #define CMENU_MENU (CMENU_HUIWND+sizeof(LONG_PTR))
  110. #define WND_EXTRA_SIZE (CMENU_MENU+sizeof(LONG_PTR))
  111. #define WM_USER_DESTROY (WM_USER + 0x0400)
  112. #define WM_USER_UICHANGE (WM_USER + 0x0401)
  113. // the flags for GetNearCaretPosition
  114. #define NEAR_CARET_FIRST_TIME 0x0001
  115. #define NEAR_CARET_CANDIDATE 0x0002
  116. // the flag for an opened or start UI
  117. #define IMN_PRIVATE_TOGGLE_UI 0x0001
  118. #define IMN_PRIVATE_CMENUDESTROYED 0x0002
  119. #if !defined(ROMANIME)
  120. #define IMN_PRIVATE_COMPOSITION_SIZE 0x0003
  121. #define IMN_PRIVATE_UPDATE_PREDICT 0x0004
  122. #if defined(WINAR30)
  123. #define IMN_PRIVATE_UPDATE_QUICK_KEY 0x0005
  124. #else
  125. #define IMN_PRIVATE_UPDATE_SOFTKBD 0x0006
  126. #endif
  127. #define IMN_PRIVATE_PAGEUP 0x0007
  128. #endif
  129. #define MSG_COMPOSITION 0x0000001
  130. #if !defined(ROMANIME)
  131. #define MSG_START_COMPOSITION 0x0000002
  132. #define MSG_END_COMPOSITION 0x0000004
  133. #define MSG_ALREADY_START 0x0000008
  134. #define MSG_CHANGE_CANDIDATE 0x0000010
  135. #define MSG_OPEN_CANDIDATE 0x0000020
  136. #define MSG_CLOSE_CANDIDATE 0x0000040
  137. #define MSG_ALREADY_OPEN 0x0000080
  138. #define MSG_GUIDELINE 0x0000100
  139. #define MSG_IMN_COMPOSITIONPOS 0x0000200
  140. #define MSG_IMN_COMPOSITIONSIZE 0x0000400
  141. #define MSG_IMN_UPDATE_PREDICT 0x0000800
  142. #if defined(WINAR30)
  143. #define MSG_IMN_UPDATE_QUICK_KEY 0x0001000
  144. #else
  145. #define MSG_IMN_UPDATE_SOFTKBD 0x0002000
  146. #endif
  147. #define MSG_ALREADY_SOFTKBD 0x0004000
  148. #define MSG_IMN_PAGEUP 0x0008000
  149. // original reserve for old array, now we switch to new, no one use yet
  150. #define MSG_CHANGE_CANDIDATE2 0x1000000
  151. #define MSG_OPEN_CANDIDATE2 0x2000000
  152. #define MSG_CLOSE_CANDIDATE2 0x4000000
  153. #define MSG_ALREADY_OPEN2 0x8000000
  154. #define MSG_STATIC_STATE (MSG_ALREADY_START|MSG_ALREADY_OPEN|MSG_ALREADY_SOFTKBD|MSG_ALREADY_OPEN2)
  155. #endif // !defined(ROMANIME)
  156. #define MSG_IMN_TOGGLE_UI 0x0400000
  157. #define MSG_IN_IMETOASCIIEX 0x0800000
  158. #define ISC_HIDE_COMP_WINDOW 0x00400000
  159. #define ISC_HIDE_CAND_WINDOW 0x00800000
  160. #define ISC_HIDE_SOFTKBD 0x01000000
  161. #define ISC_LAZY_OPERATION (ISC_HIDE_COMP_WINDOW|ISC_HIDE_CAND_WINDOW|ISC_HIDE_SOFTKBD)
  162. #define ISC_SHOW_SOFTKBD 0x02000000
  163. #define ISC_OPEN_STATUS_WINDOW 0x04000000
  164. #define ISC_OFF_CARET_UI 0x08000000
  165. #define ISC_SHOW_PRIV_UI (ISC_SHOW_SOFTKBD|ISC_OPEN_STATUS_WINDOW|ISC_OFF_CARET_UI)
  166. #define ISC_SHOW_UI_ALL (ISC_SHOWUIALL|ISC_SHOW_SOFTKBD|ISC_OPEN_STATUS_WINDOW)
  167. #define ISC_SETCONTEXT_UI (ISC_SHOWUIALL|ISC_SHOW_SOFTKBD)
  168. #if (ISC_SHOWUIALL & (ISC_LAZY_OPERATION|ISC_SHOW_PRIV_UI))
  169. #error bit confliction
  170. #endif
  171. #if defined(CHAJEI) || defined(QUICK) || defined(WINAR30)
  172. #define GHOSTCARD_SEQCODE 0x3F
  173. #endif
  174. #if defined(WINAR30)
  175. #define WILDCARD_SEQCODE 0x3E
  176. #endif
  177. // the virtual key value
  178. #define VK_OEM_SEMICLN 0xba // ; :
  179. #define VK_OEM_EQUAL 0xbb // = +
  180. #define VK_OEM_SLASH 0xbf // / ?
  181. #define VK_OEM_LBRACKET 0xdb // [ {
  182. #define VK_OEM_BSLASH 0xdc // \ |
  183. #define VK_OEM_RBRACKET 0xdd // ] }
  184. #define VK_OEM_QUOTE 0xde // ' "
  185. typedef DWORD UNALIGNED FAR *LPUNADWORD;
  186. typedef WORD UNALIGNED FAR *LPUNAWORD;
  187. typedef WCHAR UNALIGNED *LPUNAWSTR;
  188. #define NFULLABC 95
  189. typedef struct tagFullABC {
  190. WORD wFullABC[NFULLABC];
  191. } FULLABC;
  192. typedef FULLABC *PFULLABC;
  193. typedef FULLABC NEAR *NPFULLABC;
  194. typedef FULLABC FAR *LPFULLABC;
  195. #if defined(DAYI)
  196. #define NSYMBOL 0x41
  197. #else
  198. #define NSYMBOL 0x40
  199. #endif
  200. typedef struct tagSymbol {
  201. WORD wSymbol[NSYMBOL];
  202. } SYMBOL;
  203. typedef SYMBOL *PSYMBOL;
  204. typedef SYMBOL NEAR *NPSYMBOL;
  205. typedef SYMBOL FAR *LPSYMBOL;
  206. #define NUM_OF_IME_HOTKEYS 3
  207. #if defined(UNIIME)
  208. #define MAX_PHRASE_TABLES 2
  209. #if defined(MAX_NAME_LENGTH)
  210. #if (MAX_NAME_LENGTH) != 32
  211. #error MAX_NAME_LENGTH not the same in other header file
  212. #endif
  213. #else
  214. #define MAX_NAME_LENGTH 32
  215. #endif
  216. typedef struct tagPhraseTables { // match with the IMEG
  217. TCHAR szTblFile[MAX_PHRASE_TABLES][MAX_NAME_LENGTH / sizeof(TCHAR)];
  218. } PHRASETABLES;
  219. typedef PHRASETABLES *PPHRASETABLES;
  220. typedef PHRASETABLES NEAR *NPPHRASETABLES;
  221. typedef PHRASETABLES FAR *LPPHRASETABLES;
  222. #endif
  223. typedef struct tagImeG { // global structure, can be shared by all
  224. // IMEs, the seperation (IMEL and IMEG) is
  225. // only useful in UNI-IME, other IME can use
  226. // one data structure
  227. RECT rcWorkArea; // the work area of applications
  228. // full shape space (reversed internal code)
  229. WORD wFullSpace;
  230. // full shape chars (internal code)
  231. WORD wFullABC[NFULLABC];
  232. #ifdef HANDLE_PRIVATE_HOTKEY
  233. // IME hot keys
  234. // modifiers of IME hot key
  235. UINT uModifiers[NUM_OF_IME_HOTKEYS];
  236. // virtual key of IME hot key
  237. UINT uVKey[NUM_OF_IME_HOTKEYS];
  238. #endif
  239. UINT uAnsiCodePage;
  240. #if !defined(ROMANIME)
  241. // the system charset is not NATIVE_CHARSET
  242. BOOL fDiffSysCharSet;
  243. // Chinese char width & height
  244. int xChiCharWi;
  245. int yChiCharHi;
  246. #if !defined(WINAR30)
  247. // symbol chars (internal code)
  248. WORD wSymbol[NSYMBOL];
  249. #if defined(DAYI)
  250. WORD wDummy; // DWORD boundary
  251. #endif
  252. #endif
  253. #if defined(UNIIME)
  254. DWORD fdwErrMsg; // error message flag
  255. UINT uPathLen;
  256. TCHAR szPhrasePath[MAX_PATH];
  257. // size of phrase tables
  258. UINT uTblSize[MAX_PHRASE_TABLES];
  259. // filename of phrase tables
  260. TCHAR szTblFile[MAX_PHRASE_TABLES][MAX_NAME_LENGTH / sizeof(TCHAR)];
  261. // the phrase table handle
  262. #endif
  263. // setting of UI
  264. int iPara;
  265. int iPerp;
  266. int iParaTol;
  267. int iPerpTol;
  268. #endif // !defined(ROMANIME)
  269. } IMEG;
  270. typedef IMEG *PIMEG;
  271. typedef IMEG NEAR *NPIMEG;
  272. typedef IMEG FAR *LPIMEG;
  273. #if defined(UNIIME)
  274. typedef struct tagInstG { // instance global structure, can be
  275. // shared by all IMEs
  276. HANDLE hMapTbl[MAX_PHRASE_TABLES];
  277. } INSTDATAG;
  278. #endif
  279. typedef struct tagPRIVCONTEXT { // IME private data for each context
  280. BOOL fdwImeMsg; // what messages should be generated
  281. DWORD dwCompChar; // wParam of WM_IME_COMPOSITION
  282. DWORD fdwGcsFlag; // lParam for WM_IME_COMPOSITION
  283. DWORD fdwInit; // position init
  284. #if !defined(ROMANIME)
  285. int iImeState; // the composition state - input, choose, or
  286. // input data
  287. BYTE bSeq[8]; // sequence code of input char
  288. DWORD dwPattern;
  289. int iInputEnd;
  290. #if defined(CHAJEI) || defined(QUICK) || defined(WINAR30)
  291. int iGhostCard;
  292. #endif
  293. #if defined(WINAR30)
  294. DWORD dwWildCardMask;
  295. DWORD dwLastWildCard;
  296. #endif
  297. // the previous dwPageStart before page up
  298. DWORD dwPrevPageStart;
  299. #endif
  300. } PRIVCONTEXT;
  301. typedef PRIVCONTEXT *PPRIVCONTEXT;
  302. typedef PRIVCONTEXT NEAR *NPPRIVCONTEXT;
  303. typedef PRIVCONTEXT FAR *LPPRIVCONTEXT;
  304. typedef struct tagUIPRIV { // IME private UI data
  305. #if !defined(ROMANIME)
  306. HWND hCompWnd; // composition window
  307. int nShowCompCmd;
  308. HWND hCandWnd; // candidate window for composition
  309. int nShowCandCmd;
  310. HWND hSoftKbdWnd; // soft keyboard window
  311. int nShowSoftKbdCmd;
  312. #endif
  313. HWND hStatusWnd; // status window
  314. int nShowStatusCmd;
  315. DWORD fdwSetContext; // the actions to take at set context time
  316. HIMC hCacheIMC; // the recent selected hIMC
  317. HWND hCMenuWnd; // a window owner for context menu
  318. } UIPRIV;
  319. typedef UIPRIV *PUIPRIV;
  320. typedef UIPRIV NEAR *NPUIPRIV;
  321. typedef UIPRIV FAR *LPUIPRIV;
  322. typedef struct tagNEARCARET { // for near caret offset calculatation
  323. int iLogFontFacX;
  324. int iLogFontFacY;
  325. int iParaFacX;
  326. int iPerpFacX;
  327. int iParaFacY;
  328. int iPerpFacY;
  329. } NEARCARET;
  330. typedef NEARCARET *PNEARCARET;
  331. typedef NEARCARET NEAR *NPNEARCARET;
  332. typedef NEARCARET FAR *LPNEARCARET;
  333. #ifndef RC_INVOKED
  334. #pragma pack(1)
  335. #endif
  336. typedef struct tagUSRDICIMHDR {
  337. WORD uHeaderSize; // 0x00
  338. BYTE idUserCharInfoSign[8]; // 0x02
  339. BYTE idMajor; // 0x0A
  340. BYTE idMinor; // 0x0B
  341. DWORD ulTableCount; // 0x0C
  342. WORD cMethodKeySize; // 0x10
  343. BYTE uchBankID; // 0x12
  344. WORD idInternalBankID; // 0x13
  345. BYTE achCMEXReserved1[43]; // 0x15
  346. WORD uInfoSize; // 0x40
  347. BYTE chCmdKey; // 0x42
  348. BYTE idStlnUpd; // 0x43
  349. BYTE cbField; // 0x44
  350. WORD idCP; // 0x45
  351. BYTE achMethodName[6]; // 0x47
  352. BYTE achCSIReserved2[51]; // 0x4D
  353. BYTE achCopyRightMsg[128]; // 0x80
  354. } USRDICIMHDR;
  355. typedef USRDICIMHDR *PUSRDICIMHDR;
  356. typedef USRDICIMHDR NEAR *NPUSRDICIMHDR;
  357. typedef USRDICIMHDR FAR *LPUSRDICIMHDR;
  358. typedef struct tagMETHODNAME {
  359. BYTE achMethodName[6];
  360. } METHODNAME;
  361. typedef METHODNAME *PMETHODNAME;
  362. typedef METHODNAME NEAR *NPMETHODNAME;
  363. typedef METHODNAME FAR *LPMETHODNAME;
  364. #ifndef RC_INVOKED
  365. #pragma pack()
  366. #endif
  367. #endif // !defined(MINIIME)
  368. extern HINSTANCE hInst;
  369. #if defined(UNIIME)
  370. extern INSTDATAG sInstG;
  371. #endif
  372. #if !defined(MINIIME)
  373. extern IMEG sImeG;
  374. #if !defined(ROMANIME)
  375. extern int iDx[3 * CANDPERPAGE];
  376. extern const TCHAR szDigit[];
  377. extern const BYTE bUpper[];
  378. extern const WORD fMask[];
  379. extern const TCHAR szRegNearCaret[];
  380. extern const TCHAR szPhraseDic[];
  381. extern const TCHAR szPhrasePtr[];
  382. extern const TCHAR szPerp[];
  383. extern const TCHAR szPara[];
  384. extern const TCHAR szPerpTol[];
  385. extern const TCHAR szParaTol[];
  386. extern const NEARCARET ncUIEsc[], ncAltUIEsc[];
  387. extern const POINT ptInputEsc[], ptAltInputEsc[];
  388. #if defined(PHON)
  389. extern const TCHAR szRegReadLayout[];
  390. #endif
  391. extern const TCHAR szRegRevKL[];
  392. extern const TCHAR szRegUserDic[];
  393. #endif
  394. extern const TCHAR szRegAppUser[];
  395. extern const TCHAR szRegModeConfig[];
  396. extern const BYTE bChar2VirtKey[];
  397. #if defined(PHON)
  398. extern const BYTE bStandardLayout[READ_LAYOUTS][0x41];
  399. extern const char cIndexTable[];
  400. extern const char cSeq2IndexTbl[];
  401. #endif
  402. #ifdef UNICODE
  403. #if defined(PHON) || defined(DAYI)
  404. extern const BYTE bValidFirstHex[];
  405. extern const BYTE bInverseEncode[];
  406. #define IsValidCode(uCode) bValidFirstHex[uCode >> 12]
  407. #define InverseEncode(uCode) ((uCode & 0x0FFF) | (bInverseEncode[uCode >> 12] << 12))
  408. #endif // defined(PHON) || defined(DAYI)
  409. #endif // UNICODE
  410. int WINAPI LibMain(HANDLE, WORD, WORD, LPSTR); // init.c
  411. void PASCAL InitImeUIData(LPIMEL); // init.c
  412. void PASCAL SetCompLocalData(LPIMEL); // init.c
  413. void PASCAL SetUserSetting(
  414. #if defined(UNIIME)
  415. LPIMEL,
  416. #endif
  417. LPCTSTR, DWORD, LPBYTE, DWORD); // init.c
  418. #if !defined(ROMANIME)
  419. void PASCAL AddCodeIntoCand(
  420. #if defined(UNIIME)
  421. LPIMEL,
  422. #endif
  423. LPCANDIDATELIST, UINT); // compose.c
  424. DWORD PASCAL ConvertSeqCode2Pattern(
  425. #if defined(UNIIME)
  426. LPIMEL,
  427. #endif
  428. LPBYTE, LPPRIVCONTEXT); // compose.c
  429. void PASCAL CompWord(
  430. #if defined(UNIIME)
  431. LPINSTDATAL, LPIMEL,
  432. #endif
  433. WORD, HIMC, LPINPUTCONTEXT, LPCOMPOSITIONSTRING,
  434. LPGUIDELINE, LPPRIVCONTEXT); // compose.c
  435. UINT PASCAL Finalize(
  436. #if defined(UNIIME)
  437. LPINSTDATAL, LPIMEL,
  438. #endif
  439. HIMC, LPINPUTCONTEXT, LPCOMPOSITIONSTRING,
  440. LPPRIVCONTEXT, BOOL); // compose.c
  441. void PASCAL CompEscapeKey(LPINPUTCONTEXT, LPCOMPOSITIONSTRING,
  442. LPGUIDELINE, LPPRIVCONTEXT); // compose.c
  443. UINT PASCAL PhrasePrediction(
  444. #if defined(UNIIME)
  445. LPIMEL,
  446. #endif
  447. LPINPUTCONTEXT, LPCOMPOSITIONSTRING,
  448. LPPRIVCONTEXT); // chcand.c
  449. void PASCAL SelectOneCand(
  450. #if defined(UNIIME)
  451. LPIMEL,
  452. #endif
  453. HIMC, LPINPUTCONTEXT, LPCOMPOSITIONSTRING,
  454. LPPRIVCONTEXT, LPCANDIDATELIST); // chcand.c
  455. void PASCAL CandEscapeKey(LPINPUTCONTEXT, LPPRIVCONTEXT); // chcand.c
  456. void PASCAL ChooseCand(
  457. #if defined(UNIIME)
  458. LPINSTDATAL, LPIMEL,
  459. #endif
  460. WORD, HIMC, LPINPUTCONTEXT, LPCANDIDATEINFO,
  461. LPPRIVCONTEXT); // chcand.c
  462. #if defined(WINAR30) || defined(DAYI)
  463. void PASCAL SearchSymbol(WORD, HIMC, LPINPUTCONTEXT,
  464. LPPRIVCONTEXT); // chcand.c
  465. #endif // defined(WINAR30) || defined(DAYI)
  466. #endif // !defined(ROMANIME)
  467. void PASCAL InitGuideLine(LPGUIDELINE); // ddis.c
  468. void PASCAL InitCompStr(LPCOMPOSITIONSTRING); // ddis.c
  469. BOOL PASCAL ClearCand(LPINPUTCONTEXT); // ddis.c
  470. BOOL PASCAL Select(
  471. #if defined(UNIIME)
  472. LPIMEL,
  473. #endif
  474. LPINPUTCONTEXT, BOOL); // ddis.c
  475. UINT PASCAL TranslateImeMessage(LPTRANSMSGLIST, LPINPUTCONTEXT,
  476. LPPRIVCONTEXT); // toascii.c
  477. void PASCAL GenerateMessage(HIMC, LPINPUTCONTEXT,
  478. LPPRIVCONTEXT); // notify.c
  479. void PASCAL CompCancel(HIMC, LPINPUTCONTEXT); // notify.c
  480. #if !defined(WINIME) && !defined(ROMANIME)
  481. BOOL PASCAL ReadUsrDicToMem(
  482. #if defined(UNIIME)
  483. LPINSTDATAL, LPIMEL,
  484. #endif
  485. HANDLE, DWORD, UINT, UINT, UINT, UINT); // dic.c
  486. void PASCAL LoadUsrDicFile(LPINSTDATAL, LPIMEL); // dic.c
  487. #endif
  488. #if !defined(ROMANIME)
  489. BOOL PASCAL LoadPhraseTable(UINT, LPTSTR); // dic.c
  490. #endif
  491. #if !defined(ROMANIME)
  492. BOOL PASCAL LoadTable(LPINSTDATAL, LPIMEL); // dic.c
  493. void PASCAL FreeTable(LPINSTDATAL); // dic.c
  494. #if defined(WINAR30)
  495. void PASCAL SearchQuickKey(LPCANDIDATELIST, LPPRIVCONTEXT); // search.c
  496. #if defined(DAYI) || defined(UNIIME)
  497. void PASCAL SearchPhraseTbl(
  498. #if defined(UNIIME)
  499. LPIMEL,
  500. #endif
  501. UINT, LPCANDIDATELIST, DWORD dwPattern); // search.c
  502. #endif
  503. #endif
  504. void PASCAL SearchTbl(
  505. #if defined(UNIIME)
  506. LPIMEL,
  507. #endif
  508. UINT, LPCANDIDATELIST, LPPRIVCONTEXT); // search.c
  509. void PASCAL SearchUsrDic(
  510. #if defined(UNIIME)
  511. LPIMEL,
  512. #endif
  513. LPCANDIDATELIST, LPPRIVCONTEXT); // search.c
  514. DWORD PASCAL ReadingToPattern(
  515. #if defined(UNIIME)
  516. LPIMEL,
  517. #endif
  518. LPCTSTR, LPBYTE, BOOL); // regword.c
  519. #endif
  520. BOOL PASCAL UsrDicFileName(
  521. #if defined(UNIIME)
  522. LPINSTDATAL, LPIMEL,
  523. #endif
  524. HWND); // config.c
  525. void PASCAL DrawDragBorder(HWND, LONG, LONG); // uisubs.c
  526. void PASCAL DrawFrameBorder(HDC, HWND); // uisubs.c
  527. void PASCAL ContextMenu(
  528. #if defined(UNIIME)
  529. LPINSTDATAL, LPIMEL,
  530. #endif
  531. HWND, int, int); // uisubs.c
  532. #if 1 // MultiMonitor support
  533. RECT PASCAL ImeMonitorWorkAreaFromWindow(HWND); // uisubs.c
  534. RECT PASCAL ImeMonitorWorkAreaFromPoint(POINT); // uisubs.c
  535. RECT PASCAL ImeMonitorWorkAreaFromRect(LPRECT); // uisubs.c
  536. #endif
  537. #if !defined(ROMANIME)
  538. HWND PASCAL GetCompWnd(HWND); // compui.c
  539. void PASCAL GetNearCaretPosition(
  540. #if defined (UNIIME)
  541. LPIMEL,
  542. #endif
  543. LPPOINT, UINT, UINT, LPPOINT, LPPOINT, BOOL); // compui.c
  544. BOOL PASCAL AdjustCompPosition(
  545. #if defined (UNIIME)
  546. LPIMEL,
  547. #endif
  548. LPINPUTCONTEXT, LPPOINT, LPPOINT); // compui.c
  549. void PASCAL SetCompPosition(
  550. #if defined (UNIIME)
  551. LPIMEL,
  552. #endif
  553. HWND, LPINPUTCONTEXT); // compui.c
  554. void PASCAL SetCompWindow(
  555. #if defined(UNIIME)
  556. LPIMEL,
  557. #endif
  558. HWND); // compui.c
  559. void PASCAL MoveDefaultCompPosition(
  560. #if defined(UNIIME)
  561. LPIMEL,
  562. #endif
  563. HWND); // compui.c
  564. void PASCAL ShowComp(
  565. #if defined(UNIIME)
  566. LPIMEL,
  567. #endif
  568. HWND, int); // compui.c
  569. void PASCAL StartComp(
  570. #if defined(UNIIME)
  571. LPINSTDATAL, LPIMEL,
  572. #endif
  573. HWND); // compui.c
  574. void PASCAL EndComp(
  575. #if defined(UNIIME)
  576. LPIMEL,
  577. #endif
  578. HWND); // compui.c
  579. void PASCAL ChangeCompositionSize(
  580. #if defined(UNIIME)
  581. LPIMEL,
  582. #endif
  583. HWND); // compui.c
  584. HWND PASCAL GetCandWnd(HWND); // candui.c
  585. BOOL PASCAL CalcCandPos(
  586. #if defined(UNIIME)
  587. LPIMEL,
  588. #endif
  589. LPINPUTCONTEXT, LPPOINT); // candui.c
  590. void PASCAL ShowCand(
  591. #if defined(UNIIME)
  592. LPIMEL,
  593. #endif
  594. HWND, int); // candui.c
  595. void PASCAL OpenCand(
  596. #if defined(UNIIME)
  597. LPINSTDATAL, LPIMEL,
  598. #endif
  599. HWND); // candui.c
  600. void PASCAL CloseCand(
  601. #if defined(UNIIME)
  602. LPIMEL,
  603. #endif
  604. HWND); // candui.c
  605. void PASCAL CandPageSize(HWND, BOOL); // candui.c
  606. #endif // !defined(ROMANIME)
  607. HWND PASCAL GetStatusWnd(HWND); // statusui.c
  608. LRESULT PASCAL SetStatusWindowPos(
  609. #if defined(UNIIME)
  610. LPIMEL,
  611. #endif
  612. HWND); // statusui.c
  613. void PASCAL AdjustStatusBoundary(
  614. #if defined(UNIIME)
  615. LPIMEL,
  616. #endif
  617. LPPOINT); // statusui.c
  618. void PASCAL DestroyStatusWindow(HWND); // statusui.c
  619. void PASCAL ShowStatus(
  620. #if defined(UNIIME)
  621. LPIMEL,
  622. #endif
  623. HWND, int); // statusui.c
  624. void PASCAL OpenStatus(
  625. #if defined(UNIIME)
  626. LPINSTDATAL, LPIMEL,
  627. #endif
  628. HWND); // statusui.c
  629. void PASCAL SetStatus(
  630. #if defined(UNIIME)
  631. LPIMEL,
  632. #endif
  633. HWND, LPPOINT); // statusui.c
  634. void PASCAL ResourceLocked(
  635. #if defined(UNIIME)
  636. LPIMEL,
  637. #endif
  638. HWND); // statusui.c
  639. void PASCAL PaintStatusWindow(
  640. #if defined(UNIIME)
  641. LPINSTDATAL, LPIMEL,
  642. #endif
  643. HWND, HDC); // statusui.c
  644. BOOL PASCAL MouseSelectCandPage(
  645. #if defined(UNIIME)
  646. LPIMEL,
  647. #endif
  648. HWND, WORD); // offcaret.c
  649. #endif // !defined(MINIIME)
  650. #if !defined(UNIIME)
  651. LRESULT CALLBACK UIWndProc(HWND, UINT, WPARAM, LPARAM); // ui.c
  652. LRESULT CALLBACK CompWndProc(HWND, UINT, WPARAM, LPARAM); // compui.c
  653. LRESULT CALLBACK CandWndProc(HWND, UINT, WPARAM, LPARAM); // candui.c
  654. LRESULT CALLBACK StatusWndProc(HWND, UINT, WPARAM, LPARAM); // statusui.c
  655. LRESULT CALLBACK OffCaretWndProc(HWND, UINT, WPARAM, LPARAM); // offcaret.c
  656. LRESULT CALLBACK ContextMenuWndProc(HWND, UINT, WPARAM,
  657. LPARAM); // uisubs.c
  658. #endif