2 * Implementation of IDirect3DRMDevice Interface
4 * Copyright 2011, 2012 André Hentschel
6 * This file contains the (internal) driver registration functions,
7 * driver enumeration APIs and DirectDraw creation functions.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #include "wine/debug.h"
31 #include "d3drm_private.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(d3drm
);
38 IDirect3DRMDevice2 IDirect3DRMDevice2_iface
;
39 IDirect3DRMDevice3 IDirect3DRMDevice3_iface
;
40 IDirect3DRMWinDevice IDirect3DRMWinDevice_iface
;
42 } IDirect3DRMDeviceImpl
;
44 static inline IDirect3DRMDeviceImpl
*impl_from_IDirect3DRMDevice2(IDirect3DRMDevice2
*iface
)
46 return CONTAINING_RECORD(iface
, IDirect3DRMDeviceImpl
, IDirect3DRMDevice2_iface
);
49 static inline IDirect3DRMDeviceImpl
*impl_from_IDirect3DRMDevice3(IDirect3DRMDevice3
*iface
)
51 return CONTAINING_RECORD(iface
, IDirect3DRMDeviceImpl
, IDirect3DRMDevice3_iface
);
54 static inline IDirect3DRMDeviceImpl
*impl_from_IDirect3DRMWinDevice(IDirect3DRMWinDevice
*iface
)
56 return CONTAINING_RECORD(iface
, IDirect3DRMDeviceImpl
, IDirect3DRMWinDevice_iface
);
59 /*** IUnknown methods ***/
60 static HRESULT WINAPI
IDirect3DRMDevice2Impl_QueryInterface(IDirect3DRMDevice2
* iface
,
61 REFIID riid
, void** object
)
63 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
65 TRACE("(%p/%p)->(%s, %p)\n", iface
, This
, debugstr_guid(riid
), object
);
69 if (IsEqualGUID(riid
, &IID_IUnknown
) ||
70 IsEqualGUID(riid
, &IID_IDirect3DRMDevice
) ||
71 IsEqualGUID(riid
, &IID_IDirect3DRMDevice2
))
73 *object
= &This
->IDirect3DRMDevice2_iface
;
75 else if(IsEqualGUID(riid
, &IID_IDirect3DRMDevice3
))
77 *object
= &This
->IDirect3DRMDevice3_iface
;
79 else if(IsEqualGUID(riid
, &IID_IDirect3DRMWinDevice
))
81 *object
= &This
->IDirect3DRMWinDevice_iface
;
85 FIXME("interface %s not implemented\n", debugstr_guid(riid
));
89 IDirect3DRMDevice2_AddRef(iface
);
93 static ULONG WINAPI
IDirect3DRMDevice2Impl_AddRef(IDirect3DRMDevice2
* iface
)
95 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
97 TRACE("(%p)\n", This
);
99 return InterlockedIncrement(&This
->ref
);
102 static ULONG WINAPI
IDirect3DRMDevice2Impl_Release(IDirect3DRMDevice2
* iface
)
104 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
105 ULONG ref
= InterlockedDecrement(&This
->ref
);
107 TRACE("(%p)\n", This
);
110 HeapFree(GetProcessHeap(), 0, This
);
115 /*** IDirect3DRMObject methods ***/
116 static HRESULT WINAPI
IDirect3DRMDevice2Impl_Clone(IDirect3DRMDevice2
* iface
,
117 LPUNKNOWN unkwn
, REFIID riid
,
120 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
122 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface
, This
, unkwn
, debugstr_guid(riid
), object
);
127 static HRESULT WINAPI
IDirect3DRMDevice2Impl_AddDestroyCallback(IDirect3DRMDevice2
* iface
,
128 D3DRMOBJECTCALLBACK cb
,
131 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
133 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
138 static HRESULT WINAPI
IDirect3DRMDevice2Impl_DeleteDestroyCallback(IDirect3DRMDevice2
* iface
,
139 D3DRMOBJECTCALLBACK cb
,
142 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
144 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
149 static HRESULT WINAPI
IDirect3DRMDevice2Impl_SetAppData(IDirect3DRMDevice2
* iface
,
152 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
154 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, data
);
159 static DWORD WINAPI
IDirect3DRMDevice2Impl_GetAppData(IDirect3DRMDevice2
* iface
)
161 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
163 FIXME("(%p/%p)->(): stub\n", iface
, This
);
168 static HRESULT WINAPI
IDirect3DRMDevice2Impl_SetName(IDirect3DRMDevice2
* iface
, LPCSTR name
)
170 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
172 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, name
);
177 static HRESULT WINAPI
IDirect3DRMDevice2Impl_GetName(IDirect3DRMDevice2
* iface
,
178 LPDWORD size
, LPSTR name
)
180 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
182 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, size
, name
);
187 static HRESULT WINAPI
IDirect3DRMDevice2Impl_GetClassName(IDirect3DRMDevice2
* iface
,
188 LPDWORD size
, LPSTR name
)
190 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
192 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, size
, name
);
197 /*** IDirect3DRMDevice methods ***/
198 static HRESULT WINAPI
IDirect3DRMDevice2Impl_Init(IDirect3DRMDevice2
* iface
, ULONG width
,
201 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
203 FIXME("(%p/%p)->(%u, %u): stub\n", iface
, This
, width
, height
);
208 /*** IDirect3DRMDevice2 methods ***/
209 static HRESULT WINAPI
IDirect3DRMDevice2Impl_InitFromD3D(IDirect3DRMDevice2
* iface
,
211 LPDIRECT3DDEVICE lpD3DDev
)
213 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
215 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, lpD3D
, lpD3DDev
);
220 static HRESULT WINAPI
IDirect3DRMDevice2Impl_InitFromClipper(IDirect3DRMDevice2
* iface
,
221 LPDIRECTDRAWCLIPPER lpDDClipper
,
222 LPGUID lpGUID
, int width
, int height
)
224 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
226 FIXME("(%p/%p)->(%p, %p, %u, %u): stub\n", iface
, This
, lpDDClipper
, lpGUID
, width
, height
);
231 static HRESULT WINAPI
IDirect3DRMDevice2Impl_Update(IDirect3DRMDevice2
* iface
)
233 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
235 FIXME("(%p/%p)->(): stub\n", iface
, This
);
240 static HRESULT WINAPI
IDirect3DRMDevice2Impl_AddUpdateCallback(IDirect3DRMDevice2
* iface
,
241 D3DRMUPDATECALLBACK cb
, LPVOID arg
)
243 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
245 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, arg
);
250 static HRESULT WINAPI
IDirect3DRMDevice2Impl_DeleteUpdateCallback(IDirect3DRMDevice2
* iface
,
251 D3DRMUPDATECALLBACK cb
,
254 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
256 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, arg
);
261 static HRESULT WINAPI
IDirect3DRMDevice2Impl_SetBufferCount(IDirect3DRMDevice2
* iface
, DWORD count
)
263 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
265 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, count
);
270 static DWORD WINAPI
IDirect3DRMDevice2Impl_GetBufferCount(IDirect3DRMDevice2
* iface
)
272 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
274 FIXME("(%p/%p)->(): stub\n", iface
, This
);
279 static HRESULT WINAPI
IDirect3DRMDevice2Impl_SetDither(IDirect3DRMDevice2
* iface
, BOOL enable
)
281 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
283 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, enable
);
288 static HRESULT WINAPI
IDirect3DRMDevice2Impl_SetShades(IDirect3DRMDevice2
* iface
, DWORD count
)
290 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
292 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, count
);
297 static HRESULT WINAPI
IDirect3DRMDevice2Impl_SetQuality(IDirect3DRMDevice2
* iface
,
298 D3DRMRENDERQUALITY quality
)
300 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
302 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, quality
);
307 static HRESULT WINAPI
IDirect3DRMDevice2Impl_SetTextureQuality(IDirect3DRMDevice2
* iface
,
308 D3DRMTEXTUREQUALITY quality
)
310 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
312 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, quality
);
317 static HRESULT WINAPI
IDirect3DRMDevice2Impl_GetViewports(IDirect3DRMDevice2
* iface
,
318 LPDIRECT3DRMVIEWPORTARRAY
*return_views
)
320 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
322 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, return_views
);
327 static BOOL WINAPI
IDirect3DRMDevice2Impl_GetDither(IDirect3DRMDevice2
* iface
)
329 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
331 FIXME("(%p/%p)->(): stub\n", iface
, This
);
336 static DWORD WINAPI
IDirect3DRMDevice2Impl_GetShades(IDirect3DRMDevice2
* iface
)
338 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
340 FIXME("(%p/%p)->(): stub\n", iface
, This
);
345 static DWORD WINAPI
IDirect3DRMDevice2Impl_GetHeight(IDirect3DRMDevice2
* iface
)
347 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
349 FIXME("(%p/%p)->(): stub\n", iface
, This
);
354 static DWORD WINAPI
IDirect3DRMDevice2Impl_GetWidth(IDirect3DRMDevice2
* iface
)
356 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
358 FIXME("(%p/%p)->(): stub\n", iface
, This
);
363 static DWORD WINAPI
IDirect3DRMDevice2Impl_GetTrianglesDrawn(IDirect3DRMDevice2
* iface
)
365 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
367 FIXME("(%p/%p)->(): stub\n", iface
, This
);
372 static DWORD WINAPI
IDirect3DRMDevice2Impl_GetWireframeOptions(IDirect3DRMDevice2
* iface
)
374 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
376 FIXME("(%p/%p)->(): stub\n", iface
, This
);
381 static D3DRMRENDERQUALITY WINAPI
IDirect3DRMDevice2Impl_GetQuality(IDirect3DRMDevice2
* iface
)
383 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
385 FIXME("(%p/%p)->(): stub\n", iface
, This
);
390 static D3DCOLORMODEL WINAPI
IDirect3DRMDevice2Impl_GetColorModel(IDirect3DRMDevice2
* iface
)
392 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
394 FIXME("(%p/%p)->(): stub\n", iface
, This
);
399 static D3DRMTEXTUREQUALITY WINAPI
IDirect3DRMDevice2Impl_GetTextureQuality(IDirect3DRMDevice2
* iface
)
401 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
403 FIXME("(%p/%p)->(): stub\n", iface
, This
);
408 static HRESULT WINAPI
IDirect3DRMDevice2Impl_GetDirect3DDevice(IDirect3DRMDevice2
* iface
,
409 LPDIRECT3DDEVICE
* dev
)
411 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
413 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, dev
);
418 static HRESULT WINAPI
IDirect3DRMDevice2Impl_InitFromD3D2(IDirect3DRMDevice2
* iface
,
420 LPDIRECT3DDEVICE2 lpD3DDev
)
422 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
424 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, lpD3D
, lpD3DDev
);
429 static HRESULT WINAPI
IDirect3DRMDevice2Impl_InitFromSurface(IDirect3DRMDevice2
* iface
,
430 LPGUID lpGUID
, LPDIRECTDRAW lpDD
,
431 LPDIRECTDRAWSURFACE lpDDSBack
)
433 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
435 FIXME("(%p/%p)->(%p, %p, %p): stub\n", iface
, This
, lpGUID
, lpDD
, lpDDSBack
);
440 static HRESULT WINAPI
IDirect3DRMDevice2Impl_SetRenderMode(IDirect3DRMDevice2
* iface
, DWORD dwFlags
)
442 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
444 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, dwFlags
);
449 static DWORD WINAPI
IDirect3DRMDevice2Impl_GetRenderMode(IDirect3DRMDevice2
* iface
)
451 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
453 FIXME("(%p/%p)->(): stub\n", iface
, This
);
458 static HRESULT WINAPI
IDirect3DRMDevice2Impl_GetDirect3DDevice2(IDirect3DRMDevice2
* iface
,
459 LPDIRECT3DDEVICE2
* dev
)
461 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice2(iface
);
463 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, dev
);
468 static const struct IDirect3DRMDevice2Vtbl Direct3DRMDevice2_Vtbl
=
470 /*** IUnknown methods ***/
471 IDirect3DRMDevice2Impl_QueryInterface
,
472 IDirect3DRMDevice2Impl_AddRef
,
473 IDirect3DRMDevice2Impl_Release
,
474 /*** IDirect3DRMObject methods ***/
475 IDirect3DRMDevice2Impl_Clone
,
476 IDirect3DRMDevice2Impl_AddDestroyCallback
,
477 IDirect3DRMDevice2Impl_DeleteDestroyCallback
,
478 IDirect3DRMDevice2Impl_SetAppData
,
479 IDirect3DRMDevice2Impl_GetAppData
,
480 IDirect3DRMDevice2Impl_SetName
,
481 IDirect3DRMDevice2Impl_GetName
,
482 IDirect3DRMDevice2Impl_GetClassName
,
483 /*** IDirect3DRMDevice methods ***/
484 IDirect3DRMDevice2Impl_Init
,
485 IDirect3DRMDevice2Impl_InitFromD3D
,
486 IDirect3DRMDevice2Impl_InitFromClipper
,
487 IDirect3DRMDevice2Impl_Update
,
488 IDirect3DRMDevice2Impl_AddUpdateCallback
,
489 IDirect3DRMDevice2Impl_DeleteUpdateCallback
,
490 IDirect3DRMDevice2Impl_SetBufferCount
,
491 IDirect3DRMDevice2Impl_GetBufferCount
,
492 IDirect3DRMDevice2Impl_SetDither
,
493 IDirect3DRMDevice2Impl_SetShades
,
494 IDirect3DRMDevice2Impl_SetQuality
,
495 IDirect3DRMDevice2Impl_SetTextureQuality
,
496 IDirect3DRMDevice2Impl_GetViewports
,
497 IDirect3DRMDevice2Impl_GetDither
,
498 IDirect3DRMDevice2Impl_GetShades
,
499 IDirect3DRMDevice2Impl_GetHeight
,
500 IDirect3DRMDevice2Impl_GetWidth
,
501 IDirect3DRMDevice2Impl_GetTrianglesDrawn
,
502 IDirect3DRMDevice2Impl_GetWireframeOptions
,
503 IDirect3DRMDevice2Impl_GetQuality
,
504 IDirect3DRMDevice2Impl_GetColorModel
,
505 IDirect3DRMDevice2Impl_GetTextureQuality
,
506 IDirect3DRMDevice2Impl_GetDirect3DDevice
,
507 /*** IDirect3DRMDevice2 methods ***/
508 IDirect3DRMDevice2Impl_InitFromD3D2
,
509 IDirect3DRMDevice2Impl_InitFromSurface
,
510 IDirect3DRMDevice2Impl_SetRenderMode
,
511 IDirect3DRMDevice2Impl_GetRenderMode
,
512 IDirect3DRMDevice2Impl_GetDirect3DDevice2
516 /*** IUnknown methods ***/
517 static HRESULT WINAPI
IDirect3DRMDevice3Impl_QueryInterface(IDirect3DRMDevice3
* iface
,
518 REFIID riid
, void** object
)
520 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
521 return IDirect3DRMDevice2_QueryInterface(&This
->IDirect3DRMDevice2_iface
, riid
, object
);
524 static ULONG WINAPI
IDirect3DRMDevice3Impl_AddRef(IDirect3DRMDevice3
* iface
)
526 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
527 return IDirect3DRMDevice2_AddRef(&This
->IDirect3DRMDevice2_iface
);
530 static ULONG WINAPI
IDirect3DRMDevice3Impl_Release(IDirect3DRMDevice3
* iface
)
532 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
533 return IDirect3DRMDevice2_Release(&This
->IDirect3DRMDevice2_iface
);
536 /*** IDirect3DRMObject methods ***/
537 static HRESULT WINAPI
IDirect3DRMDevice3Impl_Clone(IDirect3DRMDevice3
* iface
,
538 LPUNKNOWN unkwn
, REFIID riid
,
541 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
543 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface
, This
, unkwn
, debugstr_guid(riid
), object
);
548 static HRESULT WINAPI
IDirect3DRMDevice3Impl_AddDestroyCallback(IDirect3DRMDevice3
* iface
,
549 D3DRMOBJECTCALLBACK cb
,
552 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
554 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
559 static HRESULT WINAPI
IDirect3DRMDevice3Impl_DeleteDestroyCallback(IDirect3DRMDevice3
* iface
,
560 D3DRMOBJECTCALLBACK cb
,
563 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
565 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
570 static HRESULT WINAPI
IDirect3DRMDevice3Impl_SetAppData(IDirect3DRMDevice3
* iface
,
573 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
575 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, data
);
580 static DWORD WINAPI
IDirect3DRMDevice3Impl_GetAppData(IDirect3DRMDevice3
* iface
)
582 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
584 FIXME("(%p/%p)->(): stub\n", iface
, This
);
589 static HRESULT WINAPI
IDirect3DRMDevice3Impl_SetName(IDirect3DRMDevice3
* iface
, LPCSTR name
)
591 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
593 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, name
);
598 static HRESULT WINAPI
IDirect3DRMDevice3Impl_GetName(IDirect3DRMDevice3
* iface
,
599 LPDWORD size
, LPSTR name
)
601 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
603 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, size
, name
);
608 static HRESULT WINAPI
IDirect3DRMDevice3Impl_GetClassName(IDirect3DRMDevice3
* iface
,
609 LPDWORD size
, LPSTR name
)
611 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
613 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, size
, name
);
618 /*** IDirect3DRMDevice methods ***/
619 static HRESULT WINAPI
IDirect3DRMDevice3Impl_Init(IDirect3DRMDevice3
* iface
, ULONG width
,
622 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
624 FIXME("(%p/%p)->(%u, %u): stub\n", iface
, This
, width
, height
);
629 static HRESULT WINAPI
IDirect3DRMDevice3Impl_InitFromD3D(IDirect3DRMDevice3
* iface
,
631 LPDIRECT3DDEVICE lpD3DDev
)
633 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
635 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, lpD3D
, lpD3DDev
);
640 static HRESULT WINAPI
IDirect3DRMDevice3Impl_InitFromClipper(IDirect3DRMDevice3
* iface
,
641 LPDIRECTDRAWCLIPPER lpDDClipper
,
642 LPGUID lpGUID
, int width
, int height
)
644 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
646 FIXME("(%p/%p)->(%p, %p, %u, %u): stub\n", iface
, This
, lpDDClipper
, lpGUID
, width
, height
);
651 static HRESULT WINAPI
IDirect3DRMDevice3Impl_Update(IDirect3DRMDevice3
* iface
)
653 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
655 FIXME("(%p/%p)->(): stub\n", iface
, This
);
660 static HRESULT WINAPI
IDirect3DRMDevice3Impl_AddUpdateCallback(IDirect3DRMDevice3
* iface
,
661 D3DRMUPDATECALLBACK cb
, LPVOID arg
)
663 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
665 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, arg
);
670 static HRESULT WINAPI
IDirect3DRMDevice3Impl_DeleteUpdateCallback(IDirect3DRMDevice3
* iface
,
671 D3DRMUPDATECALLBACK cb
,
674 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
676 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, arg
);
681 static HRESULT WINAPI
IDirect3DRMDevice3Impl_SetBufferCount(IDirect3DRMDevice3
* iface
, DWORD count
)
683 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
685 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, count
);
690 static DWORD WINAPI
IDirect3DRMDevice3Impl_GetBufferCount(IDirect3DRMDevice3
* iface
)
692 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
694 FIXME("(%p/%p)->(): stub\n", iface
, This
);
699 static HRESULT WINAPI
IDirect3DRMDevice3Impl_SetDither(IDirect3DRMDevice3
* iface
, BOOL enable
)
701 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
703 FIXME("(%p/%p)->(%d): stub\n", iface
, This
, enable
);
708 static HRESULT WINAPI
IDirect3DRMDevice3Impl_SetShades(IDirect3DRMDevice3
* iface
, DWORD count
)
710 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
712 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, count
);
717 static HRESULT WINAPI
IDirect3DRMDevice3Impl_SetQuality(IDirect3DRMDevice3
* iface
,
718 D3DRMRENDERQUALITY quality
)
720 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
722 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, quality
);
727 static HRESULT WINAPI
IDirect3DRMDevice3Impl_SetTextureQuality(IDirect3DRMDevice3
* iface
,
728 D3DRMTEXTUREQUALITY quality
)
730 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
732 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, quality
);
737 static HRESULT WINAPI
IDirect3DRMDevice3Impl_GetViewports(IDirect3DRMDevice3
* iface
,
738 LPDIRECT3DRMVIEWPORTARRAY
*return_views
)
740 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
742 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, return_views
);
747 static BOOL WINAPI
IDirect3DRMDevice3Impl_GetDither(IDirect3DRMDevice3
* iface
)
749 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
751 FIXME("(%p/%p)->(): stub\n", iface
, This
);
756 static DWORD WINAPI
IDirect3DRMDevice3Impl_GetShades(IDirect3DRMDevice3
* iface
)
758 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
760 FIXME("(%p/%p)->(): stub\n", iface
, This
);
765 static DWORD WINAPI
IDirect3DRMDevice3Impl_GetHeight(IDirect3DRMDevice3
* iface
)
767 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
769 FIXME("(%p/%p)->(): stub\n", iface
, This
);
774 static DWORD WINAPI
IDirect3DRMDevice3Impl_GetWidth(IDirect3DRMDevice3
* iface
)
776 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
778 FIXME("(%p/%p)->(): stub\n", iface
, This
);
783 static DWORD WINAPI
IDirect3DRMDevice3Impl_GetTrianglesDrawn(IDirect3DRMDevice3
* iface
)
785 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
787 FIXME("(%p/%p)->(): stub\n", iface
, This
);
792 static DWORD WINAPI
IDirect3DRMDevice3Impl_GetWireframeOptions(IDirect3DRMDevice3
* iface
)
794 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
796 FIXME("(%p/%p)->(): stub\n", iface
, This
);
801 static D3DRMRENDERQUALITY WINAPI
IDirect3DRMDevice3Impl_GetQuality(IDirect3DRMDevice3
* iface
)
803 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
805 FIXME("(%p/%p)->(): stub\n", iface
, This
);
810 static D3DCOLORMODEL WINAPI
IDirect3DRMDevice3Impl_GetColorModel(IDirect3DRMDevice3
* iface
)
812 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
814 FIXME("(%p/%p)->(): stub\n", iface
, This
);
819 static D3DRMTEXTUREQUALITY WINAPI
IDirect3DRMDevice3Impl_GetTextureQuality(IDirect3DRMDevice3
* iface
)
821 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
823 FIXME("(%p/%p)->(): stub\n", iface
, This
);
828 static HRESULT WINAPI
IDirect3DRMDevice3Impl_GetDirect3DDevice(IDirect3DRMDevice3
* iface
,
829 LPDIRECT3DDEVICE
* dev
)
831 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
833 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, dev
);
838 /*** IDirect3DRMDevice2 methods ***/
839 static HRESULT WINAPI
IDirect3DRMDevice3Impl_InitFromD3D2(IDirect3DRMDevice3
* iface
,
841 LPDIRECT3DDEVICE2 lpD3DDev
)
843 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
845 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, lpD3D
, lpD3DDev
);
850 static HRESULT WINAPI
IDirect3DRMDevice3Impl_InitFromSurface(IDirect3DRMDevice3
* iface
,
851 LPGUID lpGUID
, LPDIRECTDRAW lpDD
,
852 LPDIRECTDRAWSURFACE lpDDSBack
)
854 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
856 FIXME("(%p/%p)->(%p, %p, %p): stub\n", iface
, This
, lpGUID
, lpDD
, lpDDSBack
);
861 static HRESULT WINAPI
IDirect3DRMDevice3Impl_SetRenderMode(IDirect3DRMDevice3
* iface
, DWORD dwFlags
)
863 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
865 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, dwFlags
);
870 static DWORD WINAPI
IDirect3DRMDevice3Impl_GetRenderMode(IDirect3DRMDevice3
* iface
)
872 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
874 FIXME("(%p/%p)->(): stub\n", iface
, This
);
879 static HRESULT WINAPI
IDirect3DRMDevice3Impl_GetDirect3DDevice2(IDirect3DRMDevice3
* iface
,
880 LPDIRECT3DDEVICE2
* dev
)
882 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
884 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, dev
);
889 /*** IDirect3DRMDevice3 methods ***/
890 static HRESULT WINAPI
IDirect3DRMDevice3Impl_FindPreferredTextureFormat(IDirect3DRMDevice3
* iface
,
893 LPDDPIXELFORMAT lpDDPF
)
895 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
897 FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface
, This
, bitdepths
, flags
, lpDDPF
);
902 static HRESULT WINAPI
IDirect3DRMDevice3Impl_RenderStateChange(IDirect3DRMDevice3
* iface
,
903 D3DRENDERSTATETYPE type
, DWORD val
,
906 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
908 FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface
, This
, type
, val
, flags
);
913 static HRESULT WINAPI
IDirect3DRMDevice3Impl_LightStateChange(IDirect3DRMDevice3
* iface
,
914 D3DLIGHTSTATETYPE type
, DWORD val
,
917 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
919 FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface
, This
, type
, val
, flags
);
924 static HRESULT WINAPI
IDirect3DRMDevice3Impl_GetStateChangeOptions(IDirect3DRMDevice3
* iface
,
925 DWORD stateclass
, DWORD statenum
,
928 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
930 FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface
, This
, stateclass
, statenum
, flags
);
935 static HRESULT WINAPI
IDirect3DRMDevice3Impl_SetStateChangeOptions(IDirect3DRMDevice3
* iface
,
936 DWORD stateclass
, DWORD statenum
,
939 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMDevice3(iface
);
941 FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface
, This
, stateclass
, statenum
, flags
);
946 static const struct IDirect3DRMDevice3Vtbl Direct3DRMDevice3_Vtbl
=
948 /*** IUnknown methods ***/
949 IDirect3DRMDevice3Impl_QueryInterface
,
950 IDirect3DRMDevice3Impl_AddRef
,
951 IDirect3DRMDevice3Impl_Release
,
952 /*** IDirect3DRMObject methods ***/
953 IDirect3DRMDevice3Impl_Clone
,
954 IDirect3DRMDevice3Impl_AddDestroyCallback
,
955 IDirect3DRMDevice3Impl_DeleteDestroyCallback
,
956 IDirect3DRMDevice3Impl_SetAppData
,
957 IDirect3DRMDevice3Impl_GetAppData
,
958 IDirect3DRMDevice3Impl_SetName
,
959 IDirect3DRMDevice3Impl_GetName
,
960 IDirect3DRMDevice3Impl_GetClassName
,
961 /*** IDirect3DRMDevice methods ***/
962 IDirect3DRMDevice3Impl_Init
,
963 IDirect3DRMDevice3Impl_InitFromD3D
,
964 IDirect3DRMDevice3Impl_InitFromClipper
,
965 IDirect3DRMDevice3Impl_Update
,
966 IDirect3DRMDevice3Impl_AddUpdateCallback
,
967 IDirect3DRMDevice3Impl_DeleteUpdateCallback
,
968 IDirect3DRMDevice3Impl_SetBufferCount
,
969 IDirect3DRMDevice3Impl_GetBufferCount
,
970 IDirect3DRMDevice3Impl_SetDither
,
971 IDirect3DRMDevice3Impl_SetShades
,
972 IDirect3DRMDevice3Impl_SetQuality
,
973 IDirect3DRMDevice3Impl_SetTextureQuality
,
974 IDirect3DRMDevice3Impl_GetViewports
,
975 IDirect3DRMDevice3Impl_GetDither
,
976 IDirect3DRMDevice3Impl_GetShades
,
977 IDirect3DRMDevice3Impl_GetHeight
,
978 IDirect3DRMDevice3Impl_GetWidth
,
979 IDirect3DRMDevice3Impl_GetTrianglesDrawn
,
980 IDirect3DRMDevice3Impl_GetWireframeOptions
,
981 IDirect3DRMDevice3Impl_GetQuality
,
982 IDirect3DRMDevice3Impl_GetColorModel
,
983 IDirect3DRMDevice3Impl_GetTextureQuality
,
984 IDirect3DRMDevice3Impl_GetDirect3DDevice
,
985 /*** IDirect3DRMDevice2 methods ***/
986 IDirect3DRMDevice3Impl_InitFromD3D2
,
987 IDirect3DRMDevice3Impl_InitFromSurface
,
988 IDirect3DRMDevice3Impl_SetRenderMode
,
989 IDirect3DRMDevice3Impl_GetRenderMode
,
990 IDirect3DRMDevice3Impl_GetDirect3DDevice2
,
991 /*** IDirect3DRMDevice3 methods ***/
992 IDirect3DRMDevice3Impl_FindPreferredTextureFormat
,
993 IDirect3DRMDevice3Impl_RenderStateChange
,
994 IDirect3DRMDevice3Impl_LightStateChange
,
995 IDirect3DRMDevice3Impl_GetStateChangeOptions
,
996 IDirect3DRMDevice3Impl_SetStateChangeOptions
1000 /*** IUnknown methods ***/
1001 static HRESULT WINAPI
IDirect3DRMWinDeviceImpl_QueryInterface(IDirect3DRMWinDevice
* iface
,
1002 REFIID riid
, void** object
)
1004 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1005 return IDirect3DRMDevice2_QueryInterface(&This
->IDirect3DRMDevice2_iface
, riid
, object
);
1008 static ULONG WINAPI
IDirect3DRMWinDeviceImpl_AddRef(IDirect3DRMWinDevice
* iface
)
1010 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1011 return IDirect3DRMDevice2_AddRef(&This
->IDirect3DRMDevice2_iface
);
1014 static ULONG WINAPI
IDirect3DRMWinDeviceImpl_Release(IDirect3DRMWinDevice
* iface
)
1016 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1017 return IDirect3DRMDevice2_Release(&This
->IDirect3DRMDevice2_iface
);
1020 /*** IDirect3DRMObject methods ***/
1021 static HRESULT WINAPI
IDirect3DRMWinDeviceImpl_Clone(IDirect3DRMWinDevice
* iface
,
1022 LPUNKNOWN unkwn
, REFIID riid
,
1025 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1027 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface
, This
, unkwn
, debugstr_guid(riid
), object
);
1032 static HRESULT WINAPI
IDirect3DRMWinDeviceImpl_AddDestroyCallback(IDirect3DRMWinDevice
* iface
,
1033 D3DRMOBJECTCALLBACK cb
,
1036 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1038 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
1043 static HRESULT WINAPI
IDirect3DRMWinDeviceImpl_DeleteDestroyCallback(IDirect3DRMWinDevice
* iface
,
1044 D3DRMOBJECTCALLBACK cb
,
1047 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1049 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, cb
, argument
);
1054 static HRESULT WINAPI
IDirect3DRMWinDeviceImpl_SetAppData(IDirect3DRMWinDevice
* iface
,
1057 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1059 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, data
);
1064 static DWORD WINAPI
IDirect3DRMWinDeviceImpl_GetAppData(IDirect3DRMWinDevice
* iface
)
1066 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1068 FIXME("(%p/%p)->(): stub\n", iface
, This
);
1073 static HRESULT WINAPI
IDirect3DRMWinDeviceImpl_SetName(IDirect3DRMWinDevice
* iface
, LPCSTR name
)
1075 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1077 FIXME("(%p/%p)->(%s): stub\n", iface
, This
, name
);
1082 static HRESULT WINAPI
IDirect3DRMWinDeviceImpl_GetName(IDirect3DRMWinDevice
* iface
,
1083 LPDWORD size
, LPSTR name
)
1085 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1087 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, size
, name
);
1092 static HRESULT WINAPI
IDirect3DRMWinDeviceImpl_GetClassName(IDirect3DRMWinDevice
* iface
,
1093 LPDWORD size
, LPSTR name
)
1095 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1097 FIXME("(%p/%p)->(%p, %p): stub\n", iface
, This
, size
, name
);
1102 /*** IDirect3DRMWinDevice methods ***/
1103 static HRESULT WINAPI
IDirect3DRMWinDeviceImpl_HandlePaint(IDirect3DRMWinDevice
* iface
, HDC hdc
)
1105 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1107 FIXME("(%p/%p)->(%p): stub\n", iface
, This
, hdc
);
1112 static HRESULT WINAPI
IDirect3DRMWinDeviceImpl_HandleActivate(IDirect3DRMWinDevice
* iface
, WORD wparam
)
1114 IDirect3DRMDeviceImpl
*This
= impl_from_IDirect3DRMWinDevice(iface
);
1116 FIXME("(%p/%p)->(%u): stub\n", iface
, This
, wparam
);
1121 static const struct IDirect3DRMWinDeviceVtbl Direct3DRMWinDevice_Vtbl
=
1123 /*** IUnknown methods ***/
1124 IDirect3DRMWinDeviceImpl_QueryInterface
,
1125 IDirect3DRMWinDeviceImpl_AddRef
,
1126 IDirect3DRMWinDeviceImpl_Release
,
1127 /*** IDirect3DRMObject methods ***/
1128 IDirect3DRMWinDeviceImpl_Clone
,
1129 IDirect3DRMWinDeviceImpl_AddDestroyCallback
,
1130 IDirect3DRMWinDeviceImpl_DeleteDestroyCallback
,
1131 IDirect3DRMWinDeviceImpl_SetAppData
,
1132 IDirect3DRMWinDeviceImpl_GetAppData
,
1133 IDirect3DRMWinDeviceImpl_SetName
,
1134 IDirect3DRMWinDeviceImpl_GetName
,
1135 IDirect3DRMWinDeviceImpl_GetClassName
,
1136 /*** IDirect3DRMWinDevice methods ***/
1137 IDirect3DRMWinDeviceImpl_HandlePaint
,
1138 IDirect3DRMWinDeviceImpl_HandleActivate
1141 HRESULT
Direct3DRMDevice_create(REFIID riid
, IUnknown
** ppObj
)
1143 IDirect3DRMDeviceImpl
* object
;
1145 TRACE("(%p)\n", ppObj
);
1147 object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(IDirect3DRMDeviceImpl
));
1150 ERR("Out of memory\n");
1151 return E_OUTOFMEMORY
;
1154 object
->IDirect3DRMDevice2_iface
.lpVtbl
= &Direct3DRMDevice2_Vtbl
;
1155 object
->IDirect3DRMDevice3_iface
.lpVtbl
= &Direct3DRMDevice3_Vtbl
;
1156 object
->IDirect3DRMWinDevice_iface
.lpVtbl
= &Direct3DRMWinDevice_Vtbl
;
1159 if (IsEqualGUID(riid
, &IID_IDirect3DRMFrame3
))
1160 *ppObj
= (IUnknown
*)&object
->IDirect3DRMDevice3_iface
;
1162 *ppObj
= (IUnknown
*)&object
->IDirect3DRMDevice2_iface
;