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.

344 lines
13 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Microsoft Forms
  4. // Copyright (C) Microsoft Corporation, 1996-1998.
  5. //
  6. // File: mshtmhst.h
  7. //
  8. // Contents: MSHTML advanced host interfaces
  9. //
  10. //-------------------------------------------------------------------------
  11. cpp_quote("//=--------------------------------------------------------------------------=")
  12. cpp_quote("// mshtmhst.h")
  13. cpp_quote("//=--------------------------------------------------------------------------=")
  14. cpp_quote("// (C) Copyright 1995-1998 Microsoft Corporation. All Rights Reserved.")
  15. cpp_quote("//")
  16. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  17. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  18. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  19. cpp_quote("// PARTICULAR PURPOSE.")
  20. cpp_quote("//=--------------------------------------------------------------------------=")
  21. cpp_quote("")
  22. cpp_quote("#pragma comment(lib,\"uuid.lib\")")
  23. cpp_quote("")
  24. cpp_quote("//--------------------------------------------------------------------------")
  25. cpp_quote("// MSTHML Advanced Host Interfaces.")
  26. cpp_quote("")
  27. cpp_quote("#ifndef MSHTMHST_H")
  28. cpp_quote("#define MSHTMHST_H")
  29. cpp_quote("#define CONTEXT_MENU_DEFAULT 0")
  30. cpp_quote("#define CONTEXT_MENU_IMAGE 1")
  31. cpp_quote("#define CONTEXT_MENU_CONTROL 2")
  32. cpp_quote("#define CONTEXT_MENU_TABLE 3")
  33. cpp_quote("// in browse mode")
  34. cpp_quote("#define CONTEXT_MENU_TEXTSELECT 4")
  35. cpp_quote("#define CONTEXT_MENU_ANCHOR 5")
  36. cpp_quote("#define CONTEXT_MENU_UNKNOWN 6")
  37. cpp_quote("//;begin_internal")
  38. cpp_quote("// These 2 are mapped to IMAGE for the public")
  39. cpp_quote("#define CONTEXT_MENU_IMGDYNSRC 7")
  40. cpp_quote("#define CONTEXT_MENU_IMGART 8")
  41. cpp_quote("#define CONTEXT_MENU_DEBUG 9")
  42. cpp_quote("//;end_internal")
  43. cpp_quote("#define CONTEXT_MENU_VSCROLL 10")
  44. cpp_quote("#define CONTEXT_MENU_HSCROLL 11")
  45. cpp_quote("#define MENUEXT_SHOWDIALOG 0x1")
  46. cpp_quote("#define DOCHOSTUIFLAG_BROWSER DOCHOSTUIFLAG_DISABLE_HELP_MENU | DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE ")
  47. cpp_quote("#define HTMLDLG_NOUI 0x10")
  48. cpp_quote("#define HTMLDLG_MODAL 0x20")
  49. cpp_quote("#define HTMLDLG_MODELESS 0x40")
  50. cpp_quote("#define HTMLDLG_PRINT_TEMPLATE 0x80")
  51. cpp_quote("#define HTMLDLG_VERIFY 0x100")
  52. cpp_quote("#define PRINT_DONTBOTHERUSER 0x01")
  53. cpp_quote("#define PRINT_WAITFORCOMPLETION 0x02")
  54. import "ocidl.idl";
  55. import "objidl.idl";
  56. import "oleidl.idl";
  57. import "oaidl.idl";
  58. import "docobj.idl";
  59. cpp_quote("EXTERN_C const GUID CGID_MSHTML;")
  60. cpp_quote("#define CMDSETID_Forms3 CGID_MSHTML")
  61. cpp_quote("#define SZ_HTML_CLIENTSITE_OBJECTPARAM L\"{d4db6850-5385-11d0-89e9-00a0c90a90ac}\"")
  62. cpp_quote("#ifndef __IHTMLWindow2_FWD_DEFINED__")
  63. cpp_quote("#define __IHTMLWindow2_FWD_DEFINED__")
  64. cpp_quote("typedef interface IHTMLWindow2 IHTMLWindow2;")
  65. cpp_quote("#endif")
  66. #pragma midl_echo("typedef HRESULT STDAPICALLTYPE SHOWHTMLDIALOGFN (HWND hwndParent, IMoniker *pmk, VARIANT *pvarArgIn, WCHAR* pchOptions, VARIANT *pvArgOut);")
  67. #pragma midl_echo("typedef HRESULT STDAPICALLTYPE SHOWHTMLDIALOGEXFN (HWND hwndParent, IMoniker *pmk, DWORD dwDialogFlags, VARIANT *pvarArgIn, WCHAR* pchOptions, VARIANT *pvArgOut);")
  68. #pragma midl_echo("typedef HRESULT STDAPICALLTYPE SHOWMODELESSHTMLDIALOGFN (HWND hwndParent, IMoniker *pmk, VARIANT *pvarArgIn, VARIANT* pvarOptions, IHTMLWindow2 ** ppWindow);")
  69. cpp_quote("//;begin_internal")
  70. #pragma midl_echo("STDAPI ShowHTMLDialog( ")
  71. #pragma midl_echo(" HWND hwndParent, ")
  72. #pragma midl_echo(" IMoniker * pMk, ")
  73. #pragma midl_echo(" VARIANT * pvarArgIn, ")
  74. #pragma midl_echo(" WCHAR * pchOptions, ")
  75. #pragma midl_echo(" VARIANT * pvarArgOut ")
  76. #pragma midl_echo(" ); ")
  77. #pragma midl_echo("STDAPI ShowHTMLDialogEx( ")
  78. #pragma midl_echo(" HWND hwndParent, ")
  79. #pragma midl_echo(" IMoniker * pMk, ")
  80. #pragma midl_echo(" DWORD dwDialogFlags, ")
  81. #pragma midl_echo(" VARIANT * pvarArgIn, ")
  82. #pragma midl_echo(" WCHAR * pchOptions, ")
  83. #pragma midl_echo(" VARIANT * pvarArgOut ")
  84. #pragma midl_echo(" ); ")
  85. #pragma midl_echo("STDAPI ShowModelessHTMLDialog( ")
  86. #pragma midl_echo(" HWND hwndParent, ")
  87. #pragma midl_echo(" IMoniker * pMk, ")
  88. #pragma midl_echo(" VARIANT * pvarArgIn, ")
  89. #pragma midl_echo(" VARIANT * pvarOptions, ")
  90. #pragma midl_echo(" IHTMLWindow2 ** ppWindow); ")
  91. cpp_quote("//;end_internal")
  92. cpp_quote("//;begin_internal")
  93. #pragma midl_echo("STDAPI RunHTMLApplication( ")
  94. #pragma midl_echo(" HINSTANCE hinst, ")
  95. #pragma midl_echo(" HINSTANCE hPrevInst, ")
  96. #pragma midl_echo(" LPSTR szCmdLine, ")
  97. #pragma midl_echo(" int nCmdShow ")
  98. #pragma midl_echo(" ); ")
  99. cpp_quote("//;end_internal")
  100. cpp_quote("//;begin_internal")
  101. #pragma midl_echo("STDAPI CreateHTMLPropertyPage( ")
  102. #pragma midl_echo(" IMoniker * pmk, ")
  103. #pragma midl_echo(" IPropertyPage ** ppPP ")
  104. #pragma midl_echo(" ); ")
  105. cpp_quote("//;end_internal")
  106. //-------------------------------------------------------------------------
  107. // IHostDialogHelper
  108. //
  109. //-------------------------------------------------------------------------
  110. [
  111. object,
  112. uuid(53DEC138-A51E-11d2-861E-00C04FA35C89),
  113. pointer_default(unique),
  114. local
  115. ]
  116. interface IHostDialogHelper : IUnknown
  117. {
  118. HRESULT ShowHTMLDialog(
  119. HWND hwndParent,
  120. IMoniker *pMk,
  121. VARIANT *pvarArgIn,
  122. WCHAR *pchOptions,
  123. VARIANT *pvarArgOut,
  124. IUnknown *punkHost
  125. );
  126. };
  127. [
  128. uuid(429AF92C-A51F-11d2-861E-00C04FA35C89)
  129. ]
  130. coclass HostDialogHelper
  131. {
  132. [default] interface IHostDialogHelper;
  133. };
  134. cpp_quote("EXTERN_C const GUID CLSID_HostDialogHelper;")
  135. //-------------------------------------------------------------------------
  136. // IDocHostUIHandler
  137. //
  138. //-------------------------------------------------------------------------
  139. cpp_quote("//;begin_internal")
  140. typedef
  141. enum tagDOCHOSTUITYPE {
  142. DOCHOSTUITYPE_BROWSE = 0,
  143. DOCHOSTUITYPE_AUTHOR = 1,
  144. } DOCHOSTUITYPE;
  145. cpp_quote("//;end_internal")
  146. typedef enum tagDOCHOSTUIDBLCLK {
  147. DOCHOSTUIDBLCLK_DEFAULT = 0,
  148. DOCHOSTUIDBLCLK_SHOWPROPERTIES = 1,
  149. DOCHOSTUIDBLCLK_SHOWCODE = 2,
  150. } DOCHOSTUIDBLCLK ;
  151. typedef enum tagDOCHOSTUIFLAG {
  152. DOCHOSTUIFLAG_DIALOG = 0x00000001,
  153. DOCHOSTUIFLAG_DISABLE_HELP_MENU = 0x00000002,
  154. DOCHOSTUIFLAG_NO3DBORDER = 0x00000004,
  155. DOCHOSTUIFLAG_SCROLL_NO = 0x00000008,
  156. DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE = 0x00000010,
  157. DOCHOSTUIFLAG_OPENNEWWIN = 0x00000020,
  158. DOCHOSTUIFLAG_DISABLE_OFFSCREEN = 0x00000040,
  159. DOCHOSTUIFLAG_FLAT_SCROLLBAR = 0x00000080,
  160. DOCHOSTUIFLAG_DIV_BLOCKDEFAULT = 0x00000100,
  161. DOCHOSTUIFLAG_ACTIVATE_CLIENTHIT_ONLY = 0x00000200,
  162. DOCHOSTUIFLAG_OVERRIDEBEHAVIORFACTORY = 0x00000400,
  163. DOCHOSTUIFLAG_CODEPAGELINKEDFONTS = 0x00000800,
  164. DOCHOSTUIFLAG_URL_ENCODING_DISABLE_UTF8 = 0x00001000,
  165. DOCHOSTUIFLAG_URL_ENCODING_ENABLE_UTF8 = 0x00002000,
  166. DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE = 0x00004000,
  167. DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION = 0x00010000,
  168. DOCHOSTUIFLAG_IME_ENABLE_RECONVERSION = 0x00020000,
  169. DOCHOSTUIFLAG_THEME = 0x00040000,
  170. DOCHOSTUIFLAG_NOTHEME = 0x00080000,
  171. DOCHOSTUIFLAG_NOPICS = 0x00100000,
  172. DOCHOSTUIFLAG_NO3DOUTERBORDER = 0x00200000,
  173. DOCHOSTUIFLAG_DISABLE_EDIT_NS_FIXUP = 0x00400000,
  174. DOCHOSTUIFLAG_LOCAL_MACHINE_ACCESS_CHECK= 0x00800000,
  175. DOCHOSTUIFLAG_DISABLE_UNTRUSTEDPROTOCOL = 0x01000000,
  176. } DOCHOSTUIFLAG ;
  177. cpp_quote("#define DOCHOSTUIATOM_ENABLE_HIRES _T(\"TridentEnableHiRes\")")
  178. [
  179. object,
  180. uuid(bd3f23c0-d43e-11cf-893b-00aa00bdce1a),
  181. pointer_default(unique),
  182. local
  183. ]
  184. interface IDocHostUIHandler : IUnknown
  185. {
  186. typedef struct _DOCHOSTUIINFO
  187. {
  188. ULONG cbSize;
  189. DWORD dwFlags;
  190. DWORD dwDoubleClick;
  191. OLECHAR * pchHostCss;
  192. OLECHAR * pchHostNS;
  193. } DOCHOSTUIINFO;
  194. HRESULT ShowContextMenu(
  195. [in] DWORD dwID,
  196. [in] POINT* ppt,
  197. [in] IUnknown* pcmdtReserved,
  198. [in] IDispatch* pdispReserved);
  199. HRESULT GetHostInfo([in, out] DOCHOSTUIINFO * pInfo);
  200. HRESULT ShowUI(
  201. [in] DWORD dwID,
  202. [in] IOleInPlaceActiveObject * pActiveObject,
  203. [in] IOleCommandTarget * pCommandTarget,
  204. [in] IOleInPlaceFrame * pFrame,
  205. [in] IOleInPlaceUIWindow * pDoc);
  206. HRESULT HideUI();
  207. HRESULT UpdateUI();
  208. HRESULT EnableModeless([in] BOOL fEnable);
  209. HRESULT OnDocWindowActivate([in] BOOL fActivate);
  210. HRESULT OnFrameWindowActivate([in] BOOL fActivate);
  211. HRESULT ResizeBorder(
  212. [in] LPCRECT prcBorder,
  213. [in] IOleInPlaceUIWindow * pUIWindow,
  214. [in] BOOL fRameWindow);
  215. HRESULT TranslateAccelerator(
  216. [in] LPMSG lpMsg,
  217. [in] const GUID * pguidCmdGroup,
  218. [in] DWORD nCmdID);
  219. HRESULT GetOptionKeyPath([out] LPOLESTR * pchKey, [in] DWORD dw);
  220. HRESULT GetDropTarget(
  221. [in] IDropTarget * pDropTarget,
  222. [out] IDropTarget ** ppDropTarget);
  223. HRESULT GetExternal([out] IDispatch **ppDispatch);
  224. HRESULT TranslateUrl([in]DWORD dwTranslate, [in]OLECHAR *pchURLIn, [out]OLECHAR **ppchURLOut);
  225. HRESULT FilterDataObject([in]IDataObject *pDO, [out]IDataObject **ppDORet);
  226. }
  227. [
  228. object,
  229. uuid(3050f6d0-98b5-11cf-bb82-00aa00bdce0b),
  230. pointer_default(unique),
  231. local
  232. ]
  233. interface IDocHostUIHandler2 : IDocHostUIHandler
  234. {
  235. HRESULT GetOverrideKeyPath([out] LPOLESTR * pchKey, [in] DWORD dw);
  236. }
  237. cpp_quote("DEFINE_GUID(CGID_DocHostCommandHandler,0xf38bc242,0xb950,0x11d1,0x89,0x18,0x00,0xc0,0x4f,0xc2,0xc8,0x36);")
  238. //-------------------------------------------------------------------------
  239. // ICustomDoc
  240. //
  241. //-------------------------------------------------------------------------
  242. [
  243. object,
  244. uuid(3050f3f0-98b5-11cf-bb82-00aa00bdce0b),
  245. pointer_default(unique),
  246. local
  247. ]
  248. interface ICustomDoc : IUnknown
  249. {
  250. HRESULT SetUIHandler(
  251. [in] IDocHostUIHandler * pUIHandler);
  252. }
  253. //-------------------------------------------------------------------------
  254. // IDocHostShowUI
  255. //
  256. //-------------------------------------------------------------------------
  257. [
  258. object,
  259. uuid(c4d244b0-d43e-11cf-893b-00aa00bdce1a),
  260. pointer_default(unique),
  261. local
  262. ]
  263. interface IDocHostShowUI : IUnknown
  264. {
  265. HRESULT ShowMessage(
  266. [in] HWND hwnd,
  267. [in] LPOLESTR lpstrText,
  268. [in] LPOLESTR lpstrCaption,
  269. [in] DWORD dwType,
  270. [in] LPOLESTR lpstrHelpFile,
  271. [in] DWORD dwHelpContext,
  272. [out] LRESULT * plResult);
  273. HRESULT ShowHelp(
  274. [in] HWND hwnd,
  275. [in] LPOLESTR pszHelpFile,
  276. [in] UINT uCommand,
  277. [in] DWORD dwData,
  278. [in] POINT ptMouse,
  279. [out] IDispatch * pDispatchObjectHit);
  280. }
  281. cpp_quote("#define IClassFactory3 IClassFactoryEx")
  282. cpp_quote("#define IID_IClassFactory3 IID_IClassFactoryEx")
  283. //-------------------------------------------------------------------------
  284. //
  285. // IClassFactoryEx
  286. //
  287. //-------------------------------------------------------------------------
  288. [
  289. object,
  290. uuid(342D1EA0-AE25-11D1-89C5-006008C3FBFC),
  291. pointer_default(unique),
  292. local
  293. ]
  294. interface IClassFactoryEx : IClassFactory
  295. {
  296. HRESULT CreateInstanceWithContext(IUnknown *punkContext,
  297. IUnknown *punkOuter, REFIID riid, [out] void **ppv);
  298. };
  299. cpp_quote("#endif")