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;
43 D3DRMRENDERQUALITY quality;
47 } IDirect3DRMDeviceImpl;
49 static inline IDirect3DRMDeviceImpl *impl_from_IDirect3DRMDevice2(IDirect3DRMDevice2 *iface)
51 return CONTAINING_RECORD(iface, IDirect3DRMDeviceImpl, IDirect3DRMDevice2_iface);
54 static inline IDirect3DRMDeviceImpl *impl_from_IDirect3DRMDevice3(IDirect3DRMDevice3 *iface)
56 return CONTAINING_RECORD(iface, IDirect3DRMDeviceImpl, IDirect3DRMDevice3_iface);
59 static inline IDirect3DRMDeviceImpl *impl_from_IDirect3DRMWinDevice(IDirect3DRMWinDevice *iface)
61 return CONTAINING_RECORD(iface, IDirect3DRMDeviceImpl, IDirect3DRMWinDevice_iface);
64 /*** IUnknown methods ***/
65 static HRESULT WINAPI IDirect3DRMDevice2Impl_QueryInterface(IDirect3DRMDevice2* iface,
66 REFIID riid, void** object)
68 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
70 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
74 if (IsEqualGUID(riid, &IID_IUnknown) ||
75 IsEqualGUID(riid, &IID_IDirect3DRMDevice) ||
76 IsEqualGUID(riid, &IID_IDirect3DRMDevice2))
78 *object = &This->IDirect3DRMDevice2_iface;
80 else if(IsEqualGUID(riid, &IID_IDirect3DRMDevice3))
82 *object = &This->IDirect3DRMDevice3_iface;
84 else if(IsEqualGUID(riid, &IID_IDirect3DRMWinDevice))
86 *object = &This->IDirect3DRMWinDevice_iface;
90 FIXME("interface %s not implemented\n", debugstr_guid(riid));
94 IDirect3DRMDevice2_AddRef(iface);
98 static ULONG WINAPI IDirect3DRMDevice2Impl_AddRef(IDirect3DRMDevice2* iface)
100 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
101 ULONG ref = InterlockedIncrement(&This->ref);
103 TRACE("(%p)->(): new ref = %d\n", iface, ref);
108 static ULONG WINAPI IDirect3DRMDevice2Impl_Release(IDirect3DRMDevice2* iface)
110 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
111 ULONG ref = InterlockedDecrement(&This->ref);
113 TRACE("(%p)->(): new ref = %d\n", iface, ref);
116 HeapFree(GetProcessHeap(), 0, This);
121 /*** IDirect3DRMObject methods ***/
122 static HRESULT WINAPI IDirect3DRMDevice2Impl_Clone(IDirect3DRMDevice2* iface,
123 LPUNKNOWN unkwn, REFIID riid,
126 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
128 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
133 static HRESULT WINAPI IDirect3DRMDevice2Impl_AddDestroyCallback(IDirect3DRMDevice2* iface,
134 D3DRMOBJECTCALLBACK cb,
137 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
139 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
144 static HRESULT WINAPI IDirect3DRMDevice2Impl_DeleteDestroyCallback(IDirect3DRMDevice2* iface,
145 D3DRMOBJECTCALLBACK cb,
148 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
150 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
155 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetAppData(IDirect3DRMDevice2* iface,
158 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
160 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
165 static DWORD WINAPI IDirect3DRMDevice2Impl_GetAppData(IDirect3DRMDevice2* iface)
167 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
169 FIXME("(%p/%p)->(): stub\n", iface, This);
174 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetName(IDirect3DRMDevice2* iface, LPCSTR name)
176 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
178 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
183 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetName(IDirect3DRMDevice2* iface,
184 LPDWORD size, LPSTR name)
186 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
188 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
193 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetClassName(IDirect3DRMDevice2* iface,
194 LPDWORD size, LPSTR name)
196 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
198 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
200 return IDirect3DRMDevice3_GetClassName(&This->IDirect3DRMDevice3_iface, size, name);
203 /*** IDirect3DRMDevice methods ***/
204 static HRESULT WINAPI IDirect3DRMDevice2Impl_Init(IDirect3DRMDevice2* iface, ULONG width,
207 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
209 TRACE("(%p/%p)->(%u, %u)\n", iface, This, width, height);
211 return IDirect3DRMDevice3_Init(&This->IDirect3DRMDevice3_iface, width, height);
214 /*** IDirect3DRMDevice2 methods ***/
215 static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromD3D(IDirect3DRMDevice2* iface,
217 LPDIRECT3DDEVICE lpD3DDev)
219 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
221 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
226 static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromClipper(IDirect3DRMDevice2* iface,
227 LPDIRECTDRAWCLIPPER lpDDClipper,
228 LPGUID lpGUID, int width, int height)
230 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
232 TRACE("(%p/%p)->(%p, %p, %u, %u)\n", iface, This, lpDDClipper, lpGUID, width, height);
234 return IDirect3DRMDevice3_InitFromClipper(&This->IDirect3DRMDevice3_iface, lpDDClipper, lpGUID,
238 static HRESULT WINAPI IDirect3DRMDevice2Impl_Update(IDirect3DRMDevice2* iface)
240 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
242 FIXME("(%p/%p)->(): stub\n", iface, This);
247 static HRESULT WINAPI IDirect3DRMDevice2Impl_AddUpdateCallback(IDirect3DRMDevice2* iface,
248 D3DRMUPDATECALLBACK cb, LPVOID arg)
250 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
252 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, arg);
257 static HRESULT WINAPI IDirect3DRMDevice2Impl_DeleteUpdateCallback(IDirect3DRMDevice2* iface,
258 D3DRMUPDATECALLBACK cb,
261 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
263 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, arg);
268 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetBufferCount(IDirect3DRMDevice2* iface, DWORD count)
270 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
272 FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
277 static DWORD WINAPI IDirect3DRMDevice2Impl_GetBufferCount(IDirect3DRMDevice2* iface)
279 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
281 FIXME("(%p/%p)->(): stub\n", iface, This);
286 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetDither(IDirect3DRMDevice2* iface, BOOL enable)
288 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
290 TRACE("(%p/%p)->(%d)\n", iface, This, enable);
292 return IDirect3DRMDevice3_SetDither(&This->IDirect3DRMDevice3_iface, enable);
295 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetShades(IDirect3DRMDevice2* iface, DWORD count)
297 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
299 FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
304 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetQuality(IDirect3DRMDevice2* iface,
305 D3DRMRENDERQUALITY quality)
307 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
309 TRACE("(%p/%p)->(%u)\n", iface, This, quality);
311 return IDirect3DRMDevice3_SetQuality(&This->IDirect3DRMDevice3_iface, quality);
314 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetTextureQuality(IDirect3DRMDevice2* iface,
315 D3DRMTEXTUREQUALITY quality)
317 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
319 FIXME("(%p/%p)->(%u): stub\n", iface, This, quality);
324 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetViewports(IDirect3DRMDevice2* iface,
325 LPDIRECT3DRMVIEWPORTARRAY *return_views)
327 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
329 FIXME("(%p/%p)->(%p): stub\n", iface, This, return_views);
334 static BOOL WINAPI IDirect3DRMDevice2Impl_GetDither(IDirect3DRMDevice2* iface)
336 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
338 TRACE("(%p/%p)->()\n", iface, This);
340 return IDirect3DRMDevice3_GetDither(&This->IDirect3DRMDevice3_iface);
343 static DWORD WINAPI IDirect3DRMDevice2Impl_GetShades(IDirect3DRMDevice2* iface)
345 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
347 FIXME("(%p/%p)->(): stub\n", iface, This);
352 static DWORD WINAPI IDirect3DRMDevice2Impl_GetHeight(IDirect3DRMDevice2* iface)
354 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
356 TRACE("(%p/%p)->()\n", iface, This);
358 return IDirect3DRMDevice3_GetHeight(&This->IDirect3DRMDevice3_iface);
361 static DWORD WINAPI IDirect3DRMDevice2Impl_GetWidth(IDirect3DRMDevice2* iface)
363 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
365 TRACE("(%p/%p)->()\n", iface, This);
367 return IDirect3DRMDevice3_GetWidth(&This->IDirect3DRMDevice3_iface);
370 static DWORD WINAPI IDirect3DRMDevice2Impl_GetTrianglesDrawn(IDirect3DRMDevice2* iface)
372 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
374 FIXME("(%p/%p)->(): stub\n", iface, This);
379 static DWORD WINAPI IDirect3DRMDevice2Impl_GetWireframeOptions(IDirect3DRMDevice2* iface)
381 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
383 FIXME("(%p/%p)->(): stub\n", iface, This);
388 static D3DRMRENDERQUALITY WINAPI IDirect3DRMDevice2Impl_GetQuality(IDirect3DRMDevice2* iface)
390 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
392 TRACE("(%p/%p)->()\n", iface, This);
394 return IDirect3DRMDevice3_GetQuality(&This->IDirect3DRMDevice3_iface);
397 static D3DCOLORMODEL WINAPI IDirect3DRMDevice2Impl_GetColorModel(IDirect3DRMDevice2* iface)
399 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
401 FIXME("(%p/%p)->(): stub\n", iface, This);
406 static D3DRMTEXTUREQUALITY WINAPI IDirect3DRMDevice2Impl_GetTextureQuality(IDirect3DRMDevice2* iface)
408 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
410 FIXME("(%p/%p)->(): stub\n", iface, This);
415 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetDirect3DDevice(IDirect3DRMDevice2* iface,
416 LPDIRECT3DDEVICE * dev)
418 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
420 FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
425 static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromD3D2(IDirect3DRMDevice2* iface,
427 LPDIRECT3DDEVICE2 lpD3DDev)
429 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
431 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
436 static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromSurface(IDirect3DRMDevice2* iface,
437 LPGUID lpGUID, LPDIRECTDRAW lpDD,
438 LPDIRECTDRAWSURFACE lpDDSBack)
440 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
442 FIXME("(%p/%p)->(%p, %p, %p): stub\n", iface, This, lpGUID, lpDD, lpDDSBack);
447 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetRenderMode(IDirect3DRMDevice2* iface, DWORD dwFlags)
449 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
451 TRACE("(%p/%p)->(%u)\n", iface, This, dwFlags);
453 return IDirect3DRMDevice3_SetRenderMode(&This->IDirect3DRMDevice3_iface, dwFlags);
456 static DWORD WINAPI IDirect3DRMDevice2Impl_GetRenderMode(IDirect3DRMDevice2* iface)
458 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
460 TRACE("(%p/%p)->()\n", iface, This);
462 return IDirect3DRMDevice3_GetRenderMode(&This->IDirect3DRMDevice3_iface);
465 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetDirect3DDevice2(IDirect3DRMDevice2* iface,
466 LPDIRECT3DDEVICE2 * dev)
468 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
470 FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
475 static const struct IDirect3DRMDevice2Vtbl Direct3DRMDevice2_Vtbl =
477 /*** IUnknown methods ***/
478 IDirect3DRMDevice2Impl_QueryInterface,
479 IDirect3DRMDevice2Impl_AddRef,
480 IDirect3DRMDevice2Impl_Release,
481 /*** IDirect3DRMObject methods ***/
482 IDirect3DRMDevice2Impl_Clone,
483 IDirect3DRMDevice2Impl_AddDestroyCallback,
484 IDirect3DRMDevice2Impl_DeleteDestroyCallback,
485 IDirect3DRMDevice2Impl_SetAppData,
486 IDirect3DRMDevice2Impl_GetAppData,
487 IDirect3DRMDevice2Impl_SetName,
488 IDirect3DRMDevice2Impl_GetName,
489 IDirect3DRMDevice2Impl_GetClassName,
490 /*** IDirect3DRMDevice methods ***/
491 IDirect3DRMDevice2Impl_Init,
492 IDirect3DRMDevice2Impl_InitFromD3D,
493 IDirect3DRMDevice2Impl_InitFromClipper,
494 IDirect3DRMDevice2Impl_Update,
495 IDirect3DRMDevice2Impl_AddUpdateCallback,
496 IDirect3DRMDevice2Impl_DeleteUpdateCallback,
497 IDirect3DRMDevice2Impl_SetBufferCount,
498 IDirect3DRMDevice2Impl_GetBufferCount,
499 IDirect3DRMDevice2Impl_SetDither,
500 IDirect3DRMDevice2Impl_SetShades,
501 IDirect3DRMDevice2Impl_SetQuality,
502 IDirect3DRMDevice2Impl_SetTextureQuality,
503 IDirect3DRMDevice2Impl_GetViewports,
504 IDirect3DRMDevice2Impl_GetDither,
505 IDirect3DRMDevice2Impl_GetShades,
506 IDirect3DRMDevice2Impl_GetHeight,
507 IDirect3DRMDevice2Impl_GetWidth,
508 IDirect3DRMDevice2Impl_GetTrianglesDrawn,
509 IDirect3DRMDevice2Impl_GetWireframeOptions,
510 IDirect3DRMDevice2Impl_GetQuality,
511 IDirect3DRMDevice2Impl_GetColorModel,
512 IDirect3DRMDevice2Impl_GetTextureQuality,
513 IDirect3DRMDevice2Impl_GetDirect3DDevice,
514 /*** IDirect3DRMDevice2 methods ***/
515 IDirect3DRMDevice2Impl_InitFromD3D2,
516 IDirect3DRMDevice2Impl_InitFromSurface,
517 IDirect3DRMDevice2Impl_SetRenderMode,
518 IDirect3DRMDevice2Impl_GetRenderMode,
519 IDirect3DRMDevice2Impl_GetDirect3DDevice2
523 /*** IUnknown methods ***/
524 static HRESULT WINAPI IDirect3DRMDevice3Impl_QueryInterface(IDirect3DRMDevice3* iface,
525 REFIID riid, void** object)
527 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
528 return IDirect3DRMDevice2_QueryInterface(&This->IDirect3DRMDevice2_iface, riid, object);
531 static ULONG WINAPI IDirect3DRMDevice3Impl_AddRef(IDirect3DRMDevice3* iface)
533 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
534 return IDirect3DRMDevice2_AddRef(&This->IDirect3DRMDevice2_iface);
537 static ULONG WINAPI IDirect3DRMDevice3Impl_Release(IDirect3DRMDevice3* iface)
539 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
540 return IDirect3DRMDevice2_Release(&This->IDirect3DRMDevice2_iface);
543 /*** IDirect3DRMObject methods ***/
544 static HRESULT WINAPI IDirect3DRMDevice3Impl_Clone(IDirect3DRMDevice3* iface,
545 LPUNKNOWN unkwn, REFIID riid,
548 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
550 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
555 static HRESULT WINAPI IDirect3DRMDevice3Impl_AddDestroyCallback(IDirect3DRMDevice3* iface,
556 D3DRMOBJECTCALLBACK cb,
559 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
561 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
566 static HRESULT WINAPI IDirect3DRMDevice3Impl_DeleteDestroyCallback(IDirect3DRMDevice3* iface,
567 D3DRMOBJECTCALLBACK cb,
570 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
572 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
577 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetAppData(IDirect3DRMDevice3* iface,
580 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
582 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
587 static DWORD WINAPI IDirect3DRMDevice3Impl_GetAppData(IDirect3DRMDevice3* iface)
589 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
591 FIXME("(%p/%p)->(): stub\n", iface, This);
596 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetName(IDirect3DRMDevice3* iface, LPCSTR name)
598 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
600 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
605 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetName(IDirect3DRMDevice3* iface,
606 LPDWORD size, LPSTR name)
608 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
610 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
615 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetClassName(IDirect3DRMDevice3* iface,
616 LPDWORD size, LPSTR name)
618 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
620 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
622 if (!size || *size < strlen("Device") || !name)
625 strcpy(name, "Device");
626 *size = sizeof("Device");
631 /*** IDirect3DRMDevice methods ***/
632 static HRESULT WINAPI IDirect3DRMDevice3Impl_Init(IDirect3DRMDevice3* iface, ULONG width,
635 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
637 FIXME("(%p/%p)->(%u, %u): stub\n", iface, This, width, height);
639 This->height = height;
645 static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromD3D(IDirect3DRMDevice3* iface,
647 LPDIRECT3DDEVICE lpD3DDev)
649 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
651 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
656 static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromClipper(IDirect3DRMDevice3* iface,
657 LPDIRECTDRAWCLIPPER lpDDClipper,
658 LPGUID lpGUID, int width, int height)
660 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
662 FIXME("(%p/%p)->(%p, %p, %u, %u): stub\n", iface, This, lpDDClipper, lpGUID, width, height);
664 This->height = height;
670 static HRESULT WINAPI IDirect3DRMDevice3Impl_Update(IDirect3DRMDevice3* iface)
672 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
674 FIXME("(%p/%p)->(): stub\n", iface, This);
679 static HRESULT WINAPI IDirect3DRMDevice3Impl_AddUpdateCallback(IDirect3DRMDevice3* iface,
680 D3DRMUPDATECALLBACK cb, LPVOID arg)
682 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
684 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, arg);
689 static HRESULT WINAPI IDirect3DRMDevice3Impl_DeleteUpdateCallback(IDirect3DRMDevice3* iface,
690 D3DRMUPDATECALLBACK cb,
693 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
695 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, arg);
700 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetBufferCount(IDirect3DRMDevice3* iface, DWORD count)
702 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
704 FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
709 static DWORD WINAPI IDirect3DRMDevice3Impl_GetBufferCount(IDirect3DRMDevice3* iface)
711 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
713 FIXME("(%p/%p)->(): stub\n", iface, This);
718 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetDither(IDirect3DRMDevice3* iface, BOOL enable)
720 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
722 TRACE("(%p/%p)->(%d)\n", iface, This, enable);
724 This->dither = enable;
729 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetShades(IDirect3DRMDevice3* iface, DWORD count)
731 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
733 FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
738 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetQuality(IDirect3DRMDevice3* iface,
739 D3DRMRENDERQUALITY quality)
741 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
743 TRACE("(%p/%p)->(%u)\n", iface, This, quality);
745 This->quality = quality;
750 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetTextureQuality(IDirect3DRMDevice3* iface,
751 D3DRMTEXTUREQUALITY quality)
753 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
755 FIXME("(%p/%p)->(%u): stub\n", iface, This, quality);
760 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetViewports(IDirect3DRMDevice3* iface,
761 LPDIRECT3DRMVIEWPORTARRAY *return_views)
763 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
765 FIXME("(%p/%p)->(%p): stub\n", iface, This, return_views);
770 static BOOL WINAPI IDirect3DRMDevice3Impl_GetDither(IDirect3DRMDevice3* iface)
772 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
774 TRACE("(%p/%p)->()\n", iface, This);
779 static DWORD WINAPI IDirect3DRMDevice3Impl_GetShades(IDirect3DRMDevice3* iface)
781 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
783 FIXME("(%p/%p)->(): stub\n", iface, This);
788 static DWORD WINAPI IDirect3DRMDevice3Impl_GetHeight(IDirect3DRMDevice3* iface)
790 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
792 TRACE("(%p/%p)->()\n", iface, This);
797 static DWORD WINAPI IDirect3DRMDevice3Impl_GetWidth(IDirect3DRMDevice3* iface)
799 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
801 TRACE("(%p/%p)->()\n", iface, This);
806 static DWORD WINAPI IDirect3DRMDevice3Impl_GetTrianglesDrawn(IDirect3DRMDevice3* iface)
808 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
810 FIXME("(%p/%p)->(): stub\n", iface, This);
815 static DWORD WINAPI IDirect3DRMDevice3Impl_GetWireframeOptions(IDirect3DRMDevice3* iface)
817 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
819 FIXME("(%p/%p)->(): stub\n", iface, This);
824 static D3DRMRENDERQUALITY WINAPI IDirect3DRMDevice3Impl_GetQuality(IDirect3DRMDevice3* iface)
826 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
828 TRACE("(%p/%p)->()\n", iface, This);
830 return This->quality;
833 static D3DCOLORMODEL WINAPI IDirect3DRMDevice3Impl_GetColorModel(IDirect3DRMDevice3* iface)
835 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
837 FIXME("(%p/%p)->(): stub\n", iface, This);
842 static D3DRMTEXTUREQUALITY WINAPI IDirect3DRMDevice3Impl_GetTextureQuality(IDirect3DRMDevice3* iface)
844 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
846 FIXME("(%p/%p)->(): stub\n", iface, This);
851 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetDirect3DDevice(IDirect3DRMDevice3* iface,
852 LPDIRECT3DDEVICE * dev)
854 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
856 FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
861 /*** IDirect3DRMDevice2 methods ***/
862 static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromD3D2(IDirect3DRMDevice3* iface,
864 LPDIRECT3DDEVICE2 lpD3DDev)
866 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
868 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
873 static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromSurface(IDirect3DRMDevice3* iface,
874 LPGUID lpGUID, LPDIRECTDRAW lpDD,
875 LPDIRECTDRAWSURFACE lpDDSBack)
877 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
879 FIXME("(%p/%p)->(%p, %p, %p): stub\n", iface, This, lpGUID, lpDD, lpDDSBack);
884 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetRenderMode(IDirect3DRMDevice3* iface, DWORD dwFlags)
886 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
888 TRACE("(%p/%p)->(%u)\n", iface, This, dwFlags);
890 This->rendermode = dwFlags;
895 static DWORD WINAPI IDirect3DRMDevice3Impl_GetRenderMode(IDirect3DRMDevice3* iface)
897 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
899 TRACE("(%p/%p)->()\n", iface, This);
901 return This->rendermode;
904 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetDirect3DDevice2(IDirect3DRMDevice3* iface,
905 LPDIRECT3DDEVICE2 * dev)
907 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
909 FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
914 /*** IDirect3DRMDevice3 methods ***/
915 static HRESULT WINAPI IDirect3DRMDevice3Impl_FindPreferredTextureFormat(IDirect3DRMDevice3* iface,
918 LPDDPIXELFORMAT lpDDPF)
920 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
922 FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface, This, bitdepths, flags, lpDDPF);
927 static HRESULT WINAPI IDirect3DRMDevice3Impl_RenderStateChange(IDirect3DRMDevice3* iface,
928 D3DRENDERSTATETYPE type, DWORD val,
931 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
933 FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface, This, type, val, flags);
938 static HRESULT WINAPI IDirect3DRMDevice3Impl_LightStateChange(IDirect3DRMDevice3* iface,
939 D3DLIGHTSTATETYPE type, DWORD val,
942 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
944 FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface, This, type, val, flags);
949 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetStateChangeOptions(IDirect3DRMDevice3* iface,
950 DWORD stateclass, DWORD statenum,
953 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
955 FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface, This, stateclass, statenum, flags);
960 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetStateChangeOptions(IDirect3DRMDevice3* iface,
961 DWORD stateclass, DWORD statenum,
964 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
966 FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface, This, stateclass, statenum, flags);
971 static const struct IDirect3DRMDevice3Vtbl Direct3DRMDevice3_Vtbl =
973 /*** IUnknown methods ***/
974 IDirect3DRMDevice3Impl_QueryInterface,
975 IDirect3DRMDevice3Impl_AddRef,
976 IDirect3DRMDevice3Impl_Release,
977 /*** IDirect3DRMObject methods ***/
978 IDirect3DRMDevice3Impl_Clone,
979 IDirect3DRMDevice3Impl_AddDestroyCallback,
980 IDirect3DRMDevice3Impl_DeleteDestroyCallback,
981 IDirect3DRMDevice3Impl_SetAppData,
982 IDirect3DRMDevice3Impl_GetAppData,
983 IDirect3DRMDevice3Impl_SetName,
984 IDirect3DRMDevice3Impl_GetName,
985 IDirect3DRMDevice3Impl_GetClassName,
986 /*** IDirect3DRMDevice methods ***/
987 IDirect3DRMDevice3Impl_Init,
988 IDirect3DRMDevice3Impl_InitFromD3D,
989 IDirect3DRMDevice3Impl_InitFromClipper,
990 IDirect3DRMDevice3Impl_Update,
991 IDirect3DRMDevice3Impl_AddUpdateCallback,
992 IDirect3DRMDevice3Impl_DeleteUpdateCallback,
993 IDirect3DRMDevice3Impl_SetBufferCount,
994 IDirect3DRMDevice3Impl_GetBufferCount,
995 IDirect3DRMDevice3Impl_SetDither,
996 IDirect3DRMDevice3Impl_SetShades,
997 IDirect3DRMDevice3Impl_SetQuality,
998 IDirect3DRMDevice3Impl_SetTextureQuality,
999 IDirect3DRMDevice3Impl_GetViewports,
1000 IDirect3DRMDevice3Impl_GetDither,
1001 IDirect3DRMDevice3Impl_GetShades,
1002 IDirect3DRMDevice3Impl_GetHeight,
1003 IDirect3DRMDevice3Impl_GetWidth,
1004 IDirect3DRMDevice3Impl_GetTrianglesDrawn,
1005 IDirect3DRMDevice3Impl_GetWireframeOptions,
1006 IDirect3DRMDevice3Impl_GetQuality,
1007 IDirect3DRMDevice3Impl_GetColorModel,
1008 IDirect3DRMDevice3Impl_GetTextureQuality,
1009 IDirect3DRMDevice3Impl_GetDirect3DDevice,
1010 /*** IDirect3DRMDevice2 methods ***/
1011 IDirect3DRMDevice3Impl_InitFromD3D2,
1012 IDirect3DRMDevice3Impl_InitFromSurface,
1013 IDirect3DRMDevice3Impl_SetRenderMode,
1014 IDirect3DRMDevice3Impl_GetRenderMode,
1015 IDirect3DRMDevice3Impl_GetDirect3DDevice2,
1016 /*** IDirect3DRMDevice3 methods ***/
1017 IDirect3DRMDevice3Impl_FindPreferredTextureFormat,
1018 IDirect3DRMDevice3Impl_RenderStateChange,
1019 IDirect3DRMDevice3Impl_LightStateChange,
1020 IDirect3DRMDevice3Impl_GetStateChangeOptions,
1021 IDirect3DRMDevice3Impl_SetStateChangeOptions
1025 /*** IUnknown methods ***/
1026 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_QueryInterface(IDirect3DRMWinDevice* iface,
1027 REFIID riid, void** object)
1029 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1030 return IDirect3DRMDevice2_QueryInterface(&This->IDirect3DRMDevice2_iface, riid, object);
1033 static ULONG WINAPI IDirect3DRMWinDeviceImpl_AddRef(IDirect3DRMWinDevice* iface)
1035 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1036 return IDirect3DRMDevice2_AddRef(&This->IDirect3DRMDevice2_iface);
1039 static ULONG WINAPI IDirect3DRMWinDeviceImpl_Release(IDirect3DRMWinDevice* iface)
1041 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1042 return IDirect3DRMDevice2_Release(&This->IDirect3DRMDevice2_iface);
1045 /*** IDirect3DRMObject methods ***/
1046 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_Clone(IDirect3DRMWinDevice* iface,
1047 LPUNKNOWN unkwn, REFIID riid,
1050 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1052 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
1057 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_AddDestroyCallback(IDirect3DRMWinDevice* iface,
1058 D3DRMOBJECTCALLBACK cb,
1061 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1063 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1068 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_DeleteDestroyCallback(IDirect3DRMWinDevice* iface,
1069 D3DRMOBJECTCALLBACK cb,
1072 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1074 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1079 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_SetAppData(IDirect3DRMWinDevice* iface,
1082 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1084 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1089 static DWORD WINAPI IDirect3DRMWinDeviceImpl_GetAppData(IDirect3DRMWinDevice* iface)
1091 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1093 FIXME("(%p/%p)->(): stub\n", iface, This);
1098 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_SetName(IDirect3DRMWinDevice* iface, LPCSTR name)
1100 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1102 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
1107 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_GetName(IDirect3DRMWinDevice* iface,
1108 LPDWORD size, LPSTR name)
1110 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1112 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1117 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_GetClassName(IDirect3DRMWinDevice* iface,
1118 LPDWORD size, LPSTR name)
1120 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1122 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
1124 return IDirect3DRMDevice3_GetClassName(&This->IDirect3DRMDevice3_iface, size, name);
1127 /*** IDirect3DRMWinDevice methods ***/
1128 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_HandlePaint(IDirect3DRMWinDevice* iface, HDC hdc)
1130 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1132 FIXME("(%p/%p)->(%p): stub\n", iface, This, hdc);
1137 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_HandleActivate(IDirect3DRMWinDevice* iface, WORD wparam)
1139 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1141 FIXME("(%p/%p)->(%u): stub\n", iface, This, wparam);
1146 static const struct IDirect3DRMWinDeviceVtbl Direct3DRMWinDevice_Vtbl =
1148 /*** IUnknown methods ***/
1149 IDirect3DRMWinDeviceImpl_QueryInterface,
1150 IDirect3DRMWinDeviceImpl_AddRef,
1151 IDirect3DRMWinDeviceImpl_Release,
1152 /*** IDirect3DRMObject methods ***/
1153 IDirect3DRMWinDeviceImpl_Clone,
1154 IDirect3DRMWinDeviceImpl_AddDestroyCallback,
1155 IDirect3DRMWinDeviceImpl_DeleteDestroyCallback,
1156 IDirect3DRMWinDeviceImpl_SetAppData,
1157 IDirect3DRMWinDeviceImpl_GetAppData,
1158 IDirect3DRMWinDeviceImpl_SetName,
1159 IDirect3DRMWinDeviceImpl_GetName,
1160 IDirect3DRMWinDeviceImpl_GetClassName,
1161 /*** IDirect3DRMWinDevice methods ***/
1162 IDirect3DRMWinDeviceImpl_HandlePaint,
1163 IDirect3DRMWinDeviceImpl_HandleActivate
1166 HRESULT Direct3DRMDevice_create(REFIID riid, IUnknown** ppObj)
1168 IDirect3DRMDeviceImpl* object;
1170 TRACE("(%p)\n", ppObj);
1172 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMDeviceImpl));
1175 ERR("Out of memory\n");
1176 return E_OUTOFMEMORY;
1179 object->IDirect3DRMDevice2_iface.lpVtbl = &Direct3DRMDevice2_Vtbl;
1180 object->IDirect3DRMDevice3_iface.lpVtbl = &Direct3DRMDevice3_Vtbl;
1181 object->IDirect3DRMWinDevice_iface.lpVtbl = &Direct3DRMWinDevice_Vtbl;
1184 if (IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
1185 *ppObj = (IUnknown*)&object->IDirect3DRMDevice3_iface;
1187 *ppObj = (IUnknown*)&object->IDirect3DRMDevice2_iface;