po: Fix a mistake in Dutch translation.
[wine.git] / dlls / d3drm / viewport.c
blobc39903ff59bfecf6cc2d4c58449eb473a7cf9883
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 struct d3drm_viewport
37 IDirect3DRMViewport IDirect3DRMViewport_iface;
38 IDirect3DRMViewport2 IDirect3DRMViewport2_iface;
39 LONG ref;
40 D3DVALUE back;
41 D3DVALUE front;
42 D3DVALUE field;
43 D3DRMPROJECTIONTYPE projection;
46 static inline struct d3drm_viewport *impl_from_IDirect3DRMViewport(IDirect3DRMViewport *iface)
48 return CONTAINING_RECORD(iface, struct d3drm_viewport, IDirect3DRMViewport_iface);
51 static inline struct d3drm_viewport *impl_from_IDirect3DRMViewport2(IDirect3DRMViewport2 *iface)
53 return CONTAINING_RECORD(iface, struct d3drm_viewport, IDirect3DRMViewport2_iface);
56 static HRESULT WINAPI d3drm_viewport1_QueryInterface(IDirect3DRMViewport *iface, REFIID riid, void **out)
58 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
60 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
62 if (IsEqualGUID(riid, &IID_IDirect3DRMViewport)
63 || IsEqualGUID(riid, &IID_IUnknown))
65 *out = &viewport->IDirect3DRMViewport_iface;
67 else if (IsEqualGUID(riid, &IID_IDirect3DRMViewport2))
69 *out = &viewport->IDirect3DRMViewport2_iface;
71 else
73 *out = NULL;
74 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
75 return E_NOINTERFACE;
78 IUnknown_AddRef((IUnknown *)*out);
79 return S_OK;
82 static ULONG WINAPI d3drm_viewport1_AddRef(IDirect3DRMViewport *iface)
84 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
85 ULONG refcount = InterlockedIncrement(&viewport->ref);
87 TRACE("%p increasing refcount to %u.\n", iface, refcount);
89 return refcount;
92 static ULONG WINAPI d3drm_viewport1_Release(IDirect3DRMViewport *iface)
94 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
95 ULONG refcount = InterlockedDecrement(&viewport->ref);
97 TRACE("%p decreasing refcount to %u.\n", iface, refcount);
99 if (!refcount)
100 HeapFree(GetProcessHeap(), 0, viewport);
102 return refcount;
105 static HRESULT WINAPI d3drm_viewport1_Clone(IDirect3DRMViewport *iface,
106 IUnknown *outer, REFIID iid, void **out)
108 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
110 return E_NOTIMPL;
113 static HRESULT WINAPI d3drm_viewport1_AddDestroyCallback(IDirect3DRMViewport *iface,
114 D3DRMOBJECTCALLBACK cb, void *ctx)
116 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
118 return E_NOTIMPL;
121 static HRESULT WINAPI d3drm_viewport1_DeleteDestroyCallback(IDirect3DRMViewport *iface,
122 D3DRMOBJECTCALLBACK cb, void *ctx)
124 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
126 return E_NOTIMPL;
129 static HRESULT WINAPI d3drm_viewport1_SetAppData(IDirect3DRMViewport *iface, DWORD data)
131 FIXME("iface %p, data %#x stub!\n", iface, data);
133 return E_NOTIMPL;
136 static DWORD WINAPI d3drm_viewport1_GetAppData(IDirect3DRMViewport *iface)
138 FIXME("iface %p.\n", iface);
140 return 0;
143 static HRESULT WINAPI d3drm_viewport1_SetName(IDirect3DRMViewport *iface, const char *name)
145 FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
147 return E_NOTIMPL;
150 static HRESULT WINAPI d3drm_viewport1_GetName(IDirect3DRMViewport *iface, DWORD *size, char *name)
152 FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
154 return E_NOTIMPL;
157 static HRESULT WINAPI d3drm_viewport1_GetClassName(IDirect3DRMViewport *iface, DWORD *size, char *name)
159 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
161 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
163 return IDirect3DRMViewport2_GetClassName(&viewport->IDirect3DRMViewport2_iface, size, name);
166 static HRESULT WINAPI d3drm_viewport1_Init(IDirect3DRMViewport *iface, IDirect3DRMDevice *device,
167 IDirect3DRMFrame *camera, DWORD x, DWORD y, DWORD width, DWORD height)
169 FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u stub!\n",
170 iface, device, camera, x, y, width, height);
172 return E_NOTIMPL;
175 static HRESULT WINAPI d3drm_viewport1_Clear(IDirect3DRMViewport *iface)
177 FIXME("iface %p.\n", iface);
179 return D3DRM_OK;
182 static HRESULT WINAPI d3drm_viewport1_Render(IDirect3DRMViewport *iface, IDirect3DRMFrame *frame)
184 FIXME("iface %p, frame %p stub!\n", iface, frame);
186 return D3DRM_OK;
189 static HRESULT WINAPI d3drm_viewport1_SetFront(IDirect3DRMViewport *iface, D3DVALUE front)
191 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
193 TRACE("iface %p, front %.8e.\n", iface, front);
195 return IDirect3DRMViewport2_SetFront(&viewport->IDirect3DRMViewport2_iface, front);
198 static HRESULT WINAPI d3drm_viewport1_SetBack(IDirect3DRMViewport *iface, D3DVALUE back)
200 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
202 TRACE("iface %p, back %.8e.\n", iface, back);
204 return IDirect3DRMViewport2_SetBack(&viewport->IDirect3DRMViewport2_iface, back);
207 static HRESULT WINAPI d3drm_viewport1_SetField(IDirect3DRMViewport *iface, D3DVALUE field)
209 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
211 TRACE("iface %p, field %.8e.\n", iface, field);
213 return IDirect3DRMViewport2_SetField(&viewport->IDirect3DRMViewport2_iface, field);
216 static HRESULT WINAPI d3drm_viewport1_SetUniformScaling(IDirect3DRMViewport *iface, BOOL b)
218 FIXME("iface %p, b %#x stub!\n", iface, b);
220 return E_NOTIMPL;
223 static HRESULT WINAPI d3drm_viewport1_SetCamera(IDirect3DRMViewport *iface, IDirect3DRMFrame *camera)
225 FIXME("iface %p, camera %p stub!\n", iface, camera);
227 return E_NOTIMPL;
230 static HRESULT WINAPI d3drm_viewport1_SetProjection(IDirect3DRMViewport *iface, D3DRMPROJECTIONTYPE type)
232 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
234 TRACE("iface %p, type %#x.\n", iface, type);
236 return IDirect3DRMViewport2_SetProjection(&viewport->IDirect3DRMViewport2_iface, type);
239 static HRESULT WINAPI d3drm_viewport1_Transform(IDirect3DRMViewport *iface, D3DRMVECTOR4D *d, D3DVECTOR *s)
241 FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
243 return E_NOTIMPL;
246 static HRESULT WINAPI d3drm_viewport1_InverseTransform(IDirect3DRMViewport *iface, D3DVECTOR *d, D3DRMVECTOR4D *s)
248 FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
250 return E_NOTIMPL;
253 static HRESULT WINAPI d3drm_viewport1_Configure(IDirect3DRMViewport *iface,
254 LONG x, LONG y, DWORD width, DWORD height)
256 FIXME("iface %p, x %d, y %d, width %u, height %u stub!\n", iface, x, y, width, height);
258 return E_NOTIMPL;
261 static HRESULT WINAPI d3drm_viewport1_ForceUpdate(IDirect3DRMViewport *iface,
262 DWORD x1, DWORD y1, DWORD x2, DWORD y2)
264 FIXME("iface %p, x1 %u, y1 %u, x2 %u, y2 %u stub!\n", iface, x1, y1, x2, y2);
266 return E_NOTIMPL;
269 static HRESULT WINAPI d3drm_viewport1_SetPlane(IDirect3DRMViewport *iface,
270 D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top)
272 FIXME("iface %p, left %.8e, right %.8e, bottom %.8e, top %.8e stub!\n",
273 iface, left, right, bottom, top);
275 return E_NOTIMPL;
278 static HRESULT WINAPI d3drm_viewport1_GetCamera(IDirect3DRMViewport *iface, IDirect3DRMFrame **camera)
280 FIXME("iface %p, camera %p stub!\n", iface, camera);
282 return E_NOTIMPL;
285 static HRESULT WINAPI d3drm_viewport1_GetDevice(IDirect3DRMViewport *iface, IDirect3DRMDevice **device)
287 FIXME("iface %p, device %p stub!\n", iface, device);
289 return E_NOTIMPL;
292 static HRESULT WINAPI d3drm_viewport1_GetPlane(IDirect3DRMViewport *iface,
293 D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top)
295 FIXME("iface %p, left %p, right %p, bottom %p, top %p stub!\n",
296 iface, left, right, bottom, top);
298 return E_NOTIMPL;
301 static HRESULT WINAPI d3drm_viewport1_Pick(IDirect3DRMViewport *iface,
302 LONG x, LONG y, IDirect3DRMPickedArray **visuals)
304 FIXME("iface %p, x %d, y %d, visuals %p stub!\n", iface, x, y, visuals);
306 return E_NOTIMPL;
309 static BOOL WINAPI d3drm_viewport1_GetUniformScaling(IDirect3DRMViewport *iface)
311 FIXME("iface %p stub!\n", iface);
313 return E_NOTIMPL;
316 static LONG WINAPI d3drm_viewport1_GetX(IDirect3DRMViewport *iface)
318 FIXME("iface %p stub!\n", iface);
320 return E_NOTIMPL;
323 static LONG WINAPI d3drm_viewport1_GetY(IDirect3DRMViewport *iface)
325 FIXME("iface %p stub!\n", iface);
327 return E_NOTIMPL;
330 static DWORD WINAPI d3drm_viewport1_GetWidth(IDirect3DRMViewport *iface)
332 FIXME("iface %p stub!\n", iface);
334 return E_NOTIMPL;
337 static DWORD WINAPI d3drm_viewport1_GetHeight(IDirect3DRMViewport *iface)
339 FIXME("iface %p stub!\n", iface);
341 return E_NOTIMPL;
344 static D3DVALUE WINAPI d3drm_viewport1_GetField(IDirect3DRMViewport *iface)
346 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
348 TRACE("iface %p.\n", iface);
350 return IDirect3DRMViewport2_GetField(&viewport->IDirect3DRMViewport2_iface);
353 static D3DVALUE WINAPI d3drm_viewport1_GetBack(IDirect3DRMViewport *iface)
355 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
357 TRACE("iface %p.\n", iface);
359 return IDirect3DRMViewport2_GetBack(&viewport->IDirect3DRMViewport2_iface);
362 static D3DVALUE WINAPI d3drm_viewport1_GetFront(IDirect3DRMViewport *iface)
364 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
366 TRACE("iface %p.\n", iface);
368 return IDirect3DRMViewport2_GetFront(&viewport->IDirect3DRMViewport2_iface);
371 static D3DRMPROJECTIONTYPE WINAPI d3drm_viewport1_GetProjection(IDirect3DRMViewport *iface)
373 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
375 TRACE("iface %p.\n", iface);
377 return IDirect3DRMViewport2_GetProjection(&viewport->IDirect3DRMViewport2_iface);
380 static HRESULT WINAPI d3drm_viewport1_GetDirect3DViewport(IDirect3DRMViewport *iface,
381 IDirect3DViewport **viewport)
383 FIXME("iface %p, viewport %p stub!\n", iface, viewport);
385 return E_NOTIMPL;
388 static const struct IDirect3DRMViewportVtbl d3drm_viewport1_vtbl =
390 d3drm_viewport1_QueryInterface,
391 d3drm_viewport1_AddRef,
392 d3drm_viewport1_Release,
393 d3drm_viewport1_Clone,
394 d3drm_viewport1_AddDestroyCallback,
395 d3drm_viewport1_DeleteDestroyCallback,
396 d3drm_viewport1_SetAppData,
397 d3drm_viewport1_GetAppData,
398 d3drm_viewport1_SetName,
399 d3drm_viewport1_GetName,
400 d3drm_viewport1_GetClassName,
401 d3drm_viewport1_Init,
402 d3drm_viewport1_Clear,
403 d3drm_viewport1_Render,
404 d3drm_viewport1_SetFront,
405 d3drm_viewport1_SetBack,
406 d3drm_viewport1_SetField,
407 d3drm_viewport1_SetUniformScaling,
408 d3drm_viewport1_SetCamera,
409 d3drm_viewport1_SetProjection,
410 d3drm_viewport1_Transform,
411 d3drm_viewport1_InverseTransform,
412 d3drm_viewport1_Configure,
413 d3drm_viewport1_ForceUpdate,
414 d3drm_viewport1_SetPlane,
415 d3drm_viewport1_GetCamera,
416 d3drm_viewport1_GetDevice,
417 d3drm_viewport1_GetPlane,
418 d3drm_viewport1_Pick,
419 d3drm_viewport1_GetUniformScaling,
420 d3drm_viewport1_GetX,
421 d3drm_viewport1_GetY,
422 d3drm_viewport1_GetWidth,
423 d3drm_viewport1_GetHeight,
424 d3drm_viewport1_GetField,
425 d3drm_viewport1_GetBack,
426 d3drm_viewport1_GetFront,
427 d3drm_viewport1_GetProjection,
428 d3drm_viewport1_GetDirect3DViewport,
431 static HRESULT WINAPI d3drm_viewport2_QueryInterface(IDirect3DRMViewport2 *iface, REFIID riid, void **out)
433 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
435 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
437 return d3drm_viewport1_QueryInterface(&viewport->IDirect3DRMViewport_iface, riid, out);
440 static ULONG WINAPI d3drm_viewport2_AddRef(IDirect3DRMViewport2 *iface)
442 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
444 TRACE("iface %p.\n", iface);
446 return d3drm_viewport1_AddRef(&viewport->IDirect3DRMViewport_iface);
449 static ULONG WINAPI d3drm_viewport2_Release(IDirect3DRMViewport2 *iface)
451 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
453 TRACE("iface %p.\n", iface);
455 return d3drm_viewport1_Release(&viewport->IDirect3DRMViewport_iface);
458 static HRESULT WINAPI d3drm_viewport2_Clone(IDirect3DRMViewport2 *iface,
459 IUnknown *outer, REFIID iid, void **out)
461 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
463 return E_NOTIMPL;
466 static HRESULT WINAPI d3drm_viewport2_AddDestroyCallback(IDirect3DRMViewport2 *iface,
467 D3DRMOBJECTCALLBACK cb, void *ctx)
469 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
471 return E_NOTIMPL;
474 static HRESULT WINAPI d3drm_viewport2_DeleteDestroyCallback(IDirect3DRMViewport2 *iface,
475 D3DRMOBJECTCALLBACK cb, void *ctx)
477 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
479 return E_NOTIMPL;
482 static HRESULT WINAPI d3drm_viewport2_SetAppData(IDirect3DRMViewport2 *iface, DWORD data)
484 FIXME("iface %p, data %#x stub!\n", iface, data);
486 return E_NOTIMPL;
489 static DWORD WINAPI d3drm_viewport2_GetAppData(IDirect3DRMViewport2 *iface)
491 FIXME("iface %p stub!\n", iface);
493 return 0;
496 static HRESULT WINAPI d3drm_viewport2_SetName(IDirect3DRMViewport2 *iface, const char *name)
498 FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
500 return E_NOTIMPL;
503 static HRESULT WINAPI d3drm_viewport2_GetName(IDirect3DRMViewport2 *iface, DWORD *size, char *name)
505 FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
507 return E_NOTIMPL;
510 static HRESULT WINAPI d3drm_viewport2_GetClassName(IDirect3DRMViewport2 *iface, DWORD *size, char *name)
512 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
514 if (!size || *size < strlen("Viewport") || !name)
515 return E_INVALIDARG;
517 strcpy(name, "Viewport");
518 *size = sizeof("Viewport");
520 return D3DRM_OK;
523 static HRESULT WINAPI d3drm_viewport2_Init(IDirect3DRMViewport2 *iface, IDirect3DRMDevice3 *device,
524 IDirect3DRMFrame3 *camera, DWORD x, DWORD y, DWORD width, DWORD height)
526 FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u stub!\n",
527 iface, device, camera, x, y, width, height);
529 return E_NOTIMPL;
532 static HRESULT WINAPI d3drm_viewport2_Clear(IDirect3DRMViewport2 *iface, DWORD flags)
534 FIXME("iface %p, flags %#x.\n", iface, flags);
536 return D3DRM_OK;
539 static HRESULT WINAPI d3drm_viewport2_Render(IDirect3DRMViewport2 *iface, IDirect3DRMFrame3 *frame)
541 FIXME("iface %p, frame %p stub!\n", iface, frame);
543 return D3DRM_OK;
546 static HRESULT WINAPI d3drm_viewport2_SetFront(IDirect3DRMViewport2 *iface, D3DVALUE front)
548 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
550 TRACE("iface %p, front %.8e.\n", iface, front);
552 viewport->front = front;
554 return D3DRM_OK;
557 static HRESULT WINAPI d3drm_viewport2_SetBack(IDirect3DRMViewport2 *iface, D3DVALUE back)
559 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
561 TRACE("iface %p, back %.8e.\n", iface, back);
563 viewport->back = back;
565 return D3DRM_OK;
568 static HRESULT WINAPI d3drm_viewport2_SetField(IDirect3DRMViewport2 *iface, D3DVALUE field)
570 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
572 TRACE("iface %p, field %.8e.\n", iface, field);
574 viewport->field = field;
576 return D3DRM_OK;
579 static HRESULT WINAPI d3drm_viewport2_SetUniformScaling(IDirect3DRMViewport2 *iface, BOOL b)
581 FIXME("iface %p, b %#x stub!\n", iface, b);
583 return E_NOTIMPL;
586 static HRESULT WINAPI d3drm_viewport2_SetCamera(IDirect3DRMViewport2 *iface, IDirect3DRMFrame3 *camera)
588 FIXME("iface %p, camera %p stub!\n", iface, camera);
590 return E_NOTIMPL;
593 static HRESULT WINAPI d3drm_viewport2_SetProjection(IDirect3DRMViewport2 *iface, D3DRMPROJECTIONTYPE type)
595 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
597 TRACE("iface %p, type %#x.\n", iface, type);
599 viewport->projection = type;
601 return D3DRM_OK;
604 static HRESULT WINAPI d3drm_viewport2_Transform(IDirect3DRMViewport2 *iface, D3DRMVECTOR4D *d, D3DVECTOR *s)
606 FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
608 return E_NOTIMPL;
611 static HRESULT WINAPI d3drm_viewport2_InverseTransform(IDirect3DRMViewport2 *iface, D3DVECTOR *d, D3DRMVECTOR4D *s)
613 FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
615 return E_NOTIMPL;
618 static HRESULT WINAPI d3drm_viewport2_Configure(IDirect3DRMViewport2 *iface,
619 LONG x, LONG y, DWORD width, DWORD height)
621 FIXME("iface %p, x %d, y %d, width %u, height %u stub!\n", iface, x, y, width, height);
623 return E_NOTIMPL;
626 static HRESULT WINAPI d3drm_viewport2_ForceUpdate(IDirect3DRMViewport2* iface,
627 DWORD x1, DWORD y1, DWORD x2, DWORD y2)
629 FIXME("iface %p, x1 %u, y1 %u, x2 %u, y2 %u stub!\n", iface, x1, y1, x2, y2);
631 return E_NOTIMPL;
634 static HRESULT WINAPI d3drm_viewport2_SetPlane(IDirect3DRMViewport2 *iface,
635 D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top)
637 FIXME("iface %p, left %.8e, right %.8e, bottom %.8e, top %.8e stub!\n",
638 iface, left, right, bottom, top);
640 return E_NOTIMPL;
643 static HRESULT WINAPI d3drm_viewport2_GetCamera(IDirect3DRMViewport2 *iface, IDirect3DRMFrame3 **camera)
645 FIXME("iface %p, camera %p stub!\n", iface, camera);
647 return E_NOTIMPL;
650 static HRESULT WINAPI d3drm_viewport2_GetDevice(IDirect3DRMViewport2 *iface, IDirect3DRMDevice3 **device)
652 FIXME("iface %p, device %p stub!\n", iface, device);
654 return E_NOTIMPL;
657 static HRESULT WINAPI d3drm_viewport2_GetPlane(IDirect3DRMViewport2 *iface,
658 D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top)
660 FIXME("iface %p, left %p, right %p, bottom %p, top %p stub!\n",
661 iface, left, right, bottom, top);
663 return E_NOTIMPL;
666 static HRESULT WINAPI d3drm_viewport2_Pick(IDirect3DRMViewport2 *iface,
667 LONG x, LONG y, IDirect3DRMPickedArray **visuals)
669 FIXME("iface %p, x %d, y %d, visuals %p stub!\n", iface, x, y, visuals);
671 return E_NOTIMPL;
674 static BOOL WINAPI d3drm_viewport2_GetUniformScaling(IDirect3DRMViewport2 *iface)
676 FIXME("iface %p stub!\n", iface);
678 return E_NOTIMPL;
681 static LONG WINAPI d3drm_viewport2_GetX(IDirect3DRMViewport2 *iface)
683 FIXME("iface %p stub!\n", iface);
685 return E_NOTIMPL;
688 static LONG WINAPI d3drm_viewport2_GetY(IDirect3DRMViewport2 *iface)
690 FIXME("iface %p stub!\n", iface);
692 return E_NOTIMPL;
695 static DWORD WINAPI d3drm_viewport2_GetWidth(IDirect3DRMViewport2 *iface)
697 FIXME("iface %p stub!\n", iface);
699 return E_NOTIMPL;
702 static DWORD WINAPI d3drm_viewport2_GetHeight(IDirect3DRMViewport2 *iface)
704 FIXME("iface %p stub!\n", iface);
706 return E_NOTIMPL;
709 static D3DVALUE WINAPI d3drm_viewport2_GetField(IDirect3DRMViewport2 *iface)
711 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
713 TRACE("iface %p.\n", iface);
715 return viewport->field;
718 static D3DVALUE WINAPI d3drm_viewport2_GetBack(IDirect3DRMViewport2 *iface)
720 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
722 TRACE("iface %p.\n", iface);
724 return viewport->back;
727 static D3DVALUE WINAPI d3drm_viewport2_GetFront(IDirect3DRMViewport2 *iface)
729 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
731 TRACE("iface %p.\n", iface);
733 return viewport->front;
736 static D3DRMPROJECTIONTYPE WINAPI d3drm_viewport2_GetProjection(IDirect3DRMViewport2 *iface)
738 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
740 TRACE("iface %p.\n", iface);
742 return viewport->projection;
745 static HRESULT WINAPI d3drm_viewport2_GetDirect3DViewport(IDirect3DRMViewport2 *iface,
746 IDirect3DViewport **viewport)
748 FIXME("iface %p, viewport %p stub!\n", iface, viewport);
750 return E_NOTIMPL;
753 static HRESULT WINAPI d3drm_viewport2_TransformVectors(IDirect3DRMViewport2 *iface,
754 DWORD vector_count, D3DRMVECTOR4D *dst, D3DVECTOR *src)
756 FIXME("iface %p, vector_count %u, dst %p, src %p stub!\n", iface, vector_count, dst, src);
758 return E_NOTIMPL;
761 static HRESULT WINAPI d3drm_viewport2_InverseTransformVectors(IDirect3DRMViewport2 *iface,
762 DWORD vector_count, D3DVECTOR *dst, D3DRMVECTOR4D *src)
764 FIXME("iface %p, vector_count %u, dst %p, src %p stub!\n", iface, vector_count, dst, src);
766 return E_NOTIMPL;
769 static const struct IDirect3DRMViewport2Vtbl d3drm_viewport2_vtbl =
771 d3drm_viewport2_QueryInterface,
772 d3drm_viewport2_AddRef,
773 d3drm_viewport2_Release,
774 d3drm_viewport2_Clone,
775 d3drm_viewport2_AddDestroyCallback,
776 d3drm_viewport2_DeleteDestroyCallback,
777 d3drm_viewport2_SetAppData,
778 d3drm_viewport2_GetAppData,
779 d3drm_viewport2_SetName,
780 d3drm_viewport2_GetName,
781 d3drm_viewport2_GetClassName,
782 d3drm_viewport2_Init,
783 d3drm_viewport2_Clear,
784 d3drm_viewport2_Render,
785 d3drm_viewport2_SetFront,
786 d3drm_viewport2_SetBack,
787 d3drm_viewport2_SetField,
788 d3drm_viewport2_SetUniformScaling,
789 d3drm_viewport2_SetCamera,
790 d3drm_viewport2_SetProjection,
791 d3drm_viewport2_Transform,
792 d3drm_viewport2_InverseTransform,
793 d3drm_viewport2_Configure,
794 d3drm_viewport2_ForceUpdate,
795 d3drm_viewport2_SetPlane,
796 d3drm_viewport2_GetCamera,
797 d3drm_viewport2_GetDevice,
798 d3drm_viewport2_GetPlane,
799 d3drm_viewport2_Pick,
800 d3drm_viewport2_GetUniformScaling,
801 d3drm_viewport2_GetX,
802 d3drm_viewport2_GetY,
803 d3drm_viewport2_GetWidth,
804 d3drm_viewport2_GetHeight,
805 d3drm_viewport2_GetField,
806 d3drm_viewport2_GetBack,
807 d3drm_viewport2_GetFront,
808 d3drm_viewport2_GetProjection,
809 d3drm_viewport2_GetDirect3DViewport,
810 d3drm_viewport2_TransformVectors,
811 d3drm_viewport2_InverseTransformVectors,
814 HRESULT Direct3DRMViewport_create(REFIID riid, IUnknown **out)
816 struct d3drm_viewport *object;
818 TRACE("riid %s, out %p.\n", debugstr_guid(riid), out);
820 if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
821 return E_OUTOFMEMORY;
823 object->IDirect3DRMViewport_iface.lpVtbl = &d3drm_viewport1_vtbl;
824 object->IDirect3DRMViewport2_iface.lpVtbl = &d3drm_viewport2_vtbl;
825 object->ref = 1;
827 if (IsEqualGUID(riid, &IID_IDirect3DRMViewport2))
828 *out = (IUnknown *)&object->IDirect3DRMViewport2_iface;
829 else
830 *out = (IUnknown *)&object->IDirect3DRMViewport_iface;
832 return S_OK;