| 1 | /*
|
|---|
| 2 | * Implementation of IWebBrowser interface for IE Web Browser control
|
|---|
| 3 | *
|
|---|
| 4 | * 2001 John R. Sheets (for CodeWeavers)
|
|---|
| 5 | */
|
|---|
| 6 |
|
|---|
| 7 | #include "debugtools.h"
|
|---|
| 8 | #include "shdocvw.h"
|
|---|
| 9 |
|
|---|
| 10 | DEFAULT_DEBUG_CHANNEL(shdocvw);
|
|---|
| 11 |
|
|---|
| 12 | /**********************************************************************
|
|---|
| 13 | * Implement the IWebBrowser interface
|
|---|
| 14 | */
|
|---|
| 15 |
|
|---|
| 16 | static HRESULT WINAPI WB_QueryInterface(LPWEBBROWSER iface, REFIID riid, LPVOID *ppobj)
|
|---|
| 17 | {
|
|---|
| 18 | ICOM_THIS(IWebBrowserImpl, iface);
|
|---|
| 19 |
|
|---|
| 20 | FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
|---|
| 21 | return E_NOINTERFACE;
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | static ULONG WINAPI WB_AddRef(LPWEBBROWSER iface)
|
|---|
| 25 | {
|
|---|
| 26 | ICOM_THIS(IWebBrowserImpl, iface);
|
|---|
| 27 |
|
|---|
| 28 | TRACE("\n");
|
|---|
| 29 | return ++(This->ref);
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | static ULONG WINAPI WB_Release(LPWEBBROWSER iface)
|
|---|
| 33 | {
|
|---|
| 34 | ICOM_THIS(IWebBrowserImpl, iface);
|
|---|
| 35 |
|
|---|
| 36 | /* static class, won't be freed */
|
|---|
| 37 | TRACE("\n");
|
|---|
| 38 | return --(This->ref);
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | /* IDispatch methods */
|
|---|
| 42 | static HRESULT WINAPI WB_GetTypeInfoCount(LPWEBBROWSER iface, UINT *pctinfo)
|
|---|
| 43 | {
|
|---|
| 44 | FIXME("stub \n");
|
|---|
| 45 | return S_OK;
|
|---|
| 46 | }
|
|---|
| 47 |
|
|---|
| 48 | static HRESULT WINAPI WB_GetTypeInfo(LPWEBBROWSER iface, UINT iTInfo, LCID lcid,
|
|---|
| 49 | LPTYPEINFO *ppTInfo)
|
|---|
| 50 | {
|
|---|
| 51 | FIXME("stub \n");
|
|---|
| 52 | return S_OK;
|
|---|
| 53 | }
|
|---|
| 54 |
|
|---|
| 55 | static HRESULT WINAPI WB_GetIDsOfNames(LPWEBBROWSER iface, REFIID riid,
|
|---|
| 56 | LPOLESTR *rgszNames, UINT cNames,
|
|---|
| 57 | LCID lcid, DISPID *rgDispId)
|
|---|
| 58 | {
|
|---|
| 59 | FIXME("stub \n");
|
|---|
| 60 | return S_OK;
|
|---|
| 61 | }
|
|---|
| 62 |
|
|---|
| 63 | static HRESULT WINAPI WB_Invoke(LPWEBBROWSER iface, DISPID dispIdMember,
|
|---|
| 64 | REFIID riid, LCID lcid, WORD wFlags,
|
|---|
| 65 | DISPPARAMS *pDispParams, VARIANT *pVarResult,
|
|---|
| 66 | EXCEPINFO *pExepInfo, UINT *puArgErr)
|
|---|
| 67 | {
|
|---|
| 68 | FIXME("stub dispIdMember = %d, IID = %s\n", (int)dispIdMember, debugstr_guid(riid));
|
|---|
| 69 | return S_OK;
|
|---|
| 70 | }
|
|---|
| 71 |
|
|---|
| 72 | /* IWebBrowser methods */
|
|---|
| 73 | static HRESULT WINAPI WB_GoBack(LPWEBBROWSER iface)
|
|---|
| 74 | {
|
|---|
| 75 | FIXME("stub \n");
|
|---|
| 76 | return S_OK;
|
|---|
| 77 | }
|
|---|
| 78 |
|
|---|
| 79 | static HRESULT WINAPI WB_GoForward(LPWEBBROWSER iface)
|
|---|
| 80 | {
|
|---|
| 81 | FIXME("stub \n");
|
|---|
| 82 | return S_OK;
|
|---|
| 83 | }
|
|---|
| 84 |
|
|---|
| 85 | static HRESULT WINAPI WB_GoHome(LPWEBBROWSER iface)
|
|---|
| 86 | {
|
|---|
| 87 | FIXME("stub \n");
|
|---|
| 88 | return S_OK;
|
|---|
| 89 | }
|
|---|
| 90 |
|
|---|
| 91 | static HRESULT WINAPI WB_GoSearch(LPWEBBROWSER iface)
|
|---|
| 92 | {
|
|---|
| 93 | FIXME("stub \n");
|
|---|
| 94 | return S_OK;
|
|---|
| 95 | }
|
|---|
| 96 |
|
|---|
| 97 | static HRESULT WINAPI WB_Navigate(LPWEBBROWSER iface, BSTR *URL,
|
|---|
| 98 | VARIANT *Flags, VARIANT *TargetFrameName,
|
|---|
| 99 | VARIANT *PostData, VARIANT *Headers)
|
|---|
| 100 | {
|
|---|
| 101 | FIXME("stub: URL = %p (%p, %p, %p, %p)\n", URL, Flags, TargetFrameName,
|
|---|
| 102 | PostData, Headers);
|
|---|
| 103 | return S_OK;
|
|---|
| 104 | }
|
|---|
| 105 |
|
|---|
| 106 | static HRESULT WINAPI WB_Refresh(LPWEBBROWSER iface)
|
|---|
| 107 | {
|
|---|
| 108 | FIXME("stub \n");
|
|---|
| 109 | return S_OK;
|
|---|
| 110 | }
|
|---|
| 111 |
|
|---|
| 112 | static HRESULT WINAPI WB_Refresh2(LPWEBBROWSER iface, VARIANT *Level)
|
|---|
| 113 | {
|
|---|
| 114 | FIXME("stub: %p\n", Level);
|
|---|
| 115 | return S_OK;
|
|---|
| 116 | }
|
|---|
| 117 |
|
|---|
| 118 | static HRESULT WINAPI WB_Stop(LPWEBBROWSER iface)
|
|---|
| 119 | {
|
|---|
| 120 | FIXME("stub \n");
|
|---|
| 121 | return S_OK;
|
|---|
| 122 | }
|
|---|
| 123 |
|
|---|
| 124 | static HRESULT WINAPI WB_get_Application(LPWEBBROWSER iface, LPVOID *ppDisp)
|
|---|
| 125 | {
|
|---|
| 126 | FIXME("stub \n");
|
|---|
| 127 | return S_OK;
|
|---|
| 128 | }
|
|---|
| 129 |
|
|---|
| 130 | static HRESULT WINAPI WB_get_Parent(LPWEBBROWSER iface, LPVOID *ppDisp)
|
|---|
| 131 | {
|
|---|
| 132 | FIXME("stub \n");
|
|---|
| 133 | return S_OK;
|
|---|
| 134 | }
|
|---|
| 135 |
|
|---|
| 136 | static HRESULT WINAPI WB_get_Container(LPWEBBROWSER iface, LPVOID *ppDisp)
|
|---|
| 137 | {
|
|---|
| 138 | FIXME("stub \n");
|
|---|
| 139 | return S_OK;
|
|---|
| 140 | }
|
|---|
| 141 |
|
|---|
| 142 | static HRESULT WINAPI WB_get_Document(LPWEBBROWSER iface, LPVOID *ppDisp)
|
|---|
| 143 | {
|
|---|
| 144 | FIXME("stub \n");
|
|---|
| 145 | return S_OK;
|
|---|
| 146 | }
|
|---|
| 147 |
|
|---|
| 148 | static HRESULT WINAPI WB_get_TopLevelContainer(LPWEBBROWSER iface, VARIANT *pBool)
|
|---|
| 149 | {
|
|---|
| 150 | FIXME("stub \n");
|
|---|
| 151 | return S_OK;
|
|---|
| 152 | }
|
|---|
| 153 |
|
|---|
| 154 | static HRESULT WINAPI WB_get_Type(LPWEBBROWSER iface, BSTR *Type)
|
|---|
| 155 | {
|
|---|
| 156 | FIXME("stub \n");
|
|---|
| 157 | return S_OK;
|
|---|
| 158 | }
|
|---|
| 159 |
|
|---|
| 160 | static HRESULT WINAPI WB_get_Left(LPWEBBROWSER iface, long *pl)
|
|---|
| 161 | {
|
|---|
| 162 | FIXME("stub \n");
|
|---|
| 163 | return S_OK;
|
|---|
| 164 | }
|
|---|
| 165 |
|
|---|
| 166 | static HRESULT WINAPI WB_put_Left(LPWEBBROWSER iface, long Left)
|
|---|
| 167 | {
|
|---|
| 168 | FIXME("stub \n");
|
|---|
| 169 | return S_OK;
|
|---|
| 170 | }
|
|---|
| 171 |
|
|---|
| 172 | static HRESULT WINAPI WB_get_Top(LPWEBBROWSER iface, long *pl)
|
|---|
| 173 | {
|
|---|
| 174 | FIXME("stub \n");
|
|---|
| 175 | return S_OK;
|
|---|
| 176 | }
|
|---|
| 177 |
|
|---|
| 178 | static HRESULT WINAPI WB_put_Top(LPWEBBROWSER iface, long Top)
|
|---|
| 179 | {
|
|---|
| 180 | FIXME("stub \n");
|
|---|
| 181 | return S_OK;
|
|---|
| 182 | }
|
|---|
| 183 |
|
|---|
| 184 | static HRESULT WINAPI WB_get_Width(LPWEBBROWSER iface, long *pl)
|
|---|
| 185 | {
|
|---|
| 186 | FIXME("stub \n");
|
|---|
| 187 | return S_OK;
|
|---|
| 188 | }
|
|---|
| 189 |
|
|---|
| 190 | static HRESULT WINAPI WB_put_Width(LPWEBBROWSER iface, long Width)
|
|---|
| 191 | {
|
|---|
| 192 | FIXME("stub \n");
|
|---|
| 193 | return S_OK;
|
|---|
| 194 | }
|
|---|
| 195 |
|
|---|
| 196 | static HRESULT WINAPI WB_get_Height(LPWEBBROWSER iface, long *pl)
|
|---|
| 197 | {
|
|---|
| 198 | FIXME("stub \n");
|
|---|
| 199 | return S_OK;
|
|---|
| 200 | }
|
|---|
| 201 |
|
|---|
| 202 | static HRESULT WINAPI WB_put_Height(LPWEBBROWSER iface, long Height)
|
|---|
| 203 | {
|
|---|
| 204 | FIXME("stub \n");
|
|---|
| 205 | return S_OK;
|
|---|
| 206 | }
|
|---|
| 207 |
|
|---|
| 208 | static HRESULT WINAPI WB_get_LocationName(LPWEBBROWSER iface, BSTR *LocationName)
|
|---|
| 209 | {
|
|---|
| 210 | FIXME("stub \n");
|
|---|
| 211 | return S_OK;
|
|---|
| 212 | }
|
|---|
| 213 |
|
|---|
| 214 | static HRESULT WINAPI WB_get_LocationURL(LPWEBBROWSER iface, BSTR *LocationURL)
|
|---|
| 215 | {
|
|---|
| 216 | FIXME("stub \n");
|
|---|
| 217 | return S_OK;
|
|---|
| 218 | }
|
|---|
| 219 |
|
|---|
| 220 | static HRESULT WINAPI WB_get_Busy(LPWEBBROWSER iface, VARIANT *pBool)
|
|---|
| 221 | {
|
|---|
| 222 | FIXME("stub \n");
|
|---|
| 223 | return S_OK;
|
|---|
| 224 | }
|
|---|
| 225 |
|
|---|
| 226 | /**********************************************************************
|
|---|
| 227 | * IWebBrowser virtual function table for IE Web Browser component
|
|---|
| 228 | */
|
|---|
| 229 |
|
|---|
| 230 | static ICOM_VTABLE(IWebBrowser) WB_Vtbl =
|
|---|
| 231 | {
|
|---|
| 232 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
|---|
| 233 | WB_QueryInterface,
|
|---|
| 234 | WB_AddRef,
|
|---|
| 235 | WB_Release,
|
|---|
| 236 | WB_GetTypeInfoCount,
|
|---|
| 237 | WB_GetTypeInfo,
|
|---|
| 238 | WB_GetIDsOfNames,
|
|---|
| 239 | WB_Invoke,
|
|---|
| 240 | WB_GoBack,
|
|---|
| 241 | WB_GoForward,
|
|---|
| 242 | WB_GoHome,
|
|---|
| 243 | WB_GoSearch,
|
|---|
| 244 | WB_Navigate,
|
|---|
| 245 | WB_Refresh,
|
|---|
| 246 | WB_Refresh2,
|
|---|
| 247 | WB_Stop,
|
|---|
| 248 | WB_get_Application,
|
|---|
| 249 | WB_get_Parent,
|
|---|
| 250 | WB_get_Container,
|
|---|
| 251 | WB_get_Document,
|
|---|
| 252 | WB_get_TopLevelContainer,
|
|---|
| 253 | WB_get_Type,
|
|---|
| 254 | WB_get_Left,
|
|---|
| 255 | WB_put_Left,
|
|---|
| 256 | WB_get_Top,
|
|---|
| 257 | WB_put_Top,
|
|---|
| 258 | WB_get_Width,
|
|---|
| 259 | WB_put_Width,
|
|---|
| 260 | WB_get_Height,
|
|---|
| 261 | WB_put_Height,
|
|---|
| 262 | WB_get_LocationName,
|
|---|
| 263 | WB_get_LocationURL,
|
|---|
| 264 | WB_get_Busy
|
|---|
| 265 | };
|
|---|
| 266 |
|
|---|
| 267 | IWebBrowserImpl SHDOCVW_WebBrowser = { &WB_Vtbl, 1 };
|
|---|