mshtml: Implement IOleDocumentView and IViewObjectEx interfaces in HTMLDocumentObj object instead of HTMLDocument.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e55e6b8c45
commit
92e3036c72
|
@ -4761,16 +4761,8 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
|
||||||
*ppv = &This->IOleObject_iface;
|
*ppv = &This->IOleObject_iface;
|
||||||
else if(IsEqualGUID(&IID_IOleDocument, riid))
|
else if(IsEqualGUID(&IID_IOleDocument, riid))
|
||||||
*ppv = &This->IOleDocument_iface;
|
*ppv = &This->IOleDocument_iface;
|
||||||
else if(IsEqualGUID(&IID_IOleDocumentView, riid))
|
|
||||||
*ppv = &This->IOleDocumentView_iface;
|
|
||||||
else if(IsEqualGUID(&IID_IOleInPlaceActiveObject, riid))
|
else if(IsEqualGUID(&IID_IOleInPlaceActiveObject, riid))
|
||||||
*ppv = &This->IOleInPlaceActiveObject_iface;
|
*ppv = &This->IOleInPlaceActiveObject_iface;
|
||||||
else if(IsEqualGUID(&IID_IViewObject, riid))
|
|
||||||
*ppv = &This->IViewObjectEx_iface;
|
|
||||||
else if(IsEqualGUID(&IID_IViewObject2, riid))
|
|
||||||
*ppv = &This->IViewObjectEx_iface;
|
|
||||||
else if(IsEqualGUID(&IID_IViewObjectEx, riid))
|
|
||||||
*ppv = &This->IViewObjectEx_iface;
|
|
||||||
else if(IsEqualGUID(&IID_IOleWindow, riid))
|
else if(IsEqualGUID(&IID_IOleWindow, riid))
|
||||||
*ppv = &This->IOleInPlaceActiveObject_iface;
|
*ppv = &This->IOleInPlaceActiveObject_iface;
|
||||||
else if(IsEqualGUID(&IID_IOleInPlaceObject, riid))
|
else if(IsEqualGUID(&IID_IOleInPlaceObject, riid))
|
||||||
|
@ -4861,7 +4853,6 @@ static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex)
|
||||||
HTMLDocument_Persist_Init(doc);
|
HTMLDocument_Persist_Init(doc);
|
||||||
HTMLDocument_OleCmd_Init(doc);
|
HTMLDocument_OleCmd_Init(doc);
|
||||||
HTMLDocument_OleObj_Init(doc);
|
HTMLDocument_OleObj_Init(doc);
|
||||||
HTMLDocument_View_Init(doc);
|
|
||||||
HTMLDocument_Service_Init(doc);
|
HTMLDocument_Service_Init(doc);
|
||||||
|
|
||||||
ConnectionPointContainer_Init(&doc->cp_container, (IUnknown*)&doc->IHTMLDocument2_iface, HTMLDocument_cpc);
|
ConnectionPointContainer_Init(&doc->cp_container, (IUnknown*)&doc->IHTMLDocument2_iface, HTMLDocument_cpc);
|
||||||
|
@ -5247,6 +5238,14 @@ static HRESULT WINAPI HTMLDocumentObj_QueryInterface(IUnknown *iface, REFIID rii
|
||||||
return *ppv ? S_OK : E_NOINTERFACE;
|
return *ppv ? S_OK : E_NOINTERFACE;
|
||||||
}else if(IsEqualGUID(&IID_ICustomDoc, riid)) {
|
}else if(IsEqualGUID(&IID_ICustomDoc, riid)) {
|
||||||
*ppv = &This->ICustomDoc_iface;
|
*ppv = &This->ICustomDoc_iface;
|
||||||
|
}else if(IsEqualGUID(&IID_IOleDocumentView, riid)) {
|
||||||
|
*ppv = &This->IOleDocumentView_iface;
|
||||||
|
}else if(IsEqualGUID(&IID_IViewObject, riid)) {
|
||||||
|
*ppv = &This->IViewObjectEx_iface;
|
||||||
|
}else if(IsEqualGUID(&IID_IViewObject2, riid)) {
|
||||||
|
*ppv = &This->IViewObjectEx_iface;
|
||||||
|
}else if(IsEqualGUID(&IID_IViewObjectEx, riid)) {
|
||||||
|
*ppv = &This->IViewObjectEx_iface;
|
||||||
}else if(IsEqualGUID(&IID_ITargetContainer, riid)) {
|
}else if(IsEqualGUID(&IID_ITargetContainer, riid)) {
|
||||||
*ppv = &This->ITargetContainer_iface;
|
*ppv = &This->ITargetContainer_iface;
|
||||||
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
|
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
|
||||||
|
@ -5304,7 +5303,7 @@ static ULONG WINAPI HTMLDocumentObj_Release(IUnknown *iface)
|
||||||
if(This->in_place_active)
|
if(This->in_place_active)
|
||||||
IOleInPlaceObjectWindowless_InPlaceDeactivate(&This->basedoc.IOleInPlaceObjectWindowless_iface);
|
IOleInPlaceObjectWindowless_InPlaceDeactivate(&This->basedoc.IOleInPlaceObjectWindowless_iface);
|
||||||
if(This->ipsite)
|
if(This->ipsite)
|
||||||
IOleDocumentView_SetInPlaceSite(&This->basedoc.IOleDocumentView_iface, NULL);
|
IOleDocumentView_SetInPlaceSite(&This->IOleDocumentView_iface, NULL);
|
||||||
if(This->undomgr)
|
if(This->undomgr)
|
||||||
IOleUndoManager_Release(This->undomgr);
|
IOleUndoManager_Release(This->undomgr);
|
||||||
if(This->editsvcs)
|
if(This->editsvcs)
|
||||||
|
@ -5450,7 +5449,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii
|
||||||
doc->usermode = UNKNOWN_USERMODE;
|
doc->usermode = UNKNOWN_USERMODE;
|
||||||
doc->task_magic = get_task_target_magic();
|
doc->task_magic = get_task_target_magic();
|
||||||
|
|
||||||
init_binding_ui(doc);
|
HTMLDocument_View_Init(doc);
|
||||||
|
|
||||||
hres = create_nscontainer(doc, &doc->nscontainer);
|
hres = create_nscontainer(doc, &doc->nscontainer);
|
||||||
if(FAILED(hres)) {
|
if(FAILED(hres)) {
|
||||||
|
|
|
@ -595,9 +595,7 @@ struct HTMLDocument {
|
||||||
IMonikerProp IMonikerProp_iface;
|
IMonikerProp IMonikerProp_iface;
|
||||||
IOleObject IOleObject_iface;
|
IOleObject IOleObject_iface;
|
||||||
IOleDocument IOleDocument_iface;
|
IOleDocument IOleDocument_iface;
|
||||||
IOleDocumentView IOleDocumentView_iface;
|
|
||||||
IOleInPlaceActiveObject IOleInPlaceActiveObject_iface;
|
IOleInPlaceActiveObject IOleInPlaceActiveObject_iface;
|
||||||
IViewObjectEx IViewObjectEx_iface;
|
|
||||||
IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface;
|
IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface;
|
||||||
IServiceProvider IServiceProvider_iface;
|
IServiceProvider IServiceProvider_iface;
|
||||||
IOleCommandTarget IOleCommandTarget_iface;
|
IOleCommandTarget IOleCommandTarget_iface;
|
||||||
|
@ -642,6 +640,8 @@ struct HTMLDocumentObj {
|
||||||
DispatchEx dispex;
|
DispatchEx dispex;
|
||||||
IUnknown IUnknown_outer;
|
IUnknown IUnknown_outer;
|
||||||
ICustomDoc ICustomDoc_iface;
|
ICustomDoc ICustomDoc_iface;
|
||||||
|
IOleDocumentView IOleDocumentView_iface;
|
||||||
|
IViewObjectEx IViewObjectEx_iface;
|
||||||
ITargetContainer ITargetContainer_iface;
|
ITargetContainer ITargetContainer_iface;
|
||||||
|
|
||||||
IWindowForBindingUI IWindowForBindingUI_iface;
|
IWindowForBindingUI IWindowForBindingUI_iface;
|
||||||
|
@ -876,11 +876,10 @@ HRESULT create_storage(IHTMLStorage**) DECLSPEC_HIDDEN;
|
||||||
void HTMLDocument_Persist_Init(HTMLDocument*) DECLSPEC_HIDDEN;
|
void HTMLDocument_Persist_Init(HTMLDocument*) DECLSPEC_HIDDEN;
|
||||||
void HTMLDocument_OleCmd_Init(HTMLDocument*) DECLSPEC_HIDDEN;
|
void HTMLDocument_OleCmd_Init(HTMLDocument*) DECLSPEC_HIDDEN;
|
||||||
void HTMLDocument_OleObj_Init(HTMLDocument*) DECLSPEC_HIDDEN;
|
void HTMLDocument_OleObj_Init(HTMLDocument*) DECLSPEC_HIDDEN;
|
||||||
void HTMLDocument_View_Init(HTMLDocument*) DECLSPEC_HIDDEN;
|
|
||||||
void HTMLDocument_Service_Init(HTMLDocument*) DECLSPEC_HIDDEN;
|
void HTMLDocument_Service_Init(HTMLDocument*) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
void HTMLDocument_View_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
|
||||||
void TargetContainer_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
|
void TargetContainer_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
|
||||||
void init_binding_ui(HTMLDocumentObj*) DECLSPEC_HIDDEN;
|
|
||||||
|
|
||||||
void HTMLDocumentNode_SecMgr_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;
|
void HTMLDocumentNode_SecMgr_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
|
|
@ -547,17 +547,17 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms
|
||||||
HTMLDocument_LockContainer(This->doc_obj, TRUE);
|
HTMLDocument_LockContainer(This->doc_obj, TRUE);
|
||||||
|
|
||||||
/* FIXME: Create new IOleDocumentView. See CreateView for more info. */
|
/* FIXME: Create new IOleDocumentView. See CreateView for more info. */
|
||||||
hres = IOleDocumentSite_ActivateMe(pDocSite, &This->IOleDocumentView_iface);
|
hres = IOleDocumentSite_ActivateMe(pDocSite, &This->doc_obj->IOleDocumentView_iface);
|
||||||
IOleDocumentSite_Release(pDocSite);
|
IOleDocumentSite_Release(pDocSite);
|
||||||
}else {
|
}else {
|
||||||
hres = IOleDocumentView_UIActivate(&This->IOleDocumentView_iface, TRUE);
|
hres = IOleDocumentView_UIActivate(&This->doc_obj->IOleDocumentView_iface, TRUE);
|
||||||
if(SUCCEEDED(hres)) {
|
if(SUCCEEDED(hres)) {
|
||||||
if(lprcPosRect) {
|
if(lprcPosRect) {
|
||||||
RECT rect; /* We need to pass rect as not const pointer */
|
RECT rect; /* We need to pass rect as not const pointer */
|
||||||
rect = *lprcPosRect;
|
rect = *lprcPosRect;
|
||||||
IOleDocumentView_SetRect(&This->IOleDocumentView_iface, &rect);
|
IOleDocumentView_SetRect(&This->doc_obj->IOleDocumentView_iface, &rect);
|
||||||
}
|
}
|
||||||
IOleDocumentView_Show(&This->IOleDocumentView_iface, TRUE);
|
IOleDocumentView_Show(&This->doc_obj->IOleDocumentView_iface, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -751,7 +751,7 @@ static HRESULT WINAPI OleDocument_CreateView(IOleDocument *iface, IOleInPlaceSit
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(pIPSite) {
|
if(pIPSite) {
|
||||||
hres = IOleDocumentView_SetInPlaceSite(&This->IOleDocumentView_iface, pIPSite);
|
hres = IOleDocumentView_SetInPlaceSite(&This->doc_obj->IOleDocumentView_iface, pIPSite);
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
return hres;
|
return hres;
|
||||||
}
|
}
|
||||||
|
@ -759,8 +759,8 @@ static HRESULT WINAPI OleDocument_CreateView(IOleDocument *iface, IOleInPlaceSit
|
||||||
if(pstm)
|
if(pstm)
|
||||||
FIXME("pstm is not supported\n");
|
FIXME("pstm is not supported\n");
|
||||||
|
|
||||||
IOleDocumentView_AddRef(&This->IOleDocumentView_iface);
|
IOleDocumentView_AddRef(&This->doc_obj->IOleDocumentView_iface);
|
||||||
*ppView = &This->IOleDocumentView_iface;
|
*ppView = &This->doc_obj->IOleDocumentView_iface;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1127,7 +1127,7 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceOb
|
||||||
TRACE("(%p)\n", This);
|
TRACE("(%p)\n", This);
|
||||||
|
|
||||||
if(This->doc_obj->ui_active)
|
if(This->doc_obj->ui_active)
|
||||||
IOleDocumentView_UIActivate(&This->IOleDocumentView_iface, FALSE);
|
IOleDocumentView_UIActivate(&This->doc_obj->IOleDocumentView_iface, FALSE);
|
||||||
This->doc_obj->window_active = FALSE;
|
This->doc_obj->window_active = FALSE;
|
||||||
|
|
||||||
if(!This->doc_obj->in_place_active)
|
if(!This->doc_obj->in_place_active)
|
||||||
|
|
|
@ -279,11 +279,6 @@ static HRESULT activate_window(HTMLDocumentObj *This)
|
||||||
SetWindowPos(This->hwnd, NULL, 0, 0, 0, 0,
|
SetWindowPos(This->hwnd, NULL, 0, 0, 0, 0,
|
||||||
SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE | SWP_SHOWWINDOW);
|
SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE | SWP_SHOWWINDOW);
|
||||||
RedrawWindow(This->hwnd, NULL, NULL, RDW_INVALIDATE | RDW_NOERASE | RDW_ALLCHILDREN);
|
RedrawWindow(This->hwnd, NULL, NULL, RDW_INVALIDATE | RDW_NOERASE | RDW_ALLCHILDREN);
|
||||||
|
|
||||||
/* NOTE:
|
|
||||||
* Windows implementation calls:
|
|
||||||
* RegisterWindowMessage("MSWHEEL_ROLLMSG");
|
|
||||||
*/
|
|
||||||
SetTimer(This->hwnd, TIMER_ID, 100, NULL);
|
SetTimer(This->hwnd, TIMER_ID, 100, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,76 +423,76 @@ HRESULT call_set_active_object(IOleInPlaceUIWindow *window, IOleInPlaceActiveObj
|
||||||
* IOleDocumentView implementation
|
* IOleDocumentView implementation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static inline HTMLDocument *impl_from_IOleDocumentView(IOleDocumentView *iface)
|
static inline HTMLDocumentObj *impl_from_IOleDocumentView(IOleDocumentView *iface)
|
||||||
{
|
{
|
||||||
return CONTAINING_RECORD(iface, HTMLDocument, IOleDocumentView_iface);
|
return CONTAINING_RECORD(iface, HTMLDocumentObj, IOleDocumentView_iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_QueryInterface(IOleDocumentView *iface, REFIID riid, void **ppvObject)
|
static HRESULT WINAPI OleDocumentView_QueryInterface(IOleDocumentView *iface, REFIID riid, void **ppvObject)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
return htmldoc_query_interface(This, riid, ppvObject);
|
return htmldoc_query_interface(&This->basedoc, riid, ppvObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI OleDocumentView_AddRef(IOleDocumentView *iface)
|
static ULONG WINAPI OleDocumentView_AddRef(IOleDocumentView *iface)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
return htmldoc_addref(This);
|
return htmldoc_addref(&This->basedoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI OleDocumentView_Release(IOleDocumentView *iface)
|
static ULONG WINAPI OleDocumentView_Release(IOleDocumentView *iface)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
return htmldoc_release(This);
|
return htmldoc_release(&This->basedoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_SetInPlaceSite(IOleDocumentView *iface, IOleInPlaceSite *pIPSite)
|
static HRESULT WINAPI OleDocumentView_SetInPlaceSite(IOleDocumentView *iface, IOleInPlaceSite *pIPSite)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
TRACE("(%p)->(%p)\n", This, pIPSite);
|
TRACE("(%p)->(%p)\n", This, pIPSite);
|
||||||
|
|
||||||
if(pIPSite)
|
if(pIPSite)
|
||||||
IOleInPlaceSite_AddRef(pIPSite);
|
IOleInPlaceSite_AddRef(pIPSite);
|
||||||
|
|
||||||
if(This->doc_obj->ipsite)
|
if(This->ipsite)
|
||||||
IOleInPlaceSite_Release(This->doc_obj->ipsite);
|
IOleInPlaceSite_Release(This->ipsite);
|
||||||
|
|
||||||
This->doc_obj->ipsite = pIPSite;
|
This->ipsite = pIPSite;
|
||||||
This->doc_obj->request_uiactivate = TRUE;
|
This->request_uiactivate = TRUE;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_GetInPlaceSite(IOleDocumentView *iface, IOleInPlaceSite **ppIPSite)
|
static HRESULT WINAPI OleDocumentView_GetInPlaceSite(IOleDocumentView *iface, IOleInPlaceSite **ppIPSite)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
TRACE("(%p)->(%p)\n", This, ppIPSite);
|
TRACE("(%p)->(%p)\n", This, ppIPSite);
|
||||||
|
|
||||||
if(!ppIPSite)
|
if(!ppIPSite)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
if(This->doc_obj->ipsite)
|
if(This->ipsite)
|
||||||
IOleInPlaceSite_AddRef(This->doc_obj->ipsite);
|
IOleInPlaceSite_AddRef(This->ipsite);
|
||||||
|
|
||||||
*ppIPSite = This->doc_obj->ipsite;
|
*ppIPSite = This->ipsite;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_GetDocument(IOleDocumentView *iface, IUnknown **ppunk)
|
static HRESULT WINAPI OleDocumentView_GetDocument(IOleDocumentView *iface, IUnknown **ppunk)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
TRACE("(%p)->(%p)\n", This, ppunk);
|
TRACE("(%p)->(%p)\n", This, ppunk);
|
||||||
|
|
||||||
if(!ppunk)
|
if(!ppunk)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
htmldoc_addref(This);
|
*ppunk = (IUnknown*)&This->basedoc.IHTMLDocument2_iface;
|
||||||
*ppunk = (IUnknown*)&This->IHTMLDocument2_iface;
|
IUnknown_AddRef(*ppunk);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_SetRect(IOleDocumentView *iface, LPRECT prcView)
|
static HRESULT WINAPI OleDocumentView_SetRect(IOleDocumentView *iface, LPRECT prcView)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
RECT rect;
|
RECT rect;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, prcView);
|
TRACE("(%p)->(%p)\n", This, prcView);
|
||||||
|
@ -505,11 +500,11 @@ static HRESULT WINAPI OleDocumentView_SetRect(IOleDocumentView *iface, LPRECT pr
|
||||||
if(!prcView)
|
if(!prcView)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
if(This->doc_obj->hwnd) {
|
if(This->hwnd) {
|
||||||
GetClientRect(This->doc_obj->hwnd, &rect);
|
GetClientRect(This->hwnd, &rect);
|
||||||
if(!EqualRect(prcView, &rect)) {
|
if(!EqualRect(prcView, &rect)) {
|
||||||
InvalidateRect(This->doc_obj->hwnd, NULL, TRUE);
|
InvalidateRect(This->hwnd, NULL, TRUE);
|
||||||
SetWindowPos(This->doc_obj->hwnd, NULL, prcView->left, prcView->top, prcView->right,
|
SetWindowPos(This->hwnd, NULL, prcView->left, prcView->top, prcView->right,
|
||||||
prcView->bottom, SWP_NOZORDER | SWP_NOACTIVATE);
|
prcView->bottom, SWP_NOZORDER | SWP_NOACTIVATE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -519,49 +514,49 @@ static HRESULT WINAPI OleDocumentView_SetRect(IOleDocumentView *iface, LPRECT pr
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_GetRect(IOleDocumentView *iface, LPRECT prcView)
|
static HRESULT WINAPI OleDocumentView_GetRect(IOleDocumentView *iface, LPRECT prcView)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, prcView);
|
TRACE("(%p)->(%p)\n", This, prcView);
|
||||||
|
|
||||||
if(!prcView)
|
if(!prcView)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
GetClientRect(This->doc_obj->hwnd, prcView);
|
GetClientRect(This->hwnd, prcView);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_SetRectComplex(IOleDocumentView *iface, LPRECT prcView,
|
static HRESULT WINAPI OleDocumentView_SetRectComplex(IOleDocumentView *iface, LPRECT prcView,
|
||||||
LPRECT prcHScroll, LPRECT prcVScroll, LPRECT prcSizeBox)
|
LPRECT prcHScroll, LPRECT prcVScroll, LPRECT prcSizeBox)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
FIXME("(%p)->(%p %p %p %p)\n", This, prcView, prcHScroll, prcVScroll, prcSizeBox);
|
FIXME("(%p)->(%p %p %p %p)\n", This, prcView, prcHScroll, prcVScroll, prcSizeBox);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_Show(IOleDocumentView *iface, BOOL fShow)
|
static HRESULT WINAPI OleDocumentView_Show(IOleDocumentView *iface, BOOL fShow)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
TRACE("(%p)->(%x)\n", This, fShow);
|
TRACE("(%p)->(%x)\n", This, fShow);
|
||||||
|
|
||||||
if(fShow) {
|
if(fShow) {
|
||||||
if(!This->doc_obj->ui_active) {
|
if(!This->ui_active) {
|
||||||
hres = activate_window(This->doc_obj);
|
hres = activate_window(This);
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
return hres;
|
return hres;
|
||||||
}
|
}
|
||||||
update_doc(This->doc_obj, UPDATE_UI);
|
update_doc(This, UPDATE_UI);
|
||||||
ShowWindow(This->doc_obj->hwnd, SW_SHOW);
|
ShowWindow(This->hwnd, SW_SHOW);
|
||||||
}else {
|
}else {
|
||||||
ShowWindow(This->doc_obj->hwnd, SW_HIDE);
|
ShowWindow(This->hwnd, SW_HIDE);
|
||||||
|
|
||||||
if(This->doc_obj->in_place_active)
|
if(This->in_place_active)
|
||||||
IOleInPlaceObjectWindowless_InPlaceDeactivate(&This->IOleInPlaceObjectWindowless_iface);
|
IOleInPlaceObjectWindowless_InPlaceDeactivate(&This->basedoc.IOleInPlaceObjectWindowless_iface);
|
||||||
|
|
||||||
if(This->doc_obj->ip_window) {
|
if(This->ip_window) {
|
||||||
IOleInPlaceUIWindow_Release(This->doc_obj->ip_window);
|
IOleInPlaceUIWindow_Release(This->ip_window);
|
||||||
This->doc_obj->ip_window = NULL;
|
This->ip_window = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -570,13 +565,13 @@ static HRESULT WINAPI OleDocumentView_Show(IOleDocumentView *iface, BOOL fShow)
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL fUIActivate)
|
static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL fUIActivate)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
TRACE("(%p)->(%x)\n", This, fUIActivate);
|
TRACE("(%p)->(%x)\n", This, fUIActivate);
|
||||||
|
|
||||||
if(!This->doc_obj->ipsite) {
|
if(!This->ipsite) {
|
||||||
IOleClientSite *cs = This->doc_obj->client;
|
IOleClientSite *cs = This->client;
|
||||||
IOleInPlaceSite *ips;
|
IOleInPlaceSite *ips;
|
||||||
|
|
||||||
if(!cs) {
|
if(!cs) {
|
||||||
|
@ -586,15 +581,15 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
|
||||||
|
|
||||||
hres = IOleClientSite_QueryInterface(cs, &IID_IOleInPlaceSiteWindowless, (void**)&ips);
|
hres = IOleClientSite_QueryInterface(cs, &IID_IOleInPlaceSiteWindowless, (void**)&ips);
|
||||||
if(SUCCEEDED(hres))
|
if(SUCCEEDED(hres))
|
||||||
This->doc_obj->ipsite = ips;
|
This->ipsite = ips;
|
||||||
else {
|
else {
|
||||||
hres = IOleClientSite_QueryInterface(cs, &IID_IOleInPlaceSiteEx, (void**)&ips);
|
hres = IOleClientSite_QueryInterface(cs, &IID_IOleInPlaceSiteEx, (void**)&ips);
|
||||||
if(SUCCEEDED(hres))
|
if(SUCCEEDED(hres))
|
||||||
This->doc_obj->ipsite = ips;
|
This->ipsite = ips;
|
||||||
else {
|
else {
|
||||||
hres = IOleClientSite_QueryInterface(cs, &IID_IOleInPlaceSite, (void**)&ips);
|
hres = IOleClientSite_QueryInterface(cs, &IID_IOleInPlaceSite, (void**)&ips);
|
||||||
if(SUCCEEDED(hres))
|
if(SUCCEEDED(hres))
|
||||||
This->doc_obj->ipsite = ips;
|
This->ipsite = ips;
|
||||||
else {
|
else {
|
||||||
WARN("this->ipsite = NULL\n");
|
WARN("this->ipsite = NULL\n");
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
|
@ -602,71 +597,71 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IOleInPlaceSite_AddRef(This->doc_obj->ipsite);
|
IOleInPlaceSite_AddRef(This->ipsite);
|
||||||
This->doc_obj->request_uiactivate = FALSE;
|
This->request_uiactivate = FALSE;
|
||||||
HTMLDocument_LockContainer(This->doc_obj, TRUE);
|
HTMLDocument_LockContainer(This, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fUIActivate) {
|
if(fUIActivate) {
|
||||||
RECT rcBorderWidths;
|
RECT rcBorderWidths;
|
||||||
|
|
||||||
if(This->doc_obj->ui_active)
|
if(This->ui_active)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
||||||
if(!This->doc_obj->window_active) {
|
if(!This->window_active) {
|
||||||
hres = activate_window(This->doc_obj);
|
hres = activate_window(This);
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
return hres;
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
||||||
This->doc_obj->focus = TRUE;
|
This->focus = TRUE;
|
||||||
if(This->doc_obj->nscontainer)
|
if(This->nscontainer)
|
||||||
nsIWebBrowserFocus_Activate(This->doc_obj->nscontainer->focus);
|
nsIWebBrowserFocus_Activate(This->nscontainer->focus);
|
||||||
notif_focus(This->doc_obj);
|
notif_focus(This);
|
||||||
|
|
||||||
update_doc(This->doc_obj, UPDATE_UI);
|
update_doc(This, UPDATE_UI);
|
||||||
|
|
||||||
hres = IOleInPlaceSite_OnUIActivate(This->doc_obj->ipsite);
|
hres = IOleInPlaceSite_OnUIActivate(This->ipsite);
|
||||||
if(SUCCEEDED(hres)) {
|
if(SUCCEEDED(hres)) {
|
||||||
call_set_active_object((IOleInPlaceUIWindow*)This->doc_obj->frame,
|
call_set_active_object((IOleInPlaceUIWindow*)This->frame,
|
||||||
&This->IOleInPlaceActiveObject_iface);
|
&This->basedoc.IOleInPlaceActiveObject_iface);
|
||||||
}else {
|
}else {
|
||||||
FIXME("OnUIActivate failed: %08x\n", hres);
|
FIXME("OnUIActivate failed: %08x\n", hres);
|
||||||
IOleInPlaceFrame_Release(This->doc_obj->frame);
|
IOleInPlaceFrame_Release(This->frame);
|
||||||
This->doc_obj->frame = NULL;
|
This->frame = NULL;
|
||||||
This->doc_obj->ui_active = FALSE;
|
This->ui_active = FALSE;
|
||||||
return hres;
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(This->doc_obj->hostui) {
|
if(This->hostui) {
|
||||||
hres = IDocHostUIHandler_ShowUI(This->doc_obj->hostui,
|
hres = IDocHostUIHandler_ShowUI(This->hostui,
|
||||||
This->doc_obj->usermode == EDITMODE ? DOCHOSTUITYPE_AUTHOR : DOCHOSTUITYPE_BROWSE,
|
This->usermode == EDITMODE ? DOCHOSTUITYPE_AUTHOR : DOCHOSTUITYPE_BROWSE,
|
||||||
&This->IOleInPlaceActiveObject_iface, &This->IOleCommandTarget_iface,
|
&This->basedoc.IOleInPlaceActiveObject_iface, &This->basedoc.IOleCommandTarget_iface,
|
||||||
This->doc_obj->frame, This->doc_obj->ip_window);
|
This->frame, This->ip_window);
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
IDocHostUIHandler_HideUI(This->doc_obj->hostui);
|
IDocHostUIHandler_HideUI(This->hostui);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(This->doc_obj->ip_window)
|
if(This->ip_window)
|
||||||
call_set_active_object(This->doc_obj->ip_window, &This->IOleInPlaceActiveObject_iface);
|
call_set_active_object(This->ip_window, &This->basedoc.IOleInPlaceActiveObject_iface);
|
||||||
|
|
||||||
SetRectEmpty(&rcBorderWidths);
|
SetRectEmpty(&rcBorderWidths);
|
||||||
IOleInPlaceFrame_SetBorderSpace(This->doc_obj->frame, &rcBorderWidths);
|
IOleInPlaceFrame_SetBorderSpace(This->frame, &rcBorderWidths);
|
||||||
|
|
||||||
This->doc_obj->ui_active = TRUE;
|
This->ui_active = TRUE;
|
||||||
}else {
|
}else {
|
||||||
This->doc_obj->focus = FALSE;
|
This->focus = FALSE;
|
||||||
nsIWebBrowserFocus_Deactivate(This->doc_obj->nscontainer->focus);
|
nsIWebBrowserFocus_Deactivate(This->nscontainer->focus);
|
||||||
if(This->doc_obj->ui_active) {
|
if(This->ui_active) {
|
||||||
This->doc_obj->ui_active = FALSE;
|
This->ui_active = FALSE;
|
||||||
if(This->doc_obj->ip_window)
|
if(This->ip_window)
|
||||||
call_set_active_object(This->doc_obj->ip_window, NULL);
|
call_set_active_object(This->ip_window, NULL);
|
||||||
if(This->doc_obj->frame)
|
if(This->frame)
|
||||||
call_set_active_object((IOleInPlaceUIWindow*)This->doc_obj->frame, NULL);
|
call_set_active_object((IOleInPlaceUIWindow*)This->frame, NULL);
|
||||||
if(This->doc_obj->hostui)
|
if(This->hostui)
|
||||||
IDocHostUIHandler_HideUI(This->doc_obj->hostui);
|
IDocHostUIHandler_HideUI(This->hostui);
|
||||||
if(This->doc_obj->ipsite)
|
if(This->ipsite)
|
||||||
IOleInPlaceSite_OnUIDeactivate(This->doc_obj->ipsite, FALSE);
|
IOleInPlaceSite_OnUIDeactivate(This->ipsite, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
@ -674,39 +669,33 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_Open(IOleDocumentView *iface)
|
static HRESULT WINAPI OleDocumentView_Open(IOleDocumentView *iface)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
FIXME("(%p)\n", This);
|
FIXME("(%p)\n", This);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_CloseView(IOleDocumentView *iface, DWORD dwReserved)
|
static HRESULT WINAPI OleDocumentView_CloseView(IOleDocumentView *iface, DWORD dwReserved)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
TRACE("(%p)->(%x)\n", This, dwReserved);
|
TRACE("(%p)->(%x)\n", This, dwReserved);
|
||||||
|
|
||||||
if(dwReserved)
|
if(dwReserved)
|
||||||
WARN("dwReserved = %d\n", dwReserved);
|
WARN("dwReserved = %d\n", dwReserved);
|
||||||
|
|
||||||
/* NOTE:
|
|
||||||
* Windows implementation calls QueryInterface(IID_IOleCommandTarget),
|
|
||||||
* QueryInterface(IID_IOleControlSite) and KillTimer
|
|
||||||
*/
|
|
||||||
|
|
||||||
IOleDocumentView_Show(iface, FALSE);
|
IOleDocumentView_Show(iface, FALSE);
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_SaveViewState(IOleDocumentView *iface, IStream *pstm)
|
static HRESULT WINAPI OleDocumentView_SaveViewState(IOleDocumentView *iface, IStream *pstm)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, pstm);
|
FIXME("(%p)->(%p)\n", This, pstm);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleDocumentView_ApplyViewState(IOleDocumentView *iface, IStream *pstm)
|
static HRESULT WINAPI OleDocumentView_ApplyViewState(IOleDocumentView *iface, IStream *pstm)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, pstm);
|
FIXME("(%p)->(%p)\n", This, pstm);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
@ -714,7 +703,7 @@ static HRESULT WINAPI OleDocumentView_ApplyViewState(IOleDocumentView *iface, IS
|
||||||
static HRESULT WINAPI OleDocumentView_Clone(IOleDocumentView *iface, IOleInPlaceSite *pIPSiteNew,
|
static HRESULT WINAPI OleDocumentView_Clone(IOleDocumentView *iface, IOleInPlaceSite *pIPSiteNew,
|
||||||
IOleDocumentView **ppViewNew)
|
IOleDocumentView **ppViewNew)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IOleDocumentView(iface);
|
HTMLDocumentObj *This = impl_from_IOleDocumentView(iface);
|
||||||
FIXME("(%p)->(%p %p)\n", This, pIPSiteNew, ppViewNew);
|
FIXME("(%p)->(%p %p)\n", This, pIPSiteNew, ppViewNew);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
@ -742,34 +731,34 @@ static const IOleDocumentViewVtbl OleDocumentViewVtbl = {
|
||||||
* IViewObject implementation
|
* IViewObject implementation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static inline HTMLDocument *impl_from_IViewObjectEx(IViewObjectEx *iface)
|
static inline HTMLDocumentObj *impl_from_IViewObjectEx(IViewObjectEx *iface)
|
||||||
{
|
{
|
||||||
return CONTAINING_RECORD(iface, HTMLDocument, IViewObjectEx_iface);
|
return CONTAINING_RECORD(iface, HTMLDocumentObj, IViewObjectEx_iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ViewObject_QueryInterface(IViewObjectEx *iface, REFIID riid, void **ppv)
|
static HRESULT WINAPI ViewObject_QueryInterface(IViewObjectEx *iface, REFIID riid, void **ppv)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
return htmldoc_query_interface(This, riid, ppv);
|
return htmldoc_query_interface(&This->basedoc, riid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI ViewObject_AddRef(IViewObjectEx *iface)
|
static ULONG WINAPI ViewObject_AddRef(IViewObjectEx *iface)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
return htmldoc_addref(This);
|
return htmldoc_addref(&This->basedoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI ViewObject_Release(IViewObjectEx *iface)
|
static ULONG WINAPI ViewObject_Release(IViewObjectEx *iface)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
return htmldoc_release(This);
|
return htmldoc_release(&This->basedoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ViewObject_Draw(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect,
|
static HRESULT WINAPI ViewObject_Draw(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect,
|
||||||
DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds,
|
DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds,
|
||||||
LPCRECTL lprcWBounds, BOOL (CALLBACK *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue)
|
LPCRECTL lprcWBounds, BOOL (CALLBACK *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %ld)\n", This, dwDrawAspect, lindex, pvAspect,
|
FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %ld)\n", This, dwDrawAspect, lindex, pvAspect,
|
||||||
ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue);
|
ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
|
@ -778,7 +767,7 @@ static HRESULT WINAPI ViewObject_Draw(IViewObjectEx *iface, DWORD dwDrawAspect,
|
||||||
static HRESULT WINAPI ViewObject_GetColorSet(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect,
|
static HRESULT WINAPI ViewObject_GetColorSet(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect,
|
||||||
DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet)
|
DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
FIXME("(%p)->(%d %d %p %p %p %p)\n", This, dwDrawAspect, lindex, pvAspect, ptd, hicTargetDev, ppColorSet);
|
FIXME("(%p)->(%d %d %p %p %p %p)\n", This, dwDrawAspect, lindex, pvAspect, ptd, hicTargetDev, ppColorSet);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
@ -786,39 +775,39 @@ static HRESULT WINAPI ViewObject_GetColorSet(IViewObjectEx *iface, DWORD dwDrawA
|
||||||
static HRESULT WINAPI ViewObject_Freeze(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex,
|
static HRESULT WINAPI ViewObject_Freeze(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex,
|
||||||
void *pvAspect, DWORD *pdwFreeze)
|
void *pvAspect, DWORD *pdwFreeze)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, pvAspect, pdwFreeze);
|
FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, pvAspect, pdwFreeze);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ViewObject_Unfreeze(IViewObjectEx *iface, DWORD dwFreeze)
|
static HRESULT WINAPI ViewObject_Unfreeze(IViewObjectEx *iface, DWORD dwFreeze)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
FIXME("(%p)->(%d)\n", This, dwFreeze);
|
FIXME("(%p)->(%d)\n", This, dwFreeze);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ViewObject_SetAdvise(IViewObjectEx *iface, DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
|
static HRESULT WINAPI ViewObject_SetAdvise(IViewObjectEx *iface, DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
|
|
||||||
TRACE("(%p)->(%d %d %p)\n", This, aspects, advf, pAdvSink);
|
TRACE("(%p)->(%d %d %p)\n", This, aspects, advf, pAdvSink);
|
||||||
|
|
||||||
if(aspects != DVASPECT_CONTENT || advf != ADVF_PRIMEFIRST)
|
if(aspects != DVASPECT_CONTENT || advf != ADVF_PRIMEFIRST)
|
||||||
FIXME("unsupported arguments\n");
|
FIXME("unsupported arguments\n");
|
||||||
|
|
||||||
if(This->doc_obj->view_sink)
|
if(This->view_sink)
|
||||||
IAdviseSink_Release(This->doc_obj->view_sink);
|
IAdviseSink_Release(This->view_sink);
|
||||||
if(pAdvSink)
|
if(pAdvSink)
|
||||||
IAdviseSink_AddRef(pAdvSink);
|
IAdviseSink_AddRef(pAdvSink);
|
||||||
|
|
||||||
This->doc_obj->view_sink = pAdvSink;
|
This->view_sink = pAdvSink;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ViewObject_GetAdvise(IViewObjectEx *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
|
static HRESULT WINAPI ViewObject_GetAdvise(IViewObjectEx *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
FIXME("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink);
|
FIXME("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
@ -826,21 +815,21 @@ static HRESULT WINAPI ViewObject_GetAdvise(IViewObjectEx *iface, DWORD *pAspects
|
||||||
static HRESULT WINAPI ViewObject_GetExtent(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex,
|
static HRESULT WINAPI ViewObject_GetExtent(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex,
|
||||||
DVTARGETDEVICE* ptd, LPSIZEL lpsizel)
|
DVTARGETDEVICE* ptd, LPSIZEL lpsizel)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, ptd, lpsizel);
|
FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, ptd, lpsizel);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ViewObject_GetRect(IViewObjectEx *iface, DWORD dwAspect, LPRECTL pRect)
|
static HRESULT WINAPI ViewObject_GetRect(IViewObjectEx *iface, DWORD dwAspect, LPRECTL pRect)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
FIXME("(%p)->(%d %p)\n", This, dwAspect, pRect);
|
FIXME("(%p)->(%d %p)\n", This, dwAspect, pRect);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ViewObject_GetViewStatus(IViewObjectEx *iface, DWORD *pdwStatus)
|
static HRESULT WINAPI ViewObject_GetViewStatus(IViewObjectEx *iface, DWORD *pdwStatus)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, pdwStatus);
|
FIXME("(%p)->(%p)\n", This, pdwStatus);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
@ -848,7 +837,7 @@ static HRESULT WINAPI ViewObject_GetViewStatus(IViewObjectEx *iface, DWORD *pdwS
|
||||||
static HRESULT WINAPI ViewObject_QueryHitPoint(IViewObjectEx* iface, DWORD dwAspect,
|
static HRESULT WINAPI ViewObject_QueryHitPoint(IViewObjectEx* iface, DWORD dwAspect,
|
||||||
LPCRECT pRectBounds, POINT ptlLoc, LONG lCloseHint, DWORD *pHitResult)
|
LPCRECT pRectBounds, POINT ptlLoc, LONG lCloseHint, DWORD *pHitResult)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
FIXME("(%p)->(%d %p (%d %d) %d %p)\n", This, dwAspect, pRectBounds, ptlLoc.x,
|
FIXME("(%p)->(%d %p (%d %d) %d %p)\n", This, dwAspect, pRectBounds, ptlLoc.x,
|
||||||
ptlLoc.y, lCloseHint, pHitResult);
|
ptlLoc.y, lCloseHint, pHitResult);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
|
@ -857,7 +846,7 @@ static HRESULT WINAPI ViewObject_QueryHitPoint(IViewObjectEx* iface, DWORD dwAsp
|
||||||
static HRESULT WINAPI ViewObject_QueryHitRect(IViewObjectEx *iface, DWORD dwAspect,
|
static HRESULT WINAPI ViewObject_QueryHitRect(IViewObjectEx *iface, DWORD dwAspect,
|
||||||
LPCRECT pRectBounds, LPCRECT pRectLoc, LONG lCloseHint, DWORD *pHitResult)
|
LPCRECT pRectBounds, LPCRECT pRectLoc, LONG lCloseHint, DWORD *pHitResult)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
FIXME("(%p)->(%d %p %p %d %p)\n", This, dwAspect, pRectBounds, pRectLoc, lCloseHint, pHitResult);
|
FIXME("(%p)->(%d %p %p %d %p)\n", This, dwAspect, pRectBounds, pRectLoc, lCloseHint, pHitResult);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
@ -865,7 +854,7 @@ static HRESULT WINAPI ViewObject_QueryHitRect(IViewObjectEx *iface, DWORD dwAspe
|
||||||
static HRESULT WINAPI ViewObject_GetNaturalExtent(IViewObjectEx *iface, DWORD dwAspect, LONG lindex,
|
static HRESULT WINAPI ViewObject_GetNaturalExtent(IViewObjectEx *iface, DWORD dwAspect, LONG lindex,
|
||||||
DVTARGETDEVICE *ptd, HDC hicTargetDev, DVEXTENTINFO *pExtentInfo, LPSIZEL pSizel)
|
DVTARGETDEVICE *ptd, HDC hicTargetDev, DVEXTENTINFO *pExtentInfo, LPSIZEL pSizel)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = impl_from_IViewObjectEx(iface);
|
HTMLDocumentObj *This = impl_from_IViewObjectEx(iface);
|
||||||
FIXME("(%p)->(%d %d %p %p %p %p\n", This, dwAspect,lindex, ptd,
|
FIXME("(%p)->(%d %d %p %p %p %p\n", This, dwAspect,lindex, ptd,
|
||||||
hicTargetDev, pExtentInfo, pSizel);
|
hicTargetDev, pExtentInfo, pSizel);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
|
@ -889,12 +878,6 @@ static const IViewObjectExVtbl ViewObjectVtbl = {
|
||||||
ViewObject_GetNaturalExtent
|
ViewObject_GetNaturalExtent
|
||||||
};
|
};
|
||||||
|
|
||||||
void HTMLDocument_View_Init(HTMLDocument *This)
|
|
||||||
{
|
|
||||||
This->IOleDocumentView_iface.lpVtbl = &OleDocumentViewVtbl;
|
|
||||||
This->IViewObjectEx_iface.lpVtbl = &ViewObjectVtbl;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline HTMLDocumentObj *impl_from_IWindowForBindingUI(IWindowForBindingUI *iface)
|
static inline HTMLDocumentObj *impl_from_IWindowForBindingUI(IWindowForBindingUI *iface)
|
||||||
{
|
{
|
||||||
return CONTAINING_RECORD(iface, HTMLDocumentObj, IWindowForBindingUI_iface);
|
return CONTAINING_RECORD(iface, HTMLDocumentObj, IWindowForBindingUI_iface);
|
||||||
|
@ -949,7 +932,9 @@ static const IWindowForBindingUIVtbl WindowForBindingUIVtbl = {
|
||||||
WindowForBindingUI_GetWindow
|
WindowForBindingUI_GetWindow
|
||||||
};
|
};
|
||||||
|
|
||||||
void init_binding_ui(HTMLDocumentObj *doc)
|
void HTMLDocument_View_Init(HTMLDocumentObj *doc)
|
||||||
{
|
{
|
||||||
|
doc->IOleDocumentView_iface.lpVtbl = &OleDocumentViewVtbl;
|
||||||
|
doc->IViewObjectEx_iface.lpVtbl = &ViewObjectVtbl;
|
||||||
doc->IWindowForBindingUI_iface.lpVtbl = &WindowForBindingUIVtbl;
|
doc->IWindowForBindingUI_iface.lpVtbl = &WindowForBindingUIVtbl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue