ReactOS  0.4.14-dev-49-gfb4591c
webbrowser.c
Go to the documentation of this file.
1 /*
2  * WebBrowser Implementation
3  *
4  * Copyright 2005 James Hawkins
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #include "hhctrl.h"
22 #include "resource.h"
23 
24 #include "wine/debug.h"
25 
27 
29 {
30  return CONTAINING_RECORD(iface, WebBrowserContainer, IOleClientSite_iface);
31 }
32 
34 {
36 
37  if (IsEqualIID(riid, &IID_IUnknown)) {
38  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppvObj);
39  *ppvObj = &This->IOleClientSite_iface;
40  }else if(IsEqualIID(riid, &IID_IOleClientSite)) {
41  TRACE("(%p)->(IID_IOleClientSite %p)\n", This, ppvObj);
42  *ppvObj = &This->IOleClientSite_iface;
43  }else if (IsEqualIID(riid, &IID_IOleInPlaceSite)) {
44  TRACE("(%p)->(IID_IOleInPlaceSite %p)\n", This, ppvObj);
45  *ppvObj = &This->IOleInPlaceSite_iface;
46  }else if (IsEqualIID(riid, &IID_IOleInPlaceFrame)) {
47  TRACE("(%p)->(IID_IOleInPlaceFrame %p)\n", This, ppvObj);
48  *ppvObj = &This->IOleInPlaceSite_iface;
49  }else if (IsEqualIID(riid, &IID_IDocHostUIHandler)) {
50  TRACE("(%p)->(IID_IDocHostUIHandler %p)\n", This, ppvObj);
51  *ppvObj = &This->IDocHostUIHandler_iface;
52  }else {
53  TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObj);
54  *ppvObj = NULL;
55  return E_NOINTERFACE;
56  }
57 
58  IUnknown_AddRef((IUnknown*)*ppvObj);
59  return S_OK;
60 }
61 
63 {
66 
67  TRACE("(%p) ref=%d\n", This, ref);
68 
69  return ref;
70 }
71 
73 {
76 
77  TRACE("(%p) ref=%d\n", This, ref);
78 
79  if(!ref) {
80  if(This->ole_obj)
81  IOleObject_Release(This->ole_obj);
82  if(This->web_browser)
83  IWebBrowser2_Release(This->web_browser);
84  heap_free(This);
85  }
86 
87  return ref;
88 }
89 
91 {
92  return E_NOTIMPL;
93 }
94 
95 static HRESULT STDMETHODCALLTYPE Site_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
96 {
97  return E_NOTIMPL;
98 }
99 
100 static HRESULT STDMETHODCALLTYPE Site_GetContainer(IOleClientSite *iface, LPOLECONTAINER *ppContainer)
101 {
102  *ppContainer = NULL;
103 
104  return E_NOINTERFACE;
105 }
106 
108 {
109  return NOERROR;
110 }
111 
113 {
114  return E_NOTIMPL;
115 }
116 
118 {
119  return E_NOTIMPL;
120 }
121 
122 static const IOleClientSiteVtbl OleClientSiteVtbl =
123 {
125  Site_AddRef,
126  Site_Release,
133 };
134 
136 {
137  return CONTAINING_RECORD(iface, WebBrowserContainer, IDocHostUIHandler_iface);
138 }
139 
141 {
143 
144  return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppvObj);
145 }
146 
148 {
150 
151  return IOleClientSite_AddRef(&This->IOleClientSite_iface);
152 }
153 
155 {
157 
158  return IOleClientSite_Release(&This->IOleClientSite_iface);
159 }
160 
161 static HRESULT STDMETHODCALLTYPE UI_ShowContextMenu(IDocHostUIHandler *iface, DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved)
162 {
164  DWORD cmdid, menu_id = 0;
165  HMENU menu, submenu;
166 
167  TRACE("(%p)->(%d %s)\n", This, dwID, wine_dbgstr_point(ppt));
168 
170  if (!menu)
171  return S_OK;
172 
173  /* FIXME: Support more menu types. */
174  if(dwID == CONTEXT_MENU_TEXTSELECT)
175  menu_id = 1;
176 
177  submenu = GetSubMenu(menu, menu_id);
178 
180  ppt->x, ppt->y, 0, This->hwndWindow, NULL);
181  DestroyMenu(menu);
182 
183  switch(cmdid) {
184  case IDTB_BACK:
186  break;
187  case IDTB_FORWARD:
189  break;
190  case MIID_SELECTALL:
191  IWebBrowser2_ExecWB(This->web_browser, OLECMDID_SELECTALL, 0, NULL, NULL);
192  break;
193  case MIID_VIEWSOURCE:
194  FIXME("View source\n");
195  break;
196  case IDTB_PRINT:
198  break;
199  case IDTB_REFRESH:
201  break;
202  case MIID_PROPERTIES:
203  FIXME("Properties\n");
204  break;
205  case MIID_COPY:
206  IWebBrowser2_ExecWB(This->web_browser, OLECMDID_COPY, 0, NULL, NULL);
207  break;
208  case MIID_PASTE:
209  IWebBrowser2_ExecWB(This->web_browser, OLECMDID_PASTE, 0, NULL, NULL);
210  break;
211  case MIID_CUT:
212  IWebBrowser2_ExecWB(This->web_browser, OLECMDID_CUT, 0, NULL, NULL);
213  break;
214  }
215 
216  return S_OK;
217 }
218 
219 static HRESULT STDMETHODCALLTYPE UI_GetHostInfo(IDocHostUIHandler *iface, DOCHOSTUIINFO *pInfo)
220 {
221  pInfo->cbSize = sizeof(DOCHOSTUIINFO);
222  pInfo->dwFlags = DOCHOSTUIFLAG_NO3DBORDER;
223  pInfo->dwDoubleClick = DOCHOSTUIDBLCLK_DEFAULT;
224 
225  return S_OK;
226 }
227 
229 {
230  return S_OK;
231 }
232 
234 {
235  return S_OK;
236 }
237 
239 {
240  return S_OK;
241 }
242 
244 {
245  return S_OK;
246 }
247 
249 {
250  return S_OK;
251 }
252 
254 {
255  return S_OK;
256 }
257 
259 {
260  return S_OK;
261 }
262 
263 static HRESULT STDMETHODCALLTYPE UI_TranslateAccelerator(IDocHostUIHandler *iface, LPMSG lpMsg, const GUID *pguidCmdGroup, DWORD nCmdID)
264 {
265  return S_FALSE;
266 }
267 
269 {
270  return S_FALSE;
271 }
272 
274 {
275  return S_FALSE;
276 }
277 
279 {
280  *ppDispatch = NULL;
281  return S_FALSE;
282 }
283 
284 static HRESULT STDMETHODCALLTYPE UI_TranslateUrl(IDocHostUIHandler *iface, DWORD dwTranslate, OLECHAR *pchURLIn, OLECHAR **ppchURLOut)
285 {
286  *ppchURLOut = NULL;
287  return S_FALSE;
288 }
289 
291 {
292  *ppDORet = NULL;
293  return S_FALSE;
294 }
295 
296 static const IDocHostUIHandlerVtbl DocHostUIHandlerVtbl =
297 {
299  UI_AddRef,
300  UI_Release,
303  UI_ShowUI,
304  UI_HideUI,
305  UI_UpdateUI,
316 };
317 
319 {
320  return CONTAINING_RECORD(iface, WebBrowserContainer, IOleInPlaceSite_iface);
321 }
322 
324 {
326 
327  return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppvObj);
328 }
329 
331 {
333 
334  return IOleClientSite_AddRef(&This->IOleClientSite_iface);
335 }
336 
338 {
340 
341  return IOleClientSite_Release(&This->IOleClientSite_iface);
342 }
343 
345 {
347 
348  *lphwnd = This->hwndWindow;
349  return S_OK;
350 }
351 
353 {
354  return E_NOTIMPL;
355 }
356 
358 {
359  return S_OK;
360 }
361 
363 {
364  return S_OK;
365 }
366 
368 {
369  return S_OK;
370 }
371 
372 static HRESULT STDMETHODCALLTYPE InPlace_GetWindowContext(IOleInPlaceSite *iface, LPOLEINPLACEFRAME *lplpFrame, LPOLEINPLACEUIWINDOW *lplpDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
373 {
375 
376  *lplpFrame = &This->IOleInPlaceFrame_iface;
377  IOleInPlaceFrame_AddRef(&This->IOleInPlaceFrame_iface);
378 
379  *lplpDoc = NULL;
380 
381  lpFrameInfo->fMDIApp = FALSE;
382  lpFrameInfo->hwndFrame = This->hwndWindow;
383  lpFrameInfo->haccel = NULL;
384  lpFrameInfo->cAccelEntries = 0;
385 
386  return S_OK;
387 }
388 
390 {
391  return E_NOTIMPL;
392 }
393 
395 {
396  return S_OK;
397 }
398 
400 {
401  return S_OK;
402 }
403 
405 {
406  return E_NOTIMPL;
407 }
408 
410 {
411  return E_NOTIMPL;
412 }
413 
415 {
417  IOleInPlaceObject *inplace;
418 
419  if (IOleObject_QueryInterface(This->ole_obj, &IID_IOleInPlaceObject,
420  (void **)&inplace) == S_OK)
421  {
422  IOleInPlaceObject_SetObjectRects(inplace, lprcPosRect, lprcPosRect);
423  IOleInPlaceObject_Release(inplace);
424  }
425 
426  return S_OK;
427 }
428 
429 static const IOleInPlaceSiteVtbl OleInPlaceSiteVtbl =
430 {
446 };
447 
449 {
450  return CONTAINING_RECORD(iface, WebBrowserContainer, IOleInPlaceFrame_iface);
451 }
452 
454 {
456 
457  return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppvObj);
458 }
459 
461 {
463 
464  return IOleClientSite_AddRef(&This->IOleClientSite_iface);
465 }
466 
468 {
470 
471  return IOleClientSite_Release(&This->IOleClientSite_iface);
472 }
473 
475 {
477 
478  *lphwnd = This->hwndWindow;
479  return S_OK;
480 }
481 
483 {
484  return E_NOTIMPL;
485 }
486 
488 {
489  return E_NOTIMPL;
490 }
491 
492 static HRESULT STDMETHODCALLTYPE Frame_RequestBorderSpace(IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
493 {
494  return E_NOTIMPL;
495 }
496 
497 static HRESULT STDMETHODCALLTYPE Frame_SetBorderSpace(IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
498 {
499  return E_NOTIMPL;
500 }
501 
502 static HRESULT STDMETHODCALLTYPE Frame_SetActiveObject(IOleInPlaceFrame *iface, IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
503 {
504  return S_OK;
505 }
506 
507 static HRESULT STDMETHODCALLTYPE Frame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
508 {
509  return E_NOTIMPL;
510 }
511 
512 static HRESULT STDMETHODCALLTYPE Frame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject)
513 {
514  return S_OK;
515 }
516 
518 {
519  return E_NOTIMPL;
520 }
521 
522 static HRESULT STDMETHODCALLTYPE Frame_SetStatusText(IOleInPlaceFrame *iface, LPCOLESTR pszStatusText)
523 {
524  return S_OK;
525 }
526 
528 {
529  return S_OK;
530 }
531 
533 {
534  return E_NOTIMPL;
535 }
536 
537 static const IOleInPlaceFrameVtbl OleInPlaceFrameVtbl =
538 {
540  Frame_AddRef,
554 };
555 
557 {
558  return E_NOTIMPL;
559 }
560 
562 {
563  return 1;
564 }
565 
567 {
568  return 2;
569 }
570 
571 static HRESULT STDMETHODCALLTYPE Storage_CreateStream(IStorage *This, const WCHAR *pwcsName, DWORD grfMode, DWORD reserved1, DWORD reserved2, IStream **ppstm)
572 {
573  return E_NOTIMPL;
574 }
575 
576 static HRESULT STDMETHODCALLTYPE Storage_OpenStream(IStorage *This, const WCHAR * pwcsName, void *reserved1, DWORD grfMode, DWORD reserved2, IStream **ppstm)
577 {
578  return E_NOTIMPL;
579 }
580 
581 static HRESULT STDMETHODCALLTYPE Storage_CreateStorage(IStorage *This, const WCHAR *pwcsName, DWORD grfMode, DWORD reserved1, DWORD reserved2, IStorage **ppstg)
582 {
583  return E_NOTIMPL;
584 }
585 
586 static HRESULT STDMETHODCALLTYPE Storage_OpenStorage(IStorage *This, const WCHAR * pwcsName, IStorage * pstgPriority, DWORD grfMode, SNB snbExclude, DWORD reserved, IStorage **ppstg)
587 {
588  return E_NOTIMPL;
589 }
590 
591 static HRESULT STDMETHODCALLTYPE Storage_CopyTo(IStorage *This, DWORD ciidExclude, IID const *rgiidExclude, SNB snbExclude,IStorage *pstgDest)
592 {
593  return E_NOTIMPL;
594 }
595 
596 static HRESULT STDMETHODCALLTYPE Storage_MoveElementTo(IStorage *This, const OLECHAR *pwcsName,IStorage * pstgDest, const OLECHAR *pwcsNewName, DWORD grfFlags)
597 {
598  return E_NOTIMPL;
599 }
600 
602 {
603  return E_NOTIMPL;
604 }
605 
607 {
608  return E_NOTIMPL;
609 }
610 
612 {
613  return E_NOTIMPL;
614 }
615 
617 {
618  return E_NOTIMPL;
619 }
620 
621 static HRESULT STDMETHODCALLTYPE Storage_RenameElement(IStorage *This, const WCHAR *pwcsOldName, const WCHAR *pwcsNewName)
622 {
623  return E_NOTIMPL;
624 }
625 
626 static HRESULT STDMETHODCALLTYPE Storage_SetElementTimes(IStorage *This, const WCHAR *pwcsName, FILETIME const *pctime, FILETIME const *patime, FILETIME const *pmtime)
627 {
628  return E_NOTIMPL;
629 }
630 
632 {
633  return S_OK;
634 }
635 
637 {
638  return E_NOTIMPL;
639 }
640 
641 static HRESULT STDMETHODCALLTYPE Storage_Stat(IStorage *This, STATSTG *pstatstg, DWORD grfStatFlag)
642 {
643  return E_NOTIMPL;
644 }
645 
646 static const IStorageVtbl MyIStorageTable =
647 {
666 };
667 
669 
671 {
673  IOleInPlaceObject *inplace;
674  HRESULT hr;
675  RECT rc;
676 
677  container = heap_alloc_zero(sizeof(*container));
678  if (!container)
679  return FALSE;
680 
681  container->IOleClientSite_iface.lpVtbl = &OleClientSiteVtbl;
682  container->IOleInPlaceSite_iface.lpVtbl = &OleInPlaceSiteVtbl;
683  container->IOleInPlaceFrame_iface.lpVtbl = &OleInPlaceFrameVtbl;
684  container->IDocHostUIHandler_iface.lpVtbl = &DocHostUIHandlerVtbl;
685  container->ref = 1;
686  container->hwndWindow = hwndParent;
687 
688  info->web_browser = container;
689 
690  hr = OleCreate(&CLSID_WebBrowser, &IID_IOleObject, OLERENDER_DRAW, 0,
691  &container->IOleClientSite_iface, &MyIStorage,
692  (void **)&container->ole_obj);
693 
694  if (FAILED(hr)) goto error;
695 
697 
698  hr = OleSetContainedObject((struct IUnknown *)container->ole_obj, TRUE);
699  if (FAILED(hr)) goto error;
700 
701  hr = IOleObject_DoVerb(container->ole_obj, OLEIVERB_SHOW, NULL,
702  &container->IOleClientSite_iface, -1, hwndParent, &rc);
703  if (FAILED(hr)) goto error;
704 
705  hr = IOleObject_QueryInterface(container->ole_obj, &IID_IOleInPlaceObject, (void**)&inplace);
706  if (FAILED(hr)) goto error;
707 
708  IOleInPlaceObject_SetObjectRects(inplace, &rc, &rc);
709  IOleInPlaceObject_Release(inplace);
710 
711  hr = IOleObject_QueryInterface(container->ole_obj, &IID_IWebBrowser2, (void **)&container->web_browser);
712  if (SUCCEEDED(hr))
713  return TRUE;
714 
715 error:
717  return FALSE;
718 }
719 
721 {
722  WebBrowserContainer *container = info->web_browser;
723  HRESULT hres;
724 
725  if(!container)
726  return;
727 
728  if(container->ole_obj) {
729  IOleInPlaceSite *inplace;
730 
731  hres = IOleObject_QueryInterface(container->ole_obj, &IID_IOleInPlaceSite, (void**)&inplace);
732  if(SUCCEEDED(hres)) {
733  IOleInPlaceSite_OnInPlaceDeactivate(inplace);
734  IOleInPlaceSite_Release(inplace);
735  }
736 
737  IOleObject_SetClientSite(container->ole_obj, NULL);
738  }
739 
740  info->web_browser = NULL;
741  IOleClientSite_Release(&container->IOleClientSite_iface);
742 }
743 
745 {
746  if (!info->web_browser)
747  return;
748 
749  IWebBrowser2_put_Width(info->web_browser->web_browser, dwWidth);
750  IWebBrowser2_put_Height(info->web_browser->web_browser, dwHeight);
751 }
752 
754 {
755  if (!container || !container->web_browser)
756  return;
757 
758  switch (dwAction)
759  {
760  case WB_GOBACK:
761  IWebBrowser2_GoBack(container->web_browser);
762  break;
763  case WB_GOFORWARD:
764  IWebBrowser2_GoForward(container->web_browser);
765  break;
766  case WB_GOHOME:
767  IWebBrowser2_GoHome(container->web_browser);
768  break;
769  case WB_SEARCH:
770  IWebBrowser2_GoSearch(container->web_browser);
771  break;
772  case WB_REFRESH:
773  IWebBrowser2_Refresh(container->web_browser);
774  break;
775  case WB_STOP:
776  IWebBrowser2_Stop(container->web_browser);
777  break;
778  case WB_PRINT:
779  IWebBrowser2_ExecWB(container->web_browser, OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, 0, 0);
780  break;
781  }
782 }
static HRESULT STDMETHODCALLTYPE Frame_TranslateAccelerator(IOleInPlaceFrame *iface, LPMSG lpmsg, WORD wID)
Definition: webbrowser.c:532
const GUID IID_IOleInPlaceFrame
WCHAR OLECHAR
Definition: compat.h:1933
static HRESULT STDMETHODCALLTYPE UI_UpdateUI(IDocHostUIHandler *iface)
Definition: webbrowser.c:238
#define WB_PRINT
Definition: hhctrl.h:52
static HRESULT STDMETHODCALLTYPE UI_HideUI(IDocHostUIHandler *iface)
Definition: webbrowser.c:233
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
static HRESULT STDMETHODCALLTYPE InPlace_QueryInterface(IOleInPlaceSite *iface, REFIID riid, LPVOID *ppvObj)
Definition: webbrowser.c:323
#define E_NOINTERFACE
Definition: winerror.h:2364
static HRESULT STDMETHODCALLTYPE Storage_Stat(IStorage *This, STATSTG *pstatstg, DWORD grfStatFlag)
Definition: webbrowser.c:641
BOOL InitWebBrowser(HHInfo *info, HWND hwndParent)
Definition: webbrowser.c:670
long y
Definition: polytest.cpp:48
HRESULT hr
Definition: shlfolder.c:183
#define error(str)
Definition: mkdosfs.c:1605
static ULONG STDMETHODCALLTYPE Storage_AddRef(IStorage *This)
Definition: webbrowser.c:561
#define NOERROR
Definition: winerror.h:2354
#define WB_STOP
Definition: hhctrl.h:51
static HRESULT STDMETHODCALLTYPE Storage_QueryInterface(IStorage *This, REFIID riid, LPVOID *ppvObj)
Definition: webbrowser.c:556
long x
Definition: polytest.cpp:48
static HRESULT STDMETHODCALLTYPE InPlace_OnUIActivate(IOleInPlaceSite *iface)
Definition: webbrowser.c:367
#define TPM_LEFTALIGN
Definition: winuser.h:2352
static HRESULT STDMETHODCALLTYPE InPlace_OnUIDeactivate(IOleInPlaceSite *iface, BOOL fUndoable)
Definition: webbrowser.c:394
REFIID riid
Definition: precomp.h:44
const GUID IID_IOleInPlaceSite
#define REFCLSID
Definition: guiddef.h:117
static HRESULT STDMETHODCALLTYPE Site_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppvObj)
Definition: webbrowser.c:33
const GUID IID_IOleClientSite
#define TPM_RETURNCMD
Definition: winuser.h:2362
static HRESULT STDMETHODCALLTYPE Frame_GetWindow(IOleInPlaceFrame *iface, HWND *lphwnd)
Definition: webbrowser.c:474
#define WB_GOBACK
Definition: hhctrl.h:46
static HRESULT STDMETHODCALLTYPE InPlace_OnInPlaceDeactivate(IOleInPlaceSite *iface)
Definition: webbrowser.c:399
#define IDTB_PRINT
Definition: htmlhelp.h:132
static const IOleClientSiteVtbl OleClientSiteVtbl
Definition: webbrowser.c:122
static HRESULT STDMETHODCALLTYPE Frame_RequestBorderSpace(IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
Definition: webbrowser.c:492
static HRESULT STDMETHODCALLTYPE InPlace_DiscardUndoState(IOleInPlaceSite *iface)
Definition: webbrowser.c:404
static HRESULT STDMETHODCALLTYPE UI_GetExternal(IDocHostUIHandler *iface, IDispatch **ppDispatch)
Definition: webbrowser.c:278
static ULONG STDMETHODCALLTYPE UI_Release(IDocHostUIHandler *iface)
Definition: webbrowser.c:154
static HRESULT STDMETHODCALLTYPE InPlace_Scroll(IOleInPlaceSite *iface, SIZE scrollExtent)
Definition: webbrowser.c:389
static HRESULT STDMETHODCALLTYPE UI_TranslateAccelerator(IDocHostUIHandler *iface, LPMSG lpMsg, const GUID *pguidCmdGroup, DWORD nCmdID)
Definition: webbrowser.c:263
static HRESULT STDMETHODCALLTYPE InPlace_DeactivateAndUndo(IOleInPlaceSite *iface)
Definition: webbrowser.c:409
static HRESULT STDMETHODCALLTYPE Site_SaveObject(IOleClientSite *iface)
Definition: webbrowser.c:90
#define MIID_VIEWSOURCE
Definition: resource.h:49
static HRESULT STDMETHODCALLTYPE UI_GetDropTarget(IDocHostUIHandler *iface, IDropTarget *pDropTarget, IDropTarget **ppDropTarget)
Definition: webbrowser.c:273
static HRESULT STDMETHODCALLTYPE Frame_SetStatusText(IOleInPlaceFrame *iface, LPCOLESTR pszStatusText)
Definition: webbrowser.c:522
static const IStorageVtbl MyIStorageTable
Definition: webbrowser.c:646
static ULONG STDMETHODCALLTYPE UI_AddRef(IDocHostUIHandler *iface)
Definition: webbrowser.c:147
static HRESULT STDMETHODCALLTYPE Frame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hmenuShared)
Definition: webbrowser.c:517
void ReleaseWebBrowser(HHInfo *info)
Definition: webbrowser.c:720
static HRESULT STDMETHODCALLTYPE InPlace_OnInPlaceActivate(IOleInPlaceSite *iface)
Definition: webbrowser.c:362
static LPOLESTR
Definition: stg_prop.c:27
static HRESULT STDMETHODCALLTYPE Frame_ContextSensitiveHelp(IOleInPlaceFrame *iface, BOOL fEnterMode)
Definition: webbrowser.c:482
Definition: send.c:47
uint8_t reserved3
Definition: fsck.fat.h:61
void ResizeWebBrowser(HHInfo *info, DWORD dwWidth, DWORD dwHeight)
Definition: webbrowser.c:744
#define IDTB_FORWARD
Definition: htmlhelp.h:134
static HRESULT STDMETHODCALLTYPE UI_TranslateUrl(IDocHostUIHandler *iface, DWORD dwTranslate, OLECHAR *pchURLIn, OLECHAR **ppchURLOut)
Definition: webbrowser.c:284
static HRESULT STDMETHODCALLTYPE Storage_Commit(IStorage *This, DWORD grfCommitFlags)
Definition: webbrowser.c:601
struct container container
#define TPM_RIGHTBUTTON
Definition: winuser.h:2355
static ULONG STDMETHODCALLTYPE Frame_AddRef(IOleInPlaceFrame *iface)
Definition: webbrowser.c:460
static WebBrowserContainer * impl_from_IOleInPlaceSite(IOleInPlaceSite *iface)
Definition: webbrowser.c:318
void DoPageAction(WebBrowserContainer *container, DWORD dwAction)
Definition: webbrowser.c:753
unsigned int BOOL
Definition: ntddk_ex.h:94
static HRESULT STDMETHODCALLTYPE Storage_DestroyElement(IStorage *This, const OLECHAR *pwcsName)
Definition: webbrowser.c:616
long LONG
Definition: pedump.c:60
#define IDTB_BACK
Definition: htmlhelp.h:129
GLenum GLint ref
Definition: glext.h:6028
#define FIXME(fmt,...)
Definition: debug.h:110
static HRESULT STDMETHODCALLTYPE InPlace_ContextSensitiveHelp(IOleInPlaceSite *iface, BOOL fEnterMode)
Definition: webbrowser.c:352
r reserved
Definition: btrfs.c:2893
#define S_FALSE
Definition: winerror.h:2357
#define WB_REFRESH
Definition: hhctrl.h:50
static HRESULT STDMETHODCALLTYPE Frame_SetActiveObject(IOleInPlaceFrame *iface, IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
Definition: webbrowser.c:502
smooth NULL
Definition: ftsmooth.c:416
static HWND hwndParent
Definition: cryptui.c:300
static HRESULT STDMETHODCALLTYPE Site_GetContainer(IOleClientSite *iface, LPOLECONTAINER *ppContainer)
Definition: webbrowser.c:100
static HRESULT STDMETHODCALLTYPE InPlace_CanInPlaceActivate(IOleInPlaceSite *iface)
Definition: webbrowser.c:357
static const IOleInPlaceSiteVtbl OleInPlaceSiteVtbl
Definition: webbrowser.c:429
#define WB_GOFORWARD
Definition: hhctrl.h:47
static HRESULT STDMETHODCALLTYPE Storage_EnumElements(IStorage *This, DWORD reserved1, void *reserved2, DWORD reserved3, IEnumSTATSTG **ppenum)
Definition: webbrowser.c:611
#define debugstr_guid
Definition: kernel32.h:35
static HRESULT STDMETHODCALLTYPE Storage_SetStateBits(IStorage *This, DWORD grfStateBits, DWORD grfMask)
Definition: webbrowser.c:636
static HRESULT STDMETHODCALLTYPE InPlace_GetWindowContext(IOleInPlaceSite *iface, LPOLEINPLACEFRAME *lplpFrame, LPOLEINPLACEUIWINDOW *lplpDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
Definition: webbrowser.c:372
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
const GUID IID_IOleInPlaceObject
static const WCHAR dwHeight[]
Definition: provider.c:60
const GUID IID_IOleObject
static const IOleInPlaceFrameVtbl OleInPlaceFrameVtbl
Definition: webbrowser.c:537
static HRESULT STDMETHODCALLTYPE UI_QueryInterface(IDocHostUIHandler *iface, REFIID riid, LPVOID *ppvObj)
Definition: webbrowser.c:140
const char * wine_dbgstr_point(const POINT *guid)
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
uint8_t reserved2[12]
Definition: fsck.fat.h:58
static ULONG STDMETHODCALLTYPE InPlace_AddRef(IOleInPlaceSite *iface)
Definition: webbrowser.c:330
__wchar_t WCHAR
Definition: xmlstorage.h:180
static HRESULT STDMETHODCALLTYPE Site_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
Definition: webbrowser.c:95
static HRESULT STDMETHODCALLTYPE InPlace_GetWindow(IOleInPlaceSite *iface, HWND *lphwnd)
Definition: webbrowser.c:344
LONG HRESULT
Definition: typedefs.h:77
HRESULT WINAPI OleCreate(REFCLSID rclsid, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID *ppvObj)
Definition: ole2.c:2612
const GUID IID_IUnknown
static HRESULT STDMETHODCALLTYPE Site_OnShowWindow(IOleClientSite *iface, BOOL fShow)
Definition: webbrowser.c:112
static HRESULT STDMETHODCALLTYPE UI_OnFrameWindowActivate(IDocHostUIHandler *iface, BOOL fActivate)
Definition: webbrowser.c:253
static HRESULT STDMETHODCALLTYPE Frame_QueryInterface(IOleInPlaceFrame *iface, REFIID riid, LPVOID *ppvObj)
Definition: webbrowser.c:453
Definition: hhctrl.h:185
static HRESULT STDMETHODCALLTYPE UI_ResizeBorder(IDocHostUIHandler *iface, LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow)
Definition: webbrowser.c:258
static IStorage MyIStorage
Definition: webbrowser.c:668
static HRESULT STDMETHODCALLTYPE Storage_SetClass(IStorage *This, REFCLSID clsid)
Definition: webbrowser.c:631
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT WINAPI OleSetContainedObject(LPUNKNOWN pUnknown, BOOL fContained)
Definition: ole2.c:1171
static HRESULT STDMETHODCALLTYPE Storage_OpenStream(IStorage *This, const WCHAR *pwcsName, void *reserved1, DWORD grfMode, DWORD reserved2, IStream **ppstm)
Definition: webbrowser.c:576
REFIID LPVOID DWORD dw
Definition: atlbase.h:40
#define WB_GOHOME
Definition: hhctrl.h:48
static HRESULT STDMETHODCALLTYPE Frame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
Definition: webbrowser.c:507
static HRESULT STDMETHODCALLTYPE Storage_CopyTo(IStorage *This, DWORD ciidExclude, IID const *rgiidExclude, SNB snbExclude, IStorage *pstgDest)
Definition: webbrowser.c:591
static ULONG STDMETHODCALLTYPE Storage_Release(IStorage *This)
Definition: webbrowser.c:566
static HRESULT STDMETHODCALLTYPE Site_RequestNewObjectLayout(IOleClientSite *iface)
Definition: webbrowser.c:117
static HRESULT STDMETHODCALLTYPE Storage_RenameElement(IStorage *This, const WCHAR *pwcsOldName, const WCHAR *pwcsNewName)
Definition: webbrowser.c:621
static HRESULT STDMETHODCALLTYPE Storage_SetElementTimes(IStorage *This, const WCHAR *pwcsName, FILETIME const *pctime, FILETIME const *patime, FILETIME const *pmtime)
Definition: webbrowser.c:626
REFCLSID clsid
Definition: msctf.c:84
#define InterlockedDecrement
Definition: armddk.h:52
static HRESULT STDMETHODCALLTYPE InPlace_OnPosRectChange(IOleInPlaceSite *iface, LPCRECT lprcPosRect)
Definition: webbrowser.c:414
static HRESULT STDMETHODCALLTYPE Frame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject)
Definition: webbrowser.c:512
static ULONG STDMETHODCALLTYPE Site_AddRef(IOleClientSite *iface)
Definition: webbrowser.c:62
#define MIID_PASTE
Definition: resource.h:53
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
static HRESULT STDMETHODCALLTYPE UI_GetOptionKeyPath(IDocHostUIHandler *iface, LPOLESTR *pchKey, DWORD dw)
Definition: webbrowser.c:268
#define MIID_PROPERTIES
Definition: resource.h:50
#define MIID_COPY
Definition: resource.h:52
static ULONG STDMETHODCALLTYPE InPlace_Release(IOleInPlaceSite *iface)
Definition: webbrowser.c:337
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define MENU_WEBBROWSER
Definition: resource.h:36
static HRESULT STDMETHODCALLTYPE UI_FilterDataObject(IDocHostUIHandler *iface, IDataObject *pDO, IDataObject **ppDORet)
Definition: webbrowser.c:290
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
static WebBrowserContainer * impl_from_IOleInPlaceFrame(IOleInPlaceFrame *iface)
Definition: webbrowser.c:448
static HRESULT STDMETHODCALLTYPE UI_EnableModeless(IDocHostUIHandler *iface, BOOL fEnable)
Definition: webbrowser.c:243
#define S_OK
Definition: intsafe.h:59
#define MIID_CUT
Definition: resource.h:51
#define WB_SEARCH
Definition: hhctrl.h:49
#define InterlockedIncrement
Definition: armddk.h:53
static HRESULT STDMETHODCALLTYPE Storage_Revert(IStorage *This)
Definition: webbrowser.c:606
static ULONG STDMETHODCALLTYPE Frame_Release(IOleInPlaceFrame *iface)
Definition: webbrowser.c:467
WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp)
static HRESULT STDMETHODCALLTYPE UI_ShowContextMenu(IDocHostUIHandler *iface, DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved)
Definition: webbrowser.c:161
static HRESULT STDMETHODCALLTYPE Storage_CreateStream(IStorage *This, const WCHAR *pwcsName, DWORD grfMode, DWORD reserved1, DWORD reserved2, IStream **ppstm)
Definition: webbrowser.c:571
#define E_NOTIMPL
Definition: ddrawi.h:99
static HRESULT STDMETHODCALLTYPE Frame_GetBorder(IOleInPlaceFrame *iface, LPRECT lprectBorder)
Definition: webbrowser.c:487
static HRESULT STDMETHODCALLTYPE Site_ShowObject(IOleClientSite *iface)
Definition: webbrowser.c:107
static WebBrowserContainer * impl_from_IDocHostUIHandler(IDocHostUIHandler *iface)
Definition: webbrowser.c:135
static ULONG STDMETHODCALLTYPE Site_Release(IOleClientSite *iface)
Definition: webbrowser.c:72
static HRESULT STDMETHODCALLTYPE Storage_CreateStorage(IStorage *This, const WCHAR *pwcsName, DWORD grfMode, DWORD reserved1, DWORD reserved2, IStorage **ppstg)
Definition: webbrowser.c:581
static HRESULT STDMETHODCALLTYPE Storage_MoveElementTo(IStorage *This, const OLECHAR *pwcsName, IStorage *pstgDest, const OLECHAR *pwcsNewName, DWORD grfFlags)
Definition: webbrowser.c:596
#define OLEIVERB_SHOW
Definition: ole2.h:39
static const IDocHostUIHandlerVtbl DocHostUIHandlerVtbl
Definition: webbrowser.c:296
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
unsigned int ULONG
Definition: retypes.h:1
#define MIID_SELECTALL
Definition: resource.h:48
static HRESULT STDMETHODCALLTYPE Storage_OpenStorage(IStorage *This, const WCHAR *pwcsName, IStorage *pstgPriority, DWORD grfMode, SNB snbExclude, DWORD reserved, IStorage **ppstg)
Definition: webbrowser.c:586
static HRESULT STDMETHODCALLTYPE UI_ShowUI(IDocHostUIHandler *iface, DWORD dwID, IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget, IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc)
Definition: webbrowser.c:228
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HINSTANCE hhctrl_hinstance
Definition: hhctrl.c:41
static HRESULT STDMETHODCALLTYPE Frame_SetBorderSpace(IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
Definition: webbrowser.c:497
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
static HRESULT STDMETHODCALLTYPE UI_OnDocWindowActivate(IDocHostUIHandler *iface, BOOL fActivate)
Definition: webbrowser.c:248
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
static WebBrowserContainer * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: webbrowser.c:28
static const WCHAR dwWidth[]
Definition: provider.c:59
static HRESULT STDMETHODCALLTYPE Frame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable)
Definition: webbrowser.c:527
#define IDTB_REFRESH
Definition: htmlhelp.h:128
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static HRESULT STDMETHODCALLTYPE UI_GetHostInfo(IDocHostUIHandler *iface, DOCHOSTUIINFO *pInfo)
Definition: webbrowser.c:219
static BOOL heap_free(void *mem)
Definition: appwiz.h:75