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 } IDirect3DRMDeviceImpl;
45 static inline IDirect3DRMDeviceImpl *impl_from_IDirect3DRMDevice2(IDirect3DRMDevice2 *iface)
47 return CONTAINING_RECORD(iface, IDirect3DRMDeviceImpl, IDirect3DRMDevice2_iface);
50 static inline IDirect3DRMDeviceImpl *impl_from_IDirect3DRMDevice3(IDirect3DRMDevice3 *iface)
52 return CONTAINING_RECORD(iface, IDirect3DRMDeviceImpl, IDirect3DRMDevice3_iface);
55 static inline IDirect3DRMDeviceImpl *impl_from_IDirect3DRMWinDevice(IDirect3DRMWinDevice *iface)
57 return CONTAINING_RECORD(iface, IDirect3DRMDeviceImpl, IDirect3DRMWinDevice_iface);
60 /*** IUnknown methods ***/
61 static HRESULT WINAPI IDirect3DRMDevice2Impl_QueryInterface(IDirect3DRMDevice2* iface,
62 REFIID riid, void** object)
64 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
66 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
70 if (IsEqualGUID(riid, &IID_IUnknown) ||
71 IsEqualGUID(riid, &IID_IDirect3DRMDevice) ||
72 IsEqualGUID(riid, &IID_IDirect3DRMDevice2))
74 *object = &This->IDirect3DRMDevice2_iface;
76 else if(IsEqualGUID(riid, &IID_IDirect3DRMDevice3))
78 *object = &This->IDirect3DRMDevice3_iface;
80 else if(IsEqualGUID(riid, &IID_IDirect3DRMWinDevice))
82 *object = &This->IDirect3DRMWinDevice_iface;
86 FIXME("interface %s not implemented\n", debugstr_guid(riid));
90 IDirect3DRMDevice2_AddRef(iface);
94 static ULONG WINAPI IDirect3DRMDevice2Impl_AddRef(IDirect3DRMDevice2* iface)
96 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
97 ULONG ref = InterlockedIncrement(&This->ref);
99 TRACE("(%p)->(): new ref = %d\n", iface, ref);
104 static ULONG WINAPI IDirect3DRMDevice2Impl_Release(IDirect3DRMDevice2* iface)
106 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
107 ULONG ref = InterlockedDecrement(&This->ref);
109 TRACE("(%p)->(): new ref = %d\n", iface, ref);
112 HeapFree(GetProcessHeap(), 0, This);
117 /*** IDirect3DRMObject methods ***/
118 static HRESULT WINAPI IDirect3DRMDevice2Impl_Clone(IDirect3DRMDevice2* iface,
119 LPUNKNOWN unkwn, REFIID riid,
122 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
124 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
129 static HRESULT WINAPI IDirect3DRMDevice2Impl_AddDestroyCallback(IDirect3DRMDevice2* iface,
130 D3DRMOBJECTCALLBACK cb,
133 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
135 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
140 static HRESULT WINAPI IDirect3DRMDevice2Impl_DeleteDestroyCallback(IDirect3DRMDevice2* iface,
141 D3DRMOBJECTCALLBACK cb,
144 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
146 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
151 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetAppData(IDirect3DRMDevice2* iface,
154 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
156 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
161 static DWORD WINAPI IDirect3DRMDevice2Impl_GetAppData(IDirect3DRMDevice2* iface)
163 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
165 FIXME("(%p/%p)->(): stub\n", iface, This);
170 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetName(IDirect3DRMDevice2* iface, LPCSTR name)
172 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
174 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
179 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetName(IDirect3DRMDevice2* iface,
180 LPDWORD size, LPSTR name)
182 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
184 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
189 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetClassName(IDirect3DRMDevice2* iface,
190 LPDWORD size, LPSTR name)
192 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
194 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
199 /*** IDirect3DRMDevice methods ***/
200 static HRESULT WINAPI IDirect3DRMDevice2Impl_Init(IDirect3DRMDevice2* iface, ULONG width,
203 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
205 FIXME("(%p/%p)->(%u, %u): stub\n", iface, This, width, height);
210 /*** IDirect3DRMDevice2 methods ***/
211 static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromD3D(IDirect3DRMDevice2* iface,
213 LPDIRECT3DDEVICE lpD3DDev)
215 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
217 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
222 static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromClipper(IDirect3DRMDevice2* iface,
223 LPDIRECTDRAWCLIPPER lpDDClipper,
224 LPGUID lpGUID, int width, int height)
226 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
228 FIXME("(%p/%p)->(%p, %p, %u, %u): stub\n", iface, This, lpDDClipper, lpGUID, width, height);
233 static HRESULT WINAPI IDirect3DRMDevice2Impl_Update(IDirect3DRMDevice2* iface)
235 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
237 FIXME("(%p/%p)->(): stub\n", iface, This);
242 static HRESULT WINAPI IDirect3DRMDevice2Impl_AddUpdateCallback(IDirect3DRMDevice2* iface,
243 D3DRMUPDATECALLBACK cb, LPVOID arg)
245 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
247 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, arg);
252 static HRESULT WINAPI IDirect3DRMDevice2Impl_DeleteUpdateCallback(IDirect3DRMDevice2* iface,
253 D3DRMUPDATECALLBACK cb,
256 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
258 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, arg);
263 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetBufferCount(IDirect3DRMDevice2* iface, DWORD count)
265 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
267 FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
272 static DWORD WINAPI IDirect3DRMDevice2Impl_GetBufferCount(IDirect3DRMDevice2* iface)
274 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
276 FIXME("(%p/%p)->(): stub\n", iface, This);
281 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetDither(IDirect3DRMDevice2* iface, BOOL enable)
283 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
285 TRACE("(%p/%p)->(%d)\n", iface, This, enable);
287 return IDirect3DRMDevice3_SetDither(&This->IDirect3DRMDevice3_iface, enable);
290 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetShades(IDirect3DRMDevice2* iface, DWORD count)
292 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
294 FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
299 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetQuality(IDirect3DRMDevice2* iface,
300 D3DRMRENDERQUALITY quality)
302 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
304 FIXME("(%p/%p)->(%u): stub\n", iface, This, quality);
309 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetTextureQuality(IDirect3DRMDevice2* iface,
310 D3DRMTEXTUREQUALITY quality)
312 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
314 FIXME("(%p/%p)->(%u): stub\n", iface, This, quality);
319 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetViewports(IDirect3DRMDevice2* iface,
320 LPDIRECT3DRMVIEWPORTARRAY *return_views)
322 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
324 FIXME("(%p/%p)->(%p): stub\n", iface, This, return_views);
329 static BOOL WINAPI IDirect3DRMDevice2Impl_GetDither(IDirect3DRMDevice2* iface)
331 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
333 TRACE("(%p/%p)->()\n", iface, This);
335 return IDirect3DRMDevice3_GetDither(&This->IDirect3DRMDevice3_iface);
338 static DWORD WINAPI IDirect3DRMDevice2Impl_GetShades(IDirect3DRMDevice2* iface)
340 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
342 FIXME("(%p/%p)->(): stub\n", iface, This);
347 static DWORD WINAPI IDirect3DRMDevice2Impl_GetHeight(IDirect3DRMDevice2* iface)
349 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
351 FIXME("(%p/%p)->(): stub\n", iface, This);
356 static DWORD WINAPI IDirect3DRMDevice2Impl_GetWidth(IDirect3DRMDevice2* iface)
358 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
360 FIXME("(%p/%p)->(): stub\n", iface, This);
365 static DWORD WINAPI IDirect3DRMDevice2Impl_GetTrianglesDrawn(IDirect3DRMDevice2* iface)
367 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
369 FIXME("(%p/%p)->(): stub\n", iface, This);
374 static DWORD WINAPI IDirect3DRMDevice2Impl_GetWireframeOptions(IDirect3DRMDevice2* iface)
376 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
378 FIXME("(%p/%p)->(): stub\n", iface, This);
383 static D3DRMRENDERQUALITY WINAPI IDirect3DRMDevice2Impl_GetQuality(IDirect3DRMDevice2* iface)
385 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
387 FIXME("(%p/%p)->(): stub\n", iface, This);
392 static D3DCOLORMODEL WINAPI IDirect3DRMDevice2Impl_GetColorModel(IDirect3DRMDevice2* iface)
394 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
396 FIXME("(%p/%p)->(): stub\n", iface, This);
401 static D3DRMTEXTUREQUALITY WINAPI IDirect3DRMDevice2Impl_GetTextureQuality(IDirect3DRMDevice2* iface)
403 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
405 FIXME("(%p/%p)->(): stub\n", iface, This);
410 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetDirect3DDevice(IDirect3DRMDevice2* iface,
411 LPDIRECT3DDEVICE * dev)
413 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
415 FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
420 static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromD3D2(IDirect3DRMDevice2* iface,
422 LPDIRECT3DDEVICE2 lpD3DDev)
424 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
426 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
431 static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromSurface(IDirect3DRMDevice2* iface,
432 LPGUID lpGUID, LPDIRECTDRAW lpDD,
433 LPDIRECTDRAWSURFACE lpDDSBack)
435 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
437 FIXME("(%p/%p)->(%p, %p, %p): stub\n", iface, This, lpGUID, lpDD, lpDDSBack);
442 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetRenderMode(IDirect3DRMDevice2* iface, DWORD dwFlags)
444 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
446 FIXME("(%p/%p)->(%u): stub\n", iface, This, dwFlags);
451 static DWORD WINAPI IDirect3DRMDevice2Impl_GetRenderMode(IDirect3DRMDevice2* iface)
453 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
455 FIXME("(%p/%p)->(): stub\n", iface, This);
460 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetDirect3DDevice2(IDirect3DRMDevice2* iface,
461 LPDIRECT3DDEVICE2 * dev)
463 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
465 FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
470 static const struct IDirect3DRMDevice2Vtbl Direct3DRMDevice2_Vtbl =
472 /*** IUnknown methods ***/
473 IDirect3DRMDevice2Impl_QueryInterface,
474 IDirect3DRMDevice2Impl_AddRef,
475 IDirect3DRMDevice2Impl_Release,
476 /*** IDirect3DRMObject methods ***/
477 IDirect3DRMDevice2Impl_Clone,
478 IDirect3DRMDevice2Impl_AddDestroyCallback,
479 IDirect3DRMDevice2Impl_DeleteDestroyCallback,
480 IDirect3DRMDevice2Impl_SetAppData,
481 IDirect3DRMDevice2Impl_GetAppData,
482 IDirect3DRMDevice2Impl_SetName,
483 IDirect3DRMDevice2Impl_GetName,
484 IDirect3DRMDevice2Impl_GetClassName,
485 /*** IDirect3DRMDevice methods ***/
486 IDirect3DRMDevice2Impl_Init,
487 IDirect3DRMDevice2Impl_InitFromD3D,
488 IDirect3DRMDevice2Impl_InitFromClipper,
489 IDirect3DRMDevice2Impl_Update,
490 IDirect3DRMDevice2Impl_AddUpdateCallback,
491 IDirect3DRMDevice2Impl_DeleteUpdateCallback,
492 IDirect3DRMDevice2Impl_SetBufferCount,
493 IDirect3DRMDevice2Impl_GetBufferCount,
494 IDirect3DRMDevice2Impl_SetDither,
495 IDirect3DRMDevice2Impl_SetShades,
496 IDirect3DRMDevice2Impl_SetQuality,
497 IDirect3DRMDevice2Impl_SetTextureQuality,
498 IDirect3DRMDevice2Impl_GetViewports,
499 IDirect3DRMDevice2Impl_GetDither,
500 IDirect3DRMDevice2Impl_GetShades,
501 IDirect3DRMDevice2Impl_GetHeight,
502 IDirect3DRMDevice2Impl_GetWidth,
503 IDirect3DRMDevice2Impl_GetTrianglesDrawn,
504 IDirect3DRMDevice2Impl_GetWireframeOptions,
505 IDirect3DRMDevice2Impl_GetQuality,
506 IDirect3DRMDevice2Impl_GetColorModel,
507 IDirect3DRMDevice2Impl_GetTextureQuality,
508 IDirect3DRMDevice2Impl_GetDirect3DDevice,
509 /*** IDirect3DRMDevice2 methods ***/
510 IDirect3DRMDevice2Impl_InitFromD3D2,
511 IDirect3DRMDevice2Impl_InitFromSurface,
512 IDirect3DRMDevice2Impl_SetRenderMode,
513 IDirect3DRMDevice2Impl_GetRenderMode,
514 IDirect3DRMDevice2Impl_GetDirect3DDevice2
518 /*** IUnknown methods ***/
519 static HRESULT WINAPI IDirect3DRMDevice3Impl_QueryInterface(IDirect3DRMDevice3* iface,
520 REFIID riid, void** object)
522 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
523 return IDirect3DRMDevice2_QueryInterface(&This->IDirect3DRMDevice2_iface, riid, object);
526 static ULONG WINAPI IDirect3DRMDevice3Impl_AddRef(IDirect3DRMDevice3* iface)
528 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
529 return IDirect3DRMDevice2_AddRef(&This->IDirect3DRMDevice2_iface);
532 static ULONG WINAPI IDirect3DRMDevice3Impl_Release(IDirect3DRMDevice3* iface)
534 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
535 return IDirect3DRMDevice2_Release(&This->IDirect3DRMDevice2_iface);
538 /*** IDirect3DRMObject methods ***/
539 static HRESULT WINAPI IDirect3DRMDevice3Impl_Clone(IDirect3DRMDevice3* iface,
540 LPUNKNOWN unkwn, REFIID riid,
543 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
545 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
550 static HRESULT WINAPI IDirect3DRMDevice3Impl_AddDestroyCallback(IDirect3DRMDevice3* iface,
551 D3DRMOBJECTCALLBACK cb,
554 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
556 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
561 static HRESULT WINAPI IDirect3DRMDevice3Impl_DeleteDestroyCallback(IDirect3DRMDevice3* iface,
562 D3DRMOBJECTCALLBACK cb,
565 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
567 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
572 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetAppData(IDirect3DRMDevice3* iface,
575 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
577 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
582 static DWORD WINAPI IDirect3DRMDevice3Impl_GetAppData(IDirect3DRMDevice3* iface)
584 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
586 FIXME("(%p/%p)->(): stub\n", iface, This);
591 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetName(IDirect3DRMDevice3* iface, LPCSTR name)
593 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
595 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
600 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetName(IDirect3DRMDevice3* iface,
601 LPDWORD size, LPSTR name)
603 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
605 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
610 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetClassName(IDirect3DRMDevice3* iface,
611 LPDWORD size, LPSTR name)
613 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
615 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
620 /*** IDirect3DRMDevice methods ***/
621 static HRESULT WINAPI IDirect3DRMDevice3Impl_Init(IDirect3DRMDevice3* iface, ULONG width,
624 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
626 FIXME("(%p/%p)->(%u, %u): stub\n", iface, This, width, height);
631 static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromD3D(IDirect3DRMDevice3* iface,
633 LPDIRECT3DDEVICE lpD3DDev)
635 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
637 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
642 static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromClipper(IDirect3DRMDevice3* iface,
643 LPDIRECTDRAWCLIPPER lpDDClipper,
644 LPGUID lpGUID, int width, int height)
646 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
648 FIXME("(%p/%p)->(%p, %p, %u, %u): stub\n", iface, This, lpDDClipper, lpGUID, width, height);
653 static HRESULT WINAPI IDirect3DRMDevice3Impl_Update(IDirect3DRMDevice3* iface)
655 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
657 FIXME("(%p/%p)->(): stub\n", iface, This);
662 static HRESULT WINAPI IDirect3DRMDevice3Impl_AddUpdateCallback(IDirect3DRMDevice3* iface,
663 D3DRMUPDATECALLBACK cb, LPVOID arg)
665 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
667 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, arg);
672 static HRESULT WINAPI IDirect3DRMDevice3Impl_DeleteUpdateCallback(IDirect3DRMDevice3* iface,
673 D3DRMUPDATECALLBACK cb,
676 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
678 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, arg);
683 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetBufferCount(IDirect3DRMDevice3* iface, DWORD count)
685 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
687 FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
692 static DWORD WINAPI IDirect3DRMDevice3Impl_GetBufferCount(IDirect3DRMDevice3* iface)
694 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
696 FIXME("(%p/%p)->(): stub\n", iface, This);
701 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetDither(IDirect3DRMDevice3* iface, BOOL enable)
703 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
705 TRACE("(%p/%p)->(%d)\n", iface, This, enable);
707 This->dither = enable;
712 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetShades(IDirect3DRMDevice3* iface, DWORD count)
714 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
716 FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
721 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetQuality(IDirect3DRMDevice3* iface,
722 D3DRMRENDERQUALITY quality)
724 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
726 FIXME("(%p/%p)->(%u): stub\n", iface, This, quality);
731 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetTextureQuality(IDirect3DRMDevice3* iface,
732 D3DRMTEXTUREQUALITY quality)
734 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
736 FIXME("(%p/%p)->(%u): stub\n", iface, This, quality);
741 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetViewports(IDirect3DRMDevice3* iface,
742 LPDIRECT3DRMVIEWPORTARRAY *return_views)
744 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
746 FIXME("(%p/%p)->(%p): stub\n", iface, This, return_views);
751 static BOOL WINAPI IDirect3DRMDevice3Impl_GetDither(IDirect3DRMDevice3* iface)
753 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
755 TRACE("(%p/%p)->()\n", iface, This);
760 static DWORD WINAPI IDirect3DRMDevice3Impl_GetShades(IDirect3DRMDevice3* iface)
762 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
764 FIXME("(%p/%p)->(): stub\n", iface, This);
769 static DWORD WINAPI IDirect3DRMDevice3Impl_GetHeight(IDirect3DRMDevice3* iface)
771 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
773 FIXME("(%p/%p)->(): stub\n", iface, This);
778 static DWORD WINAPI IDirect3DRMDevice3Impl_GetWidth(IDirect3DRMDevice3* iface)
780 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
782 FIXME("(%p/%p)->(): stub\n", iface, This);
787 static DWORD WINAPI IDirect3DRMDevice3Impl_GetTrianglesDrawn(IDirect3DRMDevice3* iface)
789 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
791 FIXME("(%p/%p)->(): stub\n", iface, This);
796 static DWORD WINAPI IDirect3DRMDevice3Impl_GetWireframeOptions(IDirect3DRMDevice3* iface)
798 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
800 FIXME("(%p/%p)->(): stub\n", iface, This);
805 static D3DRMRENDERQUALITY WINAPI IDirect3DRMDevice3Impl_GetQuality(IDirect3DRMDevice3* iface)
807 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
809 FIXME("(%p/%p)->(): stub\n", iface, This);
814 static D3DCOLORMODEL WINAPI IDirect3DRMDevice3Impl_GetColorModel(IDirect3DRMDevice3* iface)
816 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
818 FIXME("(%p/%p)->(): stub\n", iface, This);
823 static D3DRMTEXTUREQUALITY WINAPI IDirect3DRMDevice3Impl_GetTextureQuality(IDirect3DRMDevice3* iface)
825 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
827 FIXME("(%p/%p)->(): stub\n", iface, This);
832 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetDirect3DDevice(IDirect3DRMDevice3* iface,
833 LPDIRECT3DDEVICE * dev)
835 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
837 FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
842 /*** IDirect3DRMDevice2 methods ***/
843 static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromD3D2(IDirect3DRMDevice3* iface,
845 LPDIRECT3DDEVICE2 lpD3DDev)
847 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
849 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
854 static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromSurface(IDirect3DRMDevice3* iface,
855 LPGUID lpGUID, LPDIRECTDRAW lpDD,
856 LPDIRECTDRAWSURFACE lpDDSBack)
858 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
860 FIXME("(%p/%p)->(%p, %p, %p): stub\n", iface, This, lpGUID, lpDD, lpDDSBack);
865 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetRenderMode(IDirect3DRMDevice3* iface, DWORD dwFlags)
867 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
869 FIXME("(%p/%p)->(%u): stub\n", iface, This, dwFlags);
874 static DWORD WINAPI IDirect3DRMDevice3Impl_GetRenderMode(IDirect3DRMDevice3* iface)
876 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
878 FIXME("(%p/%p)->(): stub\n", iface, This);
883 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetDirect3DDevice2(IDirect3DRMDevice3* iface,
884 LPDIRECT3DDEVICE2 * dev)
886 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
888 FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
893 /*** IDirect3DRMDevice3 methods ***/
894 static HRESULT WINAPI IDirect3DRMDevice3Impl_FindPreferredTextureFormat(IDirect3DRMDevice3* iface,
897 LPDDPIXELFORMAT lpDDPF)
899 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
901 FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface, This, bitdepths, flags, lpDDPF);
906 static HRESULT WINAPI IDirect3DRMDevice3Impl_RenderStateChange(IDirect3DRMDevice3* iface,
907 D3DRENDERSTATETYPE type, DWORD val,
910 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
912 FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface, This, type, val, flags);
917 static HRESULT WINAPI IDirect3DRMDevice3Impl_LightStateChange(IDirect3DRMDevice3* iface,
918 D3DLIGHTSTATETYPE type, DWORD val,
921 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
923 FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface, This, type, val, flags);
928 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetStateChangeOptions(IDirect3DRMDevice3* iface,
929 DWORD stateclass, DWORD statenum,
932 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
934 FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface, This, stateclass, statenum, flags);
939 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetStateChangeOptions(IDirect3DRMDevice3* iface,
940 DWORD stateclass, DWORD statenum,
943 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
945 FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface, This, stateclass, statenum, flags);
950 static const struct IDirect3DRMDevice3Vtbl Direct3DRMDevice3_Vtbl =
952 /*** IUnknown methods ***/
953 IDirect3DRMDevice3Impl_QueryInterface,
954 IDirect3DRMDevice3Impl_AddRef,
955 IDirect3DRMDevice3Impl_Release,
956 /*** IDirect3DRMObject methods ***/
957 IDirect3DRMDevice3Impl_Clone,
958 IDirect3DRMDevice3Impl_AddDestroyCallback,
959 IDirect3DRMDevice3Impl_DeleteDestroyCallback,
960 IDirect3DRMDevice3Impl_SetAppData,
961 IDirect3DRMDevice3Impl_GetAppData,
962 IDirect3DRMDevice3Impl_SetName,
963 IDirect3DRMDevice3Impl_GetName,
964 IDirect3DRMDevice3Impl_GetClassName,
965 /*** IDirect3DRMDevice methods ***/
966 IDirect3DRMDevice3Impl_Init,
967 IDirect3DRMDevice3Impl_InitFromD3D,
968 IDirect3DRMDevice3Impl_InitFromClipper,
969 IDirect3DRMDevice3Impl_Update,
970 IDirect3DRMDevice3Impl_AddUpdateCallback,
971 IDirect3DRMDevice3Impl_DeleteUpdateCallback,
972 IDirect3DRMDevice3Impl_SetBufferCount,
973 IDirect3DRMDevice3Impl_GetBufferCount,
974 IDirect3DRMDevice3Impl_SetDither,
975 IDirect3DRMDevice3Impl_SetShades,
976 IDirect3DRMDevice3Impl_SetQuality,
977 IDirect3DRMDevice3Impl_SetTextureQuality,
978 IDirect3DRMDevice3Impl_GetViewports,
979 IDirect3DRMDevice3Impl_GetDither,
980 IDirect3DRMDevice3Impl_GetShades,
981 IDirect3DRMDevice3Impl_GetHeight,
982 IDirect3DRMDevice3Impl_GetWidth,
983 IDirect3DRMDevice3Impl_GetTrianglesDrawn,
984 IDirect3DRMDevice3Impl_GetWireframeOptions,
985 IDirect3DRMDevice3Impl_GetQuality,
986 IDirect3DRMDevice3Impl_GetColorModel,
987 IDirect3DRMDevice3Impl_GetTextureQuality,
988 IDirect3DRMDevice3Impl_GetDirect3DDevice,
989 /*** IDirect3DRMDevice2 methods ***/
990 IDirect3DRMDevice3Impl_InitFromD3D2,
991 IDirect3DRMDevice3Impl_InitFromSurface,
992 IDirect3DRMDevice3Impl_SetRenderMode,
993 IDirect3DRMDevice3Impl_GetRenderMode,
994 IDirect3DRMDevice3Impl_GetDirect3DDevice2,
995 /*** IDirect3DRMDevice3 methods ***/
996 IDirect3DRMDevice3Impl_FindPreferredTextureFormat,
997 IDirect3DRMDevice3Impl_RenderStateChange,
998 IDirect3DRMDevice3Impl_LightStateChange,
999 IDirect3DRMDevice3Impl_GetStateChangeOptions,
1000 IDirect3DRMDevice3Impl_SetStateChangeOptions
1004 /*** IUnknown methods ***/
1005 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_QueryInterface(IDirect3DRMWinDevice* iface,
1006 REFIID riid, void** object)
1008 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1009 return IDirect3DRMDevice2_QueryInterface(&This->IDirect3DRMDevice2_iface, riid, object);
1012 static ULONG WINAPI IDirect3DRMWinDeviceImpl_AddRef(IDirect3DRMWinDevice* iface)
1014 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1015 return IDirect3DRMDevice2_AddRef(&This->IDirect3DRMDevice2_iface);
1018 static ULONG WINAPI IDirect3DRMWinDeviceImpl_Release(IDirect3DRMWinDevice* iface)
1020 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1021 return IDirect3DRMDevice2_Release(&This->IDirect3DRMDevice2_iface);
1024 /*** IDirect3DRMObject methods ***/
1025 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_Clone(IDirect3DRMWinDevice* iface,
1026 LPUNKNOWN unkwn, REFIID riid,
1029 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1031 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
1036 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_AddDestroyCallback(IDirect3DRMWinDevice* iface,
1037 D3DRMOBJECTCALLBACK cb,
1040 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1042 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1047 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_DeleteDestroyCallback(IDirect3DRMWinDevice* iface,
1048 D3DRMOBJECTCALLBACK cb,
1051 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1053 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1058 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_SetAppData(IDirect3DRMWinDevice* iface,
1061 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1063 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1068 static DWORD WINAPI IDirect3DRMWinDeviceImpl_GetAppData(IDirect3DRMWinDevice* iface)
1070 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1072 FIXME("(%p/%p)->(): stub\n", iface, This);
1077 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_SetName(IDirect3DRMWinDevice* iface, LPCSTR name)
1079 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1081 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
1086 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_GetName(IDirect3DRMWinDevice* iface,
1087 LPDWORD size, LPSTR name)
1089 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1091 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1096 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_GetClassName(IDirect3DRMWinDevice* iface,
1097 LPDWORD size, LPSTR name)
1099 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1101 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1106 /*** IDirect3DRMWinDevice methods ***/
1107 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_HandlePaint(IDirect3DRMWinDevice* iface, HDC hdc)
1109 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1111 FIXME("(%p/%p)->(%p): stub\n", iface, This, hdc);
1116 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_HandleActivate(IDirect3DRMWinDevice* iface, WORD wparam)
1118 IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1120 FIXME("(%p/%p)->(%u): stub\n", iface, This, wparam);
1125 static const struct IDirect3DRMWinDeviceVtbl Direct3DRMWinDevice_Vtbl =
1127 /*** IUnknown methods ***/
1128 IDirect3DRMWinDeviceImpl_QueryInterface,
1129 IDirect3DRMWinDeviceImpl_AddRef,
1130 IDirect3DRMWinDeviceImpl_Release,
1131 /*** IDirect3DRMObject methods ***/
1132 IDirect3DRMWinDeviceImpl_Clone,
1133 IDirect3DRMWinDeviceImpl_AddDestroyCallback,
1134 IDirect3DRMWinDeviceImpl_DeleteDestroyCallback,
1135 IDirect3DRMWinDeviceImpl_SetAppData,
1136 IDirect3DRMWinDeviceImpl_GetAppData,
1137 IDirect3DRMWinDeviceImpl_SetName,
1138 IDirect3DRMWinDeviceImpl_GetName,
1139 IDirect3DRMWinDeviceImpl_GetClassName,
1140 /*** IDirect3DRMWinDevice methods ***/
1141 IDirect3DRMWinDeviceImpl_HandlePaint,
1142 IDirect3DRMWinDeviceImpl_HandleActivate
1145 HRESULT Direct3DRMDevice_create(REFIID riid, IUnknown** ppObj)
1147 IDirect3DRMDeviceImpl* object;
1149 TRACE("(%p)\n", ppObj);
1151 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMDeviceImpl));
1154 ERR("Out of memory\n");
1155 return E_OUTOFMEMORY;
1158 object->IDirect3DRMDevice2_iface.lpVtbl = &Direct3DRMDevice2_Vtbl;
1159 object->IDirect3DRMDevice3_iface.lpVtbl = &Direct3DRMDevice3_Vtbl;
1160 object->IDirect3DRMWinDevice_iface.lpVtbl = &Direct3DRMWinDevice_Vtbl;
1163 if (IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
1164 *ppObj = (IUnknown*)&object->IDirect3DRMDevice3_iface;
1166 *ppObj = (IUnknown*)&object->IDirect3DRMDevice2_iface;