Leaked source code of windows server 2003
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.

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