directmanipulation: Implement IDirectManipulationContent stub interface.

Based on patch by Gijs Vermeulen.

Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2019-12-22 19:35:25 +11:00 committed by Alexandre Julliard
parent 302164c759
commit 7171a63f06
1 changed files with 109 additions and 1 deletions

View File

@ -177,10 +177,10 @@ static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
return S_OK;
}
struct primarycontext
{
IDirectManipulationPrimaryContent IDirectManipulationPrimaryContent_iface;
IDirectManipulationContent IDirectManipulationContent_iface;
LONG ref;
};
@ -189,6 +189,11 @@ static inline struct primarycontext *impl_from_IDirectManipulationPrimaryContent
return CONTAINING_RECORD(iface, struct primarycontext, IDirectManipulationPrimaryContent_iface);
}
static inline struct primarycontext *impl_from_IDirectManipulationContent(IDirectManipulationContent *iface)
{
return CONTAINING_RECORD(iface, struct primarycontext, IDirectManipulationContent_iface);
}
static HRESULT WINAPI primary_QueryInterface(IDirectManipulationPrimaryContent *iface, REFIID riid, void **ppv)
{
struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
@ -201,6 +206,12 @@ static HRESULT WINAPI primary_QueryInterface(IDirectManipulationPrimaryContent *
*ppv = &This->IDirectManipulationPrimaryContent_iface;
return S_OK;
}
else if(IsEqualGUID(riid, &IID_IDirectManipulationContent))
{
IUnknown_AddRef(iface);
*ppv = &This->IDirectManipulationContent_iface;
return S_OK;
}
FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
return E_NOINTERFACE;
@ -313,6 +324,102 @@ static const IDirectManipulationPrimaryContentVtbl primaryVtbl =
primary_GetCenterPoint
};
static HRESULT WINAPI content_QueryInterface(IDirectManipulationContent *iface, REFIID riid, void **ppv)
{
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
return IDirectManipulationPrimaryContent_QueryInterface(&This->IDirectManipulationPrimaryContent_iface,
riid, ppv);
}
static ULONG WINAPI content_AddRef(IDirectManipulationContent *iface)
{
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
return IDirectManipulationPrimaryContent_AddRef(&This->IDirectManipulationPrimaryContent_iface);
}
static ULONG WINAPI content_Release(IDirectManipulationContent *iface)
{
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
return IDirectManipulationPrimaryContent_Release(&This->IDirectManipulationPrimaryContent_iface);
}
static HRESULT WINAPI content_GetContentRect(IDirectManipulationContent *iface, RECT *size)
{
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
FIXME("%p, %p\n", This, size);
return E_NOTIMPL;
}
static HRESULT WINAPI content_SetContentRect(IDirectManipulationContent *iface, const RECT *size)
{
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
FIXME("%p, %p\n", This, size);
return E_NOTIMPL;
}
static HRESULT WINAPI content_GetViewport(IDirectManipulationContent *iface, REFIID riid, void **object)
{
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
FIXME("%p, %p, %p\n", This, debugstr_guid(riid), object);
return E_NOTIMPL;
}
static HRESULT WINAPI content_GetTag(IDirectManipulationContent *iface, REFIID riid, void **object, UINT32 *id)
{
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
FIXME("%p, %p, %p, %p\n", This, debugstr_guid(riid), object, id);
return E_NOTIMPL;
}
static HRESULT WINAPI content_SetTag(IDirectManipulationContent *iface, IUnknown *object, UINT32 id)
{
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
FIXME("%p, %p, %d\n", This, object, id);
return E_NOTIMPL;
}
static HRESULT WINAPI content_GetOutputTransform(IDirectManipulationContent *iface,
float *matrix, DWORD count)
{
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
FIXME("%p, %p, %d\n", This, matrix, count);
return E_NOTIMPL;
}
static HRESULT WINAPI content_GetContentTransform(IDirectManipulationContent *iface,
float *matrix, DWORD count)
{
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
FIXME("%p, %p, %d\n", This, matrix, count);
return E_NOTIMPL;
}
static HRESULT WINAPI content_SyncContentTransform(IDirectManipulationContent *iface,
const float *matrix, DWORD count)
{
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
FIXME("%p, %p, %d\n", This, matrix, count);
return E_NOTIMPL;
}
static const IDirectManipulationContentVtbl contentVtbl =
{
content_QueryInterface,
content_AddRef,
content_Release,
content_GetContentRect,
content_SetContentRect,
content_GetViewport,
content_GetTag,
content_SetTag,
content_GetOutputTransform,
content_GetContentTransform,
content_SyncContentTransform
};
struct directviewport
{
IDirectManipulationViewport2 IDirectManipulationViewport2_iface;
@ -473,6 +580,7 @@ static HRESULT WINAPI viewport_GetPrimaryContent(IDirectManipulationViewport2 *i
return E_OUTOFMEMORY;
primary->IDirectManipulationPrimaryContent_iface.lpVtbl = &primaryVtbl;
primary->IDirectManipulationContent_iface.lpVtbl = &contentVtbl;
primary->ref = 1;
*object = &primary->IDirectManipulationPrimaryContent_iface;