Commit 9f077e55 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

Added stub implementation of IOleControl.

parent 02ad6e72
...@@ -102,6 +102,9 @@ static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID ...@@ -102,6 +102,9 @@ static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID
}else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) { }else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) {
TRACE("(%p)->(IID_IOleCommandTarget, %p)\n", This, ppvObject); TRACE("(%p)->(IID_IOleCommandTarget, %p)\n", This, ppvObject);
*ppvObject = CMDTARGET(This); *ppvObject = CMDTARGET(This);
}else if(IsEqualGUID(&IID_IOleControl, riid)) {
TRACE("(%p)->(IID_IOleControl, %p)\n", This, ppvObject);
*ppvObject = CONTROL(This);
} }
if(*ppvObject) { if(*ppvObject) {
......
...@@ -40,6 +40,7 @@ typedef struct { ...@@ -40,6 +40,7 @@ typedef struct {
const IOleInPlaceObjectWindowlessVtbl *lpOleInPlaceObjectWindowlessVtbl; const IOleInPlaceObjectWindowlessVtbl *lpOleInPlaceObjectWindowlessVtbl;
const IServiceProviderVtbl *lpServiceProviderVtbl; const IServiceProviderVtbl *lpServiceProviderVtbl;
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl; const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
const IOleControlVtbl *lpOleControlVtbl;
LONG ref; LONG ref;
...@@ -84,6 +85,7 @@ struct NSContainer { ...@@ -84,6 +85,7 @@ struct NSContainer {
#define INPLACEWIN(x) ((IOleInPlaceObjectWindowless*) &(x)->lpOleInPlaceObjectWindowlessVtbl) #define INPLACEWIN(x) ((IOleInPlaceObjectWindowless*) &(x)->lpOleInPlaceObjectWindowlessVtbl)
#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) #define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl)
#define CMDTARGET(x) ((IOleCommandTarget*) &(x)->lpOleCommandTargetVtbl) #define CMDTARGET(x) ((IOleCommandTarget*) &(x)->lpOleCommandTargetVtbl)
#define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl))) #define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
......
...@@ -764,6 +764,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID ...@@ -764,6 +764,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
return OLECMDERR_E_UNKNOWNGROUP; return OLECMDERR_E_UNKNOWNGROUP;
} }
#undef CMDTARGET_THIS
static const IOleCommandTargetVtbl OleCommandTargetVtbl = { static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
OleCommandTarget_QueryInterface, OleCommandTarget_QueryInterface,
OleCommandTarget_AddRef, OleCommandTarget_AddRef,
...@@ -772,11 +774,76 @@ static const IOleCommandTargetVtbl OleCommandTargetVtbl = { ...@@ -772,11 +774,76 @@ static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
OleCommandTarget_Exec OleCommandTarget_Exec
}; };
/**********************************************************
* IOleControl implementation
*/
#define CONTROL_THIS(iface) DEFINE_THIS(HTMLDocument, OleControl, iface)
static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID riid, void **ppv)
{
HTMLDocument *This = CONTROL_THIS(iface);
return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
}
static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
{
HTMLDocument *This = CONTROL_THIS(iface);
return IHTMLDocument2_AddRef(HTMLDOC(This));
}
static ULONG WINAPI OleControl_Release(IOleControl *iface)
{
HTMLDocument *This = CONTROL_THIS(iface);
return IHTMLDocument_Release(HTMLDOC(This));
}
static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI)
{
HTMLDocument *This = CONTROL_THIS(iface);
FIXME("(%p)->(%p)\n", This, pCI);
return E_NOTIMPL;
}
static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, MSG *pMsg)
{
HTMLDocument *This = CONTROL_THIS(iface);
FIXME("(%p)->(%p)\n", This, pMsg);
return E_NOTIMPL;
}
static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID)
{
HTMLDocument *This = CONTROL_THIS(iface);
FIXME("(%p)->(%ld)\n", This, dispID);
return E_NOTIMPL;
}
static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL bFreeze)
{
HTMLDocument *This = CONTROL_THIS(iface);
FIXME("(%p)->(%x)\n", This, bFreeze);
return E_NOTIMPL;
}
#undef CONTROL_THIS
static const IOleControlVtbl OleControlVtbl = {
OleControl_QueryInterface,
OleControl_AddRef,
OleControl_Release,
OleControl_GetControlInfo,
OleControl_OnMnemonic,
OleControl_OnAmbientPropertyChange,
OleControl_FreezeEvents
};
void HTMLDocument_OleObj_Init(HTMLDocument *This) void HTMLDocument_OleObj_Init(HTMLDocument *This)
{ {
This->lpOleObjectVtbl = &OleObjectVtbl; This->lpOleObjectVtbl = &OleObjectVtbl;
This->lpOleDocumentVtbl = &OleDocumentVtbl; This->lpOleDocumentVtbl = &OleDocumentVtbl;
This->lpOleCommandTargetVtbl = &OleCommandTargetVtbl; This->lpOleCommandTargetVtbl = &OleCommandTargetVtbl;
This->lpOleControlVtbl = &OleControlVtbl;
This->client = NULL; This->client = NULL;
This->hostui = NULL; This->hostui = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment