45 if(
This->doc_host.hwnd)
64 IOleControlSite_OnFocus(control_site, got_focus);
65 IOleControlSite_Release(control_site);
72 static const WCHAR wszTHIS[] = {
'T',
'H',
'I',
'S',0};
103 static const WCHAR wszShellEmbedding[] =
104 {
'S',
'h',
'e',
'l',
'l',
' ',
'E',
'm',
'b',
'e',
'd',
'd',
'i',
'n',
'g',0};
123 IOleInPlaceSite_GetWindow(inplace, &
parent);
124 IOleInPlaceSite_Release(inplace);
129 wszShellEmbedding, wszShellEmbedding,
150 (
void**)&
This->inplace);
152 WARN(
"Could not get IOleInPlaceSite\n");
156 hres = IOleInPlaceSiteEx_CanInPlaceActivate(
This->inplace);
158 WARN(
"CanInPlaceActivate returned: %08x\n",
hres);
159 IOleInPlaceSiteEx_Release(
This->inplace);
164 hres = IOleInPlaceSiteEx_GetWindow(
This->inplace, &parent_hwnd);
168 IOleInPlaceSiteEx_OnInPlaceActivate(
This->inplace);
170 This->frameinfo.cb =
sizeof(OLEINPLACEFRAMEINFO);
171 IOleInPlaceSiteEx_GetWindowContext(
This->inplace, &
This->doc_host.frame, &
This->uiwindow,
176 This->pos_rect.left,
This->pos_rect.top,
177 This->pos_rect.right-
This->pos_rect.left,
178 This->pos_rect.bottom-
This->pos_rect.top,
184 IOleClientSite_ShowObject(
This->client);
189 IOleContainer_Release(
This->container);
194 if(
This->doc_host.frame)
195 IOleInPlaceFrame_GetWindow(
This->doc_host.frame, &
This->frame_hwnd);
204 static const WCHAR wszitem[] = {
'i',
't',
'e',
'm',0};
208 if(
This->shell_embedding_hwnd)
217 IOleInPlaceSiteEx_OnUIActivate(
This->inplace);
219 if(
This->doc_host.frame)
220 IOleInPlaceFrame_SetActiveObject(
This->doc_host.frame, &
This->IOleInPlaceActiveObject_iface, wszitem);
222 IOleInPlaceUIWindow_SetActiveObject(
This->uiwindow, &
This->IOleInPlaceActiveObject_iface, wszitem);
224 if(
This->doc_host.frame)
225 IOleInPlaceFrame_SetMenu(
This->doc_host.frame,
NULL,
NULL,
This->shell_embedding_hwnd);
236 DISPPARAMS dispparams = {
NULL, 0};
246 TRACE(
"Could not get IDispatch\n");
253 IDispatch_Release(disp);
265 IWebBrowser2_put_Offline(&
This->IWebBrowser2_iface,
V_BOOL(&offline));
267 WARN(
"wrong V_VT(silent) %d\n",
V_VT(&offline));
291 IOleClientSite_Release(
This->client);
295 if(
This->client_closed) {
296 IOleClientSite_Release(
This->client_closed);
300 if(destroy_win &&
This->shell_embedding_hwnd) {
306 IOleInPlaceSiteEx_Release(
This->inplace);
310 if(
This->container) {
311 IOleContainer_Release(
This->container);
316 IOleInPlaceUIWindow_Release(
This->uiwindow);
338 *
ppv = &
This->IEnumOLEVERB_iface;
341 *
ppv = &
This->IEnumOLEVERB_iface;
379 static const OLEVERB verbs[] =
382 TRACE(
"(%p)->(%u %p %p)\n",
This, celt, rgelt, pceltFetched);
392 *rgelt = verbs[
This->iter++];
442 return IWebBrowser2_QueryInterface(&
This->IWebBrowser2_iface,
riid,
ppv);
448 return IWebBrowser2_AddRef(&
This->IWebBrowser2_iface);
454 return IWebBrowser2_Release(&
This->IWebBrowser2_iface);
467 TRACE(
"(%p)->(%p)\n",
This, pClientSite);
469 if(
This->client_closed) {
470 IOleClientSite_Release(
This->client_closed);
474 if(
This->client == pClientSite)
477 if(
This->client && pClientSite) {
479 olecmd =
This->doc_host.olecmd;
481 IOleCommandTarget_AddRef(olecmd);
490 if(
This->doc_host.document)
495 IOleClientSite_AddRef(pClientSite);
496 This->client = pClientSite;
501 This->doc_host.client_disp = disp;
503 hres = IOleClientSite_QueryInterface(
This->client, &IID_IDocHostUIHandler,
506 This->doc_host.hostui = hostui;
513 hres = IOleContainer_QueryInterface(
container, &IID_ITargetContainer,
514 (
void**)&target_container);
516 FIXME(
"Unsupported ITargetContainer\n");
517 ITargetContainer_Release(target_container);
520 hres = IOleContainer_QueryInterface(
container, &IID_IOleCommandTarget, (
void**)&olecmd);
526 hres = IOleClientSite_QueryInterface(
This->client, &IID_IOleCommandTarget, (
void**)&olecmd);
532 This->doc_host.olecmd = olecmd;
534 if(
This->shell_embedding_hwnd) {
540 hres = IOleInPlaceSite_GetWindow(inplace, &
parent);
541 IOleInPlaceSite_Release(inplace);
559 TRACE(
"(%p)->(%p)\n",
This, ppClientSite);
565 IOleClientSite_AddRef(
This->client);
566 *ppClientSite =
This->client;
572 LPCOLESTR szContainerObj)
588 TRACE(
"(%p)->(%d)\n",
This, dwSaveOption);
590 if(dwSaveOption != OLECLOSE_NOSAVE) {
591 FIXME(
"unimplemented flag: %x\n", dwSaveOption);
595 if(
This->doc_host.frame)
596 IOleInPlaceFrame_SetActiveObject(
This->doc_host.frame,
NULL,
NULL);
599 IOleInPlaceUIWindow_SetActiveObject(
This->uiwindow,
NULL,
NULL);
602 IOleInPlaceSiteEx_OnUIDeactivate(
This->inplace,
FALSE);
605 IOleInPlaceSiteEx_OnInPlaceDeactivate(
This->inplace);
610 IOleClientSite_AddRef(
This->client);
611 hres = IOleObject_SetClientSite(iface,
NULL);
619 FIXME(
"(%p)->(%d, %p)\n",
This, dwWhichMoniker, pmk);
627 FIXME(
"(%p)->(%d, %d, %p)\n",
This, dwAssign, dwWhichMoniker, ppmk);
656 if(!
This->client &&
This->client_closed) {
659 IOleObject_SetClientSite(iface,
client);
660 IOleClientSite_Release(
client);
666 TRACE(
"OLEIVERB_SHOW\n");
669 TRACE(
"OLEIVERB_UIACTIVATE\n");
672 TRACE(
"OLEIVERB_INPLACEACTIVATE\n");
675 TRACE(
"OLEIVERB_HIDE\n");
677 IOleInPlaceSiteEx_OnInPlaceDeactivate(
This->inplace);
678 if(
This->shell_embedding_hwnd)
682 FIXME(
"stub for %d\n", iVerb);
694 TRACE(
"(%p)->(%p)\n",
This, ppEnumOleVerb);
704 *ppEnumOleVerb = &
ret->IEnumOLEVERB_iface;
733 TRACE(
"(%p, %d, %p)\n",
This, dwFormOfType, pszUserType);
741 TRACE(
"(%p)->(%x %p)\n",
This, dwDrawAspect, psizel);
744 This->extent = *psizel;
752 TRACE(
"(%p)->(%x, %p)\n",
This, dwDrawAspect, psizel);
755 *psizel =
This->extent;
760 DWORD* pdwConnection)
763 FIXME(
"(%p)->(%p, %p)\n",
This, pAdvSink, pdwConnection);
770 FIXME(
"(%p)->(%d)\n",
This, dwConnection);
777 FIXME(
"(%p)->(%p)\n",
This, ppenumAdvise);
785 TRACE(
"(%p)->(%x, %p)\n",
This, dwAspect, pdwStatus);
841 return IWebBrowser2_QueryInterface(&
This->IWebBrowser2_iface,
riid, ppobj);
847 return IWebBrowser2_AddRef(&
This->IWebBrowser2_iface);
853 return IWebBrowser2_Release(&
This->IWebBrowser2_iface);
862 *phwnd =
This->shell_embedding_hwnd;
880 IOleInPlaceSiteEx_Release(
This->inplace);
901 This->pos_rect = *lprcPosRect;
904 This->clip_rect = *lprcClipRect;
906 if(
This->shell_embedding_hwnd) {
908 lprcPosRect->
left, lprcPosRect->
top,
950 return IWebBrowser2_QueryInterface(&
This->IWebBrowser2_iface,
riid, ppobj);
956 return IWebBrowser2_AddRef(&
This->IWebBrowser2_iface);
962 return IWebBrowser2_Release(&
This->IWebBrowser2_iface);
1002 FIXME(
"Unknown dispID %d\n", dispID);
1033 return IWebBrowser2_QueryInterface(&
This->IWebBrowser2_iface,
riid,
ppv);
1039 return IWebBrowser2_AddRef(&
This->IWebBrowser2_iface);
1045 return IWebBrowser2_Release(&
This->IWebBrowser2_iface);
1052 return IOleInPlaceObject_GetWindow(&
This->IOleInPlaceObject_iface, phwnd);
1059 return IOleInPlaceObject_ContextSensitiveHelp(&
This->IOleInPlaceObject_iface, fEnterMode);
1071 if(
This->doc_host.document) {
1072 if(
SUCCEEDED(IUnknown_QueryInterface(
This->doc_host.document,
1074 (
void**)&activeobj))) {
1075 hr = IOleInPlaceActiveObject_TranslateAccelerator(activeobj, lpmsg);
1076 IOleInPlaceActiveObject_Release(activeobj);
1106 FIXME(
"(%p)->(%p %p %x)\n",
This, lprcBorder, pUIWindow, fFrameWindow);
1140 return IWebBrowser2_QueryInterface(&
This->IWebBrowser2_iface,
riid,
ppv);
1146 return IWebBrowser2_AddRef(&
This->IWebBrowser2_iface);
1152 return IWebBrowser2_Release(&
This->IWebBrowser2_iface);
1156 const GUID *pguidCmdGroup,
ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
1165 if(!
This->doc_host.document)
1171 hres = IUnknown_QueryInterface(
This->doc_host.document, &IID_IOleCommandTarget, (
void**)&cmdtrg);
1175 hres = IOleCommandTarget_QueryStatus(cmdtrg, pguidCmdGroup, cCmds, prgCmds, pCmdText);
1176 IOleCommandTarget_Release(cmdtrg);
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
static const char * wine_dbgstr_rect(const RECT *prc)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
HRESULT WINAPI OleRegGetUserType(REFCLSID clsid, DWORD form, LPOLESTR *usertype)
void on_commandstate_change(DocHost *doc_host, LONG command, BOOL enable)
LRESULT process_dochost_tasks(DocHost *This)
void deactivate_document(DocHost *This)
void release_dochost_client(DocHost *This)
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
#define DISPID_AMBIENT_OFFLINEIFNOTCONNECTED
#define DISPID_AMBIENT_SILENT
HINSTANCE ieframe_instance
static const char * debugstr_variant(const VARIANT *var)
static VARIANTARG static DISPID
#define DISPID_AMBIENT_DLCONTROL
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
#define LOCALE_SYSTEM_DEFAULT
interface IMoniker * LPMONIKER
interface IDataObject * LPDATAOBJECT
#define OLEIVERB_UIACTIVATE
#define OLEIVERB_INPLACEACTIVATE
#define DISPATCH_PROPERTYGET
const GUID IID_IOleInPlaceActiveObject
const GUID IID_IOleInPlaceSite
const GUID IID_IOleControlSite
const GUID IID_IEnumOLEVERB
static HRESULT WINAPI InPlaceActiveObject_GetWindow(IOleInPlaceActiveObject *iface, HWND *phwnd)
static HRESULT WINAPI OleInPlaceObject_GetWindow(IOleInPlaceObject *iface, HWND *phwnd)
static ULONG WINAPI OleInPlaceObject_Release(IOleInPlaceObject *iface)
static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL bFreeze)
static HRESULT WINAPI InPlaceActiveObject_OnDocWindowActivate(IOleInPlaceActiveObject *iface, BOOL fActivate)
static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
static HRESULT WINAPI OleObject_IsUpToDate(IOleObject *iface)
static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink, DWORD *pdwConnection)
static HRESULT WINAPI WBOleCommandTarget_QueryStatus(IOleCommandTarget *iface, const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
static HRESULT activate_inplace(WebBrowser *This, IOleClientSite *active_site)
static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD dwAssign, DWORD dwWhichMoniker, LPMONIKER *ppmk)
static void notify_on_focus(WebBrowser *This, BOOL got_focus)
static HRESULT WINAPI OleInPlaceObject_QueryInterface(IOleInPlaceObject *iface, REFIID riid, LPVOID *ppobj)
static HRESULT WINAPI InPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceActiveObject *iface, BOOL fEnterMode)
void WebBrowser_OleObject_Destroy(WebBrowser *This)
static HRESULT WINAPI EnumOLEVERB_QueryInterface(IEnumOLEVERB *iface, REFIID riid, void **ppv)
static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv)
static HRESULT WINAPI InPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject *iface, BOOL fActivate)
static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tagMSG *lpmsg, LPOLECLIENTSITE pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
static ULONG WINAPI EnumOLEVERB_AddRef(IEnumOLEVERB *iface)
static HRESULT on_silent_change(WebBrowser *This)
static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **ppenumAdvise)
static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, LPCONTROLINFO pCI)
static ULONG WINAPI OleObject_AddRef(IOleObject *iface)
static ULONG WINAPI InPlaceActiveObject_AddRef(IOleInPlaceActiveObject *iface)
static HRESULT WINAPI WBOleCommandTarget_QueryInterface(IOleCommandTarget *iface, REFIID riid, void **ppv)
void WebBrowser_OleObject_Init(WebBrowser *This)
static LRESULT resize_window(WebBrowser *This, LONG width, LONG height)
static WebBrowser * impl_from_IOleInPlaceObject(IOleInPlaceObject *iface)
static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD dwReserved, LPDATAOBJECT *ppDataObject)
static const IOleInPlaceObjectVtbl OleInPlaceObjectVtbl
static ATOM shell_embedding_atom
static ULONG WINAPI WBOleCommandTarget_AddRef(IOleCommandTarget *iface)
static ULONG WINAPI InPlaceActiveObject_Release(IOleInPlaceActiveObject *iface)
static HRESULT WINAPI OleInPlaceObject_ContextSensitiveHelp(IOleInPlaceObject *iface, BOOL fEnterMode)
static HRESULT activate_ui(WebBrowser *This, IOleClientSite *active_site)
static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl
static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
static ULONG WINAPI WBOleCommandTarget_Release(IOleCommandTarget *iface)
static HRESULT WINAPI WBOleCommandTarget_Exec(IOleCommandTarget *iface, const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
static WebBrowser * impl_from_IOleControl(IOleControl *iface)
static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType, LPOLESTR *pszUserType)
static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID)
static WebBrowser * impl_from_IOleObject(IOleObject *iface)
static ULONG WINAPI EnumOLEVERB_Release(IEnumOLEVERB *iface)
static HRESULT WINAPI EnumOLEVERB_Reset(IEnumOLEVERB *iface)
static HRESULT WINAPI EnumOLEVERB_Next(IEnumOLEVERB *iface, ULONG celt, OLEVERB *rgelt, ULONG *pceltFetched)
static ULONG WINAPI OleObject_Release(IOleObject *iface)
static HRESULT WINAPI OleInPlaceObject_ReactivateAndUndo(IOleInPlaceObject *iface)
static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp, LPCOLESTR szContainerObj)
static HRESULT WINAPI InPlaceActiveObject_ResizeBorder(IOleInPlaceActiveObject *iface, LPCRECT lprcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow)
static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID *pClsid)
static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, LPOLECLIENTSITE *ppClientSite)
static HRESULT WINAPI EnumOLEVERB_Clone(IEnumOLEVERB *iface, IEnumOLEVERB **ppenum)
static ULONG WINAPI OleControl_Release(IOleControl *iface)
static WebBrowser * impl_from_IOleCommandTarget(IOleCommandTarget *iface)
static HRESULT WINAPI OleInPlaceObject_InPlaceDeactivate(IOleInPlaceObject *iface)
static const IOleObjectVtbl OleObjectVtbl
static WebBrowser * impl_from_IOleInPlaceActiveObject(IOleInPlaceActiveObject *iface)
static HRESULT on_offlineconnected_change(WebBrowser *This)
static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker *pmk)
static void create_shell_embedding_hwnd(WebBrowser *This)
static const IEnumOLEVERBVtbl EnumOLEVERBVtbl
static ULONG WINAPI OleInPlaceObject_AddRef(IOleInPlaceObject *iface)
static HRESULT WINAPI InPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface, REFIID riid, void **ppv)
static HRESULT WINAPI InPlaceActiveObject_EnableModeless(IOleInPlaceActiveObject *iface, BOOL fEnable)
static HRESULT WINAPI OleObject_EnumVerbs(IOleObject *iface, IEnumOLEVERB **ppEnumOleVerb)
static HRESULT WINAPI OleObject_Update(IOleObject *iface)
static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID riid, LPVOID *ppobj)
static HRESULT WINAPI OleInPlaceObject_SetObjectRects(IOleInPlaceObject *iface, LPCRECT lprcPosRect, LPCRECT lprcClipRect)
HWND WINAPI SHSetParentHwnd(HWND hWnd, HWND hWndParent)
static const IOleCommandTargetVtbl OleCommandTargetVtbl
static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE pClientSite)
static HRESULT WINAPI EnumOLEVERB_Skip(IEnumOLEVERB *iface, ULONG celt)
static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, LPDATAOBJECT pDataObject, BOOL fCreation, DWORD dwReserved)
static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE *pLogpal)
static void release_client_site(WebBrowser *This, BOOL destroy_win)
static HRESULT WINAPI OleObject_Unadvise(IOleObject *iface, DWORD dwConnection)
static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
static HRESULT WINAPI InPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject *iface, LPMSG lpmsg)
static EnumOLEVERB * impl_from_IEnumOLEVERB(IEnumOLEVERB *iface)
static const IOleControlVtbl OleControlVtbl
static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, struct tagMSG *pMsg)
static HRESULT WINAPI OleInPlaceObject_UIDeactivate(IOleInPlaceObject *iface)
static HRESULT get_client_disp_property(IOleClientSite *client, DISPID dispid, VARIANT *res)
static LRESULT WINAPI shell_embedding_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
#define IsEqualGUID(rguid1, rguid2)
@ OLEMISC_ACTIVATEWHENVISIBLE
@ OLEMISC_SETCLIENTSITEFIRST
@ OLEMISC_RECOMPOSEONRESIZE
IEnumOLEVERB IEnumOLEVERB_iface
#define CONTAINING_RECORD(address, type, field)
void WINAPI VariantInit(VARIANTARG *pVarg)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
HWND WINAPI SetFocus(_In_opt_ HWND)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
HDC WINAPI GetDC(_In_opt_ HWND)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
BOOL WINAPI DestroyWindow(_In_ HWND)