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.

205 lines
7.9 KiB

  1. //
  2. // %%Title: IImeIPoint
  3. // %%Unit: COM
  4. // %%Contact: TakeshiF
  5. // %%Date: 97/02/26
  6. // %%File: ipoint.h
  7. //
  8. // Defines IImeIPoint interface methods
  9. //
  10. #ifdef __cplusplus
  11. extern "C" { /* Assume C declarations for C++ */
  12. #endif /* __cplusplus */
  13. #ifndef RC_INVOKED
  14. #pragma pack(1) /* Assume byte packing throughout */
  15. #endif /* !RC_INVOKED */
  16. //----------------------------------------------------------------
  17. // Fareast Language id
  18. //----------------------------------------------------------------
  19. #define IPFEID_MASK 0x00F00000
  20. #define IPFEID_NONE 0x00000000
  21. #define IPFEID_CHINESE_TRADITIONAL 0x00100000
  22. #define IPFEID_CHINESE_SIMPLIFIED 0x00200000
  23. #define IPFEID_CHINESE_HONGKONG 0x00300000
  24. #define IPFEID_CHINESE_SINGAPORE 0x00400000
  25. #define IPFEID_JAPANESE 0x00500000
  26. #define IPFEID_KOREAN 0x00600000
  27. #define IPFEID_KOREAN_JOHAB 0x00700000
  28. //
  29. // dwCharId
  30. //
  31. // 0xFF000000 = AppletId Applet��Id (set by IMEPAD)
  32. // ID = 0:Char From IMM.
  33. // !=0:IMEPAD use for identify the char owner.
  34. // 0x00F00000 = FEID_XX Fareast Language id (set by IMEPAD)
  35. // 0x000F0000 (reserve)
  36. // 0x0000FFFF = CharacterNo serial no of insert char (set by IPOINT)
  37. //
  38. //
  39. #define IPCHARID_CHARNO_MASK 0x0000FFFF
  40. //----------------------------------------------------------------
  41. //Control Id (dwIMEFuncID)
  42. //----------------------------------------------------------------
  43. // lparam (N/A use IPCTRLPARAM_DEFAULT)
  44. #define IPCTRL_CONVERTALL 1 // N/A
  45. #define IPCTRL_DETERMINALL 2 // N/A
  46. #define IPCTRL_DETERMINCHAR 3 // n:number of DETCHARS (IPCTRLPARAM_DEFAULT is same as 1)
  47. #define IPCTRL_CLEARALL 4 // N/A
  48. #define IPCTRL_CARETSET 5 // IPCTRLPARAM_MAKE_CARET_POS(uipos, chpos)
  49. #define IPCTRL_CARETLEFT 6 // n:number of LEFT (IPCTRLPARAM_DEFAULT is same as 1)
  50. #define IPCTRL_CARETRIGHT 7 // n:number of RIGHT(IPCTRLPARAM_DEFAULT is same as 1)
  51. #define IPCTRL_CARETTOP 8 // N/A
  52. #define IPCTRL_CARETBOTTOM 9 // N/A
  53. #define IPCTRL_CARETBACKSPACE 10 // n:number of BS chars. (IPCTRLPARAM_DEFAULT is same as 1)
  54. #define IPCTRL_CARETDELETE 11 // n:number of DEL chars. (IPCTRLPARAM_DEFAULT is same as 1)
  55. #define IPCTRL_PHRASEDELETE 12 // N/A
  56. #define IPCTRL_INSERTSPACE 13 // N/A
  57. #define IPCTRL_INSERTFULLSPACE 14 // N/A
  58. #define IPCTRL_INSERTHALFSPACE 15 // N/A
  59. #define IPCTRL_ONIME 16 // N/A
  60. #define IPCTRL_OFFIME 17 // N/A
  61. #define IPCTRL_PRECONVERSION 18 // IPCTRLPARAM_ON/IPCTRLPARAM_OFF
  62. #define IPCTRL_PHONETICCANDIDATE 19 // N/A
  63. #define IPCTRL_GETCONVERSIONMODE 20 // lparam should be LPARAM address.
  64. #define IPCTRL_GETSENTENCENMODE 21 // lparam should be LPARAM address.
  65. //----------------------------------------------------------------
  66. //Control Id lparam
  67. //----------------------------------------------------------------
  68. #define IPCTRLPARAM_DEFAULT ((LPARAM)(0xfeeeeeee))
  69. #define IPCTRLPARAM_ON ((LPARAM)(0x00000001))
  70. #define IPCTRLPARAM_OFF ((LPARAM)(0x00000000))
  71. // for IPCTRL_CARETSET
  72. #define CARET_ICHPOS (0x0000FFFF) // IP Position on the composition string. 0-n
  73. #define CARET_UIPOS (0x0FFF0000) // UIPOS (position on the character)
  74. // 0-3: X--XO--O ( 2chars )
  75. // 23012301
  76. #define IPCTRLPARAM_MAKE_CARET_POS(uipos, chpos) ((LPARAM)(((uipos << 16) & CARET_UIPOS) | (chpos & CARET_ICHPOS)))
  77. //
  78. // for IPCANDIDATE/dwFlags
  79. //
  80. #define IPFLAG_QUERY_CAND 0x00000001
  81. #define IPFLAG_APPLY_CAND 0x00000002
  82. #define IPFLAG_APPLY_CAND_EX 0x00000004
  83. #define IPFLAG_DISPLAY_FIX 0x00010000
  84. #define IPFLAG_HIDE_CAND 0x00020000 // hide candidate box. added at 99.04.14
  85. #define IPFLAG_BLOCK_CAND 0x00040000 // treat this as a block. added at 99.06.24
  86. //
  87. // for InsertImeItem (iPos)
  88. //
  89. #define IPINS_CURRENT (0xfeeeeeee)
  90. typedef struct tagIPCANDIDATE {
  91. DWORD dwSize; // size of this structure
  92. DWORD dwFlags; // IPFLAG_XXXX
  93. INT iSelIndex; // select index.
  94. INT nCandidate; // number of candidate
  95. DWORD dwPrivateDataOffset; // Private data offset
  96. DWORD dwPrivateDataSize; // Private data size
  97. DWORD dwOffset[1]; //Offset of String from IPCANDIDATE struct's TOP address.
  98. } IPCANDIDATE, * PIPCANDIDATE;
  99. // {84E913C1-BA57-11d1-AFEE-00805F0C8B6D}
  100. DEFINE_GUID(IID_IImeIPoint1,
  101. 0x84e913c1, 0xba57, 0x11d1, 0xaf, 0xee, 0x0, 0x80, 0x5f, 0xc, 0x8b, 0x6d);
  102. #ifndef RC_INVOKED
  103. #pragma pack()
  104. #endif /* !RC_INVOKED */
  105. #undef INTERFACE
  106. #define INTERFACE IImeIPoint1
  107. DECLARE_INTERFACE_(IImeIPoint1, IUnknown)
  108. {
  109. // *** IUnknown methods ***
  110. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  111. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  112. STDMETHOD_(ULONG, Release) (THIS) PURE;
  113. STDMETHOD(InsertImeItem)(THIS_
  114. IPCANDIDATE* pImeItem,
  115. INT iPos, // = IPINS_CURRENT:use current IP position and
  116. // set IP to the end of insert chars.
  117. // = 0-n: The offset of all composition string to set
  118. // IP position, before insert chars.
  119. // and IP back to original position.
  120. DWORD *lpdwCharId) PURE;
  121. STDMETHOD(ReplaceImeItem)(THIS_
  122. INT iPos, // = IPINS_CURRENT:use current IP position and
  123. // set IP to the end of insert chars.
  124. // = 0-n: The offset of all composition string to set
  125. // IP position, before insert chars.
  126. // and IP back to original position.
  127. INT iTargetLen,
  128. IPCANDIDATE* pImeItem,
  129. DWORD *lpdwCharId) PURE;
  130. STDMETHOD(InsertStringEx)(THIS_
  131. WCHAR* pwSzInsert,
  132. INT cchSzInsert,
  133. DWORD *lpdwCharId) PURE;
  134. STDMETHOD(DeleteCompString)(THIS_
  135. INT iPos, // = IPINS_CURRENT:use current IP position .
  136. // = 0-n: The offset of all composition string to set
  137. // IP position, before deleting chars.
  138. // and IP back to original position.
  139. INT cchSzDel) PURE;
  140. STDMETHOD(ReplaceCompString)(THIS_
  141. INT iPos, // = IPINS_CURRENT:use current IP position and
  142. // set IP to the end of insert chars.
  143. // = 0-n: The offset of all composition string to set
  144. // IP position, before insert chars.
  145. // and IP back to original position.
  146. INT iTargetLen,
  147. WCHAR *pwSzInsert,
  148. INT cchSzInsert,
  149. DWORD *lpdwCharId) PURE;
  150. STDMETHOD(ControlIME)(THIS_ DWORD dwIMEFuncID, LPARAM lpara) PURE;
  151. STDMETHOD(GetAllCompositionInfo)(THIS_ // You can set NULL to any parameter if you don't need.
  152. WCHAR **ppwSzCompStr, // All composition string with determined area. (
  153. // This area allocated by IPOINT using CoTaskMemAlloc, so
  154. // If function is succeed caller must free this area using CoTaskMemFree.
  155. DWORD **ppdwCharID, // Array of charID coresponding to composition string.
  156. // This area allocated by IPOINT using CoTaskMemAlloc, so
  157. // If function is succeed caller must free this area using CoTaskMemFree.
  158. //
  159. // if the character of compositionstring is changed from typingstring then
  160. // charID is null.
  161. //
  162. INT *pcchCompStr, // All composition string length.
  163. INT *piIPPos, // Current IP position.
  164. INT *piStartUndetStrPos, // Undetermined string start position.
  165. INT *pcchUndetStr, // Undetermined string length.
  166. INT *piEditStart, // Editable area start position.
  167. INT *piEditLen // Editable area length.
  168. ) PURE;
  169. STDMETHOD(GetIpCandidate)(THIS_ DWORD dwCharId, IPCANDIDATE **ppImeItem, INT *piColumn, INT *piCount) PURE;
  170. // ppImeItem is allocated by IPOINT using CoTaskMemAlloc
  171. STDMETHOD(SelectIpCandidate)(THIS_ DWORD dwCharId, INT iselno) PURE;
  172. STDMETHOD(UpdateContext)(THIS_ BOOL fGenerateMessage) PURE;
  173. };
  174. #ifdef __cplusplus
  175. } /* Assume C declarations for C++ */
  176. #endif /* __cplusplus */