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.

285 lines
11 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992-2000.
  5. //
  6. // File: softkbd.idl
  7. //
  8. // Contents: ISoftKbd declarations.
  9. //
  10. //
  11. //--------------------------------------------------------------------------
  12. cpp_quote("//=--------------------------------------------------------------------------=")
  13. cpp_quote("// softkbd.h")
  14. cpp_quote("")
  15. cpp_quote("")
  16. cpp_quote("// ISoftKbd declarations.")
  17. cpp_quote("")
  18. cpp_quote("//=--------------------------------------------------------------------------=")
  19. cpp_quote("// (C) Copyright 1995-2000 Microsoft Corporation. All Rights Reserved.")
  20. cpp_quote("//")
  21. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  22. cpp_quote("// ANY KIND, EITHER EXPRESSED OR TFPLIED, INCLUDING BUT NOT LIMITED TO")
  23. cpp_quote("// THE TFPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  24. cpp_quote("// PARTICULAR PURPOSE.")
  25. cpp_quote("//=--------------------------------------------------------------------------=")
  26. cpp_quote("")
  27. cpp_quote("#ifndef SOFTKBD_DEFINED")
  28. cpp_quote("#define SOFTKBD_DEFINED")
  29. cpp_quote("")
  30. cpp_quote("#include <windows.h>")
  31. cpp_quote("")
  32. import "oaidl.idl";
  33. import "ocidl.idl";
  34. import "msctf.idl";
  35. cpp_quote("#define SOFTKBD_US_STANDARD 1")
  36. cpp_quote("#define SOFTKBD_US_ENHANCE 2")
  37. cpp_quote("#define SOFTKBD_EURO_STANDARD 3")
  38. cpp_quote("#define SOFTKBD_EURO_ENHANCE 4")
  39. cpp_quote("#define SOFTKBD_JPN_STANDARD 5")
  40. cpp_quote("#define SOFTKBD_JPN_ENHANCE 6")
  41. cpp_quote("")
  42. cpp_quote("#define SOFTKBD_CUSTOMIZE_BEGIN 100")
  43. cpp_quote("")
  44. cpp_quote("#define SOFTKBD_NO_MORE 0")
  45. cpp_quote("")
  46. cpp_quote("#define SOFTKBD_SHOW 0x00000001")
  47. cpp_quote("#define SOFTKBD_DONT_SHOW_ALPHA_BLEND 0x80000000")
  48. cpp_quote("")
  49. // =-------------------------------------------------------------------------=
  50. //
  51. // T Y P E D E F I N I T I O N
  52. //
  53. // =-------------------------------------------------------------------------=
  54. /* Logical Font */
  55. #define LF_FACESIZE 32
  56. cpp_quote( "#ifndef _WINGDI_")
  57. typedef [uuid(8849aa7d-f739-4dc0-bc61-ac48908af060)] struct LOGFONTA
  58. {
  59. LONG lfHeight;
  60. LONG lfWidth;
  61. LONG lfEscapement;
  62. LONG lfOrientation;
  63. LONG lfWeight;
  64. BYTE lfItalic;
  65. BYTE lfUnderline;
  66. BYTE lfStrikeOut;
  67. BYTE lfCharSet;
  68. BYTE lfOutPrecision;
  69. BYTE lfClipPrecision;
  70. BYTE lfQuality;
  71. BYTE lfPitchAndFamily;
  72. CHAR lfFaceName[LF_FACESIZE];
  73. } LOGFONTA;
  74. typedef [uuid(f8c6fe8a-b112-433a-be87-eb970266ec4b)] struct LOGFONTW
  75. {
  76. LONG lfHeight;
  77. LONG lfWidth;
  78. LONG lfEscapement;
  79. LONG lfOrientation;
  80. LONG lfWeight;
  81. BYTE lfItalic;
  82. BYTE lfUnderline;
  83. BYTE lfStrikeOut;
  84. BYTE lfCharSet;
  85. BYTE lfOutPrecision;
  86. BYTE lfClipPrecision;
  87. BYTE lfQuality;
  88. BYTE lfPitchAndFamily;
  89. WCHAR lfFaceName[LF_FACESIZE];
  90. } LOGFONTW;
  91. #ifdef UNICODE
  92. typedef LOGFONTW LOGFONT;
  93. #else
  94. typedef LOGFONTA LOGFONT;
  95. #endif // UNICODE
  96. cpp_quote( "#endif")
  97. cpp_quote("")
  98. cpp_quote("#if 0")
  99. typedef [uuid(f0a544c0-1281-4e32-8bf7-a6e012e980d4)] UINT_PTR HKL;
  100. cpp_quote("#endif")
  101. cpp_quote("")
  102. cpp_quote("")
  103. typedef [uuid(432ec152-51bf-43ca-8f86-50a7e230a069)] DWORD KEYID;
  104. // COLORTYPE
  105. typedef [uuid(5f46a703-f012-46db-8cda-294e994786e8)] enum {
  106. bkcolor = 0 ,
  107. UnSelForeColor = 1,
  108. UnSelTextColor = 2,
  109. SelForeColor = 3,
  110. SelTextColor = 4,
  111. Max_color_Type = 5
  112. } COLORTYPE;
  113. // TYPEMODE
  114. typedef [uuid(711c6200-587a-46ef-9647-5a83638bac00)] enum {
  115. ClickMouse = 0,
  116. Hover = 1,
  117. Scanning = 2
  118. } TYPEMODE;
  119. // TITLEBAR_TYPE
  120. typedef [uuid(10b50da7-ce0b-4b83-827f-30c50c9bc5b9)] enum {
  121. TITLEBAR_NONE = 0,
  122. TITLEBAR_GRIPPER_HORIZ_ONLY = 1,
  123. TITLEBAR_GRIPPER_VERTI_ONLY = 2,
  124. TITLEBAR_GRIPPER_BUTTON = 3
  125. } TITLEBAR_TYPE;
  126. [
  127. object,
  128. uuid(3CB00755-7536-4B0A-A213-572EFCAF93CD),
  129. helpstring("ISoftKbd Interface"),
  130. pointer_default(unique)
  131. ]
  132. interface ISoftKbd : IUnknown
  133. {
  134. [helpstring("method Initialize")] HRESULT Initialize();
  135. [helpstring("method EnumStandardSoftKeyBoard")] HRESULT EnumSoftKeyBoard([in] LANGID langid, [out] DWORD *lpdwKeyboard);
  136. [helpstring("method SelectStandardSoftKeyboard")] HRESULT SelectSoftKeyboard([in] DWORD dwKeyboardId);
  137. [helpstring("method CreateSoftKeyboardLayoutFromXMLFile")] HRESULT CreateSoftKeyboardLayoutFromXMLFile([in, string] WCHAR *lpszKeyboardDesFile, [in] INT szFileStrLen,[out] DWORD *pdwLayoutCookie);
  138. [helpstring("method CreateSoftKeyboardLayoutFromResource")] HRESULT CreateSoftKeyboardLayoutFromResource([in, string] WCHAR *lpszResFile,[in, string] WCHAR *lpszResType, [in, string] WCHAR *lpszXMLResString,[out] DWORD *lpdwLayoutCookie);
  139. [helpstring("method ShowSoftKeyboard")] HRESULT ShowSoftKeyboard([in] INT iShow);
  140. [helpstring("method SetKeyboardLabelText")] HRESULT SetKeyboardLabelText([in] HKL hKl);
  141. [helpstring("method SetKeyboardLabelTextCombination")] HRESULT SetKeyboardLabelTextCombination([in] DWORD nModifierCombination);
  142. [helpstring("method CreateSoftKeyboardWindow")] HRESULT CreateSoftKeyboardWindow([in] HWND hOwner, [in] TITLEBAR_TYPE Titlebar_type, [in] INT xPos, [in] INT yPos, [in] INT width, [in] INT height );
  143. [helpstring("method DestroySoftKeyboardWindow")] HRESULT DestroySoftKeyboardWindow();
  144. [helpstring("method GetSoftKeyboardPosSize")] HRESULT GetSoftKeyboardPosSize([out] POINT *lpStartPoint, [out] WORD *lpwidth, [out] WORD *lpheight);
  145. [helpstring("method GetSoftKeyboardColors")] HRESULT GetSoftKeyboardColors([in] COLORTYPE colorType, [out] COLORREF *lpColor);
  146. [helpstring("method GetSoftKeyboardTypeMode")] HRESULT GetSoftKeyboardTypeMode([out] TYPEMODE *lpTypeMode);
  147. [helpstring("method GetSoftKeyboardTextFont")] HRESULT GetSoftKeyboardTextFont([out] LOGFONTW *pLogFont);
  148. [helpstring("method SetSoftKeyboardPosSize")] HRESULT SetSoftKeyboardPosSize([in] POINT StartPoint, [in] WORD width, [in] WORD height);
  149. [helpstring("method SetSoftKeyboardColors")] HRESULT SetSoftKeyboardColors([in] COLORTYPE colorType, [in] COLORREF Color);
  150. [helpstring("method SetSoftKeyboardTypeMode")] HRESULT SetSoftKeyboardTypeMode([in] TYPEMODE TypeMode);
  151. [helpstring("method SetSoftKeyboardTextFont")] HRESULT SetSoftKeyboardTextFont([in] LOGFONTW *pLogFont);
  152. [helpstring("method ShowKeysForKeyScanMode")] HRESULT ShowKeysForKeyScanMode([in] KEYID *lpKeyID, [in] INT iKeyNum, [in] BOOL fHighL);
  153. [helpstring("method AdviseSoftKeyboardEventSink")] HRESULT AdviseSoftKeyboardEventSink([in] DWORD dwKeyboardId,[in] REFIID riid, [in, iid_is(riid)] IUnknown *punk, [out] DWORD *pdwCookie);
  154. [helpstring("method UnadviseSoftKeyboardEventSink")] HRESULT UnadviseSoftKeyboardEventSink([in] DWORD dwCookie);
  155. };
  156. [
  157. object,
  158. uuid(3ea2bb1d-66e7-47f7-8795-cc03d388f887),
  159. helpstring("ISoftKeyboardEventSink Interface"),
  160. pointer_default(unique)
  161. ]
  162. interface ISoftKeyboardEventSink : IUnknown
  163. {
  164. [helpstring("method OnKeySelection")] HRESULT OnKeySelection([in] KEYID KeySelected, [in, string] WCHAR *lpwszLabel );
  165. };
  166. [
  167. object,
  168. uuid(e4283da5-d425-4f97-8b6a-061a03556e95),
  169. helpstring("ISoftKbdWindowEventSink Interface"),
  170. pointer_default(unique)
  171. ]
  172. interface ISoftKbdWindowEventSink : IUnknown
  173. {
  174. [helpstring("method OnWindowClose")] HRESULT OnWindowClose( );
  175. [helpstring("method OnWindowMove")] HRESULT OnWindowMove([in] int xWnd,[in]int yWnd, [in] int width, [in] int height);
  176. };
  177. cpp_quote("#define SOFTKBD_TYPE_US_STANDARD 1")
  178. cpp_quote("#define SOFTKBD_TYPE_US_SYMBOL 10")
  179. //
  180. // ITfFnSoftKbd
  181. //
  182. // Implemented by TIP.
  183. // interface.
  184. // This derives from ITfFunction.
  185. //
  186. [
  187. object,
  188. uuid(e7342d48-573f-4f22-9181-41938b2529c2),
  189. pointer_default(unique)
  190. ]
  191. interface ITfFnSoftKbd : ITfFunction
  192. {
  193. [helpstring("method GetSoftKbdLayoutId")] HRESULT GetSoftKbdLayoutId([in] DWORD dwLayoutType, [out] DWORD *lpdwLayoutId);
  194. [helpstring("method SetActiveLayoutId")] HRESULT SetActiveLayoutId([in] DWORD dwLayoutId );
  195. [helpstring("method SetSoftKbdOnOff")] HRESULT SetSoftKbdOnOff([in] BOOL fOn );
  196. [helpstring("method SetSoftKbdPosSize")] HRESULT SetSoftKbdPosSize([in] POINT StartPoint, [in] WORD width, [in] WORD height);
  197. [helpstring("method SetSoftKbdColors")] HRESULT SetSoftKbdColors([in] COLORTYPE colorType, [in] COLORREF Color);
  198. [helpstring("method GetActiveLayoutId")] HRESULT GetActiveLayoutId([out] DWORD *lpdwLayoutId );
  199. [helpstring("method GetSoftKbdOnOff")] HRESULT GetSoftKbdOnOff([out] BOOL *lpfOn );
  200. [helpstring("method GetSoftKbdPosSize")] HRESULT GetSoftKbdPosSize([out]POINT *lpStartPoint, [out] WORD *lpwidth, [out] WORD *lpheight);
  201. [helpstring("method GetSoftKbdColors")] HRESULT GetSoftKbdColors([in] COLORTYPE colorType, [out] COLORREF *lpColor);
  202. }
  203. //
  204. // ITfSoftKbdRegistry
  205. //
  206. // Implemented in softkbd.dll
  207. // Other TIP can call this interface to Enable or Disable softkbd TIP.
  208. //
  209. [
  210. object,
  211. uuid(f5f31f14-fdf0-4d29-835a-46adfe743b78),
  212. pointer_default(unique)
  213. ]
  214. interface ITfSoftKbdRegistry : IUnknown
  215. {
  216. [helpstring("method Enable Softkbd TIP")] HRESULT EnableSoftkbd(LANGID langid);
  217. [helpstring("method Disable Softkbd TIP")] HRESULT DisableSoftkbd(LANGID langid);
  218. }
  219. // =-------------------------------------------------------------------------=
  220. //
  221. // C L S I D / I I D D E F I N I T I O N
  222. //
  223. // =-------------------------------------------------------------------------=
  224. cpp_quote("")
  225. cpp_quote("DEFINE_GUID( IID_ISoftKbd, 0x3CB00755, 0x7536, 0x4B0A, 0xA2, 0x13, 0x57, 0x2E, 0xFC, 0xAF, 0x93, 0xCD );")
  226. cpp_quote("DEFINE_GUID( IID_ISoftKeyboardEventSink,0x3ea2bb1d, 0x66e7, 0x47f7, 0x87, 0x95, 0xcc, 0x03, 0xd3, 0x88, 0xf8, 0x87 );")
  227. cpp_quote("DEFINE_GUID( IID_ITfFnSoftKbd, 0xe7342d48, 0x573f, 0x4f22, 0x91, 0x81, 0x41, 0x93, 0x8b, 0x25, 0x29, 0xc2);")
  228. cpp_quote("DEFINE_GUID( IID_ISoftKbdWindowEventSink, 0xe4283da5,0xd425,0x4f97,0x8b, 0x6a,0x06, 0x1a, 0x03, 0x55, 0x6e, 0x95);")
  229. cpp_quote("DEFINE_GUID( IID_ITfSoftKbdRegistry, 0xf5f31f14, 0xfdf0, 0x4d29, 0x83, 0x5a, 0x46, 0xad, 0xfe, 0x74, 0x3b, 0x78);")
  230. cpp_quote("DEFINE_GUID( CLSID_SoftKbd,0x1B1A897E, 0xFBEE, 0x41CF, 0x8C, 0x48,0x9B, 0xF7, 0x64, 0xF6, 0x2B, 0x8B);")
  231. cpp_quote("")
  232. cpp_quote("DEFINE_GUID( CLSID_SoftkbdIMX, 0xf89e9e58, 0xbd2f, 0x4008, 0x9a, 0xc2, 0x0f, 0x81, 0x6c, 0x09, 0xf4, 0xee);")
  233. cpp_quote("")
  234. cpp_quote("DEFINE_GUID( CLSID_SoftkbdRegistry, 0x6a49950e, 0xce8a, 0x4ef7, 0x88, 0xb4, 0x9d, 0x11, 0x23, 0x66, 0x51, 0x1c );")
  235. cpp_quote("")
  236. cpp_quote("#endif // SOFTKBD_DEFINED")