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