ReactOS 0.4.16-dev-197-g92996da
webbrowser.c
Go to the documentation of this file.
1/*
2 * Implementation of IWebBrowser interface for WebBrowser control
3 *
4 * Copyright 2001 John R. Sheets (for CodeWeavers)
5 * Copyright 2005 Jacek Caban
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#include "ieframe.h"
23
24#include "exdispid.h"
25#include "mshtml.h"
26
27#include "wine/debug.h"
28
30
31static inline WebBrowser *impl_from_IWebBrowser2(IWebBrowser2 *iface)
32{
33 return CONTAINING_RECORD(iface, WebBrowser, IWebBrowser2_iface);
34}
35
37{
39
40 if (ppv == NULL)
41 return E_POINTER;
42 *ppv = NULL;
43
45 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
46 *ppv = &This->IWebBrowser2_iface;
47 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
48 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
49 *ppv = &This->IWebBrowser2_iface;
50 }else if(IsEqualGUID(&IID_IWebBrowser, riid)) {
51 TRACE("(%p)->(IID_IWebBrowser %p)\n", This, ppv);
52 *ppv = &This->IWebBrowser2_iface;
53 }else if(IsEqualGUID(&IID_IWebBrowserApp, riid)) {
54 TRACE("(%p)->(IID_IWebBrowserApp %p)\n", This, ppv);
55 *ppv = &This->IWebBrowser2_iface;
56 }else if(IsEqualGUID(&IID_IWebBrowser2, riid)) {
57 TRACE("(%p)->(IID_IWebBrowser2 %p)\n", This, ppv);
58 *ppv = &This->IWebBrowser2_iface;
59 }else if(IsEqualGUID(&IID_IOleObject, riid)) {
60 TRACE("(%p)->(IID_IOleObject %p)\n", This, ppv);
61 *ppv = &This->IOleObject_iface;
62 }else if(IsEqualGUID(&IID_IOleWindow, riid)) {
63 TRACE("(%p)->(IID_IOleWindow %p)\n", This, ppv);
64 *ppv = &This->IOleInPlaceObject_iface;
66 TRACE("(%p)->(IID_IOleInPlaceObject %p)\n", This, ppv);
67 *ppv = &This->IOleInPlaceObject_iface;
68 }else if(IsEqualGUID(&IID_IOleControl, riid)) {
69 TRACE("(%p)->(IID_IOleControl %p)\n", This, ppv);
70 *ppv = &This->IOleControl_iface;
71 }else if(IsEqualGUID(&IID_IPersist, riid)) {
72 TRACE("(%p)->(IID_IPersist %p)\n", This, ppv);
73 *ppv = &This->IPersistStorage_iface;
75 TRACE("(%p)->(IID_IPersistStorage %p)\n", This, ppv);
76 *ppv = &This->IPersistStorage_iface;
78 TRACE("(%p)->(IID_IPersistStorage %p)\n", This, ppv);
79 *ppv = &This->IPersistMemory_iface;
81 TRACE("(%p)->(IID_IPersistStreamInit %p)\n", This, ppv);
82 *ppv = &This->IPersistStreamInit_iface;
84 TRACE("(%p)->(IID_IProvideClassInfo %p)\n", This, ppv);
85 *ppv = &This->IProvideClassInfo2_iface;
87 TRACE("(%p)->(IID_IProvideClassInfo2 %p)\n", This, ppv);
88 *ppv = &This->IProvideClassInfo2_iface;
90 TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
91 *ppv = &This->doc_host.cps.IConnectionPointContainer_iface;
92 }else if(IsEqualGUID(&IID_IViewObject, riid)) {
93 TRACE("(%p)->(IID_IViewObject %p)\n", This, ppv);
94 *ppv = &This->IViewObject2_iface;
95 }else if(IsEqualGUID(&IID_IViewObject2, riid)) {
96 TRACE("(%p)->(IID_IViewObject2 %p)\n", This, ppv);
97 *ppv = &This->IViewObject2_iface;
99 TRACE("(%p)->(IID_IOleInPlaceActiveObject %p)\n", This, ppv);
100 *ppv = &This->IOleInPlaceActiveObject_iface;
101 }else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) {
102 TRACE("(%p)->(IID_IOleCommandTarget %p)\n", This, ppv);
103 *ppv = &This->IOleCommandTarget_iface;
104 }else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
105 *ppv = &This->IServiceProvider_iface;
106 TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
107 }else if(IsEqualGUID(&IID_IDataObject, riid)) {
108 *ppv = &This->IDataObject_iface;
109 TRACE("(%p)->(IID_IDataObject %p)\n", This, ppv);
110 }else if(IsEqualGUID(&IID_IQuickActivate, riid)) {
111 TRACE("(%p)->(IID_IQuickActivate %p) returning NULL\n", This, ppv);
112 return E_NOINTERFACE;
114 TRACE("(%p)->(IID_IRunnableObject %p) returning NULL\n", This, ppv);
115 return E_NOINTERFACE;
117 TRACE("(%p)->(IID_IPerPropertyBrowsing %p) returning NULL\n", This, ppv);
118 return E_NOINTERFACE;
119 }else if(IsEqualGUID(&IID_IOleCache, riid)) {
120 TRACE("(%p)->(IID_IOleCache %p) returning NULL\n", This, ppv);
121 return E_NOINTERFACE;
123 TRACE("(%p)->(IID_IOleInPlaceSite %p) returning NULL\n", This, ppv);
124 return E_NOINTERFACE;
126 TRACE("(%p)->(IID_IObjectWithSite %p) returning NULL\n", This, ppv);
127 return E_NOINTERFACE;
128 }else if(IsEqualGUID(&IID_IViewObjectEx, riid)) {
129 TRACE("(%p)->(IID_IViewObjectEx %p) returning NULL\n", This, ppv);
130 return E_NOINTERFACE;
131 }else if(IsEqualGUID(&IID_IOleLink, riid)) {
132 TRACE("(%p)->(IID_IOleLink %p) returning NULL\n", This, ppv);
133 return E_NOINTERFACE;
134 }else if(IsEqualGUID(&IID_IMarshal, riid)) {
135 TRACE("(%p)->(IID_IMarshal %p) returning NULL\n", This, ppv);
136 return E_NOINTERFACE;
137 }else if(IsEqualGUID(&IID_IStdMarshalInfo, riid)) {
138 /* This is implemented since IE10 */
139 WARN("(%p)->(IID_IStdMarshalInfo %p) returning NULL\n", This, ppv);
140 return E_NOINTERFACE;
141 }else if(HlinkFrame_QI(&This->hlink_frame, riid, ppv)) {
142 return S_OK;
143 }
144
145 if(*ppv) {
146 IUnknown_AddRef((IUnknown*)*ppv);
147 return S_OK;
148 }
149
150 FIXME("(%p)->(%s %p) interface not supported\n", This, debugstr_guid(riid), ppv);
151 return E_NOINTERFACE;
152}
153
154static ULONG WINAPI WebBrowser_AddRef(IWebBrowser2 *iface)
155{
158 TRACE("(%p) ref=%d\n", This, ref);
159 return ref;
160}
161
162static ULONG WINAPI WebBrowser_Release(IWebBrowser2 *iface)
163{
166
167 TRACE("(%p) ref=%d\n", This, ref);
168
169 if(!ref) {
170 if(This->sink)
171 IAdviseSink_Release(This->sink);
172
173 if(This->doc_host.document)
174 IUnknown_Release(This->doc_host.document);
175
176 DocHost_Release(&This->doc_host);
177
179
182 }
183
184 return ref;
185}
186
187/* IDispatch methods */
188static HRESULT WINAPI WebBrowser_GetTypeInfoCount(IWebBrowser2 *iface, UINT *pctinfo)
189{
191
192 TRACE("(%p)->(%p)\n", This, pctinfo);
193
194 *pctinfo = 1;
195 return S_OK;
196}
197
198static HRESULT WINAPI WebBrowser_GetTypeInfo(IWebBrowser2 *iface, UINT iTInfo, LCID lcid,
199 LPTYPEINFO *ppTInfo)
200{
204
205 TRACE("(%p)->(%d %d %p)\n", This, iTInfo, lcid, ppTInfo);
206
207 hres = get_typeinfo(IWebBrowser2_tid, &typeinfo);
208 if(FAILED(hres))
209 return hres;
210
211 ITypeInfo_AddRef(typeinfo);
212 *ppTInfo = typeinfo;
213 return S_OK;
214}
215
217 LPOLESTR *rgszNames, UINT cNames,
218 LCID lcid, DISPID *rgDispId)
219{
223
224 TRACE("(%p)->(%s %p %d %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
225 lcid, rgDispId);
226
227 hres = get_typeinfo(IWebBrowser2_tid, &typeinfo);
228 if(FAILED(hres))
229 return hres;
230
231 return ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
232}
233
234static HRESULT WINAPI WebBrowser_Invoke(IWebBrowser2 *iface, DISPID dispIdMember,
235 REFIID riid, LCID lcid, WORD wFlags,
236 DISPPARAMS *pDispParams, VARIANT *pVarResult,
237 EXCEPINFO *pExepInfo, UINT *puArgErr)
238{
242
243 TRACE("(%p)->(%d %s %d %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
244 lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
245
246 hres = get_typeinfo(IWebBrowser2_tid, &typeinfo);
247 if(FAILED(hres))
248 return hres;
249
250 return ITypeInfo_Invoke(typeinfo, &This->IWebBrowser2_iface, dispIdMember, wFlags, pDispParams,
251 pVarResult, pExepInfo, puArgErr);
252}
253
254/* IWebBrowser methods */
255static HRESULT WINAPI WebBrowser_GoBack(IWebBrowser2 *iface)
256{
258 TRACE("(%p)\n", This);
259 return go_back(&This->doc_host);
260}
261
262static HRESULT WINAPI WebBrowser_GoForward(IWebBrowser2 *iface)
263{
265 TRACE("(%p)\n", This);
266 return go_forward(&This->doc_host);
267}
268
269static HRESULT WINAPI WebBrowser_GoHome(IWebBrowser2 *iface)
270{
272 TRACE("(%p)\n", This);
273 return go_home(&This->doc_host);
274}
275
276static HRESULT WINAPI WebBrowser_GoSearch(IWebBrowser2 *iface)
277{
279 FIXME("(%p)\n", This);
280 return E_NOTIMPL;
281}
282
283static HRESULT WINAPI WebBrowser_Navigate(IWebBrowser2 *iface, BSTR szUrl,
284 VARIANT *Flags, VARIANT *TargetFrameName,
285 VARIANT *PostData, VARIANT *Headers)
286{
288
289 TRACE("(%p)->(%s %s %s %s %s)\n", This, debugstr_w(szUrl), debugstr_variant(Flags),
290 debugstr_variant(TargetFrameName), debugstr_variant(PostData),
291 debugstr_variant(Headers));
292
293 return navigate_url(&This->doc_host, szUrl, Flags, TargetFrameName, PostData, Headers);
294}
295
296static HRESULT WINAPI WebBrowser_Refresh(IWebBrowser2 *iface)
297{
299
300 TRACE("(%p)\n", This);
301
302 return refresh_document(&This->doc_host, NULL);
303}
304
305static HRESULT WINAPI WebBrowser_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
306{
308
309 TRACE("(%p)->(%s)\n", This, debugstr_variant(Level));
310
311 return refresh_document(&This->doc_host, Level);
312}
313
314static HRESULT WINAPI WebBrowser_Stop(IWebBrowser2 *iface)
315{
317 FIXME("(%p)\n", This);
318 return S_OK;
319}
320
321static HRESULT WINAPI WebBrowser_get_Application(IWebBrowser2 *iface, IDispatch **ppDisp)
322{
324
325 TRACE("(%p)->(%p)\n", This, ppDisp);
326
327 if(!ppDisp)
328 return E_POINTER;
329
330 *ppDisp = (IDispatch*)&This->IWebBrowser2_iface;
331 IDispatch_AddRef(*ppDisp);
332 return S_OK;
333}
334
335static HRESULT WINAPI WebBrowser_get_Parent(IWebBrowser2 *iface, IDispatch **ppDisp)
336{
338 FIXME("(%p)->(%p)\n", This, ppDisp);
339 return E_NOTIMPL;
340}
341
342static HRESULT WINAPI WebBrowser_get_Container(IWebBrowser2 *iface, IDispatch **ppDisp)
343{
345 FIXME("(%p)->(%p)\n", This, ppDisp);
346 return E_NOTIMPL;
347}
348
349static HRESULT WINAPI WebBrowser_get_Document(IWebBrowser2 *iface, IDispatch **ppDisp)
350{
352 IDispatch *disp = NULL;
353
354 TRACE("(%p)->(%p)\n", This, ppDisp);
355
356 if(This->doc_host.document) {
358
359 hres = IUnknown_QueryInterface(This->doc_host.document, &IID_IDispatch, (void**)&disp);
360 if(SUCCEEDED(hres)) {
362
363 /* Some broken apps cast returned IDispatch to IHTMLDocument2
364 * without QueryInterface call */
365 hres = IDispatch_QueryInterface(disp, &IID_IHTMLDocument2, (void**)&html_doc);
366 if(SUCCEEDED(hres)) {
367 IDispatch_Release(disp);
368 disp = html_doc;
369 }
370 }
371 }
372
373 *ppDisp = disp;
374 return S_OK;
375}
376
378{
380 FIXME("(%p)->(%p)\n", This, pBool);
381 return E_NOTIMPL;
382}
383
384static HRESULT WINAPI WebBrowser_get_Type(IWebBrowser2 *iface, BSTR *Type)
385{
387 FIXME("(%p)->(%p)\n", This, Type);
388 return E_NOTIMPL;
389}
390
391static HRESULT WINAPI WebBrowser_get_Left(IWebBrowser2 *iface, LONG *pl)
392{
394
395 TRACE("(%p)->(%p)\n", This, pl);
396
397 *pl = This->pos_rect.left;
398 return S_OK;
399}
400
401static HRESULT WINAPI WebBrowser_put_Left(IWebBrowser2 *iface, LONG Left)
402{
404 RECT rect;
405
406 TRACE("(%p)->(%d)\n", This, Left);
407
408 if(!This->inplace)
409 return E_UNEXPECTED;
410
411 rect = This->pos_rect;
412 rect.left = Left;
413
414 /* We don't really change the window position here.
415 * We just notify the embedder that he should do so. */
416 return IOleInPlaceSiteEx_OnPosRectChange(This->inplace, &rect);
417}
418
419static HRESULT WINAPI WebBrowser_get_Top(IWebBrowser2 *iface, LONG *pl)
420{
422
423 TRACE("(%p)->(%p)\n", This, pl);
424
425 *pl = This->pos_rect.top;
426 return S_OK;
427}
428
429static HRESULT WINAPI WebBrowser_put_Top(IWebBrowser2 *iface, LONG Top)
430{
432 RECT rect;
433
434 TRACE("(%p)->(%d)\n", This, Top);
435
436 if(!This->inplace)
437 return E_UNEXPECTED;
438
439 rect = This->pos_rect;
440 rect.top = Top;
441
442 /* We don't really change the window position here.
443 * We just notify the embedder that he should do so. */
444 return IOleInPlaceSiteEx_OnPosRectChange(This->inplace, &rect);
445}
446
447static HRESULT WINAPI WebBrowser_get_Width(IWebBrowser2 *iface, LONG *pl)
448{
450
451 TRACE("(%p)->(%p)\n", This, pl);
452
453 *pl = This->pos_rect.right - This->pos_rect.left;
454 return S_OK;
455}
456
457static HRESULT WINAPI WebBrowser_put_Width(IWebBrowser2 *iface, LONG Width)
458{
460 RECT rect;
461
462 TRACE("(%p)->(%d)\n", This, Width);
463
464 if(!This->inplace)
465 return E_UNEXPECTED;
466
467 rect = This->pos_rect;
468 rect.right = rect.left+Width;
469
470 /* We don't really change the window size here.
471 * We just notify the embedder that he should do so. */
472 return IOleInPlaceSiteEx_OnPosRectChange(This->inplace, &rect);
473}
474
475static HRESULT WINAPI WebBrowser_get_Height(IWebBrowser2 *iface, LONG *pl)
476{
478
479 TRACE("(%p)->(%p)\n", This, pl);
480
481 *pl = This->pos_rect.bottom - This->pos_rect.top;
482 return S_OK;
483}
484
485static HRESULT WINAPI WebBrowser_put_Height(IWebBrowser2 *iface, LONG Height)
486{
488 RECT rect;
489
490 TRACE("(%p)->(%d)\n", This, Height);
491
492 if(!This->inplace)
493 return E_UNEXPECTED;
494
495 rect = This->pos_rect;
496 rect.bottom = rect.top+Height;
497
498 /* We don't really change the window size here.
499 * We just notify the embedder that he should do so. */
500 return IOleInPlaceSiteEx_OnPosRectChange(This->inplace, &rect);
501}
502
503static HRESULT WINAPI WebBrowser_get_LocationName(IWebBrowser2 *iface, BSTR *LocationName)
504{
506 FIXME("(%p)->(%p)\n", This, LocationName);
507 return E_NOTIMPL;
508}
509
510static HRESULT WINAPI WebBrowser_get_LocationURL(IWebBrowser2 *iface, BSTR *LocationURL)
511{
513
514 TRACE("(%p)->(%p)\n", This, LocationURL);
515
516 return get_location_url(&This->doc_host, LocationURL);
517}
518
519static HRESULT WINAPI WebBrowser_get_Busy(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
520{
522
523 TRACE("(%p)->(%p)\n", This, pBool);
524
525 *pBool = This->doc_host.busy;
526 return S_OK;
527}
528
529static HRESULT WINAPI WebBrowser_Quit(IWebBrowser2 *iface)
530{
532
533 TRACE("(%p)\n", This);
534
535 /* It's a InternetExplorer specific method, we have nothing to do here. */
536 return E_FAIL;
537}
538
539static HRESULT WINAPI WebBrowser_ClientToWindow(IWebBrowser2 *iface, int *pcx, int *pcy)
540{
542 FIXME("(%p)->(%p %p)\n", This, pcx, pcy);
543 return E_NOTIMPL;
544}
545
546static HRESULT WINAPI WebBrowser_PutProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT vtValue)
547{
549 FIXME("(%p)->(%s %s)\n", This, debugstr_w(szProperty), debugstr_variant(&vtValue));
550 return E_NOTIMPL;
551}
552
553static HRESULT WINAPI WebBrowser_GetProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT *pvtValue)
554{
556 FIXME("(%p)->(%s %s)\n", This, debugstr_w(szProperty), debugstr_variant(pvtValue));
557 return E_NOTIMPL;
558}
559
560static HRESULT WINAPI WebBrowser_get_Name(IWebBrowser2 *iface, BSTR *Name)
561{
562 static const WCHAR sName[] = {'M','i','c','r','o','s','o','f','t',' ','W','e','b',
563 ' ','B','r','o','w','s','e','r',' ','C','o','n','t','r','o','l',0};
565
566 TRACE("(%p)->(%p)\n", This, Name);
567
568 *Name = SysAllocString(sName);
569
570 return S_OK;
571}
572
573static HRESULT WINAPI WebBrowser_get_HWND(IWebBrowser2 *iface, SHANDLE_PTR *pHWND)
574{
576
577 TRACE("(%p)->(%p)\n", This, pHWND);
578
579 /* WebBrowser control never has a frame window (in opposition to InternetExplorer) */
580 *pHWND = 0;
581 return E_FAIL;
582}
583
585{
587 FIXME("(%p)->(%p)\n", This, FullName);
588 return E_NOTIMPL;
589}
590
591static HRESULT WINAPI WebBrowser_get_Path(IWebBrowser2 *iface, BSTR *Path)
592{
594 FIXME("(%p)->(%p)\n", This, Path);
595 return E_NOTIMPL;
596}
597
598static HRESULT WINAPI WebBrowser_get_Visible(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
599{
601
602 TRACE("(%p)->(%p)\n", This, pBool);
603
604 *pBool = This->visible;
605 return S_OK;
606}
607
609{
612 DISPPARAMS dispparams = {&arg, NULL, 1, 0};
613
614 TRACE("(%p)->(%x)\n", This, Value);
615
616 This->visible = Value;
617
618 V_VT(&arg) = VT_BOOL;
619 V_BOOL(&arg) = Value;
620 call_sink(This->doc_host.cps.wbe2, DISPID_ONVISIBLE, &dispparams);
621
622 return S_OK;
623}
624
625static HRESULT WINAPI WebBrowser_get_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
626{
628
629 TRACE("(%p)->(%p)\n", This, pBool);
630
631 *pBool = This->status_bar;
632 return S_OK;
633}
634
636{
639 DISPPARAMS dispparams = {&arg, NULL, 1, 0};
640
641 TRACE("(%p)->(%x)\n", This, Value);
642
643 This->status_bar = Value ? VARIANT_TRUE : VARIANT_FALSE;
644
645 /* In opposition to InternetExplorer, all we should do here is
646 * inform the embedder about the status bar change. */
647
648 V_VT(&arg) = VT_BOOL;
649 V_BOOL(&arg) = Value;
650 call_sink(This->doc_host.cps.wbe2, DISPID_ONSTATUSBAR, &dispparams);
651
652 return S_OK;
653}
654
655static HRESULT WINAPI WebBrowser_get_StatusText(IWebBrowser2 *iface, BSTR *StatusText)
656{
658 FIXME("(%p)->(%p)\n", This, StatusText);
659 return E_NOTIMPL;
660}
661
662static HRESULT WINAPI WebBrowser_put_StatusText(IWebBrowser2 *iface, BSTR StatusText)
663{
665 FIXME("(%p)->(%s)\n", This, debugstr_w(StatusText));
666 return E_NOTIMPL;
667}
668
669static HRESULT WINAPI WebBrowser_get_ToolBar(IWebBrowser2 *iface, int *Value)
670{
672
673 TRACE("(%p)->(%p)\n", This, Value);
674
675 *Value = This->tool_bar;
676 return S_OK;
677}
678
679static HRESULT WINAPI WebBrowser_put_ToolBar(IWebBrowser2 *iface, int Value)
680{
683 DISPPARAMS dispparams = {&arg, NULL, 1, 0};
684
685 TRACE("(%p)->(%x)\n", This, Value);
686
687 This->tool_bar = Value ? VARIANT_TRUE : VARIANT_FALSE;
688
689 /* In opposition to InternetExplorer, all we should do here is
690 * inform the embedder about the tool bar change. */
691
692 V_VT(&arg) = VT_BOOL;
693 V_BOOL(&arg) = This->tool_bar;
694 call_sink(This->doc_host.cps.wbe2, DISPID_ONTOOLBAR, &dispparams);
695
696 return S_OK;
697}
698
700{
702
703 TRACE("(%p)->(%p)\n", This, Value);
704
705 *Value = This->menu_bar;
706 return S_OK;
707}
708
710{
713 DISPPARAMS dispparams = {&arg, NULL, 1, 0};
714
715 TRACE("(%p)->(%x)\n", This, Value);
716
717 This->menu_bar = Value ? VARIANT_TRUE : VARIANT_FALSE;
718
719 /* In opposition to InternetExplorer, all we should do here is
720 * inform the embedder about the menu bar change. */
721
722 V_VT(&arg) = VT_BOOL;
723 V_BOOL(&arg) = Value;
724 call_sink(This->doc_host.cps.wbe2, DISPID_ONMENUBAR, &dispparams);
725
726 return S_OK;
727}
728
729static HRESULT WINAPI WebBrowser_get_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL *pbFullScreen)
730{
732
733 TRACE("(%p)->(%p)\n", This, pbFullScreen);
734
735 *pbFullScreen = This->full_screen;
736 return S_OK;
737}
738
739static HRESULT WINAPI WebBrowser_put_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL bFullScreen)
740{
743 DISPPARAMS dispparams = {&arg, NULL, 1, 0};
744
745 /* In opposition to InternetExplorer, all we should do here is
746 * inform the embedder about the fullscreen change. */
747
748 TRACE("(%p)->(%x)\n", This, bFullScreen);
749
750 This->full_screen = bFullScreen ? VARIANT_TRUE : VARIANT_FALSE;
751
752 V_VT(&arg) = VT_BOOL;
753 V_BOOL(&arg) = bFullScreen;
754 call_sink(This->doc_host.cps.wbe2, DISPID_ONFULLSCREEN, &dispparams);
755
756 return S_OK;
757}
758
759static HRESULT WINAPI WebBrowser_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VARIANT *Flags,
760 VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
761{
763 LPCWSTR url;
764
765 TRACE("(%p)->(%s %s %s %s %s)\n", This, debugstr_variant(URL), debugstr_variant(Flags),
766 debugstr_variant(TargetFrameName), debugstr_variant(PostData), debugstr_variant(Headers));
767
768 if(!This->client)
769 return E_FAIL;
770
771 if(!URL)
772 return S_OK;
773
774 switch (V_VT(URL))
775 {
776 case VT_BSTR:
777 url = V_BSTR(URL);
778 break;
779 case VT_BSTR|VT_BYREF:
780 url = *V_BSTRREF(URL);
781 break;
782 default:
783 FIXME("Unsupported V_VT(URL) %d\n", V_VT(URL));
784 return E_INVALIDARG;
785 }
786
787 return navigate_url(&This->doc_host, url, Flags, TargetFrameName, PostData, Headers);
788}
789
790static HRESULT WINAPI WebBrowser_QueryStatusWB(IWebBrowser2 *iface, OLECMDID cmdID, OLECMDF *pcmdf)
791{
794 OLECMD ole_command[1];
796
797 TRACE("(%p)->(%d %p)\n", This, cmdID, pcmdf);
798
799 if (!pcmdf)
800 return E_POINTER;
801 ole_command[0].cmdID = cmdID;
802 ole_command[0].cmdf = *pcmdf;
803
804 if (This->container)
805 {
806 hres = IOleContainer_QueryInterface(This->container, &IID_IOleCommandTarget, (LPVOID*)&target);
807 if(FAILED(hres))
808 target = NULL;
809 }
810 if (!target && This->doc_host.document)
811 {
812 hres = IUnknown_QueryInterface(This->doc_host.document, &IID_IOleCommandTarget, (LPVOID*)&target);
813 if(FAILED(hres))
814 target = NULL;
815 }
816
817 if (!target)
818 return E_UNEXPECTED;
819
820 hres = IOleCommandTarget_QueryStatus(target, NULL, 1, ole_command, NULL);
821 if (SUCCEEDED(hres))
822 *pcmdf = ole_command[0].cmdf;
823 if (hres == OLECMDERR_E_NOTSUPPORTED)
824 {
825 *pcmdf = 0;
826 hres = S_OK;
827 }
828 IOleCommandTarget_Release(target);
829
830 return hres;
831}
832
833static HRESULT WINAPI WebBrowser_ExecWB(IWebBrowser2 *iface, OLECMDID cmdID,
834 OLECMDEXECOPT cmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
835{
839
840 TRACE("(%p)->(%d %d %s %p)\n", This, cmdID, cmdexecopt, debugstr_variant(pvaIn), pvaOut);
841
842 if(This->container)
843 {
844 hres = IOleContainer_QueryInterface(This->container, &IID_IOleCommandTarget, (LPVOID*)&target);
845 if(FAILED(hres))
846 target = NULL;
847 }
848 if(!target && This->doc_host.document)
849 {
850 hres = IUnknown_QueryInterface(This->doc_host.document, &IID_IOleCommandTarget, (LPVOID*)&target);
851 if(FAILED(hres))
852 target = NULL;
853 }
854
855 if(!target)
856 return E_UNEXPECTED;
857
858 hres = IOleCommandTarget_Exec(target, NULL, cmdID, cmdexecopt, pvaIn, pvaOut);
859 IOleCommandTarget_Release(target);
860
861 return hres;
862}
863
864static HRESULT WINAPI WebBrowser_ShowBrowserBar(IWebBrowser2 *iface, VARIANT *pvaClsid,
865 VARIANT *pvarShow, VARIANT *pvarSize)
866{
868 FIXME("(%p)->(%s %s %s)\n", This, debugstr_variant(pvaClsid), debugstr_variant(pvarShow),
869 debugstr_variant(pvarSize));
870 return E_NOTIMPL;
871}
872
873static HRESULT WINAPI WebBrowser_get_ReadyState(IWebBrowser2 *iface, READYSTATE *lpReadyState)
874{
876
877 TRACE("(%p)->(%p)\n", This, lpReadyState);
878
879 *lpReadyState = This->doc_host.ready_state;
880 return S_OK;
881}
882
883static HRESULT WINAPI WebBrowser_get_Offline(IWebBrowser2 *iface, VARIANT_BOOL *pbOffline)
884{
886
887 TRACE("(%p)->(%p)\n", This, pbOffline);
888
889 *pbOffline = This->doc_host.offline;
890 return S_OK;
891}
892
893static HRESULT WINAPI WebBrowser_put_Offline(IWebBrowser2 *iface, VARIANT_BOOL bOffline)
894{
896
897 TRACE("(%p)->(%x)\n", This, bOffline);
898
899 This->doc_host.offline = bOffline ? VARIANT_TRUE : VARIANT_FALSE;
900 return S_OK;
901}
902
903static HRESULT WINAPI WebBrowser_get_Silent(IWebBrowser2 *iface, VARIANT_BOOL *pbSilent)
904{
906
907 TRACE("(%p)->(%p)\n", This, pbSilent);
908
909 *pbSilent = This->doc_host.silent;
910 return S_OK;
911}
912
913static HRESULT WINAPI WebBrowser_put_Silent(IWebBrowser2 *iface, VARIANT_BOOL bSilent)
914{
916
917 TRACE("(%p)->(%x)\n", This, bSilent);
918
919 This->doc_host.silent = bSilent ? VARIANT_TRUE : VARIANT_FALSE;
920 return S_OK;
921}
922
924 VARIANT_BOOL *pbRegister)
925{
927
928 FIXME("(%p)->(%p)\n", This, pbRegister);
929
930 *pbRegister = This->register_browser;
931 return S_OK;
932}
933
935 VARIANT_BOOL bRegister)
936{
938
939 FIXME("(%p)->(%x)\n", This, bRegister);
940
941 This->register_browser = bRegister ? VARIANT_TRUE : VARIANT_FALSE;
942 return S_OK;
943}
944
946 VARIANT_BOOL *pbRegister)
947{
949
950 FIXME("(%p)->(%p)\n", This, pbRegister);
951
952 if(!pbRegister)
953 return E_INVALIDARG;
954
955 *pbRegister=0;
956 return S_OK;
957}
958
960 VARIANT_BOOL bRegister)
961{
963 FIXME("(%p)->(%x)\n", This, bRegister);
964 return S_OK;
965}
966
967static HRESULT WINAPI WebBrowser_get_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL *pbRegister)
968{
970
971 TRACE("(%p)->(%p)\n", This, pbRegister);
972
973 *pbRegister = This->theater_mode;
974 return S_OK;
975}
976
977static HRESULT WINAPI WebBrowser_put_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL bRegister)
978{
981 DISPPARAMS dispparams = {&arg, NULL, 1, 0};
982
983 TRACE("(%p)->(%x)\n", This, bRegister);
984
985 This->theater_mode = bRegister ? VARIANT_TRUE : VARIANT_FALSE;
986
987 /* In opposition to InternetExplorer, all we should do here is
988 * inform the embedder about the theater mode change. */
989
990 V_VT(&arg) = VT_BOOL;
991 V_BOOL(&arg) = bRegister;
992 call_sink(This->doc_host.cps.wbe2, DISPID_ONTHEATERMODE, &dispparams);
993
994 return S_OK;
995}
996
998{
1000
1001 TRACE("(%p)->(%p)\n", This, Value);
1002
1003 *Value = This->address_bar;
1004 return S_OK;
1005}
1006
1008{
1011 DISPPARAMS dispparams = {&arg, NULL, 1, 0};
1012
1013 TRACE("(%p)->(%x)\n", This, Value);
1014
1015 This->address_bar = Value ? VARIANT_TRUE : VARIANT_FALSE;
1016
1017 /* In opposition to InternetExplorer, all we should do here is
1018 * inform the embedder about the address bar change. */
1019
1020 V_VT(&arg) = VT_BOOL;
1021 V_BOOL(&arg) = Value;
1022 call_sink(This->doc_host.cps.wbe2, DISPID_ONADDRESSBAR, &dispparams);
1023
1024 return S_OK;
1025}
1026
1028{
1030
1031 TRACE("(%p)->(%p)\n", This, Value);
1032
1033 /* It's InternetExplorer object's method. We have nothing to do here. */
1034 return E_NOTIMPL;
1035}
1036
1038{
1041 DISPPARAMS dispparams = {&arg, NULL, 1, 0};
1042
1043 TRACE("(%p)->(%x)\n", This, Value);
1044
1045 /* In opposition to InternetExplorer, all we should do here is
1046 * inform the embedder about the resizable change. */
1047
1048 V_VT(&arg) = VT_BOOL;
1049 V_BOOL(&arg) = Value;
1050 call_sink(This->doc_host.cps.wbe2, DISPID_WINDOWSETRESIZABLE, &dispparams);
1051
1052 return S_OK;
1053}
1054
1055static const IWebBrowser2Vtbl WebBrowser2Vtbl =
1056{
1128};
1129
1131{
1132 return CONTAINING_RECORD(iface, WebBrowser, IServiceProvider_iface);
1133}
1134
1137{
1139 return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv);
1140}
1141
1143{
1145 return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
1146}
1147
1149{
1151 return IWebBrowser2_Release(&This->IWebBrowser2_iface);
1152}
1153
1155 REFGUID guidService, REFIID riid, void **ppv)
1156{
1158
1159 if(IsEqualGUID(&SID_SHTMLWindow, riid)) {
1160 TRACE("(%p)->(SID_SHTMLWindow)\n", This);
1161 return IHTMLWindow2_QueryInterface(&This->doc_host.html_window.IHTMLWindow2_iface, riid, ppv);
1162 }
1163
1164 if(IsEqualGUID(&IID_IBrowserService2, riid)) {
1165 TRACE("(%p)->(IID_IBrowserService2 return E_FAIL)\n", This);
1166 *ppv = NULL;
1167 return E_FAIL;
1168 }
1169
1170 FIXME("(%p)->(%s, %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
1171 *ppv = NULL;
1172 return E_NOINTERFACE;
1173}
1174
1175static const IServiceProviderVtbl ServiceProviderVtbl =
1176{
1181};
1182
1184{
1185 return CONTAINING_RECORD(iface, WebBrowser, doc_host);
1186}
1187
1189{
1191 return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
1192}
1193
1195{
1197 return IWebBrowser2_Release(&This->IWebBrowser2_iface);
1198}
1199
1201{
1202 GetClientRect(This->frame_hwnd, rc);
1203}
1204
1206{
1207 return E_NOTIMPL;
1208}
1209
1211{
1212}
1213
1215{
1216}
1217
1225};
1226
1228{
1229 WebBrowser *ret;
1230 HRESULT hres;
1231
1232 TRACE("(%p %s %p) version=%d\n", outer, debugstr_guid(riid), ppv, version);
1233
1234 ret = heap_alloc_zero(sizeof(WebBrowser));
1235
1236 ret->IWebBrowser2_iface.lpVtbl = &WebBrowser2Vtbl;
1237 ret->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
1238 ret->ref = 1;
1239 ret->version = version;
1240
1241 DocHost_Init(&ret->doc_host, &ret->IWebBrowser2_iface, &DocHostContainerVtbl);
1242
1243 ret->visible = VARIANT_TRUE;
1244 ret->menu_bar = VARIANT_TRUE;
1245 ret->address_bar = VARIANT_TRUE;
1246 ret->status_bar = VARIANT_TRUE;
1247 ret->tool_bar = VARIANT_TRUE;
1248
1253
1254 HlinkFrame_Init(&ret->hlink_frame, (IUnknown*)&ret->IWebBrowser2_iface, &ret->doc_host);
1255
1256 lock_module();
1257
1258 hres = IWebBrowser2_QueryInterface(&ret->IWebBrowser2_iface, riid, ppv);
1259
1260 IWebBrowser2_Release(&ret->IWebBrowser2_iface);
1261 return hres;
1262}
1263
1265{
1266 return create_webbrowser(1, pOuter, riid, ppv);
1267}
1268
1270{
1271 return create_webbrowser(2, pOuter, riid, ppv);
1272}
PRTL_UNICODE_STRING_BUFFER Path
Type
Definition: Type.h:7
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
static LPHIST_ENTRY Top
Definition: history.c:53
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
long SHANDLE_PTR
Definition: basetsd.h:77
const GUID IID_IUnknown
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
void WebBrowser_ClassInfo_Init(WebBrowser *This)
Definition: classinfo.c:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
OLECHAR * BSTR
Definition: compat.h:2293
short VARIANT_BOOL
Definition: compat.h:2290
@ VT_BSTR
Definition: compat.h:2303
@ VT_BYREF
Definition: compat.h:2342
@ VT_BOOL
Definition: compat.h:2306
static const WCHAR version[]
Definition: asmname.c:66
static HRESULT navigate_url(HHInfo *info, LPCWSTR surl)
Definition: help.c:193
void call_sink(ConnectionPoint *This, DISPID dispid, DISPPARAMS *dispparams)
Definition: events.c:391
const WCHAR * text
Definition: package.c:1794
void DocHost_Init(DocHost *This, IWebBrowser2 *wb, const IDocHostContainerVtbl *container)
Definition: dochost.c:1106
HRESULT refresh_document(DocHost *This, const VARIANT *level)
Definition: dochost.c:572
void DocHost_Release(DocHost *This)
Definition: dochost.c:1128
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned short WORD
Definition: ntddk_ex.h:93
GLboolean enable
Definition: glext.h:11120
GLenum target
Definition: glext.h:7315
static HRESULT WINAPI WebBrowser_get_Height(IWebBrowser2 *iface, LONG *pl)
Definition: webbrowser.c:475
static HRESULT STDMETHODCALLTYPE WBServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
Definition: webbrowser.c:1154
static HRESULT WINAPI WebBrowser_get_RegisterAsBrowser(IWebBrowser2 *iface, VARIANT_BOOL *pbRegister)
Definition: webbrowser.c:923
HRESULT WINAPI WebBrowserV1_Create(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
Definition: webbrowser.c:1264
static ULONG WINAPI WebBrowser_AddRef(IWebBrowser2 *iface)
Definition: webbrowser.c:154
static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser2 *iface, REFIID riid, LPVOID *ppv)
Definition: webbrowser.c:36
static HRESULT WINAPI WebBrowser_PutProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT vtValue)
Definition: webbrowser.c:546
static HRESULT WINAPI WebBrowser_get_Silent(IWebBrowser2 *iface, VARIANT_BOOL *pbSilent)
Definition: webbrowser.c:903
static const IDocHostContainerVtbl DocHostContainerVtbl
Definition: webbrowser.c:1218
static HRESULT WINAPI WebBrowser_get_Busy(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
Definition: webbrowser.c:519
static HRESULT WINAPI WebBrowser_Navigate(IWebBrowser2 *iface, BSTR szUrl, VARIANT *Flags, VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
Definition: webbrowser.c:283
static HRESULT WINAPI WebBrowser_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
Definition: webbrowser.c:305
static HRESULT WINAPI WebBrowser_put_ToolBar(IWebBrowser2 *iface, int Value)
Definition: webbrowser.c:679
static HRESULT WINAPI WebBrowser_QueryStatusWB(IWebBrowser2 *iface, OLECMDID cmdID, OLECMDF *pcmdf)
Definition: webbrowser.c:790
static HRESULT WINAPI WebBrowser_get_AddressBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
Definition: webbrowser.c:997
static HRESULT WINAPI WebBrowser_put_Silent(IWebBrowser2 *iface, VARIANT_BOOL bSilent)
Definition: webbrowser.c:913
static HRESULT WINAPI WebBrowser_get_Application(IWebBrowser2 *iface, IDispatch **ppDisp)
Definition: webbrowser.c:321
static HRESULT WINAPI WebBrowser_ShowBrowserBar(IWebBrowser2 *iface, VARIANT *pvaClsid, VARIANT *pvarShow, VARIANT *pvarSize)
Definition: webbrowser.c:864
HRESULT WINAPI WebBrowser_Create(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
Definition: webbrowser.c:1269
static HRESULT WINAPI WebBrowser_Refresh(IWebBrowser2 *iface)
Definition: webbrowser.c:296
static HRESULT WINAPI WebBrowser_put_Top(IWebBrowser2 *iface, LONG Top)
Definition: webbrowser.c:429
static HRESULT WINAPI WebBrowser_put_Height(IWebBrowser2 *iface, LONG Height)
Definition: webbrowser.c:485
static HRESULT WINAPI WebBrowser_put_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
Definition: webbrowser.c:635
static WebBrowser * impl_from_IWebBrowser2(IWebBrowser2 *iface)
Definition: webbrowser.c:31
static ULONG WebBrowser_addref(DocHost *iface)
Definition: webbrowser.c:1188
static HRESULT WINAPI WebBrowser_put_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL bRegister)
Definition: webbrowser.c:977
static HRESULT WINAPI WebBrowser_GetProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT *pvtValue)
Definition: webbrowser.c:553
static HRESULT WINAPI WebBrowser_Invoke(IWebBrowser2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
Definition: webbrowser.c:234
static HRESULT DocHostContainer_set_status_text(DocHost *This, const WCHAR *text)
Definition: webbrowser.c:1205
static HRESULT WINAPI WebBrowser_put_Width(IWebBrowser2 *iface, LONG Width)
Definition: webbrowser.c:457
static HRESULT WINAPI WebBrowser_get_Resizable(IWebBrowser2 *iface, VARIANT_BOOL *Value)
Definition: webbrowser.c:1027
static HRESULT WINAPI WBServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, LPVOID *ppv)
Definition: webbrowser.c:1135
static HRESULT WINAPI WebBrowser_ExecWB(IWebBrowser2 *iface, OLECMDID cmdID, OLECMDEXECOPT cmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: webbrowser.c:833
static HRESULT WINAPI WebBrowser_GetIDsOfNames(IWebBrowser2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: webbrowser.c:216
static HRESULT WINAPI WebBrowser_get_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL *pbRegister)
Definition: webbrowser.c:967
static HRESULT create_webbrowser(int version, IUnknown *outer, REFIID riid, void **ppv)
Definition: webbrowser.c:1227
static HRESULT WINAPI WebBrowser_GoSearch(IWebBrowser2 *iface)
Definition: webbrowser.c:276
static HRESULT WINAPI WebBrowser_get_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL *pbFullScreen)
Definition: webbrowser.c:729
static HRESULT WINAPI WebBrowser_put_AddressBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
Definition: webbrowser.c:1007
static const IWebBrowser2Vtbl WebBrowser2Vtbl
Definition: webbrowser.c:1055
static void DocHostContainer_get_docobj_rect(DocHost *This, RECT *rc)
Definition: webbrowser.c:1200
static ULONG WINAPI WebBrowser_Release(IWebBrowser2 *iface)
Definition: webbrowser.c:162
static HRESULT WINAPI WebBrowser_get_LocationURL(IWebBrowser2 *iface, BSTR *LocationURL)
Definition: webbrowser.c:510
static ULONG WINAPI WBServiceProvider_AddRef(IServiceProvider *iface)
Definition: webbrowser.c:1142
static HRESULT WINAPI WebBrowser_get_Name(IWebBrowser2 *iface, BSTR *Name)
Definition: webbrowser.c:560
static HRESULT WINAPI WebBrowser_GoBack(IWebBrowser2 *iface)
Definition: webbrowser.c:255
static HRESULT WINAPI WebBrowser_get_ReadyState(IWebBrowser2 *iface, READYSTATE *lpReadyState)
Definition: webbrowser.c:873
static HRESULT WINAPI WebBrowser_get_Left(IWebBrowser2 *iface, LONG *pl)
Definition: webbrowser.c:391
static HRESULT WINAPI WebBrowser_GoForward(IWebBrowser2 *iface)
Definition: webbrowser.c:262
static HRESULT WINAPI WebBrowser_get_HWND(IWebBrowser2 *iface, SHANDLE_PTR *pHWND)
Definition: webbrowser.c:573
static WebBrowser * impl_from_DocHost(DocHost *iface)
Definition: webbrowser.c:1183
static HRESULT WINAPI WebBrowser_GetTypeInfoCount(IWebBrowser2 *iface, UINT *pctinfo)
Definition: webbrowser.c:188
static HRESULT WINAPI WebBrowser_put_RegisterAsDropTarget(IWebBrowser2 *iface, VARIANT_BOOL bRegister)
Definition: webbrowser.c:959
static HRESULT WINAPI WebBrowser_get_RegisterAsDropTarget(IWebBrowser2 *iface, VARIANT_BOOL *pbRegister)
Definition: webbrowser.c:945
static HRESULT WINAPI WebBrowser_put_RegisterAsBrowser(IWebBrowser2 *iface, VARIANT_BOOL bRegister)
Definition: webbrowser.c:934
static HRESULT WINAPI WebBrowser_put_Visible(IWebBrowser2 *iface, VARIANT_BOOL Value)
Definition: webbrowser.c:608
static HRESULT WINAPI WebBrowser_Stop(IWebBrowser2 *iface)
Definition: webbrowser.c:314
static HRESULT WINAPI WebBrowser_get_StatusText(IWebBrowser2 *iface, BSTR *StatusText)
Definition: webbrowser.c:655
static HRESULT WINAPI WebBrowser_put_Offline(IWebBrowser2 *iface, VARIANT_BOOL bOffline)
Definition: webbrowser.c:893
static HRESULT WINAPI WebBrowser_get_Container(IWebBrowser2 *iface, IDispatch **ppDisp)
Definition: webbrowser.c:342
static HRESULT WINAPI WebBrowser_get_FullName(IWebBrowser2 *iface, BSTR *FullName)
Definition: webbrowser.c:584
static HRESULT WINAPI WebBrowser_get_Path(IWebBrowser2 *iface, BSTR *Path)
Definition: webbrowser.c:591
static HRESULT WINAPI WebBrowser_get_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
Definition: webbrowser.c:699
static HRESULT WINAPI WebBrowser_put_Left(IWebBrowser2 *iface, LONG Left)
Definition: webbrowser.c:401
static HRESULT WINAPI WebBrowser_get_Offline(IWebBrowser2 *iface, VARIANT_BOOL *pbOffline)
Definition: webbrowser.c:883
static HRESULT WINAPI WebBrowser_put_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
Definition: webbrowser.c:709
static HRESULT WINAPI WebBrowser_get_Top(IWebBrowser2 *iface, LONG *pl)
Definition: webbrowser.c:419
static ULONG WINAPI WBServiceProvider_Release(IServiceProvider *iface)
Definition: webbrowser.c:1148
static HRESULT WINAPI WebBrowser_put_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL bFullScreen)
Definition: webbrowser.c:739
static HRESULT WINAPI WebBrowser_Quit(IWebBrowser2 *iface)
Definition: webbrowser.c:529
static HRESULT WINAPI WebBrowser_get_Visible(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
Definition: webbrowser.c:598
static HRESULT WINAPI WebBrowser_GetTypeInfo(IWebBrowser2 *iface, UINT iTInfo, LCID lcid, LPTYPEINFO *ppTInfo)
Definition: webbrowser.c:198
static HRESULT WINAPI WebBrowser_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VARIANT *Flags, VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
Definition: webbrowser.c:759
static HRESULT WINAPI WebBrowser_ClientToWindow(IWebBrowser2 *iface, int *pcx, int *pcy)
Definition: webbrowser.c:539
static const IServiceProviderVtbl ServiceProviderVtbl
Definition: webbrowser.c:1175
static HRESULT WINAPI WebBrowser_get_Width(IWebBrowser2 *iface, LONG *pl)
Definition: webbrowser.c:447
static HRESULT WINAPI WebBrowser_get_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
Definition: webbrowser.c:625
static HRESULT WINAPI WebBrowser_get_Document(IWebBrowser2 *iface, IDispatch **ppDisp)
Definition: webbrowser.c:349
static ULONG WebBrowser_release(DocHost *iface)
Definition: webbrowser.c:1194
static void DocHostContainer_on_command_state_change(DocHost *This, LONG command, BOOL enable)
Definition: webbrowser.c:1210
static HRESULT WINAPI WebBrowser_get_ToolBar(IWebBrowser2 *iface, int *Value)
Definition: webbrowser.c:669
static HRESULT WINAPI WebBrowser_get_Parent(IWebBrowser2 *iface, IDispatch **ppDisp)
Definition: webbrowser.c:335
static void DocHostContainer_set_url(DocHost *This, const WCHAR *url)
Definition: webbrowser.c:1214
static HRESULT WINAPI WebBrowser_put_Resizable(IWebBrowser2 *iface, VARIANT_BOOL Value)
Definition: webbrowser.c:1037
static HRESULT WINAPI WebBrowser_get_LocationName(IWebBrowser2 *iface, BSTR *LocationName)
Definition: webbrowser.c:503
static WebBrowser * impl_from_IServiceProvider(IServiceProvider *iface)
Definition: webbrowser.c:1130
static HRESULT WINAPI WebBrowser_put_StatusText(IWebBrowser2 *iface, BSTR StatusText)
Definition: webbrowser.c:662
static HRESULT WINAPI WebBrowser_GoHome(IWebBrowser2 *iface)
Definition: webbrowser.c:269
static HRESULT WINAPI WebBrowser_get_TopLevelContainer(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
Definition: webbrowser.c:377
static HRESULT WINAPI WebBrowser_get_Type(IWebBrowser2 *iface, BSTR *Type)
Definition: webbrowser.c:384
void WebBrowser_ViewObject_Init(WebBrowser *) DECLSPEC_HIDDEN
Definition: view.c:253
BOOL HlinkFrame_QI(HlinkFrame *, REFIID, void **) DECLSPEC_HIDDEN
Definition: navigate.c:1666
HRESULT go_forward(DocHost *) DECLSPEC_HIDDEN
Definition: navigate.c:1132
void HlinkFrame_Init(HlinkFrame *, IUnknown *, DocHost *) DECLSPEC_HIDDEN
Definition: navigate.c:1694
static void lock_module(void)
Definition: ieframe.h:335
HRESULT get_location_url(DocHost *, BSTR *) DECLSPEC_HIDDEN
Definition: navigate.c:1142
HRESULT go_back(DocHost *) DECLSPEC_HIDDEN
Definition: navigate.c:1122
static void unlock_module(void)
Definition: ieframe.h:339
void WebBrowser_OleObject_Init(WebBrowser *) DECLSPEC_HIDDEN
Definition: oleobject.c:1199
void WebBrowser_Persist_Init(WebBrowser *) DECLSPEC_HIDDEN
Definition: persist.c:279
HRESULT go_home(DocHost *) DECLSPEC_HIDDEN
Definition: navigate.c:1065
void WebBrowser_OleObject_Destroy(WebBrowser *) DECLSPEC_HIDDEN
Definition: oleobject.c:1222
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
const IID IID_IObjectWithSite
static const WCHAR url[]
Definition: encode.c:1432
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
HRESULT hres
Definition: protocol.c:465
IHTMLDocument2 * html_doc
Definition: xmlview.c:53
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:52
unsigned int UINT
Definition: ndis.h:50
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
#define V_BOOL(A)
Definition: oleauto.h:224
#define V_BSTRREF(A)
Definition: oleauto.h:227
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
const GUID IID_IOleInPlaceActiveObject
const GUID IID_IOleInPlaceSite
const GUID IID_IViewObject
const GUID IID_IOleCache
const GUID IID_IConnectionPointContainer
const GUID IID_IProvideClassInfo
const GUID IID_IOleWindow
const GUID IID_IViewObject2
const GUID IID_IRunnableObject
const GUID IID_IProvideClassInfo2
const GUID IID_IDataObject
const GUID IID_IDispatch
const GUID IID_IOleInPlaceObject
const GUID IID_IPersistStorage
const GUID IID_IPersistMemory
const GUID IID_IOleLink
const GUID IID_IOleObject
const GUID IID_IOleControl
const GUID IID_IPerPropertyBrowsing
const GUID IID_IPersistStreamInit
long LONG
Definition: pedump.c:60
const GUID IID_IPersist
Definition: proxy.cpp:14
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
DWORD LCID
Definition: nls.h:13
#define TRACE(s)
Definition: solgame.cpp:4
& rect
Definition: startmenu.cpp:1413
Definition: scsiwmi.h:51
Definition: send.c:48
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88
int ret
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
#define DISPID_ONSTATUSBAR
Definition: webchild.h:59
#define DISPID_ONTOOLBAR
Definition: webchild.h:57
#define DISPID_ONADDRESSBAR
Definition: webchild.h:63
#define DISPID_WINDOWSETRESIZABLE
Definition: webchild.h:64
#define DISPID_ONFULLSCREEN
Definition: webchild.h:60
#define DISPID_ONVISIBLE
Definition: webchild.h:56
#define DISPID_ONMENUBAR
Definition: webchild.h:58
#define DISPID_ONTHEATERMODE
Definition: webchild.h:62
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
void * arg
Definition: msvc.h:10
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_UNEXPECTED
Definition: winerror.h:2456
#define E_POINTER
Definition: winerror.h:2365
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_ PSTRING FullName
Definition: rtlfuncs.h:1662
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185