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.

1479 lines
43 KiB

  1. /*************************************************
  2. * abc95def.h *
  3. * *
  4. * Copyright (C) 1995-1999 Microsoft Inc. *
  5. * *
  6. *************************************************/
  7. #include <regstr.h>
  8. #include <winreg.h>
  9. /* VK from the keyboard driver */
  10. #define VK_KANA 0x15 //1993.4.22 append from windows.h
  11. #define VK_ROMAJI 0x16
  12. #define VK_ZENKAKU 0x17
  13. #define VK_HIRAGANA 0x18
  14. #define VK_KANJI 0x19
  15. #define VK_DANYINHAO 0xc0 // [,] char = 0x60
  16. #define VK_JIANHAO 0xbd // [-] char = 0x2d
  17. #define VK_DENGHAO 0xbb // [=] char = 0x3d
  18. #define VK_ZUOFANG 0xdb // "[" char = 0x5b
  19. #define VK_YOUFANG 0xdd // "]" char = 0x5d
  20. #define VK_FENHAO 0xba // [;] char = 0x3b
  21. #define VK_ZUODAN 0xde // ['] char = 0x27
  22. #define VK_DOUHAO 0xbc // [,] char = 0x2c
  23. #define VK_JUHAO 0xbe // [.] char = 0x2d
  24. #define VK_SHANGXIE 0xbf // [ ] char = 0x2f
  25. #define VK_XIAXIE 0xdc // [\] char = 0x5c
  26. #define WM_NEW_WORD 1992+0x400
  27. #define STC FALSE
  28. #define CLC TRUE
  29. #define REINPUT 2
  30. #define RECALL 3
  31. #define BACKWORD_KEY 0x802d
  32. #define FORWORD_KEY 0x803d
  33. #define BIAODIAN_ONLY -2
  34. #define SC_METHOD0 100
  35. #define SC_METHOD1 101
  36. #define SC_METHOD2 102
  37. #define SC_METHOD3 103
  38. #define SC_METHOD4 104
  39. #define SC_METHOD5 105
  40. #define SC_METHOD6 106
  41. #define SC_METHOD7 107
  42. #define SC_METHOD8 108
  43. #define SC_METHOD9 109
  44. #define SC_METHOD10 110
  45. #define SC_ABOUT 111
  46. #define SC_QUIT 112
  47. #define SC_METHODA 113
  48. #define IDK_SK 211
  49. #define IDK_QY 212
  50. #define IDK_CF 213
  51. #define IDK_SX 214
  52. //Input Methods definition (kb_mode)
  53. #define CIN_QW 1
  54. #define CIN_BX 2
  55. #define CIN_STD 3
  56. #define CIN_SDA 4
  57. #define CIN_ASC 5
  58. // Definitions of input step_mode (STD, SD)
  59. #define START 0 //the step_mode before pinyin inputing
  60. #define SELECT 1 // after convert
  61. #define RESELECT 2 // after select and can be reselect by FORCE SELECT
  62. // KEY.
  63. #define ONINPUT 3 // During inputing progress.
  64. #define ONCOVERT 4 // While converting.
  65. //input information (in.info_flag) definitions
  66. #define BY_RECALL 1
  67. #define BY_WORD 0x80
  68. #define BY_CHAR 0x81
  69. //#define IDM_ABOUT 100
  70. #define ABC_HEIGHT 18 //22 //24 here
  71. #define ABC_TOP 4 //7
  72. #define KBAR_W 5 //10
  73. #define KHLINE_W 1
  74. #define KDISP_X 1
  75. #define KDISP_Y 1 //4
  76. #define KVLINE_TOP (ABC_TOP-1)
  77. #define KVLINE_H ( Rect.bottom-Rect.top/*-5-4*/-2-1) //here
  78. #define BLINE_Y (Rect.bottom-/*4*/2) //-2
  79. #define KMAIN_X 1
  80. #define KMAIN_Y ( GetSystemMetrics(SM_CYSCREEN)/*-37*/-29)
  81. #define KMAIN_W (GetSystemMetrics(SM_CXSCREEN)-2)
  82. #define KMAIN_H 28 //36
  83. #define FC_X 1
  84. #define FC_Y 1
  85. #define FC_W (GetSystemMetrics(SM_CXSCREEN)-2)
  86. #define FC_H ( GetSystemMetrics(SM_CYSCREEN)-/*37*/29)
  87. #define KA_X (Rect.left+KBAR_W) /* Default horizontal position. */
  88. #define KA_Y (Rect.top+ABC_TOP) /* Default vertical position. */
  89. #define KA_W 32
  90. #define KA_H ABC_HEIGHT /* Default height. */
  91. #define KB_X (Rect.left+KBAR_W*2+KA_W) /* Default horizontal position. */
  92. #define KB_Y (Rect.top+ABC_TOP) /* Default vertical position. */
  93. #define KB_W 200 /* Default width. */
  94. #define KB_H ABC_HEIGHT
  95. #define KD_W 32 // IT MUST BE HERE!
  96. #define KD_X (Rect.right-KD_W-KBAR_W) /* Default horizontal position. */
  97. #define KD_Y (Rect.top+ABC_TOP) /* Default vertical position. */
  98. #define KD_H ABC_HEIGHT /* Default height. */
  99. #define KC_X (Rect.left+KA_W+KBAR_W*3+KB_W) /* Default horizontal position. */
  100. #define KC_Y (Rect.top+ABC_TOP) /* Default vertical position. */
  101. #define KC_W (Rect.right-Rect.left-KBAR_W*5-KA_W-KB_W-KD_W) /* Default width. */
  102. #define KC_H ABC_HEIGHT
  103. #define KSDA_X 60
  104. #define KSDA_Y ( GetSystemMetrics(SM_CYSCREEN)-37)-130
  105. #define KSDA_W 545 //312
  106. #define KSDA_H 130 //83
  107. #define XX 0
  108. #define CUR_START_X 1 //KBAR_W+KBAR_W+KA_W+1
  109. #define CUR_START_Y /*KVLINE_TOP+*/ KDISP_Y
  110. #define CUR_W 2
  111. #define CUR_H 16
  112. #define IN_MENU 1
  113. #define IN_NAME 2
  114. #define IN_INPUT 3
  115. #define IN_CANDIDATE 4
  116. #define IN_OPERAT 5
  117. #define IN_MODE 6
  118. #define IN_SOFTKEY 7
  119. #define IN_MOVE 8
  120. #define MD_PAINT 0x1992 //For ABC Paint
  121. #define MD_CURX MD_PAINT+1 // Show chusor
  122. #define MD_NORMAL MD_PAINT+2 // Display Normal char
  123. #define MD_BACK MD_PAINT+3 // Display BACKSPACE,ESC...
  124. #define TN_CLS MD_PAINT+4
  125. #define TN_SHOW MD_PAINT+5
  126. #define TN_STATE MD_PAINT+6
  127. #define MD_UPDATE 0x1993 //1993.3 for increase user.rem
  128. #define POST_OLD 0x11
  129. #define TMMR_REAL_LENGTH 0x1800
  130. //#define some corlors
  131. #define CO_LIGHTBLUE RGB(0,255,255)
  132. #define CO_METHOD RGB(0,40,80)
  133. #define CO_CAP RGB(255,0,0)
  134. #define TColor1 RGB(0,0,0)
  135. #define TColor2 RGB(0,0,255)
  136. #define TColor4 RGB(0,0,128)
  137. #define TColor3 RGB(64,0,128)
  138. // Input msg type definitions (STD,SD)
  139. #define NORMAL 0 // Normal pinyin string
  140. #define ABBR 1 // First letter is capital
  141. #define CPAPS_NUM 2 // Capital Chinese number (identifer is "I")
  142. #define CSMALL_NUM 3 // Small chinese number (identifer is "i")
  143. #define USER_extern WORDS 4 // Look for user words
  144. #define BACK_extern WORDS 12 // Reduce convert poextern inter for a word.
  145. #define CONTINUE 13 // Continue converting.
  146. // Converitng return msg definitions(STD and SD)
  147. #define NO_RESULT -1 // Un-successful converting
  148. #define SUCCESS 1 // Converting has results.
  149. #define EXPAND_TABLE_LENGTH 0x0BBE0
  150. //�����仯����
  151. //������ʹ�õ��ļ����йز���
  152. //���ڱ��������IJ���(��ʱ�İ���)
  153. #define BX_LIB_START_POINTER 0L
  154. #define BX_LIB_LENGTH 0x5528 //7650H
  155. // (��DZSY.MB ���뵽GCW.OVL)
  156. #define DTKB_START_POINTER_LOW 0x05600 //BX_LIB_LENGTH (c680..)
  157. #define DTKB_START_POINTER_HI 0
  158. #define DTKB_LENGTH 0x0A00
  159. #define DTKB_CHECK_VALUE 0x55EB
  160. // (�����Ǵ�����̬���̵ij���)
  161. #define HELP_LOW 0x06000H
  162. #define HELP_HI 0
  163. #define HELP_LENGTH 0x600
  164. // space 180h
  165. #define BHB_START_POINTER_LOW 0x6780 //ԭ��D130H
  166. #define BHB_START_POINTER_HI 0
  167. #define BHB_LENGTH 0x54A0 //ԭΪ49A0H
  168. #define BHB_CX_LOW 0x0A1c0 //=3a80h
  169. #define BHB_CX_HI 0
  170. #define BHB_CX_LENGTH 0x1A20
  171. #define BHB_CHECK_VALUE 0x049FC
  172. #define PTZ_LIB_START_POINTER 0x0BBE0L
  173. #define PTZ_LIB_LENGTH 0x4460L // 94/4/18 0x4430 //4FC0H
  174. #define PTZ_LIB_LONG 0x400l
  175. #define PD_START_POINTER 0x10040 // 94/4/18 0x10010l //
  176. #define PD_LENGTH 0x1160 //
  177. // (PD_TAB ϵ�ڱ�дYCW��ʱ������,1990.11 ��������ģ��
  178. // �ڱ��ڼ�¼�˵����ڴʵ�ʹ��Ƶ��.
  179. // �������ݿ��ܻ���Ҫ�޸�.
  180. #define SPBX_START_POINTER 0x111E0l
  181. #define SPBX_LENGTH 6784 //(1A80H)
  182. // (SPBX_TAB ϵ�ڱ�дYCW��ʱ������,1990.11 ��������ģ��
  183. // �ڱ��ڼ�¼�˻������ֵ���ʼ�ʻ�(��ʼ��2��).
  184. // �������ݿ��ܻ���Ҫ�޸�.
  185. //TOTAL LENGTH OF THE OVERLAY FILE=12CA0H
  186. #define TMMR_LIB_LENGTH 0x1800 //��AD7��Ϊ3800H(14K)
  187. // ad81=3000h
  188. #define PAREMETER_LENGTH 0x10 //1993.4 for setting paremeters
  189. #define FRONT_LIB_START_POINTER_HI 0
  190. #define FRONT_LIB_START_POINTER_LOW 0
  191. #define FRONT_LIB_LENGTH TMMR_LIB_LENGTH
  192. #define MIDDLE_REM 0x1400 //ԭ��Ϊ1C00H 5/11/91 ����
  193. //����
  194. #define BHB_PROC_OFFSET 0
  195. #define LENGTH_OF_USER 0x0A000l //�DZ�׼������Ϊ40K
  196. // ע���˲�����"8"�Ͱ汾��ǰ������
  197. #define NEAR_CARET_CANDIDATE 0x0002
  198. #define NEAR_CARET_FIRST_TIME 0x0001
  199. #define NDX_REAL_LENGTH 0x510 //Added IN 1/1/1991
  200. #define CHECK_POINT 1024+2048-4
  201. #define CHECK_POINT2 48-4
  202. #define input_msg_disp 0 // 6
  203. // define for aiABC out type
  204. #define ABC_OUT_ONE 0x1
  205. #define ABC_OUT_MULTY 0x2
  206. #define ABC_OUT_ASCII 0x4
  207. #define COMP_NEEDS_END 0x100
  208. struct INPUT_TISHI {
  209. unsigned char buffer[6];
  210. };
  211. struct INPT_BF{
  212. WORD max_length;
  213. WORD true_length;
  214. BYTE info_flag;
  215. BYTE buffer[40];
  216. };
  217. struct W_SLBL{
  218. BYTE dw_stack[20];
  219. WORD dw_count;
  220. WORD yj[20];
  221. BYTE syj[20];
  222. WORD tone[20];
  223. BYTE bx_stack[20];
  224. BYTE cmp_stack[20];
  225. WORD yj_ps[20];
  226. int yjs;
  227. int xsyjs;
  228. int xsyjw;
  229. int syyjs;
  230. };
  231. struct ATTR{
  232. BYTE pindu;
  233. BYTE from;
  234. WORD addr;
  235. };
  236. struct STD_LIB_AREA{
  237. WORD two_end;
  238. WORD three_end;
  239. WORD four_end;
  240. BYTE buffer[0x800-6];
  241. };
  242. struct INDEX{
  243. WORD body_start;
  244. WORD ttl_length;
  245. WORD body_length;
  246. WORD index_start;
  247. WORD index_length;
  248. WORD unused1;
  249. WORD ttl_words;
  250. WORD two_words;
  251. WORD three_words;
  252. WORD four_words;
  253. WORD fiveup_words;
  254. WORD unused2[13 ];
  255. WORD dir[((23*27)+7)/8*8];
  256. };
  257. struct USER_LIB_AREA{
  258. WORD two_end;
  259. WORD three_end;
  260. WORD four_end;
  261. BYTE buffer[0x400-6];
  262. };
  263. struct TBF{
  264. WORD t_bf_start[8];
  265. WORD t_bf1[(72*94+15)/16*16];
  266. WORD t_bf2[PTZ_LIB_LENGTH/2-(72*94+15)/16*16];
  267. };
  268. struct PD_TAB{
  269. WORD pd_bf0[8];
  270. BYTE pd_bf1[((55-16+1)*94+15)/16*16];
  271. BYTE pd_bf2[0x4f0];
  272. };
  273. struct FMT{
  274. WORD fmt_group;
  275. WORD fmt_ttl_len;
  276. WORD fmt_start;
  277. };
  278. struct T_REM{
  279. WORD stack1[512];
  280. WORD stack2[1024];
  281. WORD stack3[512];
  282. WORD temp_rem_area[512];
  283. WORD rem_area[512];
  284. };
  285. struct M_NDX{
  286. WORD mulu_start_hi;
  287. WORD mulu_start_low;
  288. WORD mulu_length_max;
  289. WORD mulu_true_length;
  290. WORD mulu_record_length;
  291. WORD data_start_hi;
  292. WORD data_start_low;
  293. WORD data_record_length;
  294. };
  295. struct S_HEAD{
  296. BYTE flag;
  297. BYTE name;
  298. WORD start_pos;
  299. WORD item[25];
  300. };
  301. struct DEX{
  302. WORD body_start;
  303. WORD ttl_length;
  304. WORD body_length;
  305. WORD index_start;
  306. WORD index_length;
  307. WORD unused1;
  308. WORD ttl_words;
  309. WORD two_words;
  310. WORD three_words;
  311. WORD four_words;
  312. WORD fiveup_words;
  313. WORD unused2[13 ];
  314. struct S_HEAD dex[23];
  315. WORD unuserd2[0x510/2-23*27-24];
  316. };
  317. #define ParaPos 7
  318. /******************************************************************
  319. This part of defination is cut before CWP.c
  320. *******************************************************************/
  321. #define TRUE 1
  322. #define FALSE 0
  323. #define NUMBER 0x20
  324. #define FUYIN 0x21
  325. #define YUANYIN 0x22
  326. #define SEPERATOR 0x27
  327. #define FIRST_T 1
  328. #define SECOND_T 2
  329. #define THIRD_T 3
  330. #define FORTH_T 4
  331. // about search strutagy
  332. #define BX_FLAG 8
  333. #define JP_FLAG 4
  334. #define QP_FLAG 2
  335. #define YD_FLAG 1
  336. // about search lib
  337. #define BODY_START 0
  338. #define KZK_BODY_START 0
  339. #define KZK_BASE 0xa000l
  340. #define MORE_THAN_5 23
  341. //#define TMMR_REAL_LENGTH 0x1800
  342. // mark for test
  343. #define TEST 0
  344. struct SLBL{
  345. WORD value;
  346. BYTE head;
  347. WORD length;
  348. BYTE tune;
  349. BYTE bx1;
  350. WORD bx2;
  351. BYTE flag;
  352. };
  353. struct N_SLBL{
  354. BYTE buffer[30];
  355. int length;
  356. };
  357. // IME designer can change this file according to each IME
  358. // resource ID
  359. #define IDI_IME 0x0100
  360. #define IDS_STATUSERR 0x0200
  361. #define IDS_CHICHAR 0x0201
  362. #define IDS_EUDC 0x0202
  363. #define IDS_USRDIC_FILTER 0x0210
  364. #define IDS_FILE_OPEN_ERR 0x0220
  365. #define IDS_MEM_LESS_ERR 0x0221
  366. #define IDS_IMENAME 0x0320
  367. #define IDS_IMEUICLASS 0x0321
  368. #define IDS_IMECOMPCLASS 0x0322
  369. #define IDS_IMECANDCLASS 0x0323
  370. #define IDS_IMESTATUSCLASS 0x0324
  371. #define IDD_DEFAULT_KB 0x0400
  372. #define IDD_ETEN_KB 0x0401
  373. #define IDD_IBM_KB 0x0402
  374. #define IDD_CHING_KB 0x0403
  375. #define IDD_QUICK_KEY 0x0500
  376. #define IDD_PREDICT 0x0501
  377. #define IME_APRS_AUTO 0x0
  378. #define IME_APRS_FIX 0x1
  379. #define OFFSET_MODE_CONFIG 0
  380. #define OFFSET_READLAYOUT 4
  381. #define ERR01 "ȱ�ٴʿ��ļ�winabc.cwd��"
  382. #define ERR02 "�򿪴ʿ��ļ�winabc.cwd����������"
  383. #define ERR03 "��ȡ�ʿ��ļ�winabc.cwd����������"
  384. #define ERR04 "ȱ�ٻ������ļ�winabc.ovl��"
  385. #define ERR05 "�򿪻������ļ�winabc.ovl����������"
  386. #define ERR06 "��ȡ�������ļ�winabc.ovl����������"
  387. #define ERR07 "�򿪼����ļ�tmmr.rem����������"
  388. #define ERR08 "��ȡ�����ļ�tmmr.rem����������"
  389. #define ERR09 "д�������ļ�tmmr.rem����������"
  390. #define ERR10 "�����û��ʿ�user.rem����������"
  391. #define ERR11 "��ȡ�û��ʿ�user.rem����������"
  392. #define ERR12 "д���û��ʿ�user.rem����������"
  393. #define ERR13 "�����ļ���������������"
  394. #define ERR14 "�ڴ治����"
  395. #define ERR15 "��δ�����´����ݡ�"
  396. #define ERR16 "��δ�����´ʱ��롣"
  397. #define ERR17 "�������зǷ��ַ���"
  398. #define ERR18 "�����ظ���"
  399. #define ERR19 "�û��Զ�������̫�ࡣ"
  400. #define ERR20 "ɾ������ʧ�ܡ�"
  401. #define NTF21 "�û��ʿ��Ѿ��Զ����¡�"
  402. #define ERR22 "�ڴ����䷢��������"
  403. #define ERRMSG_LOAD_0 0x0010
  404. #define ERRMSG_LOAD_1 0x0020
  405. #define ERRMSG_LOAD_2 0x0040
  406. #define ERRMSG_LOAD_3 0x0080
  407. #define ERRMSG_LOAD_USRDIC 0x0400
  408. #define ERRMSG_MEM_0 0x1000
  409. #define ERRMSG_MEM_1 0x2000
  410. #define ERRMSG_MEM_2 0x4000
  411. #define ERRMSG_MEM_3 0x8000
  412. #define ERRMSG_MEM_USRDIC 0x00040000
  413. // state of composition
  414. #define CST_INIT 0
  415. #define CST_INPUT 1
  416. #define CST_CHOOSE 2
  417. #define CST_TOGGLE_PHRASEWORD 3 // not in iImeState
  418. #define CST_ALPHABET 4 // not in iImeState
  419. #define CST_SOFTKB 99
  420. #define CST_ALPHANUMERIC 5 // not in iImeState
  421. #define CST_INVALID 6 // not in iImeState
  422. // IME specific constants
  423. #define CANDPERPAGE 9 // 10
  424. #define MAXSTRLEN 32
  425. #define MAXCAND 256
  426. // border for UI
  427. #define UI_MARGIN 4
  428. #define STATUS_DIM_X 20//24
  429. #define STATUS_DIM_Y 21//24
  430. // if UI_MOVE_OFFSET == WINDOW_NOTDRAG, not in drag operation
  431. #define WINDOW_NOT_DRAG 0xFFFFFFFF
  432. // window extra for composition window
  433. #define UI_MOVE_OFFSET 0
  434. #define UI_MOVE_XY 4
  435. // the start number of candidate list
  436. #define CAND_START 1
  437. #define IMN_PRIVATE_TOGGLE_UI 0x0001
  438. #define IMN_PRIVATE_CMENUDESTROYED 0x0002
  439. #define IMN_PRIVATE_COMPOSITION_SIZE 0x0003
  440. #define IMN_PRIVATE_UPDATE_PREDICT 0x0004
  441. #define IMN_PRIVATE_UPDATE_SOFTKBD 0x0006
  442. #define IMN_PRIVATE_PAGEUP 0x0007
  443. // the flag for an opened or start UI
  444. /*#define IMN_PRIVATE_UPDATE_SOFTKBD 0x0001
  445. #define MSG_ALREADY_OPEN 0x000001
  446. #define MSG_ALREADY_OPEN2 0x000002
  447. #define MSG_OPEN_CANDIDATE 0x000010
  448. #define MSG_OPEN_CANDIDATE2 0x000020
  449. #define MSG_CLOSE_CANDIDATE 0x000100
  450. #define MSG_CLOSE_CANDIDATE2 0x000200
  451. #define MSG_CHANGE_CANDIDATE 0x001000
  452. #define MSG_CHANGE_CANDIDATE2 0x002000
  453. #define MSG_ALREADY_START 0x010000
  454. #define MSG_START_COMPOSITION 0x020000
  455. #define MSG_END_COMPOSITION 0x040000
  456. #define MSG_COMPOSITION 0x080000
  457. #define MSG_IMN_COMPOSITIONPOS 0x100000
  458. #define MSG_IMN_UPDATE_SOFTKBD 0x200000
  459. #define MSG_GUIDELINE 0x400000
  460. #define MSG_IN_IMETOASCIIEX 0x800000 */
  461. // this constant is depend on TranslateImeMessage
  462. #define GEN_MSG_MAX 30//6
  463. #define MSG_COMPOSITION 0x0000001
  464. #define MSG_START_COMPOSITION 0x0000002
  465. #define MSG_END_COMPOSITION 0x0000004
  466. #define MSG_ALREADY_START 0x0000008
  467. #define MSG_CHANGE_CANDIDATE 0x0000010
  468. #define MSG_OPEN_CANDIDATE 0x0000020
  469. #define MSG_CLOSE_CANDIDATE 0x0000040
  470. #define MSG_ALREADY_OPEN 0x0000080
  471. #define MSG_GUIDELINE 0x0000100
  472. #define MSG_IMN_COMPOSITIONPOS 0x0000200
  473. #define MSG_IMN_COMPOSITIONSIZE 0x0000400
  474. #define MSG_IMN_UPDATE_PREDICT 0x0000800
  475. #define MSG_IMN_UPDATE_SOFTKBD 0x0002000
  476. #define MSG_ALREADY_SOFTKBD 0x0004000
  477. #define MSG_IMN_PAGEUP 0x0008000
  478. // original reserve for old array, now we switch to new, no one use yet
  479. #define MSG_CHANGE_CANDIDATE2 0x1000000
  480. #define MSG_OPEN_CANDIDATE2 0x2000000
  481. #define MSG_CLOSE_CANDIDATE2 0x4000000
  482. #define MSG_ALREADY_OPEN2 0x8000000
  483. #define MSG_STATIC_STATE (MSG_ALREADY_START|MSG_ALREADY_OPEN|MSG_ALREADY_SOFTKBD|MSG_ALREADY_OPEN2)
  484. #define MSG_IMN_TOGGLE_UI 0x0400000
  485. #define MSG_IN_IMETOASCIIEX 0x0800000
  486. // the flag for set context
  487. /*
  488. #define SC_SHOW_UI 0x0001
  489. #define SC_HIDE_UI 0x0002
  490. #define SC_ALREADY_SHOW_STATUS 0x0004
  491. #define SC_WANT_SHOW_STATUS 0x0008
  492. #define SC_HIDE_STATUS 0x0010
  493. */
  494. #define MSG_IMN_TOGGLE_UI 0x0400000
  495. #define MSG_IN_IMETOASCIIEX 0x0800000
  496. #define ISC_SHOW_SOFTKBD 0x02000000
  497. #define ISC_OPEN_STATUS_WINDOW 0x04000000
  498. #define ISC_OFF_CARET_UI 0x08000000
  499. #define ISC_SHOW_UI_ALL (ISC_SHOWUIALL|ISC_SHOW_SOFTKBD|ISC_OPEN_STATUS_WINDOW)
  500. #define ISC_SETCONTEXT_UI (ISC_SHOWUIALL|ISC_SHOW_SOFTKBD)
  501. #define ISC_HIDE_SOFTKBD 0x01000000
  502. // the flag for composition string show status
  503. #define IME_STR_SHOWED 0x0001
  504. #define IME_STR_ERROR 0x0002
  505. // the mode configuration for an IME
  506. #define MODE_CONFIG_QUICK_KEY 0x0001
  507. #define MODE_CONFIG_WORD_PREDICT 0x0002
  508. #define MODE_CONFIG_PREDICT 0x0004
  509. #define MODE_CONFIG_OFF_CARET_UI 0x0008
  510. // the different layout for Phonetic reading
  511. #define READ_LAYOUT_DEFAULT 0
  512. #define READ_LAYOUT_ETEN 1
  513. #define READ_LAYOUT_IBM 2
  514. #define READ_LAYOUT_CHINGYEAH 3
  515. // the virtual key value
  516. #define VK_OEM_SEMICLN '\xba' // ; :
  517. #define VK_OEM_EQUAL '\xbb' // = +
  518. #define VK_OEM_SLASH '\xbf' // / ?
  519. #define VK_OEM_LBRACKET '\xdb' // [ {
  520. #define VK_OEM_BSLASH '\xdc' // \ |
  521. #define VK_OEM_RBRACKET '\xdd' // ] }
  522. #define VK_OEM_QUOTE '\xde' // ' "
  523. #define SDA_AIABC_KB 0
  524. #define SDA_WPS_KB 0x2
  525. #define SDA_STONE_KB 0x4
  526. #define SDA_USER_KB 0x8
  527. extern const TCHAR szRegAppUser[];
  528. extern const TCHAR szRegModeConfig[];
  529. #define MAX_IME_TABLES 6
  530. #define MAX_IME_CLASS 16
  531. #define CMENU_HUIWND 0
  532. #define CMENU_MENU (CMENU_HUIWND+sizeof(CMENU_HUIWND))
  533. #define WND_EXTRA_SIZE (CMENU_MENU+sizeof(CMENU_HUIWND))
  534. #define WM_USER_DESTROY (WM_USER + 0x0400)
  535. // Defines for soft_kbd skd #2
  536. #define IDM_SKL1 0x0500
  537. #define IDM_SKL2 0x0501
  538. #define IDM_SKL3 0x0502
  539. #define IDM_SKL4 0x0503
  540. #define IDM_SKL5 0x0504
  541. #define IDM_SKL6 0x0505
  542. #define IDM_SKL7 0x0506
  543. #define IDM_SKL8 0x0507
  544. #define IDM_SKL9 0x0508
  545. #define IDM_SKL10 0x0509
  546. #define IDM_SKL11 0x050a
  547. #define IDM_SKL12 0x050b
  548. #define IDM_SKL13 0x050c
  549. #define NumsSK 13
  550. typedef DWORD UNALIGNED FAR *LPUNADWORD;
  551. typedef WORD UNALIGNED FAR *LPUNAWORD;
  552. typedef struct tagImeL { // local structure, per IME structure
  553. HINSTANCE hInst; // IME DLL instance handle
  554. WORD wImeStyle; // What kind of display
  555. HWND TempUIWnd;
  556. int xCompWi; // width
  557. int yCompHi; // height
  558. int Ox;
  559. int Oy;
  560. POINT ptZLCand;
  561. POINT ptZLComp;
  562. POINT ptDefComp; // default composition window position
  563. POINT ptDefCand; // default Cand window
  564. int cxCompBorder; // border width of composition window
  565. int cyCompBorder; // border height of composition window
  566. RECT rcCompText; // text position relative to composition window
  567. BYTE szSetFile[16]; // .SET file name of IME
  568. // standard table related data
  569. DWORD fdwTblLoad; // the *.TBL load status
  570. DWORD fdwErrMsg; // error message flag
  571. int cRefCount; // reference count
  572. // size of standard table
  573. UINT uTblSize[1];
  574. // filename of tables
  575. BYTE szTblFile[1][16];
  576. // the IME tables
  577. HANDLE hMapTbl[1];
  578. UINT uUsrDicSize; // memory size of user create words table
  579. HANDLE hUsrDicMem; // memory handle for user dictionary
  580. // the calculated sequence mask bits
  581. DWORD dwSeqMask; // the sequence bits for one stoke
  582. DWORD dwPatternMask; // the pattern bits for one result string
  583. int nSeqBytes; // how many bytes for nMaxKey sequence chars
  584. // key related data
  585. DWORD fdwModeConfig;
  586. WORD fModeConfig; // quick key/prediction mode
  587. WORD nReadLayout; // ACER, ETen, IBM, or other - phonetic only
  588. WORD nSeqBits; // no. of sequence bits
  589. WORD nMaxKey; // max key of a Chinese word
  590. WORD nSeqCode; // no. of sequence code
  591. WORD fChooseChar[4]; // valid char in choose state
  592. WORD fCompChar[5]; // valid char in input state
  593. WORD nRevMaxKey;
  594. // convert sequence code to composition char
  595. WORD wSeq2CompTbl[64];
  596. // convert char to sequence code
  597. WORD wChar2SeqTbl[0x40];
  598. TCHAR szUIClassName[MAX_IME_CLASS];
  599. TCHAR szStatusClassName[MAX_IME_CLASS];
  600. TCHAR szOffCaretClassName[MAX_IME_CLASS];
  601. TCHAR szCMenuClassName[MAX_IME_CLASS];
  602. HMENU hSysMenu;
  603. HMENU hSKMenu;
  604. DWORD dwSKState[NumsSK]; // skd #1
  605. DWORD dwSKWant;
  606. BOOL fWinLogon;
  607. } IMEL;
  608. typedef IMEL *PIMEL;
  609. typedef IMEL NEAR *NPIMEL;
  610. typedef IMEL FAR *LPIMEL;
  611. typedef struct _tagTableFiles { // match with the IMEL
  612. BYTE szTblFile[MAX_IME_TABLES][16];
  613. } TABLEFILES;
  614. typedef TABLEFILES *PTABLEFILES;
  615. typedef TABLEFILES NEAR *NPTABLEFILES;
  616. typedef TABLEFILES FAR *LPTABLEFILES;
  617. typedef struct _tagValidChar { // match with the IMEL
  618. WORD nMaxKey;
  619. WORD nSeqCode;
  620. WORD fChooseChar[4];
  621. WORD fCompChar[5];
  622. WORD wSeq2CompTbl[64];
  623. WORD wChar2SeqTbl[0x40];
  624. } VALIDCHAR;
  625. typedef VALIDCHAR *PVALIDCHAR;
  626. typedef VALIDCHAR NEAR *NPVALIDCHAR;
  627. typedef VALIDCHAR FAR *LPVALIDCHAR;
  628. #define NFULLABC 95
  629. typedef struct _tagFullABC {
  630. WORD wFullABC[NFULLABC];
  631. } FULLABC;
  632. typedef FULLABC *PFULLABC;
  633. typedef FULLABC NEAR *NPFULLABC;
  634. typedef FULLABC FAR *LPFULLABC;
  635. typedef struct _tagImeG { // global structure, can be share by all IMEs,
  636. // the seperation (IMEL and IMEG) is only
  637. // useful in UNI-IME, other IME can use one
  638. RECT rcWorkArea; // the work area of applications
  639. // Select Wide ajust value
  640. int Ajust;
  641. int TextLen;
  642. int unchanged;
  643. // Chinese char width & height
  644. int xChiCharWi;
  645. int yChiCharHi;
  646. // candidate list of composition
  647. int xCandWi; // width of candidate list
  648. int yCandHi; // high of candidate list
  649. int cxCandBorder; // border width of candidate list
  650. int cyCandBorder; // border height of candidate list
  651. RECT rcCandText; // text position relative to candidate window
  652. RECT rcPageUp;
  653. RECT rcPageDown;
  654. RECT rcHome;
  655. RECT rcEnd;
  656. HBITMAP PageUpBmp;
  657. HBITMAP PageDownBmp;
  658. HBITMAP HomeBmp;
  659. HBITMAP EndBmp;
  660. HBITMAP PageUp2Bmp;
  661. HBITMAP PgDown2Bmp;
  662. HBITMAP Home2Bmp;
  663. HBITMAP End2Bmp;
  664. HBITMAP NumbBmp;
  665. HBITMAP SnumbBmp;
  666. HPEN WhitePen;
  667. HPEN BlackPen;
  668. HPEN GrayPen;
  669. HPEN LightGrayPen;
  670. // status window
  671. int xStatusWi; // width of status window
  672. int yStatusHi; // high of status window
  673. RECT rcStatusText; // text position relative to status window
  674. RECT rcInputText; // input text relateive to status window
  675. RECT rcShapeText; // shape text relative to status window
  676. RECT rcSKText; // SK text relative to status window
  677. RECT rcCmdText;
  678. RECT rcPctText;
  679. RECT rcFixCompText;
  680. // full shape space (reversed internal code)
  681. WORD wFullSpace;
  682. // full shape chars (internal code)
  683. WORD wFullABC[NFULLABC];
  684. // error string
  685. BYTE szStatusErr[8];
  686. int cbStatusErr;
  687. // candidate string start from 0 or 1
  688. int iCandStart;
  689. // setting of UI
  690. int iPara;
  691. int iPerp;
  692. int iParaTol;
  693. int iPerpTol;
  694. // flag for disp style
  695. int style;
  696. BYTE KbType;
  697. BYTE cp_ajust_flag;
  698. BYTE auto_mode ;
  699. BYTE cbx_flag;
  700. BYTE tune_flag;
  701. BYTE auto_cvt_flag;
  702. BYTE SdOpenFlag ;
  703. int InbxProc;
  704. int First;
  705. int Prop;
  706. int KeepKey;
  707. TCHAR szIMEUserPath[MAX_PATH];
  708. } IMEG;
  709. typedef IMEG *PIMEG;
  710. typedef IMEG NEAR *NPIMEG;
  711. typedef IMEG FAR *LPIMEG;
  712. typedef struct _tagPRIVCONTEXT {// IME private data for each context
  713. int iImeState; // the composition state - input, choose, or
  714. BOOL fdwImeMsg; // what messages should be generated
  715. DWORD dwCompChar; // wParam of WM_IME_COMPOSITION
  716. DWORD fdwGcsFlag; // lParam for WM_IME_COMPOSITION
  717. DWORD fdwInit; // position init
  718. // SK data
  719. HWND hSoftKbdWnd; // soft keyboard window
  720. int nShowSoftKbdCmd;
  721. // DWORD dwSKState[NumsSK]; // skd #1
  722. // DWORD dwSKWant;
  723. } PRIVCONTEXT;
  724. typedef PRIVCONTEXT *PPRIVCONTEXT;
  725. typedef PRIVCONTEXT NEAR *NPPRIVCONTEXT;
  726. typedef PRIVCONTEXT FAR *LPPRIVCONTEXT;
  727. typedef struct _tagUIPRIV { // IME private UI data
  728. HWND hCompWnd; // composition window
  729. int nShowCompCmd;
  730. HWND hCandWnd; // candidate window for composition
  731. int nShowCandCmd;
  732. HWND hSoftKbdWnd; // soft keyboard window
  733. int nShowSoftKbdCmd;
  734. HWND hStatusWnd; // status window
  735. HIMC hIMC; // the recent selected hIMC
  736. int nShowStatusCmd;
  737. DWORD fdwSetContext; // the actions to take at set context time
  738. HWND hCMenuWnd; // a window owner for context menu
  739. } UIPRIV;
  740. typedef UIPRIV *PUIPRIV;
  741. typedef UIPRIV NEAR *NPUIPRIV;
  742. typedef UIPRIV FAR *LPUIPRIV;
  743. typedef struct tagNEARCARET { // for near caret offset calculatation
  744. int iLogFontFacX;
  745. int iLogFontFacY;
  746. int iParaFacX;
  747. int iPerpFacX;
  748. int iParaFacY;
  749. int iPerpFacY;
  750. } NEARCARET;
  751. /*typedef struct _tagNEARCARET { // for near caret offset calculatation
  752. int iLogFontFac;
  753. int iParaFacX;
  754. int iPerpFacX;
  755. int iParaFacY;
  756. int iPerpFacY;
  757. } NEARCARET;*/
  758. typedef NEARCARET *PNEARCARET;
  759. typedef NEARCARET NEAR *NPNEARCARET;
  760. typedef NEARCARET FAR *LPNEARCARET;
  761. int WINAPI LibMain(HANDLE, WORD, WORD, LPSTR); // init.c
  762. LRESULT CALLBACK UIWndProc(HWND, UINT, WPARAM, LPARAM); // ui.c
  763. void PASCAL AddCodeIntoCand(LPCANDIDATELIST, WORD); // compose.c
  764. void PASCAL CompWord(WORD, LPINPUTCONTEXT, LPCOMPOSITIONSTRING, LPPRIVCONTEXT,
  765. LPGUIDELINE); // compose.c
  766. UINT PASCAL Finalize(LPINPUTCONTEXT, LPCOMPOSITIONSTRING,
  767. LPPRIVCONTEXT, BOOL); // compose.c
  768. void PASCAL CompEscapeKey(LPINPUTCONTEXT, LPCOMPOSITIONSTRING,
  769. LPGUIDELINE, LPPRIVCONTEXT); // compose.c
  770. UINT PASCAL PhrasePrediction(LPINPUTCONTEXT, LPCOMPOSITIONSTRING,
  771. LPPRIVCONTEXT); // chcand.c
  772. void PASCAL SelectOneCand(LPINPUTCONTEXT, LPCOMPOSITIONSTRING,
  773. LPPRIVCONTEXT, LPCANDIDATELIST); // chcand.c
  774. void PASCAL CandEscapeKey(LPINPUTCONTEXT, LPPRIVCONTEXT); // chcand.c
  775. void PASCAL ChooseCand(WORD, LPINPUTCONTEXT, LPCANDIDATEINFO,
  776. LPPRIVCONTEXT); // chcand.c
  777. void PASCAL SetPrivateFileSetting(LPBYTE, int, DWORD, LPCTSTR); // ddis.c
  778. void PASCAL InitCompStr(LPCOMPOSITIONSTRING); // ddis.c
  779. BOOL PASCAL ClearCand(LPINPUTCONTEXT); // ddis.c
  780. UINT PASCAL TranslateImeMessage(LPTRANSMSGLIST,LPINPUTCONTEXT, LPPRIVCONTEXT); // toascii.c
  781. void PASCAL GenerateMessage(HIMC, LPINPUTCONTEXT,
  782. LPPRIVCONTEXT); // notify.c
  783. void PASCAL LoadUsrDicFile(void); // dic.c
  784. BOOL PASCAL LoadTable(void); // dic.c
  785. void PASCAL FreeTable(void); // dic.c
  786. DWORD PASCAL ReadingToPattern(LPCTSTR, BOOL); // regword.c
  787. void PASCAL ReadingToSequence(LPCTSTR, LPBYTE, BOOL); // regword.c
  788. void PASCAL DrawDragBorder(HWND, LONG, LONG); // uisubs.c
  789. void PASCAL DrawFrameBorder(HDC, HWND); // uisubs.c
  790. HWND PASCAL GetCompWnd(HWND); // compui.c
  791. void PASCAL SetCompPosition(HWND, LPINPUTCONTEXT); // compui.c
  792. void PASCAL SetCompWindow(HWND); // compui.c
  793. void PASCAL MoveDefaultCompPosition(HWND); // compui.c
  794. void PASCAL ShowComp(HWND, int); // compui.c
  795. void PASCAL StartComp(HWND); // compui.c
  796. void PASCAL EndComp(HWND); // compui.c
  797. void PASCAL UpdateCompWindow(HWND); // compui.c
  798. LRESULT CALLBACK CompWndProc(HWND, UINT, WPARAM, LPARAM); // compui.c
  799. HWND PASCAL GetCandWnd(HWND); // candui.c
  800. BOOL PASCAL CalcCandPos(LPPOINT); // candui.c
  801. LRESULT PASCAL SetCandPosition(HWND, LPCANDIDATEFORM); // candui.c
  802. void PASCAL ShowCand(HWND, int); // candui.c
  803. void PASCAL OpenCand(HWND); // candui.c
  804. void PASCAL CloseCand(HWND); // candui.c
  805. void PASCAL UpdateCandWindow2(HWND, HDC); // candui.c
  806. LRESULT CALLBACK CandWndProc(HWND, UINT, WPARAM, LPARAM); // candui.c
  807. HWND PASCAL GetStatusWnd(HWND); // statusui.c
  808. LRESULT PASCAL SetStatusWindowPos(HWND); // statusui.c
  809. void PASCAL ShowStatus(HWND, int); // statusui.c
  810. void PASCAL OpenStatus(HWND); // statusui.c
  811. LRESULT CALLBACK StatusWndProc(HWND, UINT, WPARAM, LPARAM); // statusui.c
  812. void PASCAL UpdateCompCur(
  813. HWND hCompWnd);
  814. void PASCAL ReInitIme(
  815. HWND hWnd ,
  816. WORD WhatStyle);
  817. LRESULT PASCAL UIPaint2(
  818. HWND hUIWnd);
  819. LRESULT PASCAL UIPaint(
  820. HWND hUIWnd);
  821. void PASCAL AdjustStatusBoundary(
  822. LPPOINT lppt);
  823. void PASCAL DestroyUIWindow( // destroy composition window
  824. HWND hUIWnd);
  825. LRESULT CALLBACK ContextMenuWndProc(
  826. HWND hCMenuWnd,
  827. UINT uMsg,
  828. WPARAM wParam,
  829. LPARAM lParam);
  830. UINT PASCAL TransAbcMsg(
  831. LPTRANSMSGLIST lpTransBuf,
  832. LPPRIVCONTEXT lpImcP,
  833. LPINPUTCONTEXT lpIMC,
  834. UINT uVirtKey,
  835. UINT uScanCode,
  836. WORD wCharCode);
  837. UINT PASCAL TransAbcMsg2(
  838. LPTRANSMSG lpTransMsg,
  839. LPPRIVCONTEXT lpImcP);
  840. void PASCAL GenerateMessage2(
  841. HIMC ,
  842. LPINPUTCONTEXT ,
  843. LPPRIVCONTEXT );
  844. void PASCAL MoveCompCand(
  845. HWND hUIWnd);
  846. void PASCAL UpdateSoftKbd(
  847. HWND hUIWnd);
  848. void PASCAL DestroyStatusWindow(
  849. HWND hStatusWnd);
  850. void PASCAL ChangeCompositionSize(
  851. HWND hUIWnd);
  852. INT_PTR CALLBACK CvtCtrlProc(HWND hdlg,
  853. UINT uMessage,
  854. WPARAM wparam,
  855. LPARAM lparam);
  856. INT_PTR CALLBACK ImeStyleProc(HWND hdlg,
  857. UINT uMessage,
  858. WPARAM wparam,
  859. LPARAM lparam);
  860. INT_PTR CALLBACK KbSelectProc(HWND hdlg,
  861. UINT uMessage,
  862. WPARAM wparam,
  863. LPARAM lparam);
  864. LRESULT PASCAL GetCandPos(
  865. HWND hUIWnd,
  866. LPCANDIDATEFORM lpCandForm);
  867. /*********************************************************************/
  868. /* Prototype define of abc95wp.c */
  869. /*********************************************************************/
  870. UINT WINAPI SetResultToIMC(
  871. HIMC ghIMC,
  872. LPSTR outBuffer, //soarce buffer (normal for out_svw)
  873. WORD outCount); //How many candidates are.
  874. void PASCAL AbcGenerateMessage(
  875. HIMC hIMC,
  876. LPINPUTCONTEXT lpIMC,
  877. LPPRIVCONTEXT lpImcP);
  878. int WINAPI MouseInput(HWND hWnd, WPARAM wParam, LPARAM lParam);
  879. int WINAPI SoftKeyProc(int flag);
  880. int WINAPI WhichRect(POINT point);
  881. int WINAPI ConvertKey(WORD wParam);
  882. int WINAPI CharProc(WORD ImeChar,WPARAM wParam,LPARAM lParam,
  883. HIMC hIMC,LPINPUTCONTEXT lpIMC,LPPRIVCONTEXT lpImcP);
  884. int WINAPI v_proc(WORD input_char);
  885. void WINAPI DispModeEx();
  886. void WINAPI DispMode(HIMC);
  887. void WINAPI DispSpecChar(int c,int n);
  888. void WINAPI show_char(unsigned char *string,int count);
  889. void WINAPI disp_jiyi(HANDLE xxx);
  890. void WINAPI prompt_disp();
  891. int WINAPI cls_prompt();
  892. int WINAPI cls_prompt_only();
  893. int WINAPI SetCloseCompWinMsg(int ClsFlag);
  894. void WINAPI ABCstrnset(LPSTR bufferd,BYTE value,int n);
  895. LPSTR WINAPI ABCstrstr(LPSTR str1,LPSTR str2);
  896. int WINAPI back_a_space(int x);
  897. int WINAPI cs_p(int x);
  898. void WINAPI DrawInputCur();
  899. void WINAPI UpdateUser();
  900. int WINAPI STD_MODE(WORD input_char);
  901. int WINAPI call_czh(int mtype);
  902. void WINAPI MoveWordIntoCand(
  903. LPCANDIDATELIST lpCandList,
  904. LPBYTE srcBuffer,
  905. BYTE srcAttr,
  906. WORD perLength );
  907. UINT WINAPI SetToIMC(HIMC ghIMC,BYTE *srcBuffer,
  908. WORD srcCount,WORD perLength);
  909. int WINAPI word_select(int input_char);
  910. int WINAPI del_and_reconvert();
  911. int WINAPI backword_proc();
  912. int WINAPI same_as_backwords();
  913. void WINAPI AutoMoveResult();
  914. void WINAPI move_result();
  915. int WINAPI pindu_ajust();
  916. void WINAPI cls_inpt_bf(int hFunc);
  917. void WINAPI half_init();
  918. int WINAPI sent_chr1(int input_char);
  919. BOOL if_biaodian(BYTE x);
  920. int WINAPI analize();
  921. BOOL bd_proc();
  922. int WINAPI GetBDValue(int bd_char);
  923. BOOL if_zimu_or_not(BYTE x);
  924. int WINAPI if_number_or_not(BYTE c);
  925. int WINAPI if_bx_number(BYTE c);
  926. int WINAPI out_result(int result_type);
  927. void WINAPI fmt_transfer();
  928. int WINAPI sent_back_msg();
  929. int WINAPI if_jlxw_mode();
  930. int WINAPI disp_auto_select();
  931. int WINAPI if_first_key(WORD input_char);
  932. //void WINAPI add_ext_lib();
  933. int WINAPI temp_rem_proc();
  934. int WINAPI if_multi_rem(int c);
  935. void WINAPI send_msg(BYTE *bf,int count);
  936. int WINAPI send_one_char(int chr);
  937. int WINAPI send_one_char0(int chr);
  938. void WINAPI cap_full(WORD wParam);
  939. int WINAPI read_kb();
  940. /* WORD FAR PASCAL TimerFunc(HWND hWnd, WORD wMsg,
  941. int nIDEvent, DWORD dwTime); */
  942. extern WORD last_size;
  943. BX_MODE(WORD input_char,WPARAM wParam);
  944. void WINAPI bx_proc(WORD input_char,WPARAM wParam);
  945. int WINAPI bx_analize(WORD input_char,WPARAM wParam);
  946. int WINAPI disp_help_and_result();
  947. int WINAPI cmp_bx_word_exactly();
  948. int WINAPI cmp_bx_code2();
  949. void WINAPI conbine();
  950. int WINAPI cmp_subr();
  951. void WINAPI cls_bx_disp(int flag);
  952. int WINAPI load_one_part_bxtab();
  953. int WINAPI disp_bx_result();
  954. void WINAPI disp_bx_prompt();
  955. void WINAPI send_bx_result();
  956. void WINAPI data_init();
  957. int WINAPI QuitBefore();
  958. int WINAPI CheckAndCreate(BYTE *tmmr_rem, BYTE *user_rem);
  959. void WINAPI err_exit(char *err_msg);
  960. int WINAPI enter_death(HWND hhW);
  961. LONG FAR PASCAL Diaman(HWND hDlg, unsigned xiaoxi,
  962. WORD wParam, LONG lParam);
  963. int WINAPI ok_return(WORD xiaoxi,HWND hDlg);
  964. void WINAPI err_exit_proc( char *err_msg);
  965. int WINAPI GetText32( HDC hdc, LPCTSTR lpString, int cbString);
  966. int WINAPI makep(LPARAM lParam, LPPOINT oldPoint);
  967. int WINAPI cwp_proc(int mtype);
  968. int WINAPI find_next();
  969. int WINAPI normal();
  970. int WINAPI normal_1(int flag);
  971. int WINAPI recall();
  972. int WINAPI user_definition();
  973. int WINAPI detail_analyse();
  974. int WINAPI slbl(BYTE *s_buffer);
  975. int WINAPI getattr(BYTE x,char *p);
  976. int WINAPI neg_slbl(WORD value);
  977. int WINAPI neg_sc(int i,BYTE x);
  978. int WINAPI convert(int flag);
  979. int WINAPI copy_input();
  980. void WINAPI input_msg_type();
  981. int WINAPI pre_nt_w1();
  982. int WINAPI pre_nt_w1(int ps);
  983. void WINAPI w1_no_tune();
  984. int WINAPI sc_gb();
  985. int WINAPI sc_gbdy();
  986. int WINAPI get_the_one(int i);
  987. int WINAPI cmp_bx1(int i);
  988. int WINAPI get_the_one2(int i);
  989. int WINAPI cmp_bx2(int i);
  990. int WINAPI paidui(int cnt);
  991. void WINAPI s_tune();
  992. int WINAPI fu_sm(BYTE fy);
  993. int WINAPI find_one_hi();
  994. int WINAPI czcx(WORD *stack);
  995. int WINAPI find_multy_hi();
  996. int WINAPI find_two_hi();
  997. int WINAPI find_three_hi();
  998. int WINAPI cmp_2_and_3(WORD *t_stack);
  999. void WINAPI find_that();
  1000. int WINAPI find_hz(WORD x);
  1001. int WINAPI prepare_search1();
  1002. int WINAPI search_and_read(BYTE f_ci1,BYTE f_ci2);
  1003. int WINAPI if_already_in(BYTE f_ci1,BYTE f_ci2);
  1004. int WINAPI count_basic_pera(BYTE f_ci1,BYTE f_ci2);
  1005. int WINAPI read_kzk_lib();
  1006. int WINAPI read_a_page(BYTE file_flag,LONG start_ps, WORD size);
  1007. int WINAPI abbr_s1();
  1008. void WINAPI find_new_word();
  1009. int WINAPI fczs1(BYTE *rem_p,int end,int area_flag);
  1010. int WINAPI find_long_word2(BYTE *buffer);
  1011. int WINAPI trs_new_word(int word_addr,BYTE *buffer,int area_flag);
  1012. void WINAPI pre_cmp(WORD x);
  1013. int WINAPI cmp_a_slbl_with_bx();
  1014. int WINAPI cmp_a_slbl();
  1015. int WINAPI cmp_first_letter();
  1016. int WINAPI cisu_to_py();
  1017. int WINAPI get_head(BYTE first_letter);
  1018. int WINAPI yjbx();
  1019. int WINAPI abbr_entry(BYTE *s_start,BYTE *s_end ,BYTE ComeFrom);
  1020. int WINAPI cmp_long_word2(BYTE *buffer);
  1021. int WINAPI order_result2();
  1022. int WINAPI fenli_daxie();
  1023. int WINAPI rzw();
  1024. int WINAPI abbr();
  1025. int WINAPI sfx_proc();
  1026. void WINAPI zdyb();
  1027. int WINAPI recall_rc();
  1028. int WINAPI find_long_word3(WORD *stack,int length);
  1029. void WINAPI trs_new_word3(BYTE length,int addr);
  1030. int WINAPI new_word();
  1031. int WINAPI rem_new_word();
  1032. int WINAPI AddExtLib();
  1033. void WINAPI write_new_word(int flag);
  1034. int WINAPI writefile(BYTE *file_n,LONG distance,LPSTR p,int count);
  1035. int WINAPI read_mulu();
  1036. int WINAPI look_for_code();
  1037. int WINAPI if_code_equ(int addr);
  1038. int WINAPI read_data(int rec_cnt);
  1039. int WINAPI UpdateProc();
  1040. int WINAPI rem_pd1(WORD *buffer);
  1041. int WINAPI push_down_stack1();
  1042. void WINAPI rem_pd2(WORD *buffer);
  1043. void WINAPI rem_pd3(WORD *buffer);
  1044. void WINAPI DealWithSH();
  1045. void WINAPI PopStMenu(HWND hWnd, int x, int y);
  1046. int ReDrawSdaKB(HIMC hIMC, DWORD KbIndex, DWORD ShowOp);
  1047. int InitUserSetting(void);
  1048. void InitCvtPara(void);
  1049. int DoPropertySheet(HWND hwndOwner,HWND hWnd);
  1050. int CountDefaultComp(int x, int y, RECT Area);
  1051. int CommandProc(WPARAM wParam,HWND hWnd);
  1052. void WINAPI CenterWindow(HWND hWnd);