mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 07:37:02 +00:00
msscript: Added IPointerInactive stub.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6bd5794694
commit
e780228947
2 changed files with 84 additions and 0 deletions
|
@ -46,6 +46,7 @@ struct ScriptControl {
|
|||
IOleControl IOleControl_iface;
|
||||
IQuickActivate IQuickActivate_iface;
|
||||
IViewObject IViewObject_iface;
|
||||
IPointerInactive IPointerInactive_iface;
|
||||
IConnectionPointContainer IConnectionPointContainer_iface;
|
||||
LONG ref;
|
||||
IOleClientSite *site;
|
||||
|
@ -168,6 +169,11 @@ static inline ScriptControl *impl_from_IViewObject(IViewObject *iface)
|
|||
return CONTAINING_RECORD(iface, ScriptControl, IViewObject_iface);
|
||||
}
|
||||
|
||||
static inline ScriptControl *impl_from_IPointerInactive(IPointerInactive *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, ScriptControl, IPointerInactive_iface);
|
||||
}
|
||||
|
||||
static inline ScriptControl *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, ScriptControl, IConnectionPointContainer_iface);
|
||||
|
@ -209,6 +215,9 @@ static HRESULT WINAPI ScriptControl_QueryInterface(IScriptControl *iface, REFIID
|
|||
}else if(IsEqualGUID(&IID_IViewObject, riid)) {
|
||||
TRACE("(%p)->(IID_IViewObject %p)\n", This, ppv);
|
||||
*ppv = &This->IViewObject_iface;
|
||||
}else if(IsEqualGUID(&IID_IPointerInactive, riid)) {
|
||||
TRACE("(%p)->(IID_IPointerInactive %p)\n", This, ppv);
|
||||
*ppv = &This->IPointerInactive_iface;
|
||||
}else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
|
||||
TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
|
||||
*ppv = &This->IConnectionPointContainer_iface;
|
||||
|
@ -1047,6 +1056,62 @@ static const IViewObjectVtbl ViewObjectVtbl = {
|
|||
ViewObject_GetAdvise
|
||||
};
|
||||
|
||||
static HRESULT WINAPI PointerInactive_QueryInterface(IPointerInactive *iface, REFIID riid, void **obj)
|
||||
{
|
||||
ScriptControl *This = impl_from_IPointerInactive(iface);
|
||||
return IScriptControl_QueryInterface(&This->IScriptControl_iface, riid, obj);
|
||||
}
|
||||
|
||||
static ULONG WINAPI PointerInactive_AddRef(IPointerInactive *iface)
|
||||
{
|
||||
ScriptControl *This = impl_from_IPointerInactive(iface);
|
||||
return IScriptControl_AddRef(&This->IScriptControl_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI PointerInactive_Release(IPointerInactive *iface)
|
||||
{
|
||||
ScriptControl *This = impl_from_IPointerInactive(iface);
|
||||
return IScriptControl_Release(&This->IScriptControl_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PointerInactive_GetActivationPolicy(IPointerInactive *iface, DWORD *policy)
|
||||
{
|
||||
ScriptControl *This = impl_from_IPointerInactive(iface);
|
||||
|
||||
FIXME("(%p)->(%p)\n", This, policy);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PointerInactive_OnInactiveMouseMove(IPointerInactive *iface, const RECT *bounds,
|
||||
LONG x, LONG y, DWORD key_state)
|
||||
{
|
||||
ScriptControl *This = impl_from_IPointerInactive(iface);
|
||||
|
||||
FIXME("(%p)->(%s %d %d %#x)\n", This, wine_dbgstr_rect(bounds), x, y, key_state);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PointerInactive_OnInactiveSetCursor(IPointerInactive *iface, const RECT *bounds,
|
||||
LONG x, LONG y, DWORD msg, BOOL set_always)
|
||||
{
|
||||
ScriptControl *This = impl_from_IPointerInactive(iface);
|
||||
|
||||
FIXME("(%p)->(%s %d %d %#x %d)\n", This, wine_dbgstr_rect(bounds), x, y, msg, set_always);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IPointerInactiveVtbl PointerInactiveVtbl = {
|
||||
PointerInactive_QueryInterface,
|
||||
PointerInactive_AddRef,
|
||||
PointerInactive_Release,
|
||||
PointerInactive_GetActivationPolicy,
|
||||
PointerInactive_OnInactiveMouseMove,
|
||||
PointerInactive_OnInactiveSetCursor
|
||||
};
|
||||
|
||||
static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, REFIID riid, void **obj)
|
||||
{
|
||||
ScriptControl *This = impl_from_IConnectionPointContainer(iface);
|
||||
|
@ -1227,6 +1292,7 @@ static HRESULT WINAPI ScriptControl_CreateInstance(IClassFactory *iface, IUnknow
|
|||
script_control->IOleControl_iface.lpVtbl = &OleControlVtbl;
|
||||
script_control->IQuickActivate_iface.lpVtbl = &QuickActivateVtbl;
|
||||
script_control->IViewObject_iface.lpVtbl = &ViewObjectVtbl;
|
||||
script_control->IPointerInactive_iface.lpVtbl = &PointerInactiveVtbl;
|
||||
script_control->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl;
|
||||
script_control->ref = 1;
|
||||
script_control->site = NULL;
|
||||
|
|
|
@ -843,6 +843,23 @@ static void test_viewobject(void)
|
|||
IScriptControl_Release(sc);
|
||||
}
|
||||
|
||||
static void test_pointerinactive(void)
|
||||
{
|
||||
IPointerInactive *pi;
|
||||
IScriptControl *sc;
|
||||
HRESULT hr;
|
||||
|
||||
hr = CoCreateInstance(&CLSID_ScriptControl, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
|
||||
&IID_IScriptControl, (void**)&sc);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = IScriptControl_QueryInterface(sc, &IID_IPointerInactive, (void**)&pi);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
IPointerInactive_Release(pi);
|
||||
IScriptControl_Release(sc);
|
||||
}
|
||||
|
||||
START_TEST(msscript)
|
||||
{
|
||||
IUnknown *unk;
|
||||
|
@ -865,6 +882,7 @@ START_TEST(msscript)
|
|||
test_connectionpoints();
|
||||
test_quickactivate();
|
||||
test_viewobject();
|
||||
test_pointerinactive();
|
||||
|
||||
CoUninitialize();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue