mshtml: Added beginning IDM_BROWSEMODE implementation.
This commit is contained in:
parent
a9cdb5b832
commit
346d5bc7d0
|
@ -47,6 +47,12 @@ typedef struct HTMLDOMNode HTMLDOMNode;
|
||||||
typedef struct ConnectionPoint ConnectionPoint;
|
typedef struct ConnectionPoint ConnectionPoint;
|
||||||
typedef struct BSCallback BSCallback;
|
typedef struct BSCallback BSCallback;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
UNKNOWN_USERMODE,
|
||||||
|
BROWSEMODE,
|
||||||
|
EDITMODE
|
||||||
|
} USERMODE;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const IHTMLDocument2Vtbl *lpHTMLDocument2Vtbl;
|
const IHTMLDocument2Vtbl *lpHTMLDocument2Vtbl;
|
||||||
const IHTMLDocument3Vtbl *lpHTMLDocument3Vtbl;
|
const IHTMLDocument3Vtbl *lpHTMLDocument3Vtbl;
|
||||||
|
@ -78,6 +84,7 @@ typedef struct {
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
HWND tooltips_hwnd;
|
HWND tooltips_hwnd;
|
||||||
|
|
||||||
|
USERMODE usermode;
|
||||||
BOOL in_place_active;
|
BOOL in_place_active;
|
||||||
BOOL ui_active;
|
BOOL ui_active;
|
||||||
BOOL window_active;
|
BOOL window_active;
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "shlguid.h"
|
#include "shlguid.h"
|
||||||
#include "mshtmdid.h"
|
#include "mshtmdid.h"
|
||||||
#include "idispids.h"
|
#include "idispids.h"
|
||||||
|
#include "mshtmcid.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
@ -237,6 +238,15 @@ static HRESULT exec_get_print_template(HTMLDocument *This, DWORD nCmdexecopt, VA
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static HRESULT exec_browsemode(HTMLDocument *This)
|
||||||
|
{
|
||||||
|
WARN("(%p)\n", This);
|
||||||
|
|
||||||
|
This->usermode = BROWSEMODE;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
OLECMDF cmdf;
|
OLECMDF cmdf;
|
||||||
HRESULT (*func)(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
|
HRESULT (*func)(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
|
||||||
|
@ -374,9 +384,14 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
|
||||||
FIXME("unsupported nCmdID %ld of CGID_ShellDocView group\n", nCmdID);
|
FIXME("unsupported nCmdID %ld of CGID_ShellDocView group\n", nCmdID);
|
||||||
return OLECMDERR_E_NOTSUPPORTED;
|
return OLECMDERR_E_NOTSUPPORTED;
|
||||||
}else if(IsEqualGUID(&CGID_MSHTML, pguidCmdGroup)) {
|
}else if(IsEqualGUID(&CGID_MSHTML, pguidCmdGroup)) {
|
||||||
|
switch(nCmdID) {
|
||||||
|
case IDM_BROWSEMODE:
|
||||||
|
return exec_browsemode(This);
|
||||||
|
default:
|
||||||
FIXME("unsupported nCmdID %ld of CGID_MSHTML group\n", nCmdID);
|
FIXME("unsupported nCmdID %ld of CGID_MSHTML group\n", nCmdID);
|
||||||
return OLECMDERR_E_NOTSUPPORTED;
|
return OLECMDERR_E_NOTSUPPORTED;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FIXME("Unsupported pguidCmdGroup %s\n", debugstr_guid(pguidCmdGroup));
|
FIXME("Unsupported pguidCmdGroup %s\n", debugstr_guid(pguidCmdGroup));
|
||||||
return OLECMDERR_E_UNKNOWNGROUP;
|
return OLECMDERR_E_UNKNOWNGROUP;
|
||||||
|
|
|
@ -76,6 +76,7 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
|
||||||
if(This->client) {
|
if(This->client) {
|
||||||
IOleClientSite_Release(This->client);
|
IOleClientSite_Release(This->client);
|
||||||
This->client = NULL;
|
This->client = NULL;
|
||||||
|
This->usermode = UNKNOWN_USERMODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(This->hostui) {
|
if(This->hostui) {
|
||||||
|
@ -161,7 +162,9 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
|
||||||
This->client = pClientSite;
|
This->client = pClientSite;
|
||||||
This->hostui = pDocHostUIHandler;
|
This->hostui = pDocHostUIHandler;
|
||||||
|
|
||||||
|
if(This->usermode == UNKNOWN_USERMODE)
|
||||||
IOleControl_OnAmbientPropertyChange(CONTROL(This), DISPID_AMBIENT_USERMODE);
|
IOleControl_OnAmbientPropertyChange(CONTROL(This), DISPID_AMBIENT_USERMODE);
|
||||||
|
|
||||||
IOleControl_OnAmbientPropertyChange(CONTROL(This), DISPID_AMBIENT_OFFLINEIFNOTCONNECTED);
|
IOleControl_OnAmbientPropertyChange(CONTROL(This), DISPID_AMBIENT_OFFLINEIFNOTCONNECTED);
|
||||||
IOleControl_OnAmbientPropertyChange(CONTROL(This), DISPID_AMBIENT_SILENT);
|
IOleControl_OnAmbientPropertyChange(CONTROL(This), DISPID_AMBIENT_SILENT);
|
||||||
IOleControl_OnAmbientPropertyChange(CONTROL(This), DISPID_AMBIENT_USERAGENT);
|
IOleControl_OnAmbientPropertyChange(CONTROL(This), DISPID_AMBIENT_USERAGENT);
|
||||||
|
@ -571,9 +574,11 @@ static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DIS
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
||||||
if(V_VT(&res) == VT_BOOL) {
|
if(V_VT(&res) == VT_BOOL) {
|
||||||
if(!V_BOOL(&res)) {
|
if(V_BOOL(&res)) {
|
||||||
|
This->usermode = BROWSEMODE;
|
||||||
|
}else {
|
||||||
FIXME("edit mode is not supported\n");
|
FIXME("edit mode is not supported\n");
|
||||||
hres = E_FAIL;
|
This->usermode = EDITMODE;
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
FIXME("V_VT(res)=%d\n", V_VT(&res));
|
FIXME("V_VT(res)=%d\n", V_VT(&res));
|
||||||
|
@ -679,6 +684,8 @@ void HTMLDocument_OleObj_Init(HTMLDocument *This)
|
||||||
This->lpOleDocumentVtbl = &OleDocumentVtbl;
|
This->lpOleDocumentVtbl = &OleDocumentVtbl;
|
||||||
This->lpOleControlVtbl = &OleControlVtbl;
|
This->lpOleControlVtbl = &OleControlVtbl;
|
||||||
|
|
||||||
|
This->usermode = UNKNOWN_USERMODE;
|
||||||
|
|
||||||
This->client = NULL;
|
This->client = NULL;
|
||||||
This->hostui = NULL;
|
This->hostui = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue