d3drm: Improve IDirect3DRMViewportX_Render stub.
[wine/multimedia.git] / dlls / d3drm / viewport.c
blob33fde1f7aca2a5179052d79a5beab47ceb7657df
1 /*
2 * Implementation of IDirect3DRMViewport Interface
4 * Copyright 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"
26 #define COBJMACROS
28 #include "winbase.h"
29 #include "wingdi.h"
31 #include "d3drm_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
35 typedef struct {
36 IDirect3DRMViewport IDirect3DRMViewport_iface;
37 IDirect3DRMViewport2 IDirect3DRMViewport2_iface;
38 LONG ref;
39 D3DVALUE back;
40 D3DVALUE front;
41 D3DVALUE field;
42 D3DRMPROJECTIONTYPE projection;
43 } IDirect3DRMViewportImpl;
45 static inline IDirect3DRMViewportImpl *impl_from_IDirect3DRMViewport(IDirect3DRMViewport *iface)
47 return CONTAINING_RECORD(iface, IDirect3DRMViewportImpl, IDirect3DRMViewport_iface);
50 static inline IDirect3DRMViewportImpl *impl_from_IDirect3DRMViewport2(IDirect3DRMViewport2 *iface)
52 return CONTAINING_RECORD(iface, IDirect3DRMViewportImpl, IDirect3DRMViewport2_iface);
55 /*** IUnknown methods ***/
56 static HRESULT WINAPI IDirect3DRMViewportImpl_QueryInterface(IDirect3DRMViewport* iface,
57 REFIID riid, void** object)
59 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
61 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
63 *object = NULL;
65 if (IsEqualGUID(riid, &IID_IUnknown) ||
66 IsEqualGUID(riid, &IID_IDirect3DRMViewport))
68 *object = &This->IDirect3DRMViewport_iface;
70 else if(IsEqualGUID(riid, &IID_IDirect3DRMViewport2))
72 *object = &This->IDirect3DRMViewport2_iface;
74 else
76 FIXME("interface %s not implemented\n", debugstr_guid(riid));
77 return E_NOINTERFACE;
80 IDirect3DRMViewport_AddRef(iface);
81 return S_OK;
84 static ULONG WINAPI IDirect3DRMViewportImpl_AddRef(IDirect3DRMViewport* iface)
86 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
87 ULONG ref = InterlockedIncrement(&This->ref);
89 TRACE("(%p)->(): new ref = %d\n", This, ref);
91 return ref;
94 static ULONG WINAPI IDirect3DRMViewportImpl_Release(IDirect3DRMViewport* iface)
96 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
97 ULONG ref = InterlockedDecrement(&This->ref);
99 TRACE("(%p)->(): new ref = %d\n", This, ref);
101 if (!ref)
102 HeapFree(GetProcessHeap(), 0, This);
104 return ref;
107 /*** IDirect3DRMObject methods ***/
108 static HRESULT WINAPI IDirect3DRMViewportImpl_Clone(IDirect3DRMViewport* iface,
109 LPUNKNOWN unkwn, REFIID riid,
110 LPVOID* object)
112 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
114 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
116 return E_NOTIMPL;
119 static HRESULT WINAPI IDirect3DRMViewportImpl_AddDestroyCallback(IDirect3DRMViewport* iface,
120 D3DRMOBJECTCALLBACK cb,
121 LPVOID argument)
123 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
125 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
127 return E_NOTIMPL;
130 static HRESULT WINAPI IDirect3DRMViewportImpl_DeleteDestroyCallback(IDirect3DRMViewport* iface,
131 D3DRMOBJECTCALLBACK cb,
132 LPVOID argument)
134 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
136 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
138 return E_NOTIMPL;
141 static HRESULT WINAPI IDirect3DRMViewportImpl_SetAppData(IDirect3DRMViewport* iface,
142 DWORD data)
144 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
146 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
148 return E_NOTIMPL;
151 static DWORD WINAPI IDirect3DRMViewportImpl_GetAppData(IDirect3DRMViewport* iface)
153 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
155 FIXME("(%p/%p)->(): stub\n", iface, This);
157 return 0;
160 static HRESULT WINAPI IDirect3DRMViewportImpl_SetName(IDirect3DRMViewport* iface, LPCSTR name)
162 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
164 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
166 return E_NOTIMPL;
169 static HRESULT WINAPI IDirect3DRMViewportImpl_GetName(IDirect3DRMViewport* iface,
170 LPDWORD size, LPSTR name)
172 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
174 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
176 return E_NOTIMPL;
179 static HRESULT WINAPI IDirect3DRMViewportImpl_GetClassName(IDirect3DRMViewport* iface,
180 LPDWORD size, LPSTR name)
182 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
184 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
186 return E_NOTIMPL;
189 /*** IDirect3DRMViewport methods ***/
190 static HRESULT WINAPI IDirect3DRMViewportImpl_Init(IDirect3DRMViewport* iface,
191 LPDIRECT3DRMDEVICE dev, LPDIRECT3DRMFRAME camera,
192 DWORD xpos, DWORD ypos,
193 DWORD width, DWORD height)
195 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
197 FIXME("(%p/%p)->(%p, %p, %u, %u, %u, %u): stub\n", iface, This, dev, camera,
198 xpos, ypos, width, height);
200 return E_NOTIMPL;
203 static HRESULT WINAPI IDirect3DRMViewportImpl_Clear(IDirect3DRMViewport* iface)
205 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
207 FIXME("(%p/%p)->(): stub\n", iface, This);
209 return D3DRM_OK;
212 static HRESULT WINAPI IDirect3DRMViewportImpl_Render(IDirect3DRMViewport* iface,
213 LPDIRECT3DRMFRAME frame)
215 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
217 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
219 return D3DRM_OK;
222 static HRESULT WINAPI IDirect3DRMViewportImpl_SetFront(IDirect3DRMViewport* iface, D3DVALUE front)
224 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
226 TRACE("(%p/%p)->(%f)\n", iface, This, front);
228 return IDirect3DRMViewport2_SetFront(&This->IDirect3DRMViewport2_iface, front);
231 static HRESULT WINAPI IDirect3DRMViewportImpl_SetBack(IDirect3DRMViewport* iface, D3DVALUE back)
233 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
235 TRACE("(%p/%p)->(%f)\n", iface, This, back);
237 return IDirect3DRMViewport2_SetBack(&This->IDirect3DRMViewport2_iface, back);
240 static HRESULT WINAPI IDirect3DRMViewportImpl_SetField(IDirect3DRMViewport* iface, D3DVALUE field)
242 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
244 TRACE("(%p/%p)->(%f)\n", iface, This, field);
246 return IDirect3DRMViewport2_SetField(&This->IDirect3DRMViewport2_iface, field);
249 static HRESULT WINAPI IDirect3DRMViewportImpl_SetUniformScaling(IDirect3DRMViewport* iface, BOOL b)
251 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
253 FIXME("(%p/%p)->(%d): stub\n", iface, This, b);
255 return E_NOTIMPL;
258 static HRESULT WINAPI IDirect3DRMViewportImpl_SetCamera(IDirect3DRMViewport* iface,
259 LPDIRECT3DRMFRAME frame)
261 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
263 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
265 return E_NOTIMPL;
268 static HRESULT WINAPI IDirect3DRMViewportImpl_SetProjection(IDirect3DRMViewport* iface,
269 D3DRMPROJECTIONTYPE type)
271 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
273 TRACE("(%p/%p)->(%u)\n", iface, This, type);
275 return IDirect3DRMViewport2_SetProjection(&This->IDirect3DRMViewport2_iface, type);
278 static HRESULT WINAPI IDirect3DRMViewportImpl_Transform(IDirect3DRMViewport* iface,
279 D3DRMVECTOR4D *d, D3DVECTOR *s)
281 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
283 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, d, s);
285 return E_NOTIMPL;
288 static HRESULT WINAPI IDirect3DRMViewportImpl_InverseTransform(IDirect3DRMViewport* iface,
289 D3DVECTOR *d, D3DRMVECTOR4D *s)
291 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
293 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, d, s);
295 return E_NOTIMPL;
298 static HRESULT WINAPI IDirect3DRMViewportImpl_Configure(IDirect3DRMViewport* iface, LONG x, LONG y,
299 DWORD width, DWORD height)
301 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
303 FIXME("(%p/%p)->(%u, %u, %u, %u): stub\n", iface, This, x, y, width, height);
305 return E_NOTIMPL;
308 static HRESULT WINAPI IDirect3DRMViewportImpl_ForceUpdate(IDirect3DRMViewport* iface,
309 DWORD x1, DWORD y1, DWORD x2, DWORD y2)
311 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
313 FIXME("(%p/%p)->(%u, %u, %u, %u): stub\n", iface, This, x1, y1, x2, y2);
315 return E_NOTIMPL;
318 static HRESULT WINAPI IDirect3DRMViewportImpl_SetPlane(IDirect3DRMViewport* iface,
319 D3DVALUE left, D3DVALUE right,
320 D3DVALUE bottom, D3DVALUE top)
322 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
324 FIXME("(%p/%p)->(%f, %f, %f, %f): stub\n", iface, This, left, right, bottom, top);
326 return E_NOTIMPL;
329 static HRESULT WINAPI IDirect3DRMViewportImpl_GetCamera(IDirect3DRMViewport* iface,
330 LPDIRECT3DRMFRAME * frame)
332 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
334 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
336 return E_NOTIMPL;
339 static HRESULT WINAPI IDirect3DRMViewportImpl_GetDevice(IDirect3DRMViewport* iface,
340 LPDIRECT3DRMDEVICE * device)
342 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
344 FIXME("(%p/%p)->(%p): stub\n", iface, This, device);
346 return E_NOTIMPL;
349 static HRESULT WINAPI IDirect3DRMViewportImpl_GetPlane(IDirect3DRMViewport* iface,
350 D3DVALUE *left, D3DVALUE *right,
351 D3DVALUE *bottom, D3DVALUE *top)
353 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
355 FIXME("(%p/%p)->(%p, %p, %p, %p): stub\n", iface, This, left, right, bottom, top);
357 return E_NOTIMPL;
360 static HRESULT WINAPI IDirect3DRMViewportImpl_Pick(IDirect3DRMViewport* iface, LONG x, LONG y,
361 LPDIRECT3DRMPICKEDARRAY *return_visuals)
363 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
365 FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface, This, x, y, return_visuals);
367 return E_NOTIMPL;
370 static BOOL WINAPI IDirect3DRMViewportImpl_GetUniformScaling(IDirect3DRMViewport* iface)
372 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
374 FIXME("(%p/%p)->(): stub\n", iface, This);
376 return E_NOTIMPL;
379 static LONG WINAPI IDirect3DRMViewportImpl_GetX(IDirect3DRMViewport* iface)
381 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
383 FIXME("(%p/%p)->(): stub\n", iface, This);
385 return E_NOTIMPL;
388 static LONG WINAPI IDirect3DRMViewportImpl_GetY(IDirect3DRMViewport* iface)
390 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
392 FIXME("(%p/%p)->(): stub\n", iface, This);
394 return E_NOTIMPL;
397 static DWORD WINAPI IDirect3DRMViewportImpl_GetWidth(IDirect3DRMViewport* iface)
399 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
401 FIXME("(%p/%p)->(): stub\n", iface, This);
403 return E_NOTIMPL;
406 static DWORD WINAPI IDirect3DRMViewportImpl_GetHeight(IDirect3DRMViewport* iface)
408 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
410 FIXME("(%p/%p)->(): stub\n", iface, This);
412 return E_NOTIMPL;
415 static D3DVALUE WINAPI IDirect3DRMViewportImpl_GetField(IDirect3DRMViewport* iface)
417 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
419 TRACE("(%p/%p)->()\n", iface, This);
421 return IDirect3DRMViewport2_GetField(&This->IDirect3DRMViewport2_iface);
424 static D3DVALUE WINAPI IDirect3DRMViewportImpl_GetBack(IDirect3DRMViewport* iface)
426 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
428 TRACE("(%p/%p)->()\n", iface, This);
430 return IDirect3DRMViewport2_GetBack(&This->IDirect3DRMViewport2_iface);
433 static D3DVALUE WINAPI IDirect3DRMViewportImpl_GetFront(IDirect3DRMViewport* iface)
435 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
437 TRACE("(%p/%p)->()\n", iface, This);
439 return IDirect3DRMViewport2_GetFront(&This->IDirect3DRMViewport2_iface);
442 static D3DRMPROJECTIONTYPE WINAPI IDirect3DRMViewportImpl_GetProjection(IDirect3DRMViewport* iface)
444 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
446 TRACE("(%p/%p)->()\n", iface, This);
448 return IDirect3DRMViewport2_GetProjection(&This->IDirect3DRMViewport2_iface);
451 static HRESULT WINAPI IDirect3DRMViewportImpl_GetDirect3DViewport(IDirect3DRMViewport* iface,
452 LPDIRECT3DVIEWPORT * viewport)
454 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
456 FIXME("(%p/%p)->(%p): stub\n", iface, This, This);
458 return E_NOTIMPL;
461 static const struct IDirect3DRMViewportVtbl Direct3DRMViewport_Vtbl =
463 /*** IUnknown methods ***/
464 IDirect3DRMViewportImpl_QueryInterface,
465 IDirect3DRMViewportImpl_AddRef,
466 IDirect3DRMViewportImpl_Release,
467 /*** IDirect3DRMObject methods ***/
468 IDirect3DRMViewportImpl_Clone,
469 IDirect3DRMViewportImpl_AddDestroyCallback,
470 IDirect3DRMViewportImpl_DeleteDestroyCallback,
471 IDirect3DRMViewportImpl_SetAppData,
472 IDirect3DRMViewportImpl_GetAppData,
473 IDirect3DRMViewportImpl_SetName,
474 IDirect3DRMViewportImpl_GetName,
475 IDirect3DRMViewportImpl_GetClassName,
476 /*** IDirect3DRMViewport methods ***/
477 IDirect3DRMViewportImpl_Init,
478 IDirect3DRMViewportImpl_Clear,
479 IDirect3DRMViewportImpl_Render,
480 IDirect3DRMViewportImpl_SetFront,
481 IDirect3DRMViewportImpl_SetBack,
482 IDirect3DRMViewportImpl_SetField,
483 IDirect3DRMViewportImpl_SetUniformScaling,
484 IDirect3DRMViewportImpl_SetCamera,
485 IDirect3DRMViewportImpl_SetProjection,
486 IDirect3DRMViewportImpl_Transform,
487 IDirect3DRMViewportImpl_InverseTransform,
488 IDirect3DRMViewportImpl_Configure,
489 IDirect3DRMViewportImpl_ForceUpdate,
490 IDirect3DRMViewportImpl_SetPlane,
491 IDirect3DRMViewportImpl_GetCamera,
492 IDirect3DRMViewportImpl_GetDevice,
493 IDirect3DRMViewportImpl_GetPlane,
494 IDirect3DRMViewportImpl_Pick,
495 IDirect3DRMViewportImpl_GetUniformScaling,
496 IDirect3DRMViewportImpl_GetX,
497 IDirect3DRMViewportImpl_GetY,
498 IDirect3DRMViewportImpl_GetWidth,
499 IDirect3DRMViewportImpl_GetHeight,
500 IDirect3DRMViewportImpl_GetField,
501 IDirect3DRMViewportImpl_GetBack,
502 IDirect3DRMViewportImpl_GetFront,
503 IDirect3DRMViewportImpl_GetProjection,
504 IDirect3DRMViewportImpl_GetDirect3DViewport
508 /*** IUnknown methods ***/
509 static HRESULT WINAPI IDirect3DRMViewport2Impl_QueryInterface(IDirect3DRMViewport2* iface,
510 REFIID riid, void** object)
512 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
513 return IDirect3DRMViewport_QueryInterface(&This->IDirect3DRMViewport_iface, riid, object);
516 static ULONG WINAPI IDirect3DRMViewport2Impl_AddRef(IDirect3DRMViewport2* iface)
518 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
519 return IDirect3DRMViewport_AddRef(&This->IDirect3DRMViewport_iface);
522 static ULONG WINAPI IDirect3DRMViewport2Impl_Release(IDirect3DRMViewport2* iface)
524 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
525 return IDirect3DRMViewport_Release(&This->IDirect3DRMViewport_iface);
528 /*** IDirect3DRMObject methods ***/
529 static HRESULT WINAPI IDirect3DRMViewport2Impl_Clone(IDirect3DRMViewport2* iface,
530 LPUNKNOWN unkwn, REFIID riid,
531 LPVOID* object)
533 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
535 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
537 return E_NOTIMPL;
540 static HRESULT WINAPI IDirect3DRMViewport2Impl_AddDestroyCallback(IDirect3DRMViewport2* iface,
541 D3DRMOBJECTCALLBACK cb,
542 LPVOID argument)
544 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
546 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
548 return E_NOTIMPL;
551 static HRESULT WINAPI IDirect3DRMViewport2Impl_DeleteDestroyCallback(IDirect3DRMViewport2* iface,
552 D3DRMOBJECTCALLBACK cb,
553 LPVOID argument)
555 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
557 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
559 return E_NOTIMPL;
562 static HRESULT WINAPI IDirect3DRMViewport2Impl_SetAppData(IDirect3DRMViewport2* iface,
563 DWORD data)
565 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
567 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
569 return E_NOTIMPL;
572 static DWORD WINAPI IDirect3DRMViewport2Impl_GetAppData(IDirect3DRMViewport2* iface)
574 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
576 FIXME("(%p/%p)->(): stub\n", iface, This);
578 return 0;
581 static HRESULT WINAPI IDirect3DRMViewport2Impl_SetName(IDirect3DRMViewport2* iface, LPCSTR name)
583 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
585 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
587 return E_NOTIMPL;
590 static HRESULT WINAPI IDirect3DRMViewport2Impl_GetName(IDirect3DRMViewport2* iface,
591 LPDWORD size, LPSTR name)
593 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
595 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
597 return E_NOTIMPL;
600 static HRESULT WINAPI IDirect3DRMViewport2Impl_GetClassName(IDirect3DRMViewport2* iface,
601 LPDWORD size, LPSTR name)
603 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
605 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
607 return E_NOTIMPL;
610 /*** IDirect3DRMViewport methods ***/
611 static HRESULT WINAPI IDirect3DRMViewport2Impl_Init(IDirect3DRMViewport2* iface,
612 LPDIRECT3DRMDEVICE3 dev, LPDIRECT3DRMFRAME3 camera,
613 DWORD xpos, DWORD ypos,
614 DWORD width, DWORD height)
616 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
618 FIXME("(%p/%p)->(%p, %p, %u, %u, %u, %u): stub\n", iface, This, dev, camera,
619 xpos, ypos, width, height);
621 return E_NOTIMPL;
624 static HRESULT WINAPI IDirect3DRMViewport2Impl_Clear(IDirect3DRMViewport2* iface, DWORD flags)
626 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
628 FIXME("(%p/%p)->(): stub\n", iface, This);
630 return D3DRM_OK;
633 static HRESULT WINAPI IDirect3DRMViewport2Impl_Render(IDirect3DRMViewport2* iface,
634 LPDIRECT3DRMFRAME3 frame)
636 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
638 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
640 return D3DRM_OK;
643 static HRESULT WINAPI IDirect3DRMViewport2Impl_SetFront(IDirect3DRMViewport2* iface, D3DVALUE front)
645 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
647 TRACE("(%p/%p)->(%f):\n", iface, This, front);
649 This->front = front;
651 return D3DRM_OK;
654 static HRESULT WINAPI IDirect3DRMViewport2Impl_SetBack(IDirect3DRMViewport2* iface, D3DVALUE back)
656 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
658 TRACE("(%p/%p)->(%f)\n", iface, This, back);
660 This->back = back;
662 return D3DRM_OK;
665 static HRESULT WINAPI IDirect3DRMViewport2Impl_SetField(IDirect3DRMViewport2* iface, D3DVALUE field)
667 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
669 TRACE("(%p/%p)->(%f)\n", iface, This, field);
671 This->field = field;
673 return D3DRM_OK;
676 static HRESULT WINAPI IDirect3DRMViewport2Impl_SetUniformScaling(IDirect3DRMViewport2* iface, BOOL b)
678 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
680 FIXME("(%p/%p)->(%d): stub\n", iface, This, b);
682 return E_NOTIMPL;
685 static HRESULT WINAPI IDirect3DRMViewport2Impl_SetCamera(IDirect3DRMViewport2* iface,
686 LPDIRECT3DRMFRAME3 frame)
688 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
690 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
692 return E_NOTIMPL;
695 static HRESULT WINAPI IDirect3DRMViewport2Impl_SetProjection(IDirect3DRMViewport2* iface,
696 D3DRMPROJECTIONTYPE type)
698 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
700 TRACE("(%p/%p)->(%u)\n", iface, This, type);
702 This->projection = type;
704 return D3DRM_OK;
707 static HRESULT WINAPI IDirect3DRMViewport2Impl_Transform(IDirect3DRMViewport2* iface,
708 D3DRMVECTOR4D *d, D3DVECTOR *s)
710 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
712 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, d, s);
714 return E_NOTIMPL;
717 static HRESULT WINAPI IDirect3DRMViewport2Impl_InverseTransform(IDirect3DRMViewport2* iface,
718 D3DVECTOR *d, D3DRMVECTOR4D *s)
720 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
722 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, d, s);
724 return E_NOTIMPL;
727 static HRESULT WINAPI IDirect3DRMViewport2Impl_Configure(IDirect3DRMViewport2* iface, LONG x, LONG y,
728 DWORD width, DWORD height)
730 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
732 FIXME("(%p/%p)->(%u, %u, %u, %u): stub\n", iface, This, x, y, width, height);
734 return E_NOTIMPL;
737 static HRESULT WINAPI IDirect3DRMViewport2Impl_ForceUpdate(IDirect3DRMViewport2* iface,
738 DWORD x1, DWORD y1, DWORD x2, DWORD y2)
740 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
742 FIXME("(%p/%p)->(%u, %u, %u, %u): stub\n", iface, This, x1, y1, x2, y2);
744 return E_NOTIMPL;
747 static HRESULT WINAPI IDirect3DRMViewport2Impl_SetPlane(IDirect3DRMViewport2* iface,
748 D3DVALUE left, D3DVALUE right,
749 D3DVALUE bottom, D3DVALUE top)
751 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
753 FIXME("(%p/%p)->(%f, %f, %f, %f): stub\n", iface, This, left, right, bottom, top);
755 return E_NOTIMPL;
758 static HRESULT WINAPI IDirect3DRMViewport2Impl_GetCamera(IDirect3DRMViewport2* iface,
759 LPDIRECT3DRMFRAME3 * frame)
761 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
763 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
765 return E_NOTIMPL;
768 static HRESULT WINAPI IDirect3DRMViewport2Impl_GetDevice(IDirect3DRMViewport2* iface,
769 LPDIRECT3DRMDEVICE3 * device)
771 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
773 FIXME("(%p/%p)->(%p): stub\n", iface, This, device);
775 return E_NOTIMPL;
778 static HRESULT WINAPI IDirect3DRMViewport2Impl_GetPlane(IDirect3DRMViewport2* iface,
779 D3DVALUE *left, D3DVALUE *right,
780 D3DVALUE *bottom, D3DVALUE *top)
782 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
784 FIXME("(%p/%p)->(%p, %p, %p, %p): stub\n", iface, This, left, right, bottom, top);
786 return E_NOTIMPL;
789 static HRESULT WINAPI IDirect3DRMViewport2Impl_Pick(IDirect3DRMViewport2* iface, LONG x, LONG y,
790 LPDIRECT3DRMPICKEDARRAY *return_visuals)
792 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
794 FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface, This, x, y, return_visuals);
796 return E_NOTIMPL;
799 static BOOL WINAPI IDirect3DRMViewport2Impl_GetUniformScaling(IDirect3DRMViewport2* iface)
801 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
803 FIXME("(%p/%p)->(): stub\n", iface, This);
805 return E_NOTIMPL;
808 static LONG WINAPI IDirect3DRMViewport2Impl_GetX(IDirect3DRMViewport2* iface)
810 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
812 FIXME("(%p/%p)->(): stub\n", iface, This);
814 return E_NOTIMPL;
817 static LONG WINAPI IDirect3DRMViewport2Impl_GetY(IDirect3DRMViewport2* iface)
819 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
821 FIXME("(%p/%p)->(): stub\n", iface, This);
823 return E_NOTIMPL;
826 static DWORD WINAPI IDirect3DRMViewport2Impl_GetWidth(IDirect3DRMViewport2* iface)
828 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
830 FIXME("(%p/%p)->(): stub\n", iface, This);
832 return E_NOTIMPL;
835 static DWORD WINAPI IDirect3DRMViewport2Impl_GetHeight(IDirect3DRMViewport2* iface)
837 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
839 FIXME("(%p/%p)->(): stub\n", iface, This);
841 return E_NOTIMPL;
844 static D3DVALUE WINAPI IDirect3DRMViewport2Impl_GetField(IDirect3DRMViewport2* iface)
846 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
848 TRACE("(%p/%p)->()\n", iface, This);
850 return This->field;
853 static D3DVALUE WINAPI IDirect3DRMViewport2Impl_GetBack(IDirect3DRMViewport2* iface)
855 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
857 TRACE("(%p/%p)->()\n", iface, This);
859 return This->back;
862 static D3DVALUE WINAPI IDirect3DRMViewport2Impl_GetFront(IDirect3DRMViewport2* iface)
864 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
866 TRACE("(%p/%p)->()\n", iface, This);
868 return This->front;
871 static D3DRMPROJECTIONTYPE WINAPI IDirect3DRMViewport2Impl_GetProjection(IDirect3DRMViewport2* iface)
873 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
875 TRACE("(%p/%p)->()\n", iface, This);
877 return This->projection;
880 static HRESULT WINAPI IDirect3DRMViewport2Impl_GetDirect3DViewport(IDirect3DRMViewport2* iface,
881 LPDIRECT3DVIEWPORT * viewport)
883 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
885 FIXME("(%p/%p)->(%p): stub\n", iface, This, This);
887 return E_NOTIMPL;
890 /*** IDirect3DRMViewport2 methods ***/
891 static HRESULT WINAPI IDirect3DRMViewport2Impl_TransformVectors(IDirect3DRMViewport2* iface,
892 DWORD numvectors,
893 LPD3DRMVECTOR4D dstvectors,
894 LPD3DVECTOR srcvectors)
896 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
898 FIXME("(%p/%p)->(%u, %p, %p): stub\n", iface, This, numvectors, dstvectors, srcvectors);
900 return E_NOTIMPL;
903 static HRESULT WINAPI IDirect3DRMViewport2Impl_InverseTransformVectors(IDirect3DRMViewport2* iface,
904 DWORD numvectors,
905 LPD3DVECTOR dstvectors,
906 LPD3DRMVECTOR4D srcvectors)
908 IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport2(iface);
910 FIXME("(%p/%p)->(%u, %p, %p): stub\n", iface, This, numvectors, dstvectors, srcvectors);
912 return E_NOTIMPL;
915 static const struct IDirect3DRMViewport2Vtbl Direct3DRMViewport2_Vtbl =
917 /*** IUnknown methods ***/
918 IDirect3DRMViewport2Impl_QueryInterface,
919 IDirect3DRMViewport2Impl_AddRef,
920 IDirect3DRMViewport2Impl_Release,
921 /*** IDirect3DRMObject methods ***/
922 IDirect3DRMViewport2Impl_Clone,
923 IDirect3DRMViewport2Impl_AddDestroyCallback,
924 IDirect3DRMViewport2Impl_DeleteDestroyCallback,
925 IDirect3DRMViewport2Impl_SetAppData,
926 IDirect3DRMViewport2Impl_GetAppData,
927 IDirect3DRMViewport2Impl_SetName,
928 IDirect3DRMViewport2Impl_GetName,
929 IDirect3DRMViewport2Impl_GetClassName,
930 /*** IDirect3DRMViewport methods ***/
931 IDirect3DRMViewport2Impl_Init,
932 IDirect3DRMViewport2Impl_Clear,
933 IDirect3DRMViewport2Impl_Render,
934 IDirect3DRMViewport2Impl_SetFront,
935 IDirect3DRMViewport2Impl_SetBack,
936 IDirect3DRMViewport2Impl_SetField,
937 IDirect3DRMViewport2Impl_SetUniformScaling,
938 IDirect3DRMViewport2Impl_SetCamera,
939 IDirect3DRMViewport2Impl_SetProjection,
940 IDirect3DRMViewport2Impl_Transform,
941 IDirect3DRMViewport2Impl_InverseTransform,
942 IDirect3DRMViewport2Impl_Configure,
943 IDirect3DRMViewport2Impl_ForceUpdate,
944 IDirect3DRMViewport2Impl_SetPlane,
945 IDirect3DRMViewport2Impl_GetCamera,
946 IDirect3DRMViewport2Impl_GetDevice,
947 IDirect3DRMViewport2Impl_GetPlane,
948 IDirect3DRMViewport2Impl_Pick,
949 IDirect3DRMViewport2Impl_GetUniformScaling,
950 IDirect3DRMViewport2Impl_GetX,
951 IDirect3DRMViewport2Impl_GetY,
952 IDirect3DRMViewport2Impl_GetWidth,
953 IDirect3DRMViewport2Impl_GetHeight,
954 IDirect3DRMViewport2Impl_GetField,
955 IDirect3DRMViewport2Impl_GetBack,
956 IDirect3DRMViewport2Impl_GetFront,
957 IDirect3DRMViewport2Impl_GetProjection,
958 IDirect3DRMViewport2Impl_GetDirect3DViewport,
959 /*** IDirect3DRMViewport2 methods ***/
960 IDirect3DRMViewport2Impl_TransformVectors,
961 IDirect3DRMViewport2Impl_InverseTransformVectors
964 HRESULT Direct3DRMViewport_create(REFIID riid, IUnknown** ppObj)
966 IDirect3DRMViewportImpl* object;
968 TRACE("(%p)\n", ppObj);
970 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMViewportImpl));
971 if (!object)
973 ERR("Out of memory\n");
974 return E_OUTOFMEMORY;
977 object->IDirect3DRMViewport_iface.lpVtbl = &Direct3DRMViewport_Vtbl;
978 object->IDirect3DRMViewport2_iface.lpVtbl = &Direct3DRMViewport2_Vtbl;
979 object->ref = 1;
981 if (IsEqualGUID(riid, &IID_IDirect3DRMViewport2))
982 *ppObj = (IUnknown*)&object->IDirect3DRMViewport2_iface;
983 else
984 *ppObj = (IUnknown*)&object->IDirect3DRMViewport_iface;
986 return S_OK;