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.

255 lines
8.5 KiB

  1. //////////////////////////////////////////////////////////////////
  2. // File : imepad_.h
  3. // Purpose : IImePadInternal interface definition
  4. // for FarEast MSIME.
  5. //
  6. // Author : ToshiaK(MSKK)
  7. //
  8. // Copyright(c) 1995-1998, Microsoft Corp. All rights reserved
  9. //////////////////////////////////////////////////////////////////
  10. #ifndef _IME_PAD__H_
  11. #define _IME_PAD__H_
  12. #ifndef WIN32_LEAN_AND_MEAN
  13. #define WIN32_LEAN_AND_MEAN
  14. #endif
  15. #include <windows.h>
  16. #include <objbase.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. //////////////////////////////////////////////////////////////////
  21. //
  22. // IMEPADAPPLETINFO structure
  23. //
  24. #pragma pack(1)
  25. typedef struct tagIMEPADAPPLETINFO {
  26. DWORD dwSize;
  27. WCHAR wchTitle[64];
  28. CLSID clsId;
  29. IID iid;
  30. DWORD dwCategory;
  31. DWORD dwReserved1;
  32. DWORD dwReserved2;
  33. }IMEPADAPPLETINFO, *LPIMEPADAPPLETINFO;
  34. typedef struct tagIMEPADAPPLYCANDEX
  35. {
  36. DWORD dwSize;
  37. LPWSTR lpwstrDisplay;
  38. LPWSTR lpwstrReading;
  39. DWORD dwReserved;
  40. }IMEPADAPPLYCANDEX, *LPIMEPADAPPLYCANDEX;
  41. #pragma pack()
  42. //////////////////////////////////////////////////////////////////
  43. //
  44. // IImePadInternal's interface definition.
  45. //
  46. //
  47. //----------------------------------------------------------------
  48. // CLSID, IID
  49. //
  50. // {963732E0-CAB2-11d1-AFF1-00805F0C8B6D}
  51. DEFINE_GUID(CLSID_IImePad,
  52. 0x963732e0, 0xcab2, 0x11d1, 0xaf, 0xf1, 0x0, 0x80, 0x5f, 0xc, 0x8b, 0x6d);
  53. // {963732E1-CAB2-11d1-AFF1-00805F0C8B6D}
  54. DEFINE_GUID(IID_IImePadInternal,
  55. 0x963732e1, 0xcab2, 0x11d1, 0xaf, 0xf1, 0x0, 0x80, 0x5f, 0xc, 0x8b, 0x6d);
  56. //----------------------------------------------------------------
  57. // Interface Declaration
  58. //
  59. DECLARE_INTERFACE(IImePadInternal);
  60. DECLARE_INTERFACE_(IImePadInternal,IUnknown)
  61. {
  62. //--- IUnknown ---
  63. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  64. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  65. STDMETHOD_(ULONG, Release)(THIS) PURE;
  66. //---- IImePadInternal ----
  67. STDMETHOD(Initialize)(THIS_
  68. IUnknown *lpIImeNotify, //IImeNotify Interface.
  69. LANGID imelangId, //LangageId of caller's ime.
  70. DWORD dwRes1, //Reserved area.
  71. DWORD dwRes2 //Reserved area.
  72. ) PURE;
  73. STDMETHOD(Terminate)(THIS) PURE;
  74. STDMETHOD(ShowUI) (THIS_ HWND hwndOwner, BOOL fShow) PURE;
  75. STDMETHOD(IsVisible)(THIS_ BOOL *pfVisible) PURE;
  76. STDMETHOD(Notify) (THIS_ UINT notify, WPARAM wParam, LPARAM lParam) PURE;
  77. STDMETHOD(SetIImeIPoint)(THIS_
  78. IUnknown *lpIImeIPoint //IImeIPoint interface pointer
  79. ) PURE;
  80. STDMETHOD(GetAppletInfoList)(THIS_
  81. DWORD dwFlag,
  82. IMEPADAPPLETINFO **lppInfo,
  83. INT *pInfoCount) PURE;
  84. STDMETHOD(ActivateApplet)(THIS_
  85. UINT activateId,
  86. DWORD dwActivateParam,
  87. LPWSTR lpwstrAppletParam1,
  88. LPWSTR lpwstrAppletParam2) PURE;
  89. };
  90. //----------------------------------------------------------------
  91. //IImePadApplet category ID
  92. //----------------------------------------------------------------
  93. #define IPACID_NONE 0x0000
  94. #define IPACID_SOFTKEY 0x0001
  95. #define IPACID_HANDWRITING 0x0002
  96. #define IPACID_STROKESEARCH 0x0003
  97. #define IPACID_RADICALSEARCH 0x0004
  98. #define IPACID_SYMBOLSEARCH 0x0005
  99. #define IPACID_VOICE 0x0006
  100. #define IPACID_EPWING 0x0007
  101. #define IPACID_OCR 0x0008
  102. #define IPACID_USER 0x0100
  103. //////////////////////////////////////////////////////////////////
  104. //
  105. //Notify message for IImePadInternal::Notify()
  106. //
  107. //----------------------------------------------------------------
  108. // Notify composition string's window rect
  109. // WPARAM wParam: no use
  110. // LPARAM lParam: LPRECT lpRect = (LPRECT)lParam;
  111. //----------------------------------------------------------------
  112. #define IMEPADNOTIFY_RECTCHANGED 0x0001
  113. //----------------------------------------------------------------
  114. // Notify context's activation
  115. // WPARAM wParam: BOOL fActivate = (BOOL)wParam;
  116. // LPARAM lParam: no use
  117. //----------------------------------------------------------------
  118. #define IMEPADNOTIFY_ACTIVATECONTEXT 0x0002
  119. //----------------------------------------------------------------
  120. // Notify for mode changed
  121. // WPARAM wParam: (INT) convMode = (INT)wParam;
  122. // LPARAM lParam: (INT) sentenceMode= (INT)lParam;
  123. // conversion mode and sentence mode are IME_CMODE_XX or IME_SMODE_XX
  124. //----------------------------------------------------------------
  125. #define IMEPADNOTIFY_MODECHANGED 0x0006
  126. //----------------------------------------------------------------
  127. // Notify for start composition
  128. // WPARAM wParam: not defined
  129. // LPARAM lParam: not defined
  130. //----------------------------------------------------------------
  131. #define IMEPADNOTIFY_STARTCOMPOSITION 0x0007
  132. //----------------------------------------------------------------
  133. // Notify for composition
  134. // WPARAM wParam: not defined
  135. // LPARAM lParam: not defined
  136. //----------------------------------------------------------------
  137. #define IMEPADNOTIFY_COMPOSITION 0x0008
  138. //----------------------------------------------------------------
  139. // Notify for end composition
  140. // WPARAM wParam: not defined
  141. // LPARAM lParam: not defined
  142. //----------------------------------------------------------------
  143. #define IMEPADNOTIFY_ENDCOMPOSITION 0x0009
  144. //----------------------------------------------------------------
  145. // Notify for open candidate
  146. // WPARAM wParam: not defined
  147. // LPARAM lParam: not defined
  148. //----------------------------------------------------------------
  149. #define IMEPADNOTIFY_OPENCANDIDATE 0x000A
  150. //----------------------------------------------------------------
  151. // Notify for close candidate
  152. // WPARAM wParam: not defined
  153. // LPARAM lParam: not defined
  154. //----------------------------------------------------------------
  155. #define IMEPADNOTIFY_CLOSECANDIDATE 0x000B
  156. //----------------------------------------------------------------
  157. // Notify for Candidate Applied
  158. // WPARAM wParam: dwCharId = (DWORD)wParam;
  159. // LPARAM lParam: iSelIndex = (INT)lParam;
  160. //----------------------------------------------------------------
  161. #define IMEPADNOTIFY_APPLYCANDIDATE 0x000C
  162. //----------------------------------------------------------------
  163. // Notify for Querying Candidate
  164. // WPARAM wParam: dwCharId = (DWORD)wParam;
  165. // LPARAM lParam: 0. not used.
  166. //----------------------------------------------------------------
  167. #define IMEPADNOTIFY_QUERYCANDIDATE 0x000D
  168. //----------------------------------------------------------------
  169. // Notify for Candidate Applied
  170. // WPARAM wParam: dwCharId = (DWORD)wParam;
  171. // LPARAM lParam: lpApplyCandEx = (LPIMEPADAPPLYCANDEX)lParam;
  172. //----------------------------------------------------------------
  173. #define IMEPADNOTIFY_APPLYCANDIDATE_EX 0x000E
  174. //----------------------------------------------------------------
  175. //Notify for Destroying ImePad's current thread window
  176. //WPARAM wParam: no use
  177. //LPARAM lParam: no use
  178. //----------------------------------------------------------------
  179. #define IMEPADNOTIFY_ONIMEWINDOWDESTROY 0x0100
  180. //////////////////////////////////////////////////////////////////
  181. //
  182. // ActivateId for IImePadInternal::ActivateApplet()
  183. //
  184. //----------------------------------------------------------------
  185. // IMEPADACTID_ACTIVATEBYCATID requests ImePad to
  186. // Activate Applet by CategoryId.
  187. //
  188. // UINT activateId: IMEPADACTID_ACTIVATEBYCATID;
  189. // LPARAM lParamActivate: IPACID_XXXX;
  190. // LPWSTR lpwstrAppletParam1: string passed to applet.
  191. // LPWSTR lpwstrAppletParam2: string passed to applet.
  192. #define IMEPADACTID_ACTIVATEBYCATID 1000
  193. //----------------------------------------------------------------
  194. // IMEPADACTID_ACTIVATEBYIID requests ImePad to
  195. // activate applet by Interface ID
  196. //
  197. // UINT activateId: IMEPADACTID_ACTIVATEBYIID;
  198. // DWORD dwActivateParam: (DWORD)(IID *)pIID;
  199. // LPWSTR lpwstrAppletParam1: string passed to applet.
  200. // LPWSTR lpwstrAppletParam2: string passed to applet.
  201. #define IMEPADACTID_ACTIVATEBYIID 1001
  202. //----------------------------------------------------------------
  203. // IMEPADACTID_ACTIVATEBYNAME requests ImePad to
  204. // activaet applet by applet's title name.
  205. //
  206. // UINT activateId: IMEPADACTID_ACTIVATEBYNAME
  207. // DWORD dwActivateParam: (DWORD)(LPWSTR)lpwstrTitle;
  208. // LPWSTR lpwstrAppletParam1: string passed to applet.
  209. // LPWSTR lpwstrAppletParam2: string passed to applet.
  210. #define IMEPADACTID_ACTIVATEBYNAME 1003
  211. #ifdef __cplusplus
  212. };
  213. #endif
  214. #endif //_IME_PAD__H_