2012-01-13 00:16:02 +01:00
|
|
|
/*
|
|
|
|
* Implementation of IDirect3DRMDevice Interface
|
|
|
|
*
|
|
|
|
* Copyright 2011, 2012 André Hentschel
|
|
|
|
*
|
|
|
|
* This file contains the (internal) driver registration functions,
|
|
|
|
* driver enumeration APIs and DirectDraw creation functions.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
|
|
|
|
|
|
|
#include "d3drm_private.h"
|
2012-01-17 22:56:24 +01:00
|
|
|
#include "initguid.h"
|
|
|
|
#include "d3drmwin.h"
|
2012-01-13 00:16:02 +01:00
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
IDirect3DRMDevice2 IDirect3DRMDevice2_iface;
|
2012-01-15 17:01:09 +01:00
|
|
|
IDirect3DRMDevice3 IDirect3DRMDevice3_iface;
|
2012-01-17 22:56:24 +01:00
|
|
|
IDirect3DRMWinDevice IDirect3DRMWinDevice_iface;
|
2012-01-13 00:16:02 +01:00
|
|
|
LONG ref;
|
2012-05-27 15:34:40 +02:00
|
|
|
BOOL dither;
|
2012-05-27 15:35:01 +02:00
|
|
|
D3DRMRENDERQUALITY quality;
|
2012-05-27 15:35:34 +02:00
|
|
|
DWORD rendermode;
|
2012-05-27 15:37:09 +02:00
|
|
|
DWORD height;
|
|
|
|
DWORD width;
|
2012-01-13 00:16:02 +01:00
|
|
|
} IDirect3DRMDeviceImpl;
|
|
|
|
|
|
|
|
static inline IDirect3DRMDeviceImpl *impl_from_IDirect3DRMDevice2(IDirect3DRMDevice2 *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, IDirect3DRMDeviceImpl, IDirect3DRMDevice2_iface);
|
|
|
|
}
|
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
static inline IDirect3DRMDeviceImpl *impl_from_IDirect3DRMDevice3(IDirect3DRMDevice3 *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, IDirect3DRMDeviceImpl, IDirect3DRMDevice3_iface);
|
|
|
|
}
|
|
|
|
|
2012-01-17 22:56:24 +01:00
|
|
|
static inline IDirect3DRMDeviceImpl *impl_from_IDirect3DRMWinDevice(IDirect3DRMWinDevice *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, IDirect3DRMDeviceImpl, IDirect3DRMWinDevice_iface);
|
|
|
|
}
|
|
|
|
|
2012-01-13 00:16:02 +01:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_QueryInterface(IDirect3DRMDevice2* iface,
|
|
|
|
REFIID riid, void** object)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
|
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
*object = NULL;
|
|
|
|
|
2012-01-13 00:16:02 +01:00
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDirect3DRMDevice) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDirect3DRMDevice2))
|
|
|
|
{
|
2012-01-15 17:01:09 +01:00
|
|
|
*object = &This->IDirect3DRMDevice2_iface;
|
|
|
|
}
|
|
|
|
else if(IsEqualGUID(riid, &IID_IDirect3DRMDevice3))
|
|
|
|
{
|
|
|
|
*object = &This->IDirect3DRMDevice3_iface;
|
|
|
|
}
|
2012-01-17 22:56:24 +01:00
|
|
|
else if(IsEqualGUID(riid, &IID_IDirect3DRMWinDevice))
|
|
|
|
{
|
|
|
|
*object = &This->IDirect3DRMWinDevice_iface;
|
|
|
|
}
|
2012-01-15 17:01:09 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
FIXME("interface %s not implemented\n", debugstr_guid(riid));
|
|
|
|
return E_NOINTERFACE;
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
IDirect3DRMDevice2_AddRef(iface);
|
|
|
|
return S_OK;
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRMDevice2Impl_AddRef(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
2012-03-16 08:16:10 +01:00
|
|
|
ULONG ref = InterlockedIncrement(&This->ref);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2012-03-16 08:16:10 +01:00
|
|
|
TRACE("(%p)->(): new ref = %d\n", iface, ref);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2012-03-16 08:16:10 +01:00
|
|
|
return ref;
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRMDevice2Impl_Release(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
ULONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
|
2012-03-16 08:16:10 +01:00
|
|
|
TRACE("(%p)->(): new ref = %d\n", iface, ref);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
|
|
|
if (!ref)
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRMObject methods ***/
|
2013-08-20 10:20:13 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_Clone(IDirect3DRMDevice2 *iface,
|
|
|
|
IUnknown *outer, REFIID iid, void **out)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
2013-08-20 10:20:13 +02:00
|
|
|
FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_AddDestroyCallback(IDirect3DRMDevice2 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_DeleteDestroyCallback(IDirect3DRMDevice2 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_SetAppData(IDirect3DRMDevice2* iface,
|
|
|
|
DWORD data)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice2Impl_GetAppData(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-09-06 09:57:43 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_SetName(IDirect3DRMDevice2 *iface, const char *name)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
2013-09-06 09:57:43 +02:00
|
|
|
FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
|
2012-01-13 00:16:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_GetName(IDirect3DRMDevice2 *iface, DWORD *size, char *name)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_GetClassName(IDirect3DRMDevice2 *iface, DWORD *size, char *name)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
IDirect3DRMDeviceImpl *device = impl_from_IDirect3DRMDevice2(iface);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
return IDirect3DRMDevice3_GetClassName(&device->IDirect3DRMDevice3_iface, size, name);
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRMDevice methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_Init(IDirect3DRMDevice2* iface, ULONG width,
|
|
|
|
ULONG height)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
TRACE("(%p/%p)->(%u, %u)\n", iface, This, width, height);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
return IDirect3DRMDevice3_Init(&This->IDirect3DRMDevice3_iface, width, height);
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
/*** IDirect3DRMDevice2 methods ***/
|
2012-11-20 22:40:20 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromD3D(IDirect3DRMDevice2 *iface,
|
|
|
|
IDirect3D *lpD3D, IDirect3DDevice *lpD3DDev)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:11 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromClipper(IDirect3DRMDevice2 *iface,
|
|
|
|
IDirectDrawClipper *lpDDClipper, GUID *lpGUID, int width, int height)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
TRACE("(%p/%p)->(%p, %p, %u, %u)\n", iface, This, lpDDClipper, lpGUID, width, height);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
return IDirect3DRMDevice3_InitFromClipper(&This->IDirect3DRMDevice3_iface, lpDDClipper, lpGUID,
|
|
|
|
width, height);
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_Update(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
2012-06-07 13:52:08 +02:00
|
|
|
return D3DRM_OK;
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_AddUpdateCallback(IDirect3DRMDevice2 *iface,
|
|
|
|
D3DRMUPDATECALLBACK cb, void *ctx)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_DeleteUpdateCallback(IDirect3DRMDevice2 *iface,
|
|
|
|
D3DRMUPDATECALLBACK cb, void *ctx)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_SetBufferCount(IDirect3DRMDevice2* iface, DWORD count)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice2Impl_GetBufferCount(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_SetDither(IDirect3DRMDevice2* iface, BOOL enable)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
2012-05-27 15:34:40 +02:00
|
|
|
TRACE("(%p/%p)->(%d)\n", iface, This, enable);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2012-05-27 15:34:40 +02:00
|
|
|
return IDirect3DRMDevice3_SetDither(&This->IDirect3DRMDevice3_iface, enable);
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_SetShades(IDirect3DRMDevice2* iface, DWORD count)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_SetQuality(IDirect3DRMDevice2* iface,
|
|
|
|
D3DRMRENDERQUALITY quality)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
2012-05-27 15:35:01 +02:00
|
|
|
TRACE("(%p/%p)->(%u)\n", iface, This, quality);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2012-05-27 15:35:01 +02:00
|
|
|
return IDirect3DRMDevice3_SetQuality(&This->IDirect3DRMDevice3_iface, quality);
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_SetTextureQuality(IDirect3DRMDevice2* iface,
|
|
|
|
D3DRMTEXTUREQUALITY quality)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, quality);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-06-05 11:06:13 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_GetViewports(IDirect3DRMDevice2 *iface, IDirect3DRMViewportArray **array)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
2013-06-05 11:06:13 +02:00
|
|
|
FIXME("iface %p, array %p stub!\n", iface, array);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static BOOL WINAPI IDirect3DRMDevice2Impl_GetDither(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
2012-05-27 15:34:40 +02:00
|
|
|
TRACE("(%p/%p)->()\n", iface, This);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2012-05-27 15:34:40 +02:00
|
|
|
return IDirect3DRMDevice3_GetDither(&This->IDirect3DRMDevice3_iface);
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice2Impl_GetShades(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice2Impl_GetHeight(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
TRACE("(%p/%p)->()\n", iface, This);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
return IDirect3DRMDevice3_GetHeight(&This->IDirect3DRMDevice3_iface);
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice2Impl_GetWidth(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
TRACE("(%p/%p)->()\n", iface, This);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
return IDirect3DRMDevice3_GetWidth(&This->IDirect3DRMDevice3_iface);
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice2Impl_GetTrianglesDrawn(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice2Impl_GetWireframeOptions(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static D3DRMRENDERQUALITY WINAPI IDirect3DRMDevice2Impl_GetQuality(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
2012-05-27 15:35:01 +02:00
|
|
|
TRACE("(%p/%p)->()\n", iface, This);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2012-05-27 15:35:01 +02:00
|
|
|
return IDirect3DRMDevice3_GetQuality(&This->IDirect3DRMDevice3_iface);
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static D3DCOLORMODEL WINAPI IDirect3DRMDevice2Impl_GetColorModel(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static D3DRMTEXTUREQUALITY WINAPI IDirect3DRMDevice2Impl_GetTextureQuality(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2012-11-20 22:40:20 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_GetDirect3DDevice(IDirect3DRMDevice2 *iface,
|
|
|
|
IDirect3DDevice **dev)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2012-11-20 22:40:19 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromD3D2(IDirect3DRMDevice2 *iface,
|
|
|
|
IDirect3D2 *lpD3D, IDirect3DDevice2 *lpD3DDev)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromSurface(IDirect3DRMDevice2 *iface, GUID *lpGUID,
|
|
|
|
IDirectDraw *lpDD, IDirectDrawSurface *lpDDSBack)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p, %p, %p): stub\n", iface, This, lpGUID, lpDD, lpDDSBack);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_SetRenderMode(IDirect3DRMDevice2* iface, DWORD dwFlags)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
2012-05-27 15:35:34 +02:00
|
|
|
TRACE("(%p/%p)->(%u)\n", iface, This, dwFlags);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2012-05-27 15:35:34 +02:00
|
|
|
return IDirect3DRMDevice3_SetRenderMode(&This->IDirect3DRMDevice3_iface, dwFlags);
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice2Impl_GetRenderMode(IDirect3DRMDevice2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
2012-05-27 15:35:34 +02:00
|
|
|
TRACE("(%p/%p)->()\n", iface, This);
|
2012-01-13 00:16:02 +01:00
|
|
|
|
2012-05-27 15:35:34 +02:00
|
|
|
return IDirect3DRMDevice3_GetRenderMode(&This->IDirect3DRMDevice3_iface);
|
2012-01-13 00:16:02 +01:00
|
|
|
}
|
|
|
|
|
2012-11-20 22:40:19 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice2Impl_GetDirect3DDevice2(IDirect3DRMDevice2 *iface,
|
|
|
|
IDirect3DDevice2 **dev)
|
2012-01-13 00:16:02 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IDirect3DRMDevice2Vtbl Direct3DRMDevice2_Vtbl =
|
|
|
|
{
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
IDirect3DRMDevice2Impl_QueryInterface,
|
|
|
|
IDirect3DRMDevice2Impl_AddRef,
|
|
|
|
IDirect3DRMDevice2Impl_Release,
|
|
|
|
/*** IDirect3DRMObject methods ***/
|
|
|
|
IDirect3DRMDevice2Impl_Clone,
|
|
|
|
IDirect3DRMDevice2Impl_AddDestroyCallback,
|
|
|
|
IDirect3DRMDevice2Impl_DeleteDestroyCallback,
|
|
|
|
IDirect3DRMDevice2Impl_SetAppData,
|
|
|
|
IDirect3DRMDevice2Impl_GetAppData,
|
|
|
|
IDirect3DRMDevice2Impl_SetName,
|
|
|
|
IDirect3DRMDevice2Impl_GetName,
|
|
|
|
IDirect3DRMDevice2Impl_GetClassName,
|
|
|
|
/*** IDirect3DRMDevice methods ***/
|
|
|
|
IDirect3DRMDevice2Impl_Init,
|
|
|
|
IDirect3DRMDevice2Impl_InitFromD3D,
|
|
|
|
IDirect3DRMDevice2Impl_InitFromClipper,
|
|
|
|
IDirect3DRMDevice2Impl_Update,
|
|
|
|
IDirect3DRMDevice2Impl_AddUpdateCallback,
|
|
|
|
IDirect3DRMDevice2Impl_DeleteUpdateCallback,
|
|
|
|
IDirect3DRMDevice2Impl_SetBufferCount,
|
|
|
|
IDirect3DRMDevice2Impl_GetBufferCount,
|
|
|
|
IDirect3DRMDevice2Impl_SetDither,
|
|
|
|
IDirect3DRMDevice2Impl_SetShades,
|
|
|
|
IDirect3DRMDevice2Impl_SetQuality,
|
|
|
|
IDirect3DRMDevice2Impl_SetTextureQuality,
|
|
|
|
IDirect3DRMDevice2Impl_GetViewports,
|
|
|
|
IDirect3DRMDevice2Impl_GetDither,
|
|
|
|
IDirect3DRMDevice2Impl_GetShades,
|
|
|
|
IDirect3DRMDevice2Impl_GetHeight,
|
|
|
|
IDirect3DRMDevice2Impl_GetWidth,
|
|
|
|
IDirect3DRMDevice2Impl_GetTrianglesDrawn,
|
|
|
|
IDirect3DRMDevice2Impl_GetWireframeOptions,
|
|
|
|
IDirect3DRMDevice2Impl_GetQuality,
|
|
|
|
IDirect3DRMDevice2Impl_GetColorModel,
|
|
|
|
IDirect3DRMDevice2Impl_GetTextureQuality,
|
|
|
|
IDirect3DRMDevice2Impl_GetDirect3DDevice,
|
|
|
|
/*** IDirect3DRMDevice2 methods ***/
|
|
|
|
IDirect3DRMDevice2Impl_InitFromD3D2,
|
|
|
|
IDirect3DRMDevice2Impl_InitFromSurface,
|
|
|
|
IDirect3DRMDevice2Impl_SetRenderMode,
|
|
|
|
IDirect3DRMDevice2Impl_GetRenderMode,
|
|
|
|
IDirect3DRMDevice2Impl_GetDirect3DDevice2
|
|
|
|
};
|
2012-01-15 17:01:09 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_QueryInterface(IDirect3DRMDevice3* iface,
|
|
|
|
REFIID riid, void** object)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
return IDirect3DRMDevice2_QueryInterface(&This->IDirect3DRMDevice2_iface, riid, object);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRMDevice3Impl_AddRef(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
2012-01-17 22:58:58 +01:00
|
|
|
return IDirect3DRMDevice2_AddRef(&This->IDirect3DRMDevice2_iface);
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRMDevice3Impl_Release(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
2012-01-17 22:58:58 +01:00
|
|
|
return IDirect3DRMDevice2_Release(&This->IDirect3DRMDevice2_iface);
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRMObject methods ***/
|
2013-08-20 10:20:13 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_Clone(IDirect3DRMDevice3 *iface,
|
|
|
|
IUnknown *outer, REFIID iid, void **out)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
2013-08-20 10:20:13 +02:00
|
|
|
FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_AddDestroyCallback(IDirect3DRMDevice3 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_DeleteDestroyCallback(IDirect3DRMDevice3 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_SetAppData(IDirect3DRMDevice3* iface,
|
|
|
|
DWORD data)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice3Impl_GetAppData(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-09-06 09:57:43 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_SetName(IDirect3DRMDevice3 *iface, const char *name)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
2013-09-06 09:57:43 +02:00
|
|
|
FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
|
2012-01-15 17:01:09 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_GetName(IDirect3DRMDevice3 *iface, DWORD *size, char *name)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_GetClassName(IDirect3DRMDevice3 *iface, DWORD *size, char *name)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
2012-06-17 19:02:53 +02:00
|
|
|
if (!size || *size < strlen("Device") || !name)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
strcpy(name, "Device");
|
|
|
|
*size = sizeof("Device");
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRMDevice methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_Init(IDirect3DRMDevice3* iface, ULONG width,
|
|
|
|
ULONG height)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u, %u): stub\n", iface, This, width, height);
|
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
This->height = height;
|
|
|
|
This->width = width;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
2012-11-20 22:40:20 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromD3D(IDirect3DRMDevice3 *iface,
|
|
|
|
IDirect3D *lpD3D, IDirect3DDevice *lpD3DDev)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:11 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromClipper(IDirect3DRMDevice3 *iface,
|
|
|
|
IDirectDrawClipper *lpDDClipper, GUID *lpGUID, int width, int height)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p, %p, %u, %u): stub\n", iface, This, lpDDClipper, lpGUID, width, height);
|
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
This->height = height;
|
|
|
|
This->width = width;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_Update(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
2012-06-07 13:52:08 +02:00
|
|
|
return D3DRM_OK;
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_AddUpdateCallback(IDirect3DRMDevice3 *iface,
|
|
|
|
D3DRMUPDATECALLBACK cb, void *ctx)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_DeleteUpdateCallback(IDirect3DRMDevice3 *iface,
|
|
|
|
D3DRMUPDATECALLBACK cb, void *ctx)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_SetBufferCount(IDirect3DRMDevice3* iface, DWORD count)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice3Impl_GetBufferCount(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_SetDither(IDirect3DRMDevice3* iface, BOOL enable)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
2012-05-27 15:34:40 +02:00
|
|
|
TRACE("(%p/%p)->(%d)\n", iface, This, enable);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
2012-05-27 15:34:40 +02:00
|
|
|
This->dither = enable;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_SetShades(IDirect3DRMDevice3* iface, DWORD count)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_SetQuality(IDirect3DRMDevice3* iface,
|
|
|
|
D3DRMRENDERQUALITY quality)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
2012-05-27 15:35:01 +02:00
|
|
|
TRACE("(%p/%p)->(%u)\n", iface, This, quality);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
2012-05-27 15:35:01 +02:00
|
|
|
This->quality = quality;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_SetTextureQuality(IDirect3DRMDevice3* iface,
|
|
|
|
D3DRMTEXTUREQUALITY quality)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, quality);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-06-05 11:06:13 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_GetViewports(IDirect3DRMDevice3 *iface, IDirect3DRMViewportArray **array)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
2013-06-05 11:06:13 +02:00
|
|
|
FIXME("iface %p, array %p stub!\n", iface, array);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static BOOL WINAPI IDirect3DRMDevice3Impl_GetDither(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
2012-05-27 15:34:40 +02:00
|
|
|
TRACE("(%p/%p)->()\n", iface, This);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
2012-05-27 15:34:40 +02:00
|
|
|
return This->dither;
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice3Impl_GetShades(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice3Impl_GetHeight(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
TRACE("(%p/%p)->()\n", iface, This);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
return This->height;
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice3Impl_GetWidth(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
TRACE("(%p/%p)->()\n", iface, This);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
2012-05-27 15:37:09 +02:00
|
|
|
return This->width;
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice3Impl_GetTrianglesDrawn(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice3Impl_GetWireframeOptions(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static D3DRMRENDERQUALITY WINAPI IDirect3DRMDevice3Impl_GetQuality(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
2012-05-27 15:35:01 +02:00
|
|
|
TRACE("(%p/%p)->()\n", iface, This);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
2012-05-27 15:35:01 +02:00
|
|
|
return This->quality;
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static D3DCOLORMODEL WINAPI IDirect3DRMDevice3Impl_GetColorModel(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static D3DRMTEXTUREQUALITY WINAPI IDirect3DRMDevice3Impl_GetTextureQuality(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2012-11-20 22:40:20 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_GetDirect3DDevice(IDirect3DRMDevice3 *iface,
|
|
|
|
IDirect3DDevice **dev)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRMDevice2 methods ***/
|
2012-11-20 22:40:19 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromD3D2(IDirect3DRMDevice3 *iface,
|
|
|
|
IDirect3D2 *lpD3D, IDirect3DDevice2 *lpD3DDev)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromSurface(IDirect3DRMDevice3 *iface, GUID *lpGUID,
|
|
|
|
IDirectDraw *lpDD, IDirectDrawSurface *lpDDSBack)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p, %p, %p): stub\n", iface, This, lpGUID, lpDD, lpDDSBack);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_SetRenderMode(IDirect3DRMDevice3* iface, DWORD dwFlags)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
2012-05-27 15:35:34 +02:00
|
|
|
TRACE("(%p/%p)->(%u)\n", iface, This, dwFlags);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
2012-05-27 15:35:34 +02:00
|
|
|
This->rendermode = dwFlags;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMDevice3Impl_GetRenderMode(IDirect3DRMDevice3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
2012-05-27 15:35:34 +02:00
|
|
|
TRACE("(%p/%p)->()\n", iface, This);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
2012-05-27 15:35:34 +02:00
|
|
|
return This->rendermode;
|
2012-01-15 17:01:09 +01:00
|
|
|
}
|
|
|
|
|
2012-11-20 22:40:19 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_GetDirect3DDevice2(IDirect3DRMDevice3 *iface,
|
|
|
|
IDirect3DDevice2 **dev)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRMDevice3 methods ***/
|
2013-01-22 11:34:06 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_FindPreferredTextureFormat(IDirect3DRMDevice3 *iface,
|
|
|
|
DWORD bitdepths, DWORD flags, DDPIXELFORMAT *lpDDPF)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface, This, bitdepths, flags, lpDDPF);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_RenderStateChange(IDirect3DRMDevice3* iface,
|
|
|
|
D3DRENDERSTATETYPE type, DWORD val,
|
|
|
|
DWORD flags)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface, This, type, val, flags);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_LightStateChange(IDirect3DRMDevice3* iface,
|
|
|
|
D3DLIGHTSTATETYPE type, DWORD val,
|
|
|
|
DWORD flags)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface, This, type, val, flags);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-10 09:32:35 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_GetStateChangeOptions(IDirect3DRMDevice3 *iface,
|
|
|
|
DWORD state_class, DWORD state_idx, DWORD *flags)
|
2012-01-15 17:01:09 +01:00
|
|
|
{
|
2013-09-10 09:32:35 +02:00
|
|
|
FIXME("iface %p, state_class %#x, state_idx %#x, flags %p stub!\n",
|
|
|
|
iface, state_class, state_idx, flags);
|
2012-01-15 17:01:09 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMDevice3Impl_SetStateChangeOptions(IDirect3DRMDevice3* iface,
|
|
|
|
DWORD stateclass, DWORD statenum,
|
|
|
|
DWORD flags)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface, This, stateclass, statenum, flags);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IDirect3DRMDevice3Vtbl Direct3DRMDevice3_Vtbl =
|
|
|
|
{
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
IDirect3DRMDevice3Impl_QueryInterface,
|
|
|
|
IDirect3DRMDevice3Impl_AddRef,
|
|
|
|
IDirect3DRMDevice3Impl_Release,
|
|
|
|
/*** IDirect3DRMObject methods ***/
|
|
|
|
IDirect3DRMDevice3Impl_Clone,
|
|
|
|
IDirect3DRMDevice3Impl_AddDestroyCallback,
|
|
|
|
IDirect3DRMDevice3Impl_DeleteDestroyCallback,
|
|
|
|
IDirect3DRMDevice3Impl_SetAppData,
|
|
|
|
IDirect3DRMDevice3Impl_GetAppData,
|
|
|
|
IDirect3DRMDevice3Impl_SetName,
|
|
|
|
IDirect3DRMDevice3Impl_GetName,
|
|
|
|
IDirect3DRMDevice3Impl_GetClassName,
|
|
|
|
/*** IDirect3DRMDevice methods ***/
|
|
|
|
IDirect3DRMDevice3Impl_Init,
|
|
|
|
IDirect3DRMDevice3Impl_InitFromD3D,
|
|
|
|
IDirect3DRMDevice3Impl_InitFromClipper,
|
|
|
|
IDirect3DRMDevice3Impl_Update,
|
|
|
|
IDirect3DRMDevice3Impl_AddUpdateCallback,
|
|
|
|
IDirect3DRMDevice3Impl_DeleteUpdateCallback,
|
|
|
|
IDirect3DRMDevice3Impl_SetBufferCount,
|
|
|
|
IDirect3DRMDevice3Impl_GetBufferCount,
|
|
|
|
IDirect3DRMDevice3Impl_SetDither,
|
|
|
|
IDirect3DRMDevice3Impl_SetShades,
|
|
|
|
IDirect3DRMDevice3Impl_SetQuality,
|
|
|
|
IDirect3DRMDevice3Impl_SetTextureQuality,
|
|
|
|
IDirect3DRMDevice3Impl_GetViewports,
|
|
|
|
IDirect3DRMDevice3Impl_GetDither,
|
|
|
|
IDirect3DRMDevice3Impl_GetShades,
|
|
|
|
IDirect3DRMDevice3Impl_GetHeight,
|
|
|
|
IDirect3DRMDevice3Impl_GetWidth,
|
|
|
|
IDirect3DRMDevice3Impl_GetTrianglesDrawn,
|
|
|
|
IDirect3DRMDevice3Impl_GetWireframeOptions,
|
|
|
|
IDirect3DRMDevice3Impl_GetQuality,
|
|
|
|
IDirect3DRMDevice3Impl_GetColorModel,
|
|
|
|
IDirect3DRMDevice3Impl_GetTextureQuality,
|
|
|
|
IDirect3DRMDevice3Impl_GetDirect3DDevice,
|
|
|
|
/*** IDirect3DRMDevice2 methods ***/
|
|
|
|
IDirect3DRMDevice3Impl_InitFromD3D2,
|
|
|
|
IDirect3DRMDevice3Impl_InitFromSurface,
|
|
|
|
IDirect3DRMDevice3Impl_SetRenderMode,
|
|
|
|
IDirect3DRMDevice3Impl_GetRenderMode,
|
|
|
|
IDirect3DRMDevice3Impl_GetDirect3DDevice2,
|
|
|
|
/*** IDirect3DRMDevice3 methods ***/
|
|
|
|
IDirect3DRMDevice3Impl_FindPreferredTextureFormat,
|
|
|
|
IDirect3DRMDevice3Impl_RenderStateChange,
|
|
|
|
IDirect3DRMDevice3Impl_LightStateChange,
|
|
|
|
IDirect3DRMDevice3Impl_GetStateChangeOptions,
|
|
|
|
IDirect3DRMDevice3Impl_SetStateChangeOptions
|
|
|
|
};
|
2012-01-17 22:56:13 +01:00
|
|
|
|
2012-01-17 22:56:24 +01:00
|
|
|
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMWinDeviceImpl_QueryInterface(IDirect3DRMWinDevice* iface,
|
|
|
|
REFIID riid, void** object)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
|
|
|
|
return IDirect3DRMDevice2_QueryInterface(&This->IDirect3DRMDevice2_iface, riid, object);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRMWinDeviceImpl_AddRef(IDirect3DRMWinDevice* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
|
|
|
|
return IDirect3DRMDevice2_AddRef(&This->IDirect3DRMDevice2_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRMWinDeviceImpl_Release(IDirect3DRMWinDevice* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
|
|
|
|
return IDirect3DRMDevice2_Release(&This->IDirect3DRMDevice2_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRMObject methods ***/
|
2013-08-20 10:20:13 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMWinDeviceImpl_Clone(IDirect3DRMWinDevice *iface,
|
|
|
|
IUnknown *outer, REFIID iid, void **out)
|
2012-01-17 22:56:24 +01:00
|
|
|
{
|
2013-08-20 10:20:13 +02:00
|
|
|
FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
|
2012-01-17 22:56:24 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMWinDeviceImpl_AddDestroyCallback(IDirect3DRMWinDevice *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2012-01-17 22:56:24 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2012-01-17 22:56:24 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMWinDeviceImpl_DeleteDestroyCallback(IDirect3DRMWinDevice *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2012-01-17 22:56:24 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2012-01-17 22:56:24 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMWinDeviceImpl_SetAppData(IDirect3DRMWinDevice* iface,
|
|
|
|
DWORD data)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMWinDeviceImpl_GetAppData(IDirect3DRMWinDevice* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-09-06 09:57:43 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMWinDeviceImpl_SetName(IDirect3DRMWinDevice *iface, const char *name)
|
2012-01-17 22:56:24 +01:00
|
|
|
{
|
2013-09-06 09:57:43 +02:00
|
|
|
FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
|
2012-01-17 22:56:24 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMWinDeviceImpl_GetName(IDirect3DRMWinDevice *iface, DWORD *size, char *name)
|
2012-01-17 22:56:24 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
|
2012-01-17 22:56:24 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMWinDeviceImpl_GetClassName(IDirect3DRMWinDevice *iface, DWORD *size, char *name)
|
2012-01-17 22:56:24 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
IDirect3DRMDeviceImpl *device = impl_from_IDirect3DRMWinDevice(iface);
|
2012-01-17 22:56:24 +01:00
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
2012-01-17 22:56:24 +01:00
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
return IDirect3DRMDevice3_GetClassName(&device->IDirect3DRMDevice3_iface, size, name);
|
2012-01-17 22:56:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRMWinDevice methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMWinDeviceImpl_HandlePaint(IDirect3DRMWinDevice* iface, HDC hdc)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, hdc);
|
|
|
|
|
2012-06-07 13:55:03 +02:00
|
|
|
return D3DRM_OK;
|
2012-01-17 22:56:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMWinDeviceImpl_HandleActivate(IDirect3DRMWinDevice* iface, WORD wparam)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, wparam);
|
|
|
|
|
2012-05-27 15:37:40 +02:00
|
|
|
return D3DRM_OK;
|
2012-01-17 22:56:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IDirect3DRMWinDeviceVtbl Direct3DRMWinDevice_Vtbl =
|
|
|
|
{
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
IDirect3DRMWinDeviceImpl_QueryInterface,
|
|
|
|
IDirect3DRMWinDeviceImpl_AddRef,
|
|
|
|
IDirect3DRMWinDeviceImpl_Release,
|
|
|
|
/*** IDirect3DRMObject methods ***/
|
|
|
|
IDirect3DRMWinDeviceImpl_Clone,
|
|
|
|
IDirect3DRMWinDeviceImpl_AddDestroyCallback,
|
|
|
|
IDirect3DRMWinDeviceImpl_DeleteDestroyCallback,
|
|
|
|
IDirect3DRMWinDeviceImpl_SetAppData,
|
|
|
|
IDirect3DRMWinDeviceImpl_GetAppData,
|
|
|
|
IDirect3DRMWinDeviceImpl_SetName,
|
|
|
|
IDirect3DRMWinDeviceImpl_GetName,
|
|
|
|
IDirect3DRMWinDeviceImpl_GetClassName,
|
|
|
|
/*** IDirect3DRMWinDevice methods ***/
|
|
|
|
IDirect3DRMWinDeviceImpl_HandlePaint,
|
|
|
|
IDirect3DRMWinDeviceImpl_HandleActivate
|
|
|
|
};
|
|
|
|
|
2012-01-17 22:56:13 +01:00
|
|
|
HRESULT Direct3DRMDevice_create(REFIID riid, IUnknown** ppObj)
|
|
|
|
{
|
|
|
|
IDirect3DRMDeviceImpl* object;
|
|
|
|
|
|
|
|
TRACE("(%p)\n", ppObj);
|
|
|
|
|
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMDeviceImpl));
|
|
|
|
if (!object)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
object->IDirect3DRMDevice2_iface.lpVtbl = &Direct3DRMDevice2_Vtbl;
|
|
|
|
object->IDirect3DRMDevice3_iface.lpVtbl = &Direct3DRMDevice3_Vtbl;
|
2012-01-17 22:56:24 +01:00
|
|
|
object->IDirect3DRMWinDevice_iface.lpVtbl = &Direct3DRMWinDevice_Vtbl;
|
2012-01-17 22:56:13 +01:00
|
|
|
object->ref = 1;
|
|
|
|
|
|
|
|
if (IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
|
|
|
|
*ppObj = (IUnknown*)&object->IDirect3DRMDevice3_iface;
|
|
|
|
else
|
|
|
|
*ppObj = (IUnknown*)&object->IDirect3DRMDevice2_iface;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|